From 20ca59da73a2808d411d6665d71178fa91a41da3 Mon Sep 17 00:00:00 2001 From: disaster37 Date: Fri, 31 Mar 2017 14:20:52 +0000 Subject: [PATCH] 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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