From 20ca59da73a2808d411d6665d71178fa91a41da3 Mon Sep 17 00:00:00 2001 From: disaster37 Date: Fri, 31 Mar 2017 14:20:52 +0000 Subject: [PATCH 01/16] Piece of code to add gocd stack --- templates/gocd/0/README.md | 30 ++++++++++ templates/gocd/0/docker-compose.yml | 82 ++++++++++++++++++++++++++++ templates/gocd/catalogIcon-gocd.png | Bin 0 -> 3136 bytes templates/gocd/config.yml | 9 +++ 4 files changed, 121 insertions(+) create mode 100644 templates/gocd/0/README.md create mode 100644 templates/gocd/0/docker-compose.yml create mode 100644 templates/gocd/catalogIcon-gocd.png create mode 100644 templates/gocd/config.yml diff --git a/templates/gocd/0/README.md b/templates/gocd/0/README.md new file mode 100644 index 0000000..76e11d8 --- /dev/null +++ b/templates/gocd/0/README.md @@ -0,0 +1,30 @@ +# GoCD.io + +### Info: + +This template creates one GoCD server and scale out the number of GoCD agent you need. + +The GoCD agent embedded Docker support, so the idea is to not create GoCD agent per language but use docker container to build and test your stuff. + + +### Usage: + +Select GoCD from catalog. + +Enter the number of GoCD agent you need. +Enter extra GoCD plugins to download and install. +Choose the key to autoregister GoCD agent. + +Click deploy. + +GoCD server can now be accessed over the Rancher network on port `8153` (http://IP_CONTAINER:8153). To access from external Rancher network, you need to set load balancer or expose the port 8153. + + + +### Source, bugs and enhances + + If you found bugs or need enhance, you can open ticket on github: + - [GoCD official core project](https://github.com/gocd/gocd) + - [GoCD Server docker image](https://github.com/disaster37/alpine-gocd-server) + - [GoCD Agent docker image](https://github.com/disaster37/alpine-gocd-agent) + - [Rancher Cattle metadata docker image](https://github.com/disaster37/rancher-cattle-metadata) \ No newline at end of file diff --git a/templates/gocd/0/docker-compose.yml b/templates/gocd/0/docker-compose.yml new file mode 100644 index 0000000..121edad --- /dev/null +++ b/templates/gocd/0/docker-compose.yml @@ -0,0 +1,82 @@ +version: '2' +services: + gocd-server: + tty: true + image: webcenter/alpine-gocd-server:17.3.0 + volumes: + - gocd-server-data:/data + environment: + - GOCD_CONFIG_memory="1024m" + - GOCD_CONFIG_agent-key="my_secure_key" + - GOCD_CONFIG_plugin_script-executor="https://github.com/gocd-contrib/script-executor-task/releases/download/0.3/script-executor-0.3.0.jar" + - GOCD_CONFIG_plugin_docker-task="https://github.com/manojlds/gocd-docker/releases/download/0.1.27/docker-task-assembly-0.1.27.jar" + - GOCD_CONFIG_plugin_slack="https://github.com/Vincit/gocd-slack-task/releases/download/v1.3.1/gocd-slack-task-1.3.1.jar" + - GOCD_CONFIG_plugin_docker-pipline="https://github.com/Haufe-Lexware/gocd-plugins/releases/download/v1.0.0-beta/gocd-docker-pipeline-plugin-1.0.0.jar" + - GOCD_CONFIG_plugin_github-pr="https://github.com/insano10/gocd-pr-comment-scalastyle/releases/download/1.2/github-pr-comment-scalastyle-1.2.jar" + - GOCD_CONFIG_plugin_email-notifier="https://github.com/gocd-contrib/email-notifier/releases/download/v0.1/email-notifier-0.1.jar" + - GOCD_CONFIG_plugin_slack-notifier="https://github.com/ashwanthkumar/gocd-slack-build-notifier/releases/download/v1.4.0-RC11/gocd-slack-notifier-1.4.0-RC11.jar" + - GOCD_CONFIG_plugin_github-notifier="https://github.com/gocd-contrib/gocd-build-status-notifier/releases/download/1.3/github-pr-status-1.3.jar" + - GOCD_CONFIG_plugin_github-scm="https://github.com/ashwanthkumar/gocd-build-github-pull-requests/releases/download/v1.3.3/github-pr-poller-1.3.3.jar" + {{- if (ne .Values.DEPLOY_LB "true") and .Values.PUBLISH_PORT}} + ports: + - ${PUBLISH_PORT}:8153 + {{- end}} + labels: + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.hostname_override: container_name + gocd-agent: + tty: true + image: webcenter/alpine-gocd-agent:17.3.0 + volumes: + - gocd-agent-data:/data + - gocd-scheduler-setting:/opt/scheduler + environment: + - GOCD_CONFIG_memory="1024m" + - GOCD_CONFIG_agent_key="my_secure_key" + - GOCD_CONFIG_agent_resource_docker= "docker" + labels: + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.hostname_override: container_name + io.rancher.sidekicks: rancher-cattle-metadata + rancher-cattle-metadata: + network_mode: none + labels: + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.hostname_override: container_name + io.rancher.container.start_once: "true" + image: webcenter/rancher-cattle-metadata:1.0.1 + volumes: + - gocd-scheduler-setting:/opt/scheduler + {{- if eq .Values.DEPLOY_LB "true"}} + lb: + image: rancher/lb-service-haproxy:v0.6.2 + {{- if .Values.PUBLISH_PORT}} + ports: + - ${PUBLISH_PORT}:8153/tcp + {{- else}} + expose: + - 8153:8153/tcp + {{- end}} + links: + - gocd-server:gocd-server + labels: + io.rancher.container.agent.role: environmentAdmin + io.rancher.container.create_agent: 'true' + {{- end}} + +volumes: + minio-scheduler-setting: + driver: local + per_container: true + gocd-agent-data: + driver: local + per_container: true + gocd-server-data: + driver: local + {{- if not (contains .Values.VOLUME_DRIVER "/")}} + {{- range $idx, $e := atoi .Values.MINIO_DISKS | until }} + minio-data-{{$idx}}: + per_container: true + driver: ${VOLUME_DRIVER} + {{- end}} + {{- end}} \ No newline at end of file diff --git a/templates/gocd/catalogIcon-gocd.png b/templates/gocd/catalogIcon-gocd.png new file mode 100644 index 0000000000000000000000000000000000000000..8983baacf5b1b2c3eef6497c6a6efc5be8c41315 GIT binary patch literal 3136 zcmV-G48QY?OrUjONml9EAe+5^N|UBR|Wm{(Ylo8~%rpW)iQ|79Y=3 z7?6vpQ@(m=+uu+W%c`Tgh;@b9O6}Ghg z>zCAxiGo@hj!{wF)nbbs&q{Uuy(~VJ>E({ysTaH0LSUpPX{@*?ObpORhsF>#{)R7& z6=z*F+!-70<_MfaD2s)otGSE1-Nnz}h7U2qpq6H(?jj98l2B~VA3lG~P6~MroH`a= zs11NomD1=9E3AMb=xh)x4(HNXIJ#E{&U2UXa|Cg{m*vFShlv6NbjIUTG~WNxQ|E=L z`WOkXR0ZKAl*ZpMi&T6wHY*k9o-FEL&wOsLu`Na;y+}hbDr4eOiS0+IIPpaq^{<{a zR%(#~fSl?g%WiD+Ml9|b-@JcWR_e|SQ}|U%#1^B1{gX5tuXW6qnz{+^$*~cmH1&<< zsk%*`Cwuey5rAA@8Y|8^-+d}U0GYy#)+uQP{=a0|RR_?BQ5wCW6EO-)Q2|bRmPU+b zqc@&n_#HSJ~ni&0Lf#h?$oRrV2s-U`$uVFaVNi5Z*;6!prq17jd$v)>MUmL-jRTm{w+Oq zUg%kk2Shj&c#tOdukY)407Kx!r8NGAo(=N;0Xj&NrrN1mEErI|lMLj!z!4QycS5xr zP^OY`E00^*Muvk7pZ^1~JeB|Z?7+QJZN+{Ng*ZP-vsBNA0S69o8^dMhYg*R%R9r4$ zcC=K!&0=MhBbvh@>K`tViqoUaPh4ymj)CK}PYaPKiv2L$^Bn`TEVHS`G2#WD$Av8YK zy5~CIySwCJly#KEu0c^~~xi~&g2inAdor{jE7b&y!?=jTtjBV_T*@8IV zYwC@yFMbH@FTsEy4nT1|&uwbPxY~eY&bn5%u)opl#zy_mAx0v@ZjG!AVc4jk+8L6H zQ?xk@)puj-lPWk2Q&rw66}{I;VDsCF{OC{64_c)+oO7d7&2|sx_|t2~2Sa*E#c+l@ z?{drib5-KJ#>3MqM$kKh5e!KQ2k!oM9h)B|lZT8M-*g1S#)>QB|99bEY*-NwTu*JJ z(#LrSb`-;gV|GBj`|$hEU@~>QxPQoz42j-|#o|ISr8*Ef@NS8!1EUoCCr5B8;c@pYH$c$0!pqvUL)0fTi2hh@RTvM*hyo02h<;2d&lD^aeSUH(cM1& z!Mu+Y^jrQy481bwEsciMUjrDN)HzGsx{kg32`|9VIwcA{`P(N{()D%bV$+^)PP#yG z@55tv@1Bn2%&qXtNQ${@qWcbpW@fxH^uEk&)^@z-Gpb_t`b5-|0Oq#Z_Wp;G=S!(M z!7pk|`?CsM`%oQHL`yOhhncLHcQ6br4u<>i=E-vzpKaiJwi22*jLpob#}v0J@i>~j z!CS9Boc`(+8yyI!+p^q$SLlltEB)-in(NjHWC! zhUW1wr0tMmYl}1idulVPTBFF&RO=y19yme0%pG81%llZnws1@3M#(1^Yne;Vf_AAs zOn`Qf|5!)7z?j+x!-%(r``znANw{45R>n-<8HTCRpAMuJ{3GYEz!CaHKf$&P)nk6o zCkZM-yIQsZA2&nwHh=16W_3sC6QiZq znCEz0g!|Xh3h#nmf`x}c<7uu&-n_BYAv38H%4fD08k}C@8edY ztp5tu8%T)?fQb~H)>|^P`89vT(8eo>_VQqu)z*kGs3RF9IPffOjF?oK=MDzR5C-x* z1TcglP~wv`534e}M%>ZPS(EDe^{a>$gk@;NCuyEky+Mp2KtP-Ge#;yHy|wypuodXU z;p(llPduj2cYR=i!n@JnX9y4um#i8Y3hsRfu)k2p|B>J{MWOAMi`8w7!-FBYe$`#> z1kh?yy23~vwfdcRUdW%gGxZkz1vKV;0!ZG!l}pLLp{5EXZuwlc74I4IW*sx*4 aAI3i~znXMD-j{v=0000" +minimum_rancher_version: v1.5.0 +license: Apache License +projectURL: https://www.gocd.io/ From 6fd9b319c46d2dfed4d843e812f795f85ac3cbfc Mon Sep 17 00:00:00 2001 From: disaster37 Date: Fri, 31 Mar 2017 18:59:36 +0000 Subject: [PATCH 02/16] try gocd templte --- templates/gocd/0/README.md | 5 + templates/gocd/0/docker-compose.yml | 88 +++++++++++------ templates/gocd/0/rancher-compose.yml | 137 +++++++++++++++++++++++++++ templates/gocd/config.yml | 2 +- 4 files changed, 201 insertions(+), 31 deletions(-) create mode 100644 templates/gocd/0/rancher-compose.yml diff --git a/templates/gocd/0/README.md b/templates/gocd/0/README.md index 76e11d8..5aba6ad 100644 --- a/templates/gocd/0/README.md +++ b/templates/gocd/0/README.md @@ -5,6 +5,11 @@ This template creates one GoCD server and scale out the number of GoCD agent you need. The GoCD agent embedded Docker support, so the idea is to not create GoCD agent per language but use docker container to build and test your stuff. +You can use on GoCD agent: +- docker cli +- docker-compose cli +- rancher-compose cli +- make ### Usage: diff --git a/templates/gocd/0/docker-compose.yml b/templates/gocd/0/docker-compose.yml index 121edad..a366a6a 100644 --- a/templates/gocd/0/docker-compose.yml +++ b/templates/gocd/0/docker-compose.yml @@ -1,13 +1,19 @@ version: '2' services: + {{- if eq .Values.DEPLOY_SERVER "true"}} gocd-server: tty: true - image: webcenter/alpine-gocd-server:17.3.0 + image: webcenter/alpine-gocd-server:develop volumes: + {{- if (contains .Values.VOLUME_DRIVER_SERVER "/")}} - gocd-server-data:/data + {{- else}} + - ${VOLUME_DRIVER_SERVER}:/data + {{- end}} environment: - - GOCD_CONFIG_memory="1024m" - - GOCD_CONFIG_agent-key="my_secure_key" + - GOCD_CONFIG_memory="${GOCD_SERVER_MEMORY}" + - GOCD_CONFIG_agent-key="${GOCD_AGENT_KEY}" + {{- if eq .Values.GOCD_AGENT_PACKAGE "true"}} - GOCD_CONFIG_plugin_script-executor="https://github.com/gocd-contrib/script-executor-task/releases/download/0.3/script-executor-0.3.0.jar" - GOCD_CONFIG_plugin_docker-task="https://github.com/manojlds/gocd-docker/releases/download/0.1.27/docker-task-assembly-0.1.27.jar" - GOCD_CONFIG_plugin_slack="https://github.com/Vincit/gocd-slack-task/releases/download/v1.3.1/gocd-slack-task-1.3.1.jar" @@ -17,6 +23,7 @@ services: - GOCD_CONFIG_plugin_slack-notifier="https://github.com/ashwanthkumar/gocd-slack-build-notifier/releases/download/v1.4.0-RC11/gocd-slack-notifier-1.4.0-RC11.jar" - GOCD_CONFIG_plugin_github-notifier="https://github.com/gocd-contrib/gocd-build-status-notifier/releases/download/1.3/github-pr-status-1.3.jar" - GOCD_CONFIG_plugin_github-scm="https://github.com/ashwanthkumar/gocd-build-github-pull-requests/releases/download/v1.3.3/github-pr-poller-1.3.3.jar" + {{- end}} {{- if (ne .Values.DEPLOY_LB "true") and .Values.PUBLISH_PORT}} ports: - ${PUBLISH_PORT}:8153 @@ -24,20 +31,45 @@ services: labels: io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} io.rancher.container.hostname_override: container_name + {{- if eq .Values.DEPLOY_LB "true"}} + lb: + image: rancher/lb-service-haproxy:v0.6.2 + {{- if .Values.PUBLISH_PORT}} + ports: + - ${PUBLISH_PORT}:8153/tcp + {{- else}} + expose: + - 8153:8153/tcp + {{- end}} + links: + - gocd-server:gocd-server + labels: + io.rancher.container.agent.role: environmentAdmin + io.rancher.container.create_agent: 'true' + {{- end}} + {{- end}} + {{- if eq .Values.DEPLOY_AGENT "true"}} gocd-agent: tty: true - image: webcenter/alpine-gocd-agent:17.3.0 + image: webcenter/alpine-gocd-agent:develop volumes: + {{- if (contains .Values.VOLUME_DRIVER_AGENT "/")}} + - ${VOLUME_DRIVER_AGENT}:/data + {{- else}} - gocd-agent-data:/data + {{- end}} - gocd-scheduler-setting:/opt/scheduler environment: - - GOCD_CONFIG_memory="1024m" - - GOCD_CONFIG_agent_key="my_secure_key" - - GOCD_CONFIG_agent_resource_docker= "docker" + - GOCD_CONFIG_memory="${GOCD_AGENT_MEMORY}" + - GOCD_CONFIG_agent_key="${GOCD_AGENT_KEY}" + - GOCD_CONFIG_agent_resource_docker= "${GOCD_AGENT_RESOURCE}" + - DOCKER_HOST: tcp://docker-engine:2375 labels: io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} io.rancher.container.hostname_override: container_name - io.rancher.sidekicks: rancher-cattle-metadata + io.rancher.container.agent.role: environment + io.rancher.container.create_agent: 'true' + io.rancher.sidekicks: rancher-cattle-metadata,docker-engine rancher-cattle-metadata: network_mode: none labels: @@ -47,36 +79,32 @@ services: image: webcenter/rancher-cattle-metadata:1.0.1 volumes: - gocd-scheduler-setting:/opt/scheduler - {{- if eq .Values.DEPLOY_LB "true"}} - lb: - image: rancher/lb-service-haproxy:v0.6.2 - {{- if .Values.PUBLISH_PORT}} - ports: - - ${PUBLISH_PORT}:8153/tcp - {{- else}} - expose: - - 8153:8153/tcp - {{- end}} - links: - - gocd-server:gocd-server + docker-engine: + network_mode: none + privileged: true labels: - io.rancher.container.agent.role: environmentAdmin - io.rancher.container.create_agent: 'true' + io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.hostname_override: container_name + image: index.docker.io/docker:1.13-dind + volumes: + {{- if (contains .Values.VOLUME_DRIVER_AGENT "/")}} + - ${VOLUME_DRIVER_AGENT}:/data + {{- else}} + - gocd-agent-data:/data + {{- end}} {{- end}} + volumes: minio-scheduler-setting: driver: local per_container: true + {{- if not (contains .Values.VOLUME_DRIVER_AGENT "/")}} gocd-agent-data: - driver: local + driver: ${VOLUME_DRIVER_AGENT} per_container: true + {{- end}} + {{- if not (contains .Values.VOLUME_DRIVER_SERVER "/")}} gocd-server-data: - driver: local - {{- if not (contains .Values.VOLUME_DRIVER "/")}} - {{- range $idx, $e := atoi .Values.MINIO_DISKS | until }} - minio-data-{{$idx}}: - per_container: true - driver: ${VOLUME_DRIVER} - {{- end}} + driver: ${VOLUME_DRIVER_SERVER} {{- end}} \ No newline at end of file diff --git a/templates/gocd/0/rancher-compose.yml b/templates/gocd/0/rancher-compose.yml new file mode 100644 index 0000000..31da10d --- /dev/null +++ b/templates/gocd/0/rancher-compose.yml @@ -0,0 +1,137 @@ +version: '2' +catalog: + name: GoCD + version: 17.3.0-rancher1 + questions: + - variable: "DEPLOY_SERVER" + description: "Deploy GoCD server" + label: "Deploy GoCD server" + required: true + type: enum + default: "true" + options: + - "true" + - "false" + - variable: "DEPLOY_AGENT" + description: "Deploy GoCD agent" + label: "Deploy GoCD agent" + required: true + type: enum + default: "true" + options: + - "true" + - "false" + - variable: "GOCD_AGENT_SCALE" + description: "Number of GoCD agent" + label: "GoCD Agents" + required: true + default: 1 + type: "string" + - variable: "GOCD_AGENT_KEY" + description: "Key to use for auto registration agent" + label: "Agent key" + required: true + type: "password" + - variable: "GOCD_SERVER_MEMORY" + description: "Max memory allowed to GoCD server" + label: "Max memory for server" + type: "string" + required: true + default: "1024m" + - variable: "GOCD_AGENT_MEMORY" + description: "Max memory allowed to GoCD agent" + label: "Max memory for agent" + type: "string" + required: true + default: "2048m" + - variable: "GOCD_AGENT_RESOURCE" + description: "Resource name associated for agent" + label: "Resource name" + type: "string" + required: true + default: "docker" + - variable: "GOCD_AGENT_PACKAGE" + description: "Install GoCD extra plugins" + label: "Install extra plugins" + required: true + type: enum + default: "true" + options: + - "true" + - "false" + - variable: "VOLUME_DRIVER_SERVER" + description: "Docker driver to store volume or base path for GoCD server" + label: "Volume drver / Path for server" + type: "string" + required: true + default: "local" + - variable: "VOLUME_DRIVER_AGENT" + description: "Docker driver to store volume or base path for GoCD agent" + label: "Volume drver / Path for agent" + type: "string" + required: true + default: "local" + - variable: "DEPLOY_LB" + description: "Deploy Loadbalancer" + label: "Deploy Loadbalancer" + required: true + type: enum + default: "true" + options: + - "true" + - "false" + - variable: "PUBLISH_PORT" + description: "Set port if you want publish external port for GoCD server or Loadbalancer" + label: "Publish port" + required: false + type: "string" + default: "8153" + - variable: "CONFD_BACKEND" + description: "The confd backend to grab config" + label: "Confd backend" + required: true + default: "env" + type: "string" + - variable: "CONFD_NODES" + description: "The confd nodes" + label: "Confd nodes" + required: false + type: "string" + - variable: "CONFD_PREFIX" + description: "The confd prefix" + label: "Confd prefix" + required: true + default: "/gocd" + type: "string" + +services: + gocd-agent: + scale: ${GOCD_AGENT_SCALE} + retain_ip: true + gocd-server: + scale: 1 + retain_ip: false + health_check: + port: 8153 + interval: 5000 + unhealthy_threshold: 3 + request_line: '' + healthy_threshold: 2 + response_timeout: 5000 + lb: + scale: 1 + start_on_create: true + lb_config: + certs: [] + port_rules: + - priority: 1 + protocol: http + service: gocd-server + source_port: 8153 + target_port: 8153 + health_check: + response_timeout: 2000 + healthy_threshold: 2 + port: 42 + unhealthy_threshold: 3 + interval: 2000 \ No newline at end of file diff --git a/templates/gocd/config.yml b/templates/gocd/config.yml index 709bd33..f295f44 100644 --- a/templates/gocd/config.yml +++ b/templates/gocd/config.yml @@ -1,4 +1,4 @@ -name: gocd-server +name: GoCD description: | GoCD Stack (server and agents) version: 17.3.0-rancher1 From c3fb2a1e011bfdc48d2860d89a7dd2b0f06f4e1f Mon Sep 17 00:00:00 2001 From: disaster37 Date: Sat, 1 Apr 2017 06:38:32 +0000 Subject: [PATCH 03/16] Fix error or docker-compose --- templates/gocd/0/docker-compose.yml | 4 ++-- templates/gocd/0/rancher-compose.yml | 1 + templates/gocd/config.yml | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/gocd/0/docker-compose.yml b/templates/gocd/0/docker-compose.yml index a366a6a..436353a 100644 --- a/templates/gocd/0/docker-compose.yml +++ b/templates/gocd/0/docker-compose.yml @@ -62,8 +62,8 @@ services: environment: - GOCD_CONFIG_memory="${GOCD_AGENT_MEMORY}" - GOCD_CONFIG_agent_key="${GOCD_AGENT_KEY}" - - GOCD_CONFIG_agent_resource_docker= "${GOCD_AGENT_RESOURCE}" - - DOCKER_HOST: tcp://docker-engine:2375 + - GOCD_CONFIG_agent_resource_docker="${GOCD_AGENT_RESOURCE}" + - DOCKER_HOST="tcp://docker-engine:2375" labels: io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} io.rancher.container.hostname_override: container_name diff --git a/templates/gocd/0/rancher-compose.yml b/templates/gocd/0/rancher-compose.yml index 31da10d..bb75a2a 100644 --- a/templates/gocd/0/rancher-compose.yml +++ b/templates/gocd/0/rancher-compose.yml @@ -2,6 +2,7 @@ version: '2' catalog: name: GoCD version: 17.3.0-rancher1 + minimum_rancher_version: v1.5.0 questions: - variable: "DEPLOY_SERVER" description: "Deploy GoCD server" diff --git a/templates/gocd/config.yml b/templates/gocd/config.yml index f295f44..8c59e5e 100644 --- a/templates/gocd/config.yml +++ b/templates/gocd/config.yml @@ -4,6 +4,5 @@ description: | version: 17.3.0-rancher1 category: Continuous Integration maintainer: "Sebastien Langoureaux " -minimum_rancher_version: v1.5.0 license: Apache License projectURL: https://www.gocd.io/ From f7bf5f3da8e16e4db6b5a4e45236f270eb7ca67a Mon Sep 17 00:00:00 2001 From: disaster37 Date: Sat, 1 Apr 2017 06:40:35 +0000 Subject: [PATCH 04/16] Add links beteween server and agent --- templates/gocd/0/docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/gocd/0/docker-compose.yml b/templates/gocd/0/docker-compose.yml index 436353a..f535ebc 100644 --- a/templates/gocd/0/docker-compose.yml +++ b/templates/gocd/0/docker-compose.yml @@ -64,6 +64,8 @@ services: - GOCD_CONFIG_agent_key="${GOCD_AGENT_KEY}" - GOCD_CONFIG_agent_resource_docker="${GOCD_AGENT_RESOURCE}" - DOCKER_HOST="tcp://docker-engine:2375" + links: + - gocd-server:gocd-server labels: io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} io.rancher.container.hostname_override: container_name From df11e6f49e30196e9a84ba8638adfd1f29143704 Mon Sep 17 00:00:00 2001 From: disaster37 Date: Sat, 1 Apr 2017 07:04:59 +0000 Subject: [PATCH 05/16] remove double quote on environment --- templates/gocd/0/docker-compose.yml | 39 ++++++++++++++--------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/templates/gocd/0/docker-compose.yml b/templates/gocd/0/docker-compose.yml index f535ebc..368a7a2 100644 --- a/templates/gocd/0/docker-compose.yml +++ b/templates/gocd/0/docker-compose.yml @@ -6,23 +6,23 @@ services: image: webcenter/alpine-gocd-server:develop volumes: {{- if (contains .Values.VOLUME_DRIVER_SERVER "/")}} - - gocd-server-data:/data - {{- else}} - ${VOLUME_DRIVER_SERVER}:/data + {{- else}} + - gocd-server-data:/data {{- end}} environment: - - GOCD_CONFIG_memory="${GOCD_SERVER_MEMORY}" - - GOCD_CONFIG_agent-key="${GOCD_AGENT_KEY}" + - GOCD_CONFIG_memory=${GOCD_SERVER_MEMORY} + - GOCD_CONFIG_agent-key=${GOCD_AGENT_KEY} {{- if eq .Values.GOCD_AGENT_PACKAGE "true"}} - - GOCD_CONFIG_plugin_script-executor="https://github.com/gocd-contrib/script-executor-task/releases/download/0.3/script-executor-0.3.0.jar" - - GOCD_CONFIG_plugin_docker-task="https://github.com/manojlds/gocd-docker/releases/download/0.1.27/docker-task-assembly-0.1.27.jar" - - GOCD_CONFIG_plugin_slack="https://github.com/Vincit/gocd-slack-task/releases/download/v1.3.1/gocd-slack-task-1.3.1.jar" - - GOCD_CONFIG_plugin_docker-pipline="https://github.com/Haufe-Lexware/gocd-plugins/releases/download/v1.0.0-beta/gocd-docker-pipeline-plugin-1.0.0.jar" - - GOCD_CONFIG_plugin_github-pr="https://github.com/insano10/gocd-pr-comment-scalastyle/releases/download/1.2/github-pr-comment-scalastyle-1.2.jar" - - GOCD_CONFIG_plugin_email-notifier="https://github.com/gocd-contrib/email-notifier/releases/download/v0.1/email-notifier-0.1.jar" - - GOCD_CONFIG_plugin_slack-notifier="https://github.com/ashwanthkumar/gocd-slack-build-notifier/releases/download/v1.4.0-RC11/gocd-slack-notifier-1.4.0-RC11.jar" - - GOCD_CONFIG_plugin_github-notifier="https://github.com/gocd-contrib/gocd-build-status-notifier/releases/download/1.3/github-pr-status-1.3.jar" - - GOCD_CONFIG_plugin_github-scm="https://github.com/ashwanthkumar/gocd-build-github-pull-requests/releases/download/v1.3.3/github-pr-poller-1.3.3.jar" + - GOCD_CONFIG_plugin_script-executor=https://github.com/gocd-contrib/script-executor-task/releases/download/0.3/script-executor-0.3.0.jar + - GOCD_CONFIG_plugin_docker-task=https://github.com/manojlds/gocd-docker/releases/download/0.1.27/docker-task-assembly-0.1.27.jar + - GOCD_CONFIG_plugin_slack=https://github.com/Vincit/gocd-slack-task/releases/download/v1.3.1/gocd-slack-task-1.3.1.jar + - GOCD_CONFIG_plugin_docker-pipline=https://github.com/Haufe-Lexware/gocd-plugins/releases/download/v1.0.0-beta/gocd-docker-pipeline-plugin-1.0.0.jar + - GOCD_CONFIG_plugin_github-pr=https://github.com/insano10/gocd-pr-comment-scalastyle/releases/download/1.2/github-pr-comment-scalastyle-1.2.jar + - GOCD_CONFIG_plugin_email-notifier=https://github.com/gocd-contrib/email-notifier/releases/download/v0.1/email-notifier-0.1.jar + - GOCD_CONFIG_plugin_slack-notifier=https://github.com/ashwanthkumar/gocd-slack-build-notifier/releases/download/v1.4.0-RC11/gocd-slack-notifier-1.4.0-RC11.jar + - GOCD_CONFIG_plugin_github-notifier=https://github.com/gocd-contrib/gocd-build-status-notifier/releases/download/1.3/github-pr-status-1.3.jar + - GOCD_CONFIG_plugin_github-scm=https://github.com/ashwanthkumar/gocd-build-github-pull-requests/releases/download/v1.3.3/github-pr-poller-1.3.3.jar {{- end}} {{- if (ne .Values.DEPLOY_LB "true") and .Values.PUBLISH_PORT}} ports: @@ -54,16 +54,16 @@ services: image: webcenter/alpine-gocd-agent:develop volumes: {{- if (contains .Values.VOLUME_DRIVER_AGENT "/")}} - - ${VOLUME_DRIVER_AGENT}:/data - {{- else}} - gocd-agent-data:/data + {{- else}} + - ${VOLUME_DRIVER_AGENT}:/data {{- end}} - gocd-scheduler-setting:/opt/scheduler environment: - - GOCD_CONFIG_memory="${GOCD_AGENT_MEMORY}" - - GOCD_CONFIG_agent_key="${GOCD_AGENT_KEY}" - - GOCD_CONFIG_agent_resource_docker="${GOCD_AGENT_RESOURCE}" - - DOCKER_HOST="tcp://docker-engine:2375" + - GOCD_CONFIG_memory=${GOCD_AGENT_MEMORY} + - GOCD_CONFIG_agent_key=${GOCD_AGENT_KEY} + - GOCD_CONFIG_agent_resource_docker=${GOCD_AGENT_RESOURCE} + - DOCKER_HOST=docker-engine:2375 links: - gocd-server:gocd-server labels: @@ -82,7 +82,6 @@ services: volumes: - gocd-scheduler-setting:/opt/scheduler docker-engine: - network_mode: none privileged: true labels: io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} From c00bf1d3d95e2a28e095a1057c3e52889784895e Mon Sep 17 00:00:00 2001 From: disaster37 Date: Sat, 1 Apr 2017 18:27:54 +0000 Subject: [PATCH 06/16] Fix plugin environment --- templates/gocd/0/docker-compose.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/templates/gocd/0/docker-compose.yml b/templates/gocd/0/docker-compose.yml index 368a7a2..fc2f270 100644 --- a/templates/gocd/0/docker-compose.yml +++ b/templates/gocd/0/docker-compose.yml @@ -14,15 +14,16 @@ services: - GOCD_CONFIG_memory=${GOCD_SERVER_MEMORY} - GOCD_CONFIG_agent-key=${GOCD_AGENT_KEY} {{- if eq .Values.GOCD_AGENT_PACKAGE "true"}} - - GOCD_CONFIG_plugin_script-executor=https://github.com/gocd-contrib/script-executor-task/releases/download/0.3/script-executor-0.3.0.jar - - GOCD_CONFIG_plugin_docker-task=https://github.com/manojlds/gocd-docker/releases/download/0.1.27/docker-task-assembly-0.1.27.jar - - GOCD_CONFIG_plugin_slack=https://github.com/Vincit/gocd-slack-task/releases/download/v1.3.1/gocd-slack-task-1.3.1.jar - - GOCD_CONFIG_plugin_docker-pipline=https://github.com/Haufe-Lexware/gocd-plugins/releases/download/v1.0.0-beta/gocd-docker-pipeline-plugin-1.0.0.jar - - GOCD_CONFIG_plugin_github-pr=https://github.com/insano10/gocd-pr-comment-scalastyle/releases/download/1.2/github-pr-comment-scalastyle-1.2.jar - - GOCD_CONFIG_plugin_email-notifier=https://github.com/gocd-contrib/email-notifier/releases/download/v0.1/email-notifier-0.1.jar - - GOCD_CONFIG_plugin_slack-notifier=https://github.com/ashwanthkumar/gocd-slack-build-notifier/releases/download/v1.4.0-RC11/gocd-slack-notifier-1.4.0-RC11.jar - - GOCD_CONFIG_plugin_github-notifier=https://github.com/gocd-contrib/gocd-build-status-notifier/releases/download/1.3/github-pr-status-1.3.jar - - GOCD_CONFIG_plugin_github-scm=https://github.com/ashwanthkumar/gocd-build-github-pull-requests/releases/download/v1.3.3/github-pr-poller-1.3.3.jar + - GOCD_PLUGIN_script-executor=https://github.com/gocd-contrib/script-executor-task/releases/download/0.3/script-executor-0.3.0.jar + - GOCD_PLUGIN_docker-task=https://github.com/manojlds/gocd-docker/releases/download/0.1.27/docker-task-assembly-0.1.27.jar + - GOCD_PLUGIN_slack=https://github.com/Vincit/gocd-slack-task/releases/download/v1.3.1/gocd-slack-task-1.3.1.jar + - GOCD_PLUGIN_docker-pipline=https://github.com/Haufe-Lexware/gocd-plugins/releases/download/v1.0.0-beta/gocd-docker-pipeline-plugin-1.0.0.jar + - GOCD_PLUGIN_github-pr=https://github.com/insano10/gocd-pr-comment-scalastyle/releases/download/1.2/github-pr-comment-scalastyle-1.2.jar + - GOCD_PLUGIN_email-notifier=https://github.com/gocd-contrib/email-notifier/releases/download/v0.1/email-notifier-0.1.jar + - GOCD_PLUGIN_slack-notifier=https://github.com/ashwanthkumar/gocd-slack-build-notifier/releases/download/v1.4.0-RC11/gocd-slack-notifier-1.4.0-RC11.jar + - GOCD_PLUGIN_github-notifier=https://github.com/gocd-contrib/gocd-build-status-notifier/releases/download/1.3/github-pr-status-1.3.jar + - GOCD_PLUGIN_github-scm=https://github.com/ashwanthkumar/gocd-build-github-pull-requests/releases/download/v1.3.3/github-pr-poller-1.3.3.jar + - GOCD_PLUGIN_docker-elastic=https://github.com/gocd-contrib/docker-elastic-agents/releases/download/v0.6.1/docker-elastic-agents-0.6.1.jar {{- end}} {{- if (ne .Values.DEPLOY_LB "true") and .Values.PUBLISH_PORT}} ports: From 54680093b0ba60d5884430981b672a12a7274bb6 Mon Sep 17 00:00:00 2001 From: disaster37 Date: Sun, 2 Apr 2017 09:52:48 +0000 Subject: [PATCH 07/16] Add auth --- templates/gocd/0/docker-compose.yml | 1 + templates/gocd/0/rancher-compose.yml | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/templates/gocd/0/docker-compose.yml b/templates/gocd/0/docker-compose.yml index fc2f270..61abe2a 100644 --- a/templates/gocd/0/docker-compose.yml +++ b/templates/gocd/0/docker-compose.yml @@ -13,6 +13,7 @@ services: environment: - GOCD_CONFIG_memory=${GOCD_SERVER_MEMORY} - GOCD_CONFIG_agent-key=${GOCD_AGENT_KEY} + - GOCD_USER_${GOCD_USER}=${GOCD_PASSWORD} {{- if eq .Values.GOCD_AGENT_PACKAGE "true"}} - GOCD_PLUGIN_script-executor=https://github.com/gocd-contrib/script-executor-task/releases/download/0.3/script-executor-0.3.0.jar - GOCD_PLUGIN_docker-task=https://github.com/manojlds/gocd-docker/releases/download/0.1.27/docker-task-assembly-0.1.27.jar diff --git a/templates/gocd/0/rancher-compose.yml b/templates/gocd/0/rancher-compose.yml index bb75a2a..6df6dfe 100644 --- a/templates/gocd/0/rancher-compose.yml +++ b/templates/gocd/0/rancher-compose.yml @@ -51,6 +51,17 @@ catalog: type: "string" required: true default: "docker" + - variable: "GOCD_USER" + description: "Login to connect on GoCD" + label: "Login" + type: "string" + required: true + default: "admin" + - variable: "GOCD_PASSWORD" + description: "Password to connect on GoCD" + label: "Password" + type: "password" + required: true - variable: "GOCD_AGENT_PACKAGE" description: "Install GoCD extra plugins" label: "Install extra plugins" From 7f8d36499aa743a21020ec1fd5b4e899975ef0f4 Mon Sep 17 00:00:00 2001 From: disaster37 Date: Sun, 2 Apr 2017 18:29:05 +0000 Subject: [PATCH 08/16] add usefull plugin to gocd --- templates/gocd/0/docker-compose.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/templates/gocd/0/docker-compose.yml b/templates/gocd/0/docker-compose.yml index 61abe2a..bb871e9 100644 --- a/templates/gocd/0/docker-compose.yml +++ b/templates/gocd/0/docker-compose.yml @@ -19,12 +19,20 @@ services: - GOCD_PLUGIN_docker-task=https://github.com/manojlds/gocd-docker/releases/download/0.1.27/docker-task-assembly-0.1.27.jar - GOCD_PLUGIN_slack=https://github.com/Vincit/gocd-slack-task/releases/download/v1.3.1/gocd-slack-task-1.3.1.jar - GOCD_PLUGIN_docker-pipline=https://github.com/Haufe-Lexware/gocd-plugins/releases/download/v1.0.0-beta/gocd-docker-pipeline-plugin-1.0.0.jar - - GOCD_PLUGIN_github-pr=https://github.com/insano10/gocd-pr-comment-scalastyle/releases/download/1.2/github-pr-comment-scalastyle-1.2.jar - GOCD_PLUGIN_email-notifier=https://github.com/gocd-contrib/email-notifier/releases/download/v0.1/email-notifier-0.1.jar - - GOCD_PLUGIN_slack-notifier=https://github.com/ashwanthkumar/gocd-slack-build-notifier/releases/download/v1.4.0-RC11/gocd-slack-notifier-1.4.0-RC11.jar - GOCD_PLUGIN_github-notifier=https://github.com/gocd-contrib/gocd-build-status-notifier/releases/download/1.3/github-pr-status-1.3.jar - GOCD_PLUGIN_github-scm=https://github.com/ashwanthkumar/gocd-build-github-pull-requests/releases/download/v1.3.3/github-pr-poller-1.3.3.jar - GOCD_PLUGIN_docker-elastic=https://github.com/gocd-contrib/docker-elastic-agents/releases/download/v0.6.1/docker-elastic-agents-0.6.1.jar + - GOCD_PLUGIN_maven-repository=https://github.com/1and1/go-maven-poller/releases/download/v1.1.4/go-maven-poller.jar + - GOCD_PLUGIN_maven-task=https://github.com/ruckc/gocd-maven-plugin/releases/download/0.1.1/gocd-maven-plugin-0.1.1.jar + - GOCD_PLUGIN_s3-fetch=https://github.com/indix/gocd-s3-artifacts/releases/download/v2.0.2/s3fetch-assembly-2.0.2.jar + - GOCD_PLUGIN_s3-material=https://github.com/indix/gocd-s3-artifacts/releases/download/v2.0.2/s3material-assembly-2.0.2.jar + - GOCD_PLUGIN_s3-publish=https://github.com/indix/gocd-s3-artifacts/releases/download/v2.0.2/s3publish-assembly-2.0.2.jar + - GOCD_PLUGIN_nessus-scan=https://github.com/Haufe-Lexware/gocd-plugins/releases/download/v1.0.0-beta/gocd-nessus-scan-plugin-1.0.0.jar + - GOCD_PLUGIN_sonar=https://github.com/Haufe-Lexware/gocd-plugins/releases/download/v1.0.0-beta/gocd-sonar-qualitygates-plugin-1.0.0.jar + - GOCD_PLUGIN_gitlab-auth=https://github.com/gocd-contrib/gocd-oauth-login/releases/download/v2.3/gitlab-oauth-login-2.3.jar + - GOCD_PLUGIN_google-auth=https://github.com/gocd-contrib/gocd-oauth-login/releases/download/v2.3/google-oauth-login-2.3.jar + - GOCD_PLUGIN_github-auth=https://github.com/gocd-contrib/gocd-oauth-login/releases/download/v2.3/github-oauth-login-2.3.jar {{- end}} {{- if (ne .Values.DEPLOY_LB "true") and .Values.PUBLISH_PORT}} ports: From 838b03251881c55fddaac57c07e5ea635de0b702 Mon Sep 17 00:00:00 2001 From: disaster37 Date: Sun, 2 Apr 2017 18:37:35 +0000 Subject: [PATCH 09/16] add usefull plugin to gocd --- templates/gocd/0/docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/gocd/0/docker-compose.yml b/templates/gocd/0/docker-compose.yml index bb871e9..94d0a7b 100644 --- a/templates/gocd/0/docker-compose.yml +++ b/templates/gocd/0/docker-compose.yml @@ -26,7 +26,6 @@ services: - GOCD_PLUGIN_maven-repository=https://github.com/1and1/go-maven-poller/releases/download/v1.1.4/go-maven-poller.jar - GOCD_PLUGIN_maven-task=https://github.com/ruckc/gocd-maven-plugin/releases/download/0.1.1/gocd-maven-plugin-0.1.1.jar - GOCD_PLUGIN_s3-fetch=https://github.com/indix/gocd-s3-artifacts/releases/download/v2.0.2/s3fetch-assembly-2.0.2.jar - - GOCD_PLUGIN_s3-material=https://github.com/indix/gocd-s3-artifacts/releases/download/v2.0.2/s3material-assembly-2.0.2.jar - GOCD_PLUGIN_s3-publish=https://github.com/indix/gocd-s3-artifacts/releases/download/v2.0.2/s3publish-assembly-2.0.2.jar - GOCD_PLUGIN_nessus-scan=https://github.com/Haufe-Lexware/gocd-plugins/releases/download/v1.0.0-beta/gocd-nessus-scan-plugin-1.0.0.jar - GOCD_PLUGIN_sonar=https://github.com/Haufe-Lexware/gocd-plugins/releases/download/v1.0.0-beta/gocd-sonar-qualitygates-plugin-1.0.0.jar From 437db4f62ea96eb9da8238b048daf09f1d9f21da Mon Sep 17 00:00:00 2001 From: disaster37 Date: Mon, 3 Apr 2017 12:16:01 +0000 Subject: [PATCH 10/16] add usefull plugin to gocd --- templates/gocd/0/docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/gocd/0/docker-compose.yml b/templates/gocd/0/docker-compose.yml index 94d0a7b..8acba93 100644 --- a/templates/gocd/0/docker-compose.yml +++ b/templates/gocd/0/docker-compose.yml @@ -22,7 +22,6 @@ services: - GOCD_PLUGIN_email-notifier=https://github.com/gocd-contrib/email-notifier/releases/download/v0.1/email-notifier-0.1.jar - GOCD_PLUGIN_github-notifier=https://github.com/gocd-contrib/gocd-build-status-notifier/releases/download/1.3/github-pr-status-1.3.jar - GOCD_PLUGIN_github-scm=https://github.com/ashwanthkumar/gocd-build-github-pull-requests/releases/download/v1.3.3/github-pr-poller-1.3.3.jar - - GOCD_PLUGIN_docker-elastic=https://github.com/gocd-contrib/docker-elastic-agents/releases/download/v0.6.1/docker-elastic-agents-0.6.1.jar - GOCD_PLUGIN_maven-repository=https://github.com/1and1/go-maven-poller/releases/download/v1.1.4/go-maven-poller.jar - GOCD_PLUGIN_maven-task=https://github.com/ruckc/gocd-maven-plugin/releases/download/0.1.1/gocd-maven-plugin-0.1.1.jar - GOCD_PLUGIN_s3-fetch=https://github.com/indix/gocd-s3-artifacts/releases/download/v2.0.2/s3fetch-assembly-2.0.2.jar From 14dde4c0d98b5570e8a57b40bdc85b668bbb5a4f Mon Sep 17 00:00:00 2001 From: disaster37 Date: Mon, 3 Apr 2017 15:49:27 +0000 Subject: [PATCH 11/16] Add server URL when deploy only agent --- templates/gocd/0/docker-compose.yml | 3 +++ templates/gocd/0/rancher-compose.yml | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/templates/gocd/0/docker-compose.yml b/templates/gocd/0/docker-compose.yml index 8acba93..7fe1f36 100644 --- a/templates/gocd/0/docker-compose.yml +++ b/templates/gocd/0/docker-compose.yml @@ -13,6 +13,7 @@ services: environment: - GOCD_CONFIG_memory=${GOCD_SERVER_MEMORY} - GOCD_CONFIG_agent-key=${GOCD_AGENT_KEY} + - GOCD_CONFIG_server-url=${GOCD_SERVER_URL} - GOCD_USER_${GOCD_USER}=${GOCD_PASSWORD} {{- if eq .Values.GOCD_AGENT_PACKAGE "true"}} - GOCD_PLUGIN_script-executor=https://github.com/gocd-contrib/script-executor-task/releases/download/0.3/script-executor-0.3.0.jar @@ -72,8 +73,10 @@ services: - GOCD_CONFIG_agent_key=${GOCD_AGENT_KEY} - GOCD_CONFIG_agent_resource_docker=${GOCD_AGENT_RESOURCE} - DOCKER_HOST=docker-engine:2375 + {{- if eq .Values.DEPLOY_SERVER "true"}} links: - gocd-server:gocd-server + {{- end}} labels: io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} io.rancher.container.hostname_override: container_name diff --git a/templates/gocd/0/rancher-compose.yml b/templates/gocd/0/rancher-compose.yml index 6df6dfe..11e6bb6 100644 --- a/templates/gocd/0/rancher-compose.yml +++ b/templates/gocd/0/rancher-compose.yml @@ -98,6 +98,12 @@ catalog: required: false type: "string" default: "8153" + - variable: "GOCD_SERVER_URL" + description: "The server URL use by agent to auto register. Don't touch if you deploy server and agent" + label: "Server URL" + required: true + type: "string" + default: "https://gocd-server:8154/go" - variable: "CONFD_BACKEND" description: "The confd backend to grab config" label: "Confd backend" From b8abcf06d4e770f0c2dd43446f51d13f37311fd3 Mon Sep 17 00:00:00 2001 From: disaster37 Date: Wed, 5 Apr 2017 13:38:48 +0000 Subject: [PATCH 12/16] Fix gocd entry --- templates/gocd/0/docker-compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/gocd/0/docker-compose.yml b/templates/gocd/0/docker-compose.yml index 7fe1f36..f7f6d3f 100644 --- a/templates/gocd/0/docker-compose.yml +++ b/templates/gocd/0/docker-compose.yml @@ -63,9 +63,9 @@ services: image: webcenter/alpine-gocd-agent:develop volumes: {{- if (contains .Values.VOLUME_DRIVER_AGENT "/")}} - - gocd-agent-data:/data - {{- else}} - ${VOLUME_DRIVER_AGENT}:/data + {{- else}} + - gocd-agent-data:/data {{- end}} - gocd-scheduler-setting:/opt/scheduler environment: @@ -108,7 +108,7 @@ services: volumes: - minio-scheduler-setting: + gocd-scheduler-setting: driver: local per_container: true {{- if not (contains .Values.VOLUME_DRIVER_AGENT "/")}} From e983c332334abf34b4f9d9f9ce5e31db5195a5d9 Mon Sep 17 00:00:00 2001 From: disaster37 Date: Wed, 5 Apr 2017 14:03:32 +0000 Subject: [PATCH 13/16] Use taged version image --- templates/gocd/0/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/gocd/0/docker-compose.yml b/templates/gocd/0/docker-compose.yml index f7f6d3f..445a046 100644 --- a/templates/gocd/0/docker-compose.yml +++ b/templates/gocd/0/docker-compose.yml @@ -3,7 +3,7 @@ services: {{- if eq .Values.DEPLOY_SERVER "true"}} gocd-server: tty: true - image: webcenter/alpine-gocd-server:develop + image: webcenter/alpine-gocd-server:17.3.0-1 volumes: {{- if (contains .Values.VOLUME_DRIVER_SERVER "/")}} - ${VOLUME_DRIVER_SERVER}:/data @@ -60,7 +60,7 @@ services: {{- if eq .Values.DEPLOY_AGENT "true"}} gocd-agent: tty: true - image: webcenter/alpine-gocd-agent:develop + image: webcenter/alpine-gocd-agent:17.3.0-1 volumes: {{- if (contains .Values.VOLUME_DRIVER_AGENT "/")}} - ${VOLUME_DRIVER_AGENT}:/data From bc79bc5af2b4b641383654f8d1bd386608daf74f Mon Sep 17 00:00:00 2001 From: disaster37 Date: Wed, 5 Apr 2017 14:31:04 +0000 Subject: [PATCH 14/16] Fix Readme for GoCD --- templates/gocd/0/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/gocd/0/README.md b/templates/gocd/0/README.md index 5aba6ad..f78d15f 100644 --- a/templates/gocd/0/README.md +++ b/templates/gocd/0/README.md @@ -4,7 +4,7 @@ This template creates one GoCD server and scale out the number of GoCD agent you need. -The GoCD agent embedded Docker support, so the idea is to not create GoCD agent per language but use docker container to build and test your stuff. +The GoCD agent is link with docker engine container as sidekick, so the idea is to not create GoCD agent per language but use docker container to build and test your stuff. You can use on GoCD agent: - docker cli - docker-compose cli @@ -16,8 +16,8 @@ You can use on GoCD agent: Select GoCD from catalog. +Choose if you should deploy GoCD Server, or GoCD Agent or the two. Enter the number of GoCD agent you need. -Enter extra GoCD plugins to download and install. Choose the key to autoregister GoCD agent. Click deploy. From 4e2d2822a303ca25939de1d7a180d70d6e697779 Mon Sep 17 00:00:00 2001 From: disaster37 Date: Wed, 5 Apr 2017 14:42:07 +0000 Subject: [PATCH 15/16] Rename docker-compose.yml to docker-compose.yml.tpl --- templates/gocd/0/{docker-compose.yml => docker-compose.yml.tpl} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename templates/gocd/0/{docker-compose.yml => docker-compose.yml.tpl} (100%) diff --git a/templates/gocd/0/docker-compose.yml b/templates/gocd/0/docker-compose.yml.tpl similarity index 100% rename from templates/gocd/0/docker-compose.yml rename to templates/gocd/0/docker-compose.yml.tpl From 7dd8cc6f01388275d5288d6e6d557c0b81cf5673 Mon Sep 17 00:00:00 2001 From: disaster37 Date: Thu, 6 Apr 2017 12:02:32 +0200 Subject: [PATCH 16/16] Add Confd setting --- templates/gocd/0/docker-compose.yml.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/gocd/0/docker-compose.yml.tpl b/templates/gocd/0/docker-compose.yml.tpl index 445a046..bdd6ca9 100644 --- a/templates/gocd/0/docker-compose.yml.tpl +++ b/templates/gocd/0/docker-compose.yml.tpl @@ -15,6 +15,9 @@ services: - GOCD_CONFIG_agent-key=${GOCD_AGENT_KEY} - GOCD_CONFIG_server-url=${GOCD_SERVER_URL} - GOCD_USER_${GOCD_USER}=${GOCD_PASSWORD} + - CONFD_BACKEND=${CONFD_BACKEND} + - CONFD_NODES=${CONFD_NODES} + - CONFD_PREFIX_KEY=${CONFD_PREFIX} {{- if eq .Values.GOCD_AGENT_PACKAGE "true"}} - GOCD_PLUGIN_script-executor=https://github.com/gocd-contrib/script-executor-task/releases/download/0.3/script-executor-0.3.0.jar - GOCD_PLUGIN_docker-task=https://github.com/manojlds/gocd-docker/releases/download/0.1.27/docker-task-assembly-0.1.27.jar @@ -119,4 +122,4 @@ volumes: {{- if not (contains .Values.VOLUME_DRIVER_SERVER "/")}} gocd-server-data: driver: ${VOLUME_DRIVER_SERVER} - {{- end}} \ No newline at end of file + {{- end}}