From bc7dabd318cc6d0084bbd9a8ed020100a5f6a628 Mon Sep 17 00:00:00 2001 From: gothrek22 Date: Tue, 28 Nov 2017 11:16:45 +0100 Subject: [PATCH 1/8] Added the new docker image as a new version, because the old one is deprecated. --- templates/jenkins-ci/4/docker-compose.yml | 20 +++++++++++ templates/jenkins-ci/4/rancher-compose.yml | 42 ++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 templates/jenkins-ci/4/docker-compose.yml create mode 100644 templates/jenkins-ci/4/rancher-compose.yml diff --git a/templates/jenkins-ci/4/docker-compose.yml b/templates/jenkins-ci/4/docker-compose.yml new file mode 100644 index 0000000..4de40bf --- /dev/null +++ b/templates/jenkins-ci/4/docker-compose.yml @@ -0,0 +1,20 @@ +jenkins-primary: + image: "jenkins/jenkins:2.92" + ports: + - "${PORT}:8080" + labels: + io.rancher.sidekicks: jenkins-plugins,jenkins-datavolume + io.rancher.container.hostname_override: container_name + volumes_from: + - jenkins-plugins + - jenkins-datavolume + entrypoint: /usr/share/jenkins/rancher/jenkins.sh +jenkins-plugins: + image: rancher/jenkins-plugins:v0.1.1 +jenkins-datavolume: + image: "busybox" + volumes: + - ${volume_work}:/var/jenkins_home + labels: + io.rancher.container.start_once: true + entrypoint: ["chown", "-R", "1000:1000", "/var/jenkins_home"] diff --git a/templates/jenkins-ci/4/rancher-compose.yml b/templates/jenkins-ci/4/rancher-compose.yml new file mode 100644 index 0000000..2fd65c6 --- /dev/null +++ b/templates/jenkins-ci/4/rancher-compose.yml @@ -0,0 +1,42 @@ +.catalog: + name: Jenkins + version: 2.92 + description: | + Jenkins CI management server. + questions: + - variable: "PORT" + type: "int" + label: "Port Number" + description: "Which port should Jenkins listen on?" + default: 8080 + required: true + - variable: "volume_work" + description: "Work volume to save jenkins data" + label: "Work volume:" + required: true + default: "/var/lib/docker/jenkins-ci" + type: "string" + - variable: "plugins" + type: "multiline" + label: "List of Plugins" + description: | + List of plugins in the format [:] + one entry per line. + default: | + credentials + git + git-client + github + github-api + github-oauth + greenballs + junit + plain-credentials + scm-api + ssh-credentials + ssh-slaves + swarm +jenkins-primary: + metadata: + plugins: | + ${plugins} From 9de88cb90fadabbe4b40358c7b4962bb7dbc2110 Mon Sep 17 00:00:00 2001 From: gothrek22 Date: Tue, 28 Nov 2017 11:20:24 +0100 Subject: [PATCH 2/8] Changed version, to use newest --- templates/jenkins-ci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/jenkins-ci/config.yml b/templates/jenkins-ci/config.yml index 42c8ad3..cca11b2 100644 --- a/templates/jenkins-ci/config.yml +++ b/templates/jenkins-ci/config.yml @@ -1,5 +1,5 @@ name: Jenkins description: | Jenkins CI server (LTS) -version: 2.60.1-rancher1 +version: 2.92 category: Continuous Integration From 567be4323194e4a3aaa3177a942414f2f13da66e Mon Sep 17 00:00:00 2001 From: gothrek22 Date: Tue, 28 Nov 2017 11:41:20 +0100 Subject: [PATCH 3/8] New version for gogs, plus mysql upgrade in that catalog --- templates/gogs/1/docker-compose.yml.tpl | 35 +++++++++ templates/gogs/1/rancher-compose.yml | 94 +++++++++++++++++++++++++ templates/gogs/config.yml | 2 +- 3 files changed, 130 insertions(+), 1 deletion(-) create mode 100644 templates/gogs/1/docker-compose.yml.tpl create mode 100644 templates/gogs/1/rancher-compose.yml diff --git a/templates/gogs/1/docker-compose.yml.tpl b/templates/gogs/1/docker-compose.yml.tpl new file mode 100644 index 0000000..b9ca12f --- /dev/null +++ b/templates/gogs/1/docker-compose.yml.tpl @@ -0,0 +1,35 @@ +version: '2' +services: + gogs: + image: gogs/gogs:0.11.34 + volumes: + - gogs-data:/data +{{- if ne .Values.db_link ""}} + external_links: + - ${db_link}:db +{{- else}} + links: + - db:db + db: + image: mysql:8.0 + environment: + MYSQL_ROOT_PASSWORD: ${mysql_password} + MYSQL_USER: ${mysql_user} + MYSQL_PASSWORD: ${mysql_password} + MYSQL_DATABASE: ${mysql_db} + volumes: + - gogs-db:/var/lib/mysql +{{- end}} + lb: + image: rancher/lb-service-haproxy:v0.7.17 + ports: + - ${http_port}:${http_port}/tcp + - ${ssh_port}:${ssh_port}/tcp +volumes: + gogs-data: + driver: ${volume_driver} +{{- if eq .Values.db_link ""}} + gogs-db: + driver: ${volume_driver} +{{- end}} + diff --git a/templates/gogs/1/rancher-compose.yml b/templates/gogs/1/rancher-compose.yml new file mode 100644 index 0000000..982db81 --- /dev/null +++ b/templates/gogs/1/rancher-compose.yml @@ -0,0 +1,94 @@ +version: '2' +catalog: + name: "Gogs" + version: "v0.11.34" + description: "A painless self-hosted Git service" + uuid: gogs-0 + minimum_rancher_version: v0.51.0 + questions: + - variable: http_port + description: "http port to access gogs webui" + label: "Http Port" + required: true + default: "8080" + type: "int" + - variable: ssh_port + description: "ssh port to access gogs cli" + label: "SSH Port" + required: true + default: "2222" + type: "int" + - variable: "volume_driver" + description: "Volume driver to associate with this service" + label: "Volume Driver" + required: true + default: "local" + type: enum + options: # List of options if using type of `enum` + - local + - rancher-nfs + - rancher-efs + - rancher-ebs + - variable: "db_link" + description: | + DB external service link cluster. + label: "External db service" + default: "" + required: false + type: "service" + - variable: mysql_db + description: "mysql db" + label: "Mysql db" + required: true + default: "gogs" + type: "string" + - variable: mysql_user + description: "mysql user" + label: "Mysql User" + required: true + default: "gogs" + type: "string" + - variable: mysql_password + description: "mysql root password" + label: "Mysql Password" + required: true + default: "default_pass" + type: "password" +services: + gogs: + scale: 1 + retain_ip: true + health_check: + response_timeout: 2000 + healthy_threshold: 2 + port: 3000 + unhealthy_threshold: 3 + initializing_timeout: 300000 + interval: 2000 + strategy: recreate + request_line: GET "/" "HTTP/1.0" + reinitializing_timeout: 120000 + lb: + scale: 1 + start_on_create: true + lb_config: + certs: [] + port_rules: + - priority: 1 + protocol: http + service: gogs + source_port: ${http_port} + target_port: 3000 + - priority: 2 + protocol: tcp + service: gogs + source_port: ${ssh_port} + target_port: 22 + health_check: + response_timeout: 2000 + healthy_threshold: 2 + port: 42 + unhealthy_threshold: 3 + initializing_timeout: 60000 + interval: 2000 + reinitializing_timeout: 60000 diff --git a/templates/gogs/config.yml b/templates/gogs/config.yml index c675211..92331bf 100644 --- a/templates/gogs/config.yml +++ b/templates/gogs/config.yml @@ -1,5 +1,5 @@ name: Gogs description: | A painless self-hosted Git service -version: v0.11.19 +version: v0.11.34 category: Git From 067a0750cdea5742ce8ec7cd63e1db39fcc757de Mon Sep 17 00:00:00 2001 From: gothrek22 Date: Tue, 28 Nov 2017 11:48:53 +0100 Subject: [PATCH 4/8] Fix haproxy version --- templates/gogs/1/docker-compose.yml.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/gogs/1/docker-compose.yml.tpl b/templates/gogs/1/docker-compose.yml.tpl index b9ca12f..20fe4e5 100644 --- a/templates/gogs/1/docker-compose.yml.tpl +++ b/templates/gogs/1/docker-compose.yml.tpl @@ -21,7 +21,7 @@ services: - gogs-db:/var/lib/mysql {{- end}} lb: - image: rancher/lb-service-haproxy:v0.7.17 + image: rancher/lb-service-haproxy:v0.7.9 ports: - ${http_port}:${http_port}/tcp - ${ssh_port}:${ssh_port}/tcp From e8f0f3c3b1b41d3ca935581fb069b05dfa796a31 Mon Sep 17 00:00:00 2001 From: gothrek22 Date: Tue, 28 Nov 2017 11:52:07 +0100 Subject: [PATCH 5/8] Fix haproxy version --- templates/gogs/1/docker-compose.yml.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/gogs/1/docker-compose.yml.tpl b/templates/gogs/1/docker-compose.yml.tpl index 20fe4e5..355d153 100644 --- a/templates/gogs/1/docker-compose.yml.tpl +++ b/templates/gogs/1/docker-compose.yml.tpl @@ -21,7 +21,7 @@ services: - gogs-db:/var/lib/mysql {{- end}} lb: - image: rancher/lb-service-haproxy:v0.7.9 + image: rancher/lb-service-haproxy:v0.6.4 ports: - ${http_port}:${http_port}/tcp - ${ssh_port}:${ssh_port}/tcp From cd12b074dc0b6274748f8ea6323b31cf4401bcaa Mon Sep 17 00:00:00 2001 From: gothrek22 Date: Tue, 28 Nov 2017 11:57:09 +0100 Subject: [PATCH 6/8] Fix haproxy version --- templates/gogs/1/docker-compose.yml.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/gogs/1/docker-compose.yml.tpl b/templates/gogs/1/docker-compose.yml.tpl index 355d153..20fe4e5 100644 --- a/templates/gogs/1/docker-compose.yml.tpl +++ b/templates/gogs/1/docker-compose.yml.tpl @@ -21,7 +21,7 @@ services: - gogs-db:/var/lib/mysql {{- end}} lb: - image: rancher/lb-service-haproxy:v0.6.4 + image: rancher/lb-service-haproxy:v0.7.9 ports: - ${http_port}:${http_port}/tcp - ${ssh_port}:${ssh_port}/tcp From 5667c0b1f43c5e8fc416d6cf3831e0abc4cfad06 Mon Sep 17 00:00:00 2001 From: gothrek22 Date: Tue, 28 Nov 2017 12:16:58 +0100 Subject: [PATCH 7/8] Update config.yml --- templates/jenkins-ci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/jenkins-ci/config.yml b/templates/jenkins-ci/config.yml index cca11b2..d797b5a 100644 --- a/templates/jenkins-ci/config.yml +++ b/templates/jenkins-ci/config.yml @@ -1,5 +1,5 @@ name: Jenkins description: | Jenkins CI server (LTS) -version: 2.92 +version: 2.92-rancher1 category: Continuous Integration From 8030fa2e363916451b91f1325c01a4eb9c0fdc84 Mon Sep 17 00:00:00 2001 From: gothrek22 Date: Tue, 28 Nov 2017 12:17:16 +0100 Subject: [PATCH 8/8] Update rancher-compose.yml --- templates/jenkins-ci/4/rancher-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/jenkins-ci/4/rancher-compose.yml b/templates/jenkins-ci/4/rancher-compose.yml index 2fd65c6..30b7d34 100644 --- a/templates/jenkins-ci/4/rancher-compose.yml +++ b/templates/jenkins-ci/4/rancher-compose.yml @@ -1,6 +1,6 @@ .catalog: name: Jenkins - version: 2.92 + version: 2.92-rancher1 description: | Jenkins CI management server. questions: