From 8ffc5745db284e599c1916df7d7b6a063b2ab497 Mon Sep 17 00:00:00 2001 From: sido Date: Fri, 23 Mar 2018 08:50:38 +0100 Subject: [PATCH 1/3] feat(jenkins): added jenkins build servers --- templates/jenkins/0/README.md | 17 ++++++++++++++++ templates/jenkins/0/docker-compose.yml | 26 +++++++++++++++++++++++++ templates/jenkins/0/rancher-compose.yml | 15 ++++++++++++++ templates/jenkins/config.yml | 7 +++++++ templates/molgenis/config.yml | 4 ++-- 5 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 templates/jenkins/0/README.md create mode 100644 templates/jenkins/0/docker-compose.yml create mode 100644 templates/jenkins/0/rancher-compose.yml create mode 100644 templates/jenkins/config.yml diff --git a/templates/jenkins/0/README.md b/templates/jenkins/0/README.md new file mode 100644 index 0000000..e5cc915 --- /dev/null +++ b/templates/jenkins/0/README.md @@ -0,0 +1,17 @@ +# Jenkins for MOLGENIS +Flexible software for scientific data + +## Rancher configuration +These templates can create a range of MOLGENIS stacks on top of Rancher. The latests and stable release serves 4 docker services: + +- Jenkins +- Jenkins Agent - Development tools + +## Usage +- Select Jenkins from catalog +- Fill in the questions in the template area +- Click *Launch* + +## Loadbalancers +You can check lb.molgenis.org to check the availabity of the stack. + diff --git a/templates/jenkins/0/docker-compose.yml b/templates/jenkins/0/docker-compose.yml new file mode 100644 index 0000000..1b03df7 --- /dev/null +++ b/templates/jenkins/0/docker-compose.yml @@ -0,0 +1,26 @@ +version: '2' + +services: + jenkins: + image: jenkinsci/blueocean:latest + ports: + - 8080 + volumes: + - molgenis-jenkins + labels: + io.rancher.container.pull_image: always + traefik.frontend.rule: Host:${DOMAINS} + traefik.backend: ${TRAEFIK_BACKEND} + traefik.enable: true + traefik.port: 8080 + + jenkins-agent-devtools: + image: registry.webhosting.rug.nl/molgenis/jenkins-agent-devtools:latest + volumes: + - molgenis-jenkins-agent-devtools + +volumes: + molgenis-jenkins: + driver: local + molgenis-jenkins-agent-devtools: + driver: local diff --git a/templates/jenkins/0/rancher-compose.yml b/templates/jenkins/0/rancher-compose.yml new file mode 100644 index 0000000..356c3cc --- /dev/null +++ b/templates/jenkins/0/rancher-compose.yml @@ -0,0 +1,15 @@ +.catalog: + name: jenkins + version: latest + description: Jenkins for Molgenis + minimum_rancher_version: v1.6.3 + + start_on_create: true + scale: 1 + health_check: + port: 8080 + interval: 5000 + unhealthy_threshold: 3 + request_line: 'GET / HTTP/1.0' + healthy_threshold: 2 + response_timeout: 5000 diff --git a/templates/jenkins/config.yml b/templates/jenkins/config.yml new file mode 100644 index 0000000..fee5311 --- /dev/null +++ b/templates/jenkins/config.yml @@ -0,0 +1,7 @@ +name: Jenkins +description: | + Jenkins for Molgenis +version: v1.0.0 +category: All +maintainer: Molgenis DEVOPS-team +projectURL: https://jenkins.io \ No newline at end of file diff --git a/templates/molgenis/config.yml b/templates/molgenis/config.yml index 9716f41..766d1af 100644 --- a/templates/molgenis/config.yml +++ b/templates/molgenis/config.yml @@ -1,7 +1,7 @@ name: Molgenis description: | Molgenis | Flexible software for scientific data -version: v5.0.0 +version: v7.0.0 category: All maintainer: Molgenis DEV-team and community-members -projectURL: http://molgenis.org \ No newline at end of file +projectURL: https://www.molgenis.org \ No newline at end of file From 5bfde40628023f6a1a9738f98456bb9b64e7a964 Mon Sep 17 00:00:00 2001 From: sido Date: Fri, 23 Mar 2018 14:07:19 +0100 Subject: [PATCH 2/3] chore(flow): added flow to project --- templates/prometheus/0/docker-compose.yml | 77 +++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 templates/prometheus/0/docker-compose.yml diff --git a/templates/prometheus/0/docker-compose.yml b/templates/prometheus/0/docker-compose.yml new file mode 100644 index 0000000..1970fbd --- /dev/null +++ b/templates/prometheus/0/docker-compose.yml @@ -0,0 +1,77 @@ +version: '2' + +services: + cadvisor: + labels: + io.rancher.scheduler.global: 'true' + tty: true + image: google/cadvisor:latest + stdin_open: true + volumes: + - "/:/rootfs:ro" + - "/var/run:/var/run:rw" + - "/sys:/sys:ro" + - "/var/lib/docker/:/var/lib/docker:ro" + + node-exporter: + labels: + io.rancher.scheduler.global: 'true' + tty: true + image: prom/node-exporter:latest + stdin_open: true + + prom-conf: + tty: true + image: infinityworks/prom-conf:20 + volumes: + - /etc/prom-conf/ + net: none + + prometheus: + tty: true + image: prom/prometheus:v2.1.0 + command: --config.file=/etc/prom-conf/prometheus.yml --storage.tsdb.path=/prometheus --web.console.libraries=/etc/prometheus/console_libraries --web.console.templates=/etc/prometheus/consoles + ports: + - 9090 + labels: + io.rancher.sidekicks: prom-conf + volumes_from: + - prom-conf + volumes: + - prometheus-data:/prometheus + volume_driver: ${VOLUME_DRIVER} + links: + - cadvisor:cadvisor + - node-exporter:node-exporter + - prometheus-rancher-exporter:prometheus-rancher-exporter + extra_hosts: + - "rancher-server:${RANCHER_SERVER}" + + graf-db: + tty: true + image: infinityworks/graf-db:11 + command: cat + volumes: + - grafana-data:/var/lib/grafana/ + volume_driver: ${VOLUME_DRIVER} + net: none + + grafana: + tty: true + image: grafana/grafana:5.0.0 + ports: + - 3000 + labels: + io.rancher.sidekicks: graf-db + volumes_from: + - graf-db + links: + - prometheus:prometheus + - prometheus-rancher-exporter:prometheus-rancher-exporter + + prometheus-rancher-exporter: + tty: true + labels: + io.rancher.container.create_agent: true + io.rancher.container.agent.role: environment + image: infinityworks/prometheus-rancher-exporter:v0.22.52 \ No newline at end of file From 0304d00b0562e1c6c80d85b5232c075660bf30a5 Mon Sep 17 00:00:00 2001 From: sido Date: Tue, 27 Mar 2018 10:09:07 +0200 Subject: [PATCH 3/3] chore(prometheus): removed prometheus from add-jenkins branch --- templates/prometheus/0/docker-compose.yml | 77 ----------------------- 1 file changed, 77 deletions(-) delete mode 100644 templates/prometheus/0/docker-compose.yml diff --git a/templates/prometheus/0/docker-compose.yml b/templates/prometheus/0/docker-compose.yml deleted file mode 100644 index 1970fbd..0000000 --- a/templates/prometheus/0/docker-compose.yml +++ /dev/null @@ -1,77 +0,0 @@ -version: '2' - -services: - cadvisor: - labels: - io.rancher.scheduler.global: 'true' - tty: true - image: google/cadvisor:latest - stdin_open: true - volumes: - - "/:/rootfs:ro" - - "/var/run:/var/run:rw" - - "/sys:/sys:ro" - - "/var/lib/docker/:/var/lib/docker:ro" - - node-exporter: - labels: - io.rancher.scheduler.global: 'true' - tty: true - image: prom/node-exporter:latest - stdin_open: true - - prom-conf: - tty: true - image: infinityworks/prom-conf:20 - volumes: - - /etc/prom-conf/ - net: none - - prometheus: - tty: true - image: prom/prometheus:v2.1.0 - command: --config.file=/etc/prom-conf/prometheus.yml --storage.tsdb.path=/prometheus --web.console.libraries=/etc/prometheus/console_libraries --web.console.templates=/etc/prometheus/consoles - ports: - - 9090 - labels: - io.rancher.sidekicks: prom-conf - volumes_from: - - prom-conf - volumes: - - prometheus-data:/prometheus - volume_driver: ${VOLUME_DRIVER} - links: - - cadvisor:cadvisor - - node-exporter:node-exporter - - prometheus-rancher-exporter:prometheus-rancher-exporter - extra_hosts: - - "rancher-server:${RANCHER_SERVER}" - - graf-db: - tty: true - image: infinityworks/graf-db:11 - command: cat - volumes: - - grafana-data:/var/lib/grafana/ - volume_driver: ${VOLUME_DRIVER} - net: none - - grafana: - tty: true - image: grafana/grafana:5.0.0 - ports: - - 3000 - labels: - io.rancher.sidekicks: graf-db - volumes_from: - - graf-db - links: - - prometheus:prometheus - - prometheus-rancher-exporter:prometheus-rancher-exporter - - prometheus-rancher-exporter: - tty: true - labels: - io.rancher.container.create_agent: true - io.rancher.container.agent.role: environment - image: infinityworks/prometheus-rancher-exporter:v0.22.52 \ No newline at end of file