From 0e8eeade14e43fe09aa13af3ecce2d227f75cf40 Mon Sep 17 00:00:00 2001 From: Franz Garcia Date: Fri, 26 May 2017 14:07:11 -0400 Subject: [PATCH 01/51] Added version 1.0.2 of cloud.ca machine template --- machine-templates/cloudca/1/checksum | 1 + machine-templates/cloudca/1/rancher-compose.yml | 3 +++ machine-templates/cloudca/1/uiUrl | 1 + machine-templates/cloudca/1/url | 1 + 4 files changed, 6 insertions(+) create mode 100644 machine-templates/cloudca/1/checksum create mode 100644 machine-templates/cloudca/1/rancher-compose.yml create mode 100644 machine-templates/cloudca/1/uiUrl create mode 100644 machine-templates/cloudca/1/url diff --git a/machine-templates/cloudca/1/checksum b/machine-templates/cloudca/1/checksum new file mode 100644 index 0000000..6005709 --- /dev/null +++ b/machine-templates/cloudca/1/checksum @@ -0,0 +1 @@ +100bf1dc97f5016602457ba397433561 diff --git a/machine-templates/cloudca/1/rancher-compose.yml b/machine-templates/cloudca/1/rancher-compose.yml new file mode 100644 index 0000000..405ebb3 --- /dev/null +++ b/machine-templates/cloudca/1/rancher-compose.yml @@ -0,0 +1,3 @@ +.catalog: + name: cloudca + version: "v1.0.2" diff --git a/machine-templates/cloudca/1/uiUrl b/machine-templates/cloudca/1/uiUrl new file mode 100644 index 0000000..a39e32f --- /dev/null +++ b/machine-templates/cloudca/1/uiUrl @@ -0,0 +1 @@ +https://objects-east.cloud.ca/v1/5ef827605f884961b94881e928e7a250/rancher-ui-driver/v1.0.2/component.js diff --git a/machine-templates/cloudca/1/url b/machine-templates/cloudca/1/url new file mode 100644 index 0000000..7d2343e --- /dev/null +++ b/machine-templates/cloudca/1/url @@ -0,0 +1 @@ +https://objects-east.cloud.ca/v1/5ef827605f884961b94881e928e7a250/docker-machine-driver-cloudca/v1.0.2/docker-machine-driver-cloudca_v1.0.2_linux-amd64.zip From 83ae433b17b2447d531b9dcfd78f13783732270b Mon Sep 17 00:00:00 2001 From: Chris Fordham Date: Fri, 21 Jul 2017 11:27:30 +1000 Subject: [PATCH 02/51] drone 0.8.0-rc.1-rancher1. --- templates/drone/4/README.md | 19 +++ templates/drone/4/docker-compose.yml.tpl | 116 +++++++++++++++ templates/drone/4/rancher-compose.yml | 179 +++++++++++++++++++++++ templates/drone/config.yml | 2 +- 4 files changed, 315 insertions(+), 1 deletion(-) create mode 100644 templates/drone/4/README.md create mode 100644 templates/drone/4/docker-compose.yml.tpl create mode 100644 templates/drone/4/rancher-compose.yml diff --git a/templates/drone/4/README.md b/templates/drone/4/README.md new file mode 100644 index 0000000..0349171 --- /dev/null +++ b/templates/drone/4/README.md @@ -0,0 +1,19 @@ +# Drone + +### Info: + +This template creates an instance of Drone CI server 0.8 along with selectable number of agents to perform the builds. + +### Usage: + +Select the Drone template from the catalog. Provide the following information: + +1. Publish port +2. Agents scale +3. Drone secret +4. Run mode. debug | release +3. Remote driver and config. (Ie. GitHub) +4. Database driver and config. (Ie. sqlite) + + +See [Drone documentation](http://readme.drone.io/admin) for complete information. diff --git a/templates/drone/4/docker-compose.yml.tpl b/templates/drone/4/docker-compose.yml.tpl new file mode 100644 index 0000000..279192c --- /dev/null +++ b/templates/drone/4/docker-compose.yml.tpl @@ -0,0 +1,116 @@ +version: '2' +services: + agent: + image: ${drone_agent_image} + environment: + DRONE_SERVER: ${drone_server} + DRONE_SECRET: ${drone_secret} +{{- if (.Values.http_proxy)}} + HTTP_PROXY: ${http_proxy} + http_proxy: ${http_proxy} +{{- end}} +{{- if (.Values.https_proxy)}} + HTTPS_PROXY: ${https_proxy} + https_proxy: ${https_proxy} +{{- end}} +{{- if (.Values.no_proxy)}} + NO_PROXY: ${no_proxy} + no_proxy: ${no_proxy} +{{- end}} + volumes: + - /var/run/docker.sock:/var/run/docker.sock + links: + - server:drone + command: + - agent + 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 + server: + image: ${drone_server_image} + environment: + GIN_MODE: ${gin_mode} +{{- if (.Values.drone_debug)}} + DRONE_DEBUG: '${drone_debug}' +{{- end}} + DRONE_SECRET: ${drone_secret} + DRONE_OPEN: ${drone_open} +{{- if (.Values.drone_admin)}} + DRONE_ADMIN: ${drone_admins} +{{- end}} +{{- if (.Values.drone_orgs)}} + DRONE_ORGS: ${drone_orgs} +{{- end}} +{{- if eq .Values.drone_driver "GitHub"}} + DRONE_GITHUB: true + DRONE_GITHUB_CLIENT: ${drone_driver_client} + DRONE_GITHUB_SECRET: ${drone_driver_secret} +{{- end}} +{{- if eq .Values.drone_driver "Bitbucket Cloud"}} + DRONE_BITBUCKET: true + DRONE_BITBUCKET_CLIENT: ${drone_driver_client} + DRONE_BITBUCKET_SECRET: ${drone_driver_secret} +{{- end}} +{{- if eq .Values.drone_driver "Bitbucket Server"}} + DRONE_STASH: true + DRONE_STASH_GIT_USERNAME: ${drone_driver_user} + DRONE_STASH_GIT_PASSWORD: ${drone_driver_password} + DRONE_STASH_CONSUMER_KEY: ${drone_driver_client} + DRONE_STASH_CONSUMER_RSA_STRING: ${drone_driver_secret} + DRONE_STASH_URL: ${drone_driver_url} +{{- end}} +{{- if eq .Values.drone_driver "GitLab"}} + DRONE_GITLAB: true + DRONE_GITLAB_CLIENT: ${drone_driver_secret} + DRONE_GITLAB_SECRET: ${drone_driver_secret} + DRONE_GITLAB_URL: ${drone_driver_url} +{{- end}} +{{- if eq .Values.drone_driver "Gogs"}} + DRONE_GOGS: true + DRONE_GOGS_URL: ${drone_driver_url} +{{- end}} +{{- if ne .Values.database_driver "sqlite"}} + DRONE_DATABASE_DRIVER: ${database_driver} + DRONE_DATABASE_DATASOURCE: ${database_source} +{{- end}} +{{- if (.Values.http_proxy)}} + HTTP_PROXY: ${http_proxy} + http_proxy: ${http_proxy} +{{- end}} +{{- if (.Values.https_proxy)}} + HTTPS_PROXY: ${https_proxy} + https_proxy: ${https_proxy} +{{- end}} +{{- if (.Values.no_proxy)}} + NO_PROXY: ${no_proxy} + no_proxy: ${no_proxy} +{{- 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 +{{- if eq .Values.database_driver "sqlite"}} + io.rancher.sidekicks: server-volume + volumes_from: + - server-volume + server-volume: + image: rawmind/alpine-volume:0.0.2-1 + environment: + SERVICE_GID: '0' + SERVICE_UID: '0' + SERVICE_VOLUME: /var/lib/drone + network_mode: none + volumes: + - /var/lib/drone + labels: + io.rancher.container.start_once: '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 +{{- end}} + lb: + image: rancher/load-balancer-service + ports: + - ${host_port}:8000/tcp + links: + - server:server + labels: + io.rancher.scheduler.affinity:host_label_soft: drone_lb=true diff --git a/templates/drone/4/rancher-compose.yml b/templates/drone/4/rancher-compose.yml new file mode 100644 index 0000000..b27c195 --- /dev/null +++ b/templates/drone/4/rancher-compose.yml @@ -0,0 +1,179 @@ +version: 2 +catalog: + name: Drone + version: 0.8.0-rc.1-rancher1 + upgrade_from: 0.5-rancher1 + description: | + Drone CI Server ref http://readme.drone.io/admin/installation-guide/ + questions: + - variable: host_port + label: Drone server Host Port + description: | + Port that will be exposed on service creation + required: true + default: 8000 + type: int + - variable: agent_scale + label: Drone agent scale + description: Drone agent scale to deploy + required: true + default: 1 + type: int + - variable: drone_secret + label: Server and agents secret. + description: Server and agents secret to be communicate. http://readme.drone.io/admin/user-registration/ + type: password + required: true + - variable: gin_mode + label: Run mode + description: "Drone run mode, GIN_MODE" + type: enum + default: "release" + options: + - "release" + - "debug" + required: true + - variable: drone_open + label: Open registration + description: | + Users self register. http://readme.drone.io/admin/user-registration/ + required: true + default: true + type: enum + options: + - true + - false + - variable: drone_admin + label: Drone Admin + description: List of admins for drone comma seperated. http://readme.drone.io/admin/user-admins/ + type: string + required: false + - variable: drone_orgs + label: Organizations + description: Comman seperated list of org that can access drone. http://readme.drone.io/admin/user-registration/ + type: string + required: false + - variable: "drone_driver" + type: "enum" + required: true + label: "Remote Driver" + default: "GitHub" + description: "Remote Git and Auth scheme. ref http://readme.drone.io/admin" + options: + - GitHub + - GitLab + - Gogs + - Bitbucket Cloud + - Bitbucket Server + - variable: drone_driver_client + label: Remote Driver client + description: "Client key from remote driver. Required for GitHub, Bitbucket Cloud, Bitbucket Server and GitLab." + type: string + required: false + - variable: drone_driver_secret + label: Remote Driver secret + description: "Secret key from remote driver. Required for GitHub, Bitbucket Cloud, Bitbucket Server and GitLab." + type: multiline + required: false + - variable: drone_driver_url + label: Remote Driver URL + description: "Remote Driver server url. Required for GitLab, Gogs and Bitbucket Server; see http://readme.drone.io/admin." + type: string + required: false + - variable: drone_driver_user + label: Remove Driver Username + description: "Remote Driver username. Required for BitBucket Server; see http://docs.drone.io/install-for-bitbucket-server/." + type: string + required: false + - variable: drone_driver_password + label: Remove Driver Password + description: "Remote Driver password. Required for BitBucket Server, http://docs.drone.io/install-for-bitbucket-server/." + type: password + required: false + - variable: drone_server + label: Drone Server + description: "Drone sever identifier. Used by the agent to connect to the server (does not require change)." + type: string + default: "ws://drone:8000/ws/broker" + - variable: drone_server_image + label: Drone Server Image + description: "Docker image used for the Drone server container." + type: string + default: "drone/drone:0.8.0-rc.1" + - variable: drone_agent_image + label: Drone Agent Image + description: "Docker image used for the Drone agent container(s)." + type: string + default: "drone/drone:0.8.0-rc.1" + - variable: database_driver + label: Database Driver + description: "Database driver. If sqlite, additional volume would be mounted at /var/lib/drone." + type: enum + default: "sqlite" + options: + - "sqlite" + - "mysql" + - "postgres" + required: true + - variable: "database_source" + type: "string" + label: "Database source" + description: "Database datasource. Required if database driver is mysql or postgres, http://readme.drone.io/admin/database-engines/" + required: false + - variable: "http_proxy" + type: string + label: HTTP Proxy + description: "Optional: HTTP forward proxy URL." + required: false + - variable: "https_proxy" + type: string + label: HTTPS Proxy + description: "Optional: HTTPS forward proxy URL." + required: false + - variable: "no_proxy" + type: string + label: No Proxy + description: "Optional: No proxy hosts (comma-separated hostnames/IPs)." + required: false + default: "drone" + - variable: "drone_debug" + label: Drone Debug + description: "Enable debug output with the Drone server." + type: enum + options: + - 'true' + - 'false' + default: 'false' +services: + agent: + scale: ${agent_scale} + start_on_create: true + server: + scale: 1 + start_on_create: true + health_check: + port: 8000 + interval: 2000 + unhealthy_threshold: 3 + strategy: recreate + request_line: GET / HTTP/1.0 + healthy_threshold: 2 + response_timeout: 2000 + lb: + scale: 1 + start_on_create: true + lb_config: + certs: [] + port_rules: + - priority: 1 + protocol: http + service: server + source_port: ${host_port} + target_port: 8000 + health_check: + healthy_threshold: 2 + response_timeout: 2000 + port: 42 + unhealthy_threshold: 3 + interval: 2000 + strategy: recreate diff --git a/templates/drone/config.yml b/templates/drone/config.yml index d30faef..e501783 100644 --- a/templates/drone/config.yml +++ b/templates/drone/config.yml @@ -1,5 +1,5 @@ name: Drone description: | Drone CI Server -version: 0.7.1-rancher1 +version: 0.8.0-rc.1-rancher1 category: Continuous Integration From de128b8054957060d3ba742e196b7b696c599777 Mon Sep 17 00:00:00 2001 From: Chris Fordham Date: Fri, 21 Jul 2017 11:56:12 +1000 Subject: [PATCH 03/51] Initial version of mysql catalog entry. --- templates/mysql/0/README.md | 18 ++++ templates/mysql/0/docker-compose.yml.tpl | 42 ++++++++ templates/mysql/0/rancher-compose.yml | 124 +++++++++++++++++++++++ templates/mysql/README.md | 3 + templates/mysql/catalogIcon-mysql.svg | 27 +++++ templates/mysql/config.yml | 5 + 6 files changed, 219 insertions(+) create mode 100644 templates/mysql/0/README.md create mode 100644 templates/mysql/0/docker-compose.yml.tpl create mode 100644 templates/mysql/0/rancher-compose.yml create mode 100644 templates/mysql/README.md create mode 100644 templates/mysql/catalogIcon-mysql.svg create mode 100644 templates/mysql/config.yml diff --git a/templates/mysql/0/README.md b/templates/mysql/0/README.md new file mode 100644 index 0000000..11e8931 --- /dev/null +++ b/templates/mysql/0/README.md @@ -0,0 +1,18 @@ +# MySQL + +## What is MySQL? + +MySQL is the world's most popular open source database. With its proven performance, reliability and ease-of-use, MySQL has become the leading database choice for web-based applications, covering the entire range from personal projects and websites, via e-commerce and information services, all the way to high profile web properties including Facebook, Twitter, YouTube, Yahoo! and many more. + +For more information and related downloads for MySQL Server and other MySQL products, please visit [www.mysql.com](http://www.mysql.com). + +## Services + +Includes the following services: +- Load Balancer +- MySQL Server +- MySQL Data (sidekick to the server) + +## Usage + +The minimum configuration option(s) required to launch the stack is the MySQL Public LB Port and MySQL Root Password. See the description of each option for more information. diff --git a/templates/mysql/0/docker-compose.yml.tpl b/templates/mysql/0/docker-compose.yml.tpl new file mode 100644 index 0000000..cbc2426 --- /dev/null +++ b/templates/mysql/0/docker-compose.yml.tpl @@ -0,0 +1,42 @@ +version: '2' +services: + mysql-lb: + image: rancher/lb-service-haproxy + links: + - mysql + ports: + - ${mysql_lb_port}:3306 + mysql-data: + image: busybox + labels: + io.rancher.container.start_once: true + volumes: + - /var/lib/mysql + mysql: + image: ${mysql_image} + environment: +{{- if eq .Values.mysql_allow_empty_password "yes"}} + MYSQL_ALLOW_EMPTY_PASSWORD: ${mysql_allow_empty_password} +{{- end}} +{{- if (.Values.mysql_database)}} + MYSQL_DATABASE: ${mysql_database} +{{- end}} +{{- if eq .Values.mysql_onetime_password "yes"}} + MYSQL_ONETIME_PASSWORD: ${mysql_onetime_password} +{{- end}} +{{- if (.Values.mysql_password)}} + MYSQL_PASSWORD: ${mysql_password} +{{- end}} +{{- if eq .Values.mysql_random_root_password "yes"}} + MYSQL_RANDOM_ROOT_PASSWORD: ${mysql_random_root_password} +{{- end}} + MYSQL_ROOT_PASSWORD: ${mysql_root_password} +{{- if (.Values.mysql_user)}} + MYSQL_USER: ${mysql_user} +{{- end}} + tty: true + stdin_open: true + labels: + io.rancher.sidekicks: mysql-data + volumes_from: + - mysql-data diff --git a/templates/mysql/0/rancher-compose.yml b/templates/mysql/0/rancher-compose.yml new file mode 100644 index 0000000..f41e4c1 --- /dev/null +++ b/templates/mysql/0/rancher-compose.yml @@ -0,0 +1,124 @@ +.catalog: + name: "mysql" + version: "v0.0.1" + description: "A recommended stack for the MySQL RDBMS." + uuid: mysql-0 + minimum_rancher_version: v1.0.0 + questions: + - variable: mysql_lb_port + description: "Public port for access to MySQL through the load balancer" + label: "MySQL Public LB Port" + required: true + default: 3306 + type: "int" + - variable: mysql_root_password + description: "The password that will be set for the MySQL root superuser account." + label: "MySQL Root Password" + required: true + type: password + - variable: mysql_image + description: "The docker image to use for the MySQL server." + label: "MySQL Docker Image" + type: "enum" + options: + - "mysql:latest" + - "mysql:8.0.1" + - "mysql:8.0" + - "mysql:8" + - "mysql:5.7.18" + - "mysql:5.7" + - "mysql:5" + - "mysql:5.6.36" + - "mysql:5.6" + - "mysql:5.5.56" + - "mysql:5.5" + - "mariadb:latest" + - "mariadb:10.3.0" + - "mariadb:10.3" + - "mariadb:10.2.6" + - "mariadb:10.2" + - "mariadb:10.1.24" + - "mariadb:10.1" + - "mariadb:10" + - "mariadb:10.0.31" + - "mariadb:10.0" + - "mariadb:5.5.56" + - "mariadb:5.5" + - "mariadb:5" + default: "mysql:latest" + required: true + - variable: mysql_database + description: "Optional, allows you to specify the name of a database to be created on image startup." + label: "MySQL Database" + required: false + type: "string" + - variable: mysql_user + description: "Creates an additional MySQL (super)user. MySQL Password must also be set." + label: "MySQL User" + required: false + type: "string" + - variable: mysql_password + description: "A password for the additional MySQL (super)user. MySQL User must also be set." + label: "MySQL Password" + required: false + type: password + - variable: mysql_allow_empty_password + description: "Set to 'yes' to allow the container to be started with a blank password for the root user." + label: MySQL Allow Empty Password + type: "enum" + options: + - "yes" + - "no" + default: "no" + required: false + - variable: mysql_random_root_password + description: "Set to 'yes' to generate a random initial password for the root user (using pwgen)." + label: MySQL Random Root Password + type: "enum" + options: + - "yes" + - "no" + default: "no" + required: false + - variable: mysql_onetime_password + description: "Set to 'yes' and the root user's password will be set as expired once init is complete." + label: MySQL One-time Password + type: "enum" + options: + - "yes" + - "no" + default: "no" + required: false + +version: '2' +services: + mysql-lb: + scale: 1 + start_on_create: true + lb_config: + certs: [] + port_rules: + - protocol: tcp + service: mysql + source_port: ${mysql_lb_port} + target_port: 3306 + health_check: + healthy_threshold: 2 + response_timeout: 2000 + port: 42 + unhealthy_threshold: 3 + interval: 2000 + strategy: recreate + mysql: + scale: 1 + start_on_create: true + health_check: + healthy_threshold: 2 + response_timeout: 2000 + port: 3306 + unhealthy_threshold: 3 + interval: 2000 + strategy: recreate + mysql-data: + scale: 1 + start_on_create: true diff --git a/templates/mysql/README.md b/templates/mysql/README.md new file mode 100644 index 0000000..bc36af5 --- /dev/null +++ b/templates/mysql/README.md @@ -0,0 +1,3 @@ +## What is inside the MySQL Stack? +* MySQL database server + sidekick with volume data +* Load Balancer diff --git a/templates/mysql/catalogIcon-mysql.svg b/templates/mysql/catalogIcon-mysql.svg new file mode 100644 index 0000000..6d1d5c8 --- /dev/null +++ b/templates/mysql/catalogIcon-mysql.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/mysql/config.yml b/templates/mysql/config.yml new file mode 100644 index 0000000..6d2838d --- /dev/null +++ b/templates/mysql/config.yml @@ -0,0 +1,5 @@ +name: MySQL +description: | + MySQL — an open-source relational database management system (RDBMS) +version: v0.0.1 +category: Database From c2f3e7a12666f7a0c8ecd33c7b07a394dd58dbd4 Mon Sep 17 00:00:00 2001 From: Chris Fordham Date: Fri, 21 Jul 2017 12:51:04 +1000 Subject: [PATCH 04/51] Fix missing DRONE_HOST env; expose server ports; fix agent image ref; fix drone server address. --- templates/drone/4/docker-compose.yml.tpl | 4 ++++ templates/drone/4/rancher-compose.yml | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/templates/drone/4/docker-compose.yml.tpl b/templates/drone/4/docker-compose.yml.tpl index 279192c..831a6fc 100644 --- a/templates/drone/4/docker-compose.yml.tpl +++ b/templates/drone/4/docker-compose.yml.tpl @@ -29,6 +29,7 @@ services: server: image: ${drone_server_image} environment: + DRONE_HOST: drone GIN_MODE: ${gin_mode} {{- if (.Values.drone_debug)}} DRONE_DEBUG: '${drone_debug}' @@ -106,6 +107,9 @@ services: io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} io.rancher.container.hostname_override: container_name {{- end}} + ports: + - 9000/tcp + - 8000/tcp lb: image: rancher/load-balancer-service ports: diff --git a/templates/drone/4/rancher-compose.yml b/templates/drone/4/rancher-compose.yml index b27c195..922a0ea 100644 --- a/templates/drone/4/rancher-compose.yml +++ b/templates/drone/4/rancher-compose.yml @@ -66,12 +66,12 @@ catalog: - Bitbucket Cloud - Bitbucket Server - variable: drone_driver_client - label: Remote Driver client + label: Remote Driver Client description: "Client key from remote driver. Required for GitHub, Bitbucket Cloud, Bitbucket Server and GitLab." type: string required: false - variable: drone_driver_secret - label: Remote Driver secret + label: Remote Driver Secret description: "Secret key from remote driver. Required for GitHub, Bitbucket Cloud, Bitbucket Server and GitLab." type: multiline required: false @@ -81,12 +81,12 @@ catalog: type: string required: false - variable: drone_driver_user - label: Remove Driver Username + label: Remote Driver Username description: "Remote Driver username. Required for BitBucket Server; see http://docs.drone.io/install-for-bitbucket-server/." type: string required: false - variable: drone_driver_password - label: Remove Driver Password + label: Remote Driver Password description: "Remote Driver password. Required for BitBucket Server, http://docs.drone.io/install-for-bitbucket-server/." type: password required: false @@ -94,7 +94,7 @@ catalog: label: Drone Server description: "Drone sever identifier. Used by the agent to connect to the server (does not require change)." type: string - default: "ws://drone:8000/ws/broker" + default: "drone:9000" - variable: drone_server_image label: Drone Server Image description: "Docker image used for the Drone server container." @@ -104,7 +104,7 @@ catalog: label: Drone Agent Image description: "Docker image used for the Drone agent container(s)." type: string - default: "drone/drone:0.8.0-rc.1" + default: "drone/agent:0.8.0-rc.1" - variable: database_driver label: Database Driver description: "Database driver. If sqlite, additional volume would be mounted at /var/lib/drone." From 28e9c1f416f5fef775efd1138a7f9ac1d687634c Mon Sep 17 00:00:00 2001 From: Chris Fordham Date: Fri, 21 Jul 2017 15:03:04 +1000 Subject: [PATCH 05/51] Parameterise DRONE_HOST env var. --- templates/drone/4/docker-compose.yml.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/drone/4/docker-compose.yml.tpl b/templates/drone/4/docker-compose.yml.tpl index 831a6fc..e675aab 100644 --- a/templates/drone/4/docker-compose.yml.tpl +++ b/templates/drone/4/docker-compose.yml.tpl @@ -29,7 +29,7 @@ services: server: image: ${drone_server_image} environment: - DRONE_HOST: drone + DRONE_HOST: ${drone_host} GIN_MODE: ${gin_mode} {{- if (.Values.drone_debug)}} DRONE_DEBUG: '${drone_debug}' From 1e71f1fc1a48160b1dfda57086c4ede4b93a7d84 Mon Sep 17 00:00:00 2001 From: Chris Fordham Date: Fri, 21 Jul 2017 15:05:12 +1000 Subject: [PATCH 06/51] Parameterise DRONE_HOST env var. --- templates/drone/4/rancher-compose.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/templates/drone/4/rancher-compose.yml b/templates/drone/4/rancher-compose.yml index 922a0ea..1c12f52 100644 --- a/templates/drone/4/rancher-compose.yml +++ b/templates/drone/4/rancher-compose.yml @@ -6,21 +6,25 @@ catalog: description: | Drone CI Server ref http://readme.drone.io/admin/installation-guide/ questions: + - variable: drone_host + label: Drone Host URL + description: Intended URL Drone will be hosted on, e.g. http://drone.mycompany.com. + required: true + type: string - variable: host_port - label: Drone server Host Port - description: | - Port that will be exposed on service creation + label: Drone Server Host Port + description: Public port that will be exposed on service creation. required: true default: 8000 type: int - variable: agent_scale - label: Drone agent scale + label: Drone Agent Scale description: Drone agent scale to deploy required: true default: 1 type: int - variable: drone_secret - label: Server and agents secret. + label: Server and Agents Secret description: Server and agents secret to be communicate. http://readme.drone.io/admin/user-registration/ type: password required: true @@ -34,7 +38,7 @@ catalog: - "debug" required: true - variable: drone_open - label: Open registration + label: Open Registration description: | Users self register. http://readme.drone.io/admin/user-registration/ required: true From bc9554079a5d7503e51110cb2eb7e5c8f913e0e1 Mon Sep 17 00:00:00 2001 From: Chris Fordham Date: Fri, 21 Jul 2017 15:06:29 +1000 Subject: [PATCH 07/51] Expose ports on correct server service. --- templates/drone/4/docker-compose.yml.tpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/drone/4/docker-compose.yml.tpl b/templates/drone/4/docker-compose.yml.tpl index e675aab..198c832 100644 --- a/templates/drone/4/docker-compose.yml.tpl +++ b/templates/drone/4/docker-compose.yml.tpl @@ -93,6 +93,9 @@ services: io.rancher.sidekicks: server-volume volumes_from: - server-volume + ports: + - 9000/tcp + - 8000/tcp server-volume: image: rawmind/alpine-volume:0.0.2-1 environment: @@ -107,9 +110,6 @@ services: io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} io.rancher.container.hostname_override: container_name {{- end}} - ports: - - 9000/tcp - - 8000/tcp lb: image: rancher/load-balancer-service ports: From 499f45a6949f2acd5711129ba2ee6b975ec6fb2d Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Fri, 21 Jul 2017 15:22:18 -0500 Subject: [PATCH 08/51] Added volume name and driver questions --- templates/traefik/8/README.md | 79 +++++++++++++ templates/traefik/8/docker-compose.yml.tpl | 64 +++++++++++ templates/traefik/8/rancher-compose.yml | 123 +++++++++++++++++++++ templates/traefik/config.yml | 4 +- 4 files changed, 268 insertions(+), 2 deletions(-) create mode 100644 templates/traefik/8/README.md create mode 100644 templates/traefik/8/docker-compose.yml.tpl create mode 100644 templates/traefik/8/rancher-compose.yml diff --git a/templates/traefik/8/README.md b/templates/traefik/8/README.md new file mode 100644 index 0000000..11bae29 --- /dev/null +++ b/templates/traefik/8/README.md @@ -0,0 +1,79 @@ +# Traefik active load balancer (Experimental) + +### Info: + + This template deploys traefik active load balancers on top of Rancher. The configuration is generated and updated with confd from Rancher metadata. + It would be deployed in hosts with label traefik_lb=true. + +### Config: + +- host_label = "traefik_lb=true" # Host label where to run traefik service. +- http_port = 8080 # Port exposed to get access to the published services. +- https_port = 8443 # Port exposed to get secured access to the published services. +- admin_port = 8000 # Port exposed to get admin access to the traefik service. +- https_enable = + - false: Enable http enpoints and disable https ones. + - true: Enable http and https endpoints. + - only: Enable https endpoints and redirect http to https. +- acme_enable = false # Enable/Disable acme traefik support. +- acme_email = "test@traefik.io" # acme user email +- acme_ondemand = true # acme ondemand parameter. +- acme_onhostrule = true # acme onHostRule parameter. +- ssl_key # Paste your ssl key. *Required if you enable https +- ssl_crt # Paste your ssl crt. *Required if you enable https +- insecure_skip = false # Enable InsecureSkipVerify param. +- refresh_interval = 10s # Interval to refresh traefik rules.toml from rancher-metadata. + +NOTE: If you enable acme support, additional sidekick will be created for acme persistance. + +### Service configuration labels: + +Traefik labels has to be added in your services, in order to get included in traefik dynamic config. + +- traefik.enable = + - true: the service will be published as *service_name.stack_name.traefik_domain* + - stack: the service will be published as *stack_name.traefik_domain*. WARNING: You could have collisions inside services within your stack + - false: the service will not be published +- traefik.priority = # Override for frontend priority. 5 by default +- traefik.protocol = < http | https > # Override the default http protocol +- traefik.sticky = < true | false > # Enable/disable sticky sessions to the backend +- traefik.alias = < alias > # Alternate names to route rule. Multiple values separated by ",". traefik.domain is appended. WARNING: You could have collisions BE CAREFULL +- traefik.alias.fqdn = < alias fqdn > # Alternate names to route rule. Multiple values separated by ",". traefik.domain must be defined but is not appended here. +- traefik.domain = < domain.name > # Domain names to route rules. Multiple domains separated by "," +- traefik.domain.regexp = < domain.regexp > # Domain name regexp rule. Multiple domains separated by "," +- traefik.port = < port > # Port to expose throught traefik +- traefik.acme = < true | false > # Enable/disable ACME traefik feature +- traefik.path = < path > # Path rule. Multiple values separated by "," +- traefik.path.strip = < path > # Path strip rule. Multiple values separated by "," +- traefik.path.prefix = < path > # Path prefix rule. Multiple values separated by "," +- traefik.path.prefix.strip = < path > # Path prefix strip rule. Multiple values separated by "," + +Details for configuring the traefik rules can be found at: https://docs.traefik.io/basics/#frontends + +WARNING: Only services with healthy state are added to traefik, so health checks are mandatory. + +### Usage: + + Select Traefik from catalog. + + Set the params. + + Click deploy. + + Services will be accessed throught hosts ip's whith $host_label: + + - http://${service_name}.${stack_name}.${traefik.domain}:${http_port} + - https://${service_name}.${stack_name}.${traefik.domain}:${https_port} + + or + + - http://${stack_name}.${traefik.domain}:${http_port} + - https://${stack_name}.${traefik.domain}:${https_port} + + If you set traefik.alias you service could also be acceses through + + - http://${traefik.alias}.${traefik.domain}:${http_port} + - https://${traefik.alias}.${traefik.domain}:${https_port} + +Note: To access the services, you need to create A or CNAMES dns entries for every one. + diff --git a/templates/traefik/8/docker-compose.yml.tpl b/templates/traefik/8/docker-compose.yml.tpl new file mode 100644 index 0000000..aad902e --- /dev/null +++ b/templates/traefik/8/docker-compose.yml.tpl @@ -0,0 +1,64 @@ +traefik: + ports: + - ${admin_port}:8000/tcp + - ${http_port}:${http_port}/tcp + - ${https_port}:${https_port}/tcp + log_driver: '' + labels: + io.rancher.scheduler.global: 'true' + io.rancher.scheduler.affinity:host_label: ${host_label} + io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.sidekicks: traefik-conf + {{- if eq .Values.acme_enable "true" -}} + ,traefik-acme + {{- end}} + io.rancher.container.hostname_override: container_name + tty: true + log_opt: {} + image: rawmind/alpine-traefik:1.3.3 + environment: + - CONF_INTERVAL=${refresh_interval} + - TRAEFIK_HTTP_PORT=${http_port} + - TRAEFIK_HTTPS_PORT=${https_port} + - TRAEFIK_HTTPS_ENABLE=${https_enable} +{{- if eq .Values.acme_enable "true"}} + - TRAEFIK_ACME_ENABLE=${acme_enable} + - TRAEFIK_ACME_EMAIL=${acme_email} + - TRAEFIK_ACME_ONDEMAND=${acme_ondemand} + - TRAEFIK_ACME_ONHOSTRULE=${acme_onhostrule} +{{- end}} + - TRAEFIK_INSECURE_SKIP=${insecure_skip} + volumes_from: + - traefik-conf +{{- if eq .Values.acme_enable "true"}} + - traefik-acme +{{- end}} +traefik-conf: + log_driver: '' + labels: + io.rancher.scheduler.global: 'true' + io.rancher.scheduler.affinity:host_label: ${host_label} + io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.start_once: 'true' + tty: true + log_opt: {} + image: rawmind/rancher-traefik:1.3.3 + net: none + volumes: + - /opt/tools +{{- if eq .Values.acme_enable "true"}} +traefik-acme: + net: 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 + environment: + - SERVICE_UID=10001 + - SERVICE_GID=10001 + - SERVICE_VOLUME=/opt/traefik/acme + volumes: + - ${VOLUME_NAME}:/opt/traefik/acme + volume_driver: ${VOLUME_DRIVER} + image: rawmind/alpine-volume:0.0.2-1 +{{- end}} diff --git a/templates/traefik/8/rancher-compose.yml b/templates/traefik/8/rancher-compose.yml new file mode 100644 index 0000000..49af3aa --- /dev/null +++ b/templates/traefik/8/rancher-compose.yml @@ -0,0 +1,123 @@ +.catalog: + name: traefik + version: v1.3.3-rancher2 + description: | + (Experimental) Traefik load balancer. + minimum_rancher_version: v0.59.0 + maintainer: "Raul Sanchez " + uuid: traefik-0 + questions: + - variable: "host_label" + description: "Host label where to run traefik service." + label: "Host label:" + required: true + default: "traefik_lb=true" + type: "string" + - variable: "http_port" + description: "Traefik http public port to listen." + label: "Http port:" + required: true + default: 8080 + type: "int" + - variable: "https_port" + description: "Traefik https public port to listen." + label: "Https port:" + required: true + default: 8443 + type: "int" + - variable: "admin_port" + description: "Traefik admin public port to listen." + label: "Admin port:" + required: true + default: 8000 + type: "int" + - variable: "https_enable" + label: "Enable HTTPS:" + description: | + Enable https working mode. If you activate, you need to fill SSL key and SSL crt in order to work. + default: false + required: true + type: enum + options: + - false + - true + - only + - variable: "acme_enable" + description: "Enable acme support on traefik." + label: "Enable ACME:" + required: true + default: false + type: "boolean" + - variable: "acme_email" + description: "ACME user email." + label: "ACME email:" + required: true + default: "test@traefik.io" + type: "string" + - variable: "acme_ondemand" + description: "Enable acme ondemand." + label: "ACME ondemand:" + required: true + default: true + type: "boolean" + - variable: "acme_onhostrule" + description: "Enable acme onHostRule." + label: "ACME onHostRule:" + required: true + default: true + type: "boolean" + - variable: "ssl_key" + description: "SSL key to secure the service. *Required if you enable https" + label: "SSL key" + type: "multiline" + required: false + default: "" + - variable: "ssl_crt" + description: "SSL cert to secure the service. *Required if you enable https" + label: "SSL crt" + type: "multiline" + required: false + default: "" + - variable: "insecure_skip" + description: "Enable InsecureSkipVerify param." + label: "InsecureSkipVerify:" + required: true + default: false + type: "boolean" + - variable: "refresh_interval" + description: "Interval to poll/apply configuration changes." + label: "Refresh Interval (s):" + required: true + default: 10 + type: "int" + - variable: "VOLUME_DRIVER" + description: "The VOLUME driver to associate with this server" + label: "VOLUME Driver" + required: true + default: "rancher-nfs" + type: enum + options: # List of options if using type of `enum` + - rancher-nfs + - rancher-efs + - rancher-ebs + - variable: "VOLUME_NAME" + description: "The VOLUME name to associate with this server" + label: "VOLUME Name" + required: true + default: "TRAEFIK" + type: "string" +traefik: + retain_ip: true + health_check: + port: 8000 + interval: 5000 + unhealthy_threshold: 3 + request_line: 'GET /dashboard/# HTTP/1.0' + healthy_threshold: 2 + response_timeout: 5000 + metadata: + traefik: + ssl_key: | + ${ssl_key} + ssl_crt: | + ${ssl_crt} diff --git a/templates/traefik/config.yml b/templates/traefik/config.yml index 131b31c..5aa689f 100644 --- a/templates/traefik/config.yml +++ b/templates/traefik/config.yml @@ -1,9 +1,9 @@ name: Traefik description: | (Experimental) Traefik active load balancer -version: v1.3.3-rancher1 +version: v1.3.3-rancher2 category: Load Balancing maintainer: "Raul Sanchez " minimum_rancher_version: v0.59.0 -license: +license: projectURL: https://github.com/rawmind0/alpine-traefik From 03876184e1cc37e938b1a5a962fa9384079edd19 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Fri, 21 Jul 2017 15:41:17 -0500 Subject: [PATCH 09/51] Added storage driver choice --- templates/es-cluster/2/README.md | 5 + templates/es-cluster/2/docker-compose.yml.tpl | 131 ++++++++++++++++++ templates/es-cluster/2/rancher-compose.yml | 111 +++++++++++++++ templates/es-cluster/config.yml | 4 +- 4 files changed, 249 insertions(+), 2 deletions(-) create mode 100644 templates/es-cluster/2/README.md create mode 100644 templates/es-cluster/2/docker-compose.yml.tpl create mode 100644 templates/es-cluster/2/rancher-compose.yml diff --git a/templates/es-cluster/2/README.md b/templates/es-cluster/2/README.md new file mode 100644 index 0000000..c662188 --- /dev/null +++ b/templates/es-cluster/2/README.md @@ -0,0 +1,5 @@ +# Elasticsearch Cluster + +A scalable Elasticsearch cluster + +WARN: To avoid vm.max_map_count errors you could set "Update host sysctl" to true. Then param vm.max_map_count will be update to 262144 if it's less in your hosts. diff --git a/templates/es-cluster/2/docker-compose.yml.tpl b/templates/es-cluster/2/docker-compose.yml.tpl new file mode 100644 index 0000000..f4706fd --- /dev/null +++ b/templates/es-cluster/2/docker-compose.yml.tpl @@ -0,0 +1,131 @@ +version: '2' +services: + es-master: + 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: es-storage + {{- if eq .Values.UPDATE_SYSCTL "true" -}} + ,es-sysctl + {{- end}} + image: docker.elastic.co/elasticsearch/elasticsearch:5.4.2 + environment: + - "cluster.name=${cluster_name}" + - "node.name=$${HOSTNAME}" + - "bootstrap.memory_lock=true" + - "xpack.security.enabled=false" + - "ES_JAVA_OPTS=-Xms${master_heap_size} -Xmx${master_heap_size}" + - "discovery.zen.ping.unicast.hosts=es-master" + - "discovery.zen.minimum_master_nodes=${minimum_master_nodes}" + - "node.master=true" + - "node.data=false" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + mem_limit: ${master_mem_limit} + mem_swappiness: 0 + cap_add: + - IPC_LOCK + volumes_from: + - es-storage + + es-data: + 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: es-storage + {{- if eq .Values.UPDATE_SYSCTL "true" -}} + ,es-sysctl + {{- end}} + image: docker.elastic.co/elasticsearch/elasticsearch:5.4.2 + environment: + - "cluster.name=${cluster_name}" + - "node.name=$${HOSTNAME}" + - "bootstrap.memory_lock=true" + - "xpack.security.enabled=false" + - "discovery.zen.ping.unicast.hosts=es-master" + - "ES_JAVA_OPTS=-Xms${data_heap_size} -Xmx${data_heap_size}" + - "node.master=false" + - "node.data=true" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + mem_limit: ${data_mem_limit} + mem_swappiness: 0 + cap_add: + - IPC_LOCK + volumes_from: + - es-storage + depends_on: + - es-master + + es-client: + 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: es-storage + {{- if eq .Values.UPDATE_SYSCTL "true" -}} + ,es-sysctl + {{- end}} + image: docker.elastic.co/elasticsearch/elasticsearch:5.4.2 + environment: + - "cluster.name=${cluster_name}" + - "node.name=$${HOSTNAME}" + - "bootstrap.memory_lock=true" + - "xpack.security.enabled=false" + - "discovery.zen.ping.unicast.hosts=es-master" + - "ES_JAVA_OPTS=-Xms${client_heap_size} -Xmx${client_heap_size}" + - "node.master=false" + - "node.data=false" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + mem_limit: ${client_mem_limit} + mem_swappiness: 0 + cap_add: + - IPC_LOCK + volumes_from: + - es-storage + depends_on: + - es-master + + es-storage: + labels: + io.rancher.container.start_once: true + network_mode: none + image: rawmind/alpine-volume:0.0.2-1 + environment: + - SERVICE_UID=1000 + - SERVICE_GID=1000 + - SERVICE_VOLUME=/usr/share/elasticsearch/data + volumes: + - es-storage-volume:/usr/share/elasticsearch/data + + {{- if eq .Values.UPDATE_SYSCTL "true" }} + es-sysctl: + labels: + io.rancher.container.start_once: true + network_mode: none + image: rawmind/alpine-sysctl:0.1 + privileged: true + environment: + - "SYSCTL_KEY=vm.max_map_count" + - "SYSCTL_VALUE=262144" + {{- end}} + +volumes: + es-storage-volume: + driver: ${VOLUME_DRIVER} + per_container: true diff --git a/templates/es-cluster/2/rancher-compose.yml b/templates/es-cluster/2/rancher-compose.yml new file mode 100644 index 0000000..aefd049 --- /dev/null +++ b/templates/es-cluster/2/rancher-compose.yml @@ -0,0 +1,111 @@ +version: '2' +catalog: + name: Elasticsearch Cluster + version: 5.4.2-rancher2 + description: Scalable Elasticsearch Cluster + + questions: + - variable: "cluster_name" + type: "string" + required: true + label: "Cluster name" + description: "Name of the Elasticsearch Cluster" + default: "es-cluster" + + - variable: "UPDATE_SYSCTL" + label: "Update host sysctl:" + description: | + Set true to avoid vm.max_map_count errors. + WARN: If set true, host param vm.max_map_count will be update to 262144. + default: false + required: true + type: enum + options: + - false + - true + + - variable: "master_heap_size" + type: "string" + required: true + label: "Heap size (master nodes)" + description: "Heap size to be allocated for Java (mater nodes)" + default: "512m" + + - variable: "master_mem_limit" + type: "int" + required: true + label: "Memory limit in byte (master nodes)" + description: "Memory limit in Byte per elasticsearch container. AT LEAST double the heap size! (master nodes)" + default: 1073741824 + + - variable: "data_heap_size" + type: "string" + required: true + label: "Heap size (data nodes)" + description: "Heap size to be allocated for Java (mater nodes)" + default: "512m" + + - variable: "data_mem_limit" + type: "int" + required: true + label: "Memory limit in byte (data nodes)" + description: "Memory limit in Byte per elasticsearch container. AT LEAST double the heap size! (data nodes)" + default: 1073741824 + + - variable: "client_heap_size" + type: "string" + required: true + label: "Heap size (client nodes)" + description: "Heap size to be allocated for Java (mater nodes)" + default: "512m" + + - variable: "client_mem_limit" + type: "int" + required: true + label: "Memory limit in byte (client nodes)" + description: "Memory limit in Byte per elasticsearch container. AT LEAST double the heap size! (client nodes)" + default: 1073741824 + + - variable: "minimum_master_nodes" + type: "int" + required: true + label: "# of minimum Master Nodes" + description: "Set the number of required master nodes to reach quorum. Sets initial scale to this value as well" + default: 3 + + - variable: "initial_data_nodes" + type: "int" + required: true + label: "# of initial data nodes" + description: "Set the initial number of data nodes" + default: 2 + + - variable: "initial_client_nodes" + type: "int" + required: true + label: "# of initial client nodes" + description: "Set the initial number of client nodes" + default: 1 + + - variable: "VOLUME_DRIVER" + description: "The VOLUME driver to associate with this server" + label: "VOLUME Driver" + required: true + default: "local" + type: enum + options: + - local + - rancher-nfs + - rancher-efs + - rancher-ebs + +services: + + es-master: + scale: ${minimum_master_nodes} + + es-data: + scale: ${initial_data_nodes} + + es-client: + scale: ${initial_client_nodes} diff --git a/templates/es-cluster/config.yml b/templates/es-cluster/config.yml index 8b9077b..a0984cb 100644 --- a/templates/es-cluster/config.yml +++ b/templates/es-cluster/config.yml @@ -1,5 +1,5 @@ name: Elasticsearch Cluster 5.4.2 description: | Elasticsearch, you know for search! -version: 5.4.2-rancher1 -category: ELK \ No newline at end of file +version: 5.4.2-rancher2 +category: ELK From 69fe7ae6102ac988da88f2481b93f9d117337bee Mon Sep 17 00:00:00 2001 From: Chris Fordham Date: Mon, 24 Jul 2017 09:22:54 +1000 Subject: [PATCH 10/51] Use specifically v0.6.4 of the haproxy image. --- templates/mysql/0/docker-compose.yml.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/mysql/0/docker-compose.yml.tpl b/templates/mysql/0/docker-compose.yml.tpl index cbc2426..1ead6ef 100644 --- a/templates/mysql/0/docker-compose.yml.tpl +++ b/templates/mysql/0/docker-compose.yml.tpl @@ -1,7 +1,7 @@ version: '2' services: mysql-lb: - image: rancher/lb-service-haproxy + image: rancher/lb-service-haproxy:v0.6.4 links: - mysql ports: From 842ab6a5aced35b560849cd5d3acf2056a4f8cf9 Mon Sep 17 00:00:00 2001 From: Chris Fordham Date: Mon, 24 Jul 2017 21:41:13 +1000 Subject: [PATCH 11/51] Use mysql_lb_port in dest port as well; remove unnecessary link to the mysql service. --- templates/mysql/0/docker-compose.yml.tpl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/templates/mysql/0/docker-compose.yml.tpl b/templates/mysql/0/docker-compose.yml.tpl index 1ead6ef..b014999 100644 --- a/templates/mysql/0/docker-compose.yml.tpl +++ b/templates/mysql/0/docker-compose.yml.tpl @@ -2,10 +2,8 @@ version: '2' services: mysql-lb: image: rancher/lb-service-haproxy:v0.6.4 - links: - - mysql ports: - - ${mysql_lb_port}:3306 + - ${mysql_lb_port}:${mysql_lb_port} mysql-data: image: busybox labels: From 395c15c72f051ee03e486e784fe1dceddd09db00 Mon Sep 17 00:00:00 2001 From: Chris Fordham Date: Mon, 24 Jul 2017 22:31:56 +1000 Subject: [PATCH 12/51] Don't expose ports directly for drone server. --- templates/drone/4/docker-compose.yml.tpl | 3 --- 1 file changed, 3 deletions(-) diff --git a/templates/drone/4/docker-compose.yml.tpl b/templates/drone/4/docker-compose.yml.tpl index 198c832..7574992 100644 --- a/templates/drone/4/docker-compose.yml.tpl +++ b/templates/drone/4/docker-compose.yml.tpl @@ -93,9 +93,6 @@ services: io.rancher.sidekicks: server-volume volumes_from: - server-volume - ports: - - 9000/tcp - - 8000/tcp server-volume: image: rawmind/alpine-volume:0.0.2-1 environment: From d16edb7b5c74abc9d3a5f8115261a4c6fd824825 Mon Sep 17 00:00:00 2001 From: Chris Fordham Date: Mon, 24 Jul 2017 22:35:43 +1000 Subject: [PATCH 13/51] Use modern rancher lb image and fix port map. --- templates/drone/4/docker-compose.yml.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/drone/4/docker-compose.yml.tpl b/templates/drone/4/docker-compose.yml.tpl index 7574992..14c3d7f 100644 --- a/templates/drone/4/docker-compose.yml.tpl +++ b/templates/drone/4/docker-compose.yml.tpl @@ -108,9 +108,9 @@ services: io.rancher.container.hostname_override: container_name {{- end}} lb: - image: rancher/load-balancer-service + image: rancher/lb-service-haproxy:v0.6.4 ports: - - ${host_port}:8000/tcp + - ${host_port}:${host_port} links: - server:server labels: From 13b02e065487993130b01fd5f4a639166a68030a Mon Sep 17 00:00:00 2001 From: Franz Garcia Date: Mon, 24 Jul 2017 16:04:25 -0400 Subject: [PATCH 14/51] Updated cloud.ca config.yml to use v1.0.2 --- machine-templates/cloudca/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machine-templates/cloudca/config.yml b/machine-templates/cloudca/config.yml index f63e58e..ab1cf0e 100644 --- a/machine-templates/cloudca/config.yml +++ b/machine-templates/cloudca/config.yml @@ -1,2 +1,2 @@ name: cloudca -version: "v1.0.1" +version: "v1.0.2" From f826533c59f8b80cd648f7740ac5d00c24c65f1d Mon Sep 17 00:00:00 2001 From: Chris Fordham Date: Tue, 25 Jul 2017 21:30:39 +1000 Subject: [PATCH 15/51] Employ use of drone version/tag instead of separate images, lb as global schedule. --- templates/drone/4/docker-compose.yml.tpl | 7 +++---- templates/drone/4/rancher-compose.yml | 21 ++++++++++----------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/templates/drone/4/docker-compose.yml.tpl b/templates/drone/4/docker-compose.yml.tpl index 14c3d7f..b822ae1 100644 --- a/templates/drone/4/docker-compose.yml.tpl +++ b/templates/drone/4/docker-compose.yml.tpl @@ -1,7 +1,7 @@ version: '2' services: agent: - image: ${drone_agent_image} + image: drone/agent:${drone_version} environment: DRONE_SERVER: ${drone_server} DRONE_SECRET: ${drone_secret} @@ -27,7 +27,7 @@ services: io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} io.rancher.container.hostname_override: container_name server: - image: ${drone_server_image} + image: drone/drone:${drone_version} environment: DRONE_HOST: ${drone_host} GIN_MODE: ${gin_mode} @@ -111,7 +111,6 @@ services: image: rancher/lb-service-haproxy:v0.6.4 ports: - ${host_port}:${host_port} - links: - - server:server labels: + io.rancher.scheduler.global: 'true' io.rancher.scheduler.affinity:host_label_soft: drone_lb=true diff --git a/templates/drone/4/rancher-compose.yml b/templates/drone/4/rancher-compose.yml index 1c12f52..2f7dc05 100644 --- a/templates/drone/4/rancher-compose.yml +++ b/templates/drone/4/rancher-compose.yml @@ -99,16 +99,16 @@ catalog: description: "Drone sever identifier. Used by the agent to connect to the server (does not require change)." type: string default: "drone:9000" - - variable: drone_server_image - label: Drone Server Image - description: "Docker image used for the Drone server container." - type: string - default: "drone/drone:0.8.0-rc.1" - - variable: drone_agent_image - label: Drone Agent Image - description: "Docker image used for the Drone agent container(s)." - type: string - default: "drone/agent:0.8.0-rc.1" + - variable: drone_version + label: Drone Version + description: "Drone version/Docker tag used for the Drone container images." + type: enum + default: "0.8.0-rc.1" + options: + - 0.8.0-rc.1 + - 0.8.0 + - '0.8' + - latest - variable: database_driver label: Database Driver description: "Database driver. If sqlite, additional volume would be mounted at /var/lib/drone." @@ -164,7 +164,6 @@ services: healthy_threshold: 2 response_timeout: 2000 lb: - scale: 1 start_on_create: true lb_config: certs: [] From caa454c1237123d0b0f9d12dc72d5519d5c3f15f Mon Sep 17 00:00:00 2001 From: Chris Fordham Date: Tue, 25 Jul 2017 22:12:06 +1000 Subject: [PATCH 16/51] Parameterise the host LB host label used for affinity scheduling. --- templates/drone/4/docker-compose.yml.tpl | 2 +- templates/drone/4/rancher-compose.yml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/drone/4/docker-compose.yml.tpl b/templates/drone/4/docker-compose.yml.tpl index b822ae1..b2ed55b 100644 --- a/templates/drone/4/docker-compose.yml.tpl +++ b/templates/drone/4/docker-compose.yml.tpl @@ -113,4 +113,4 @@ services: - ${host_port}:${host_port} labels: io.rancher.scheduler.global: 'true' - io.rancher.scheduler.affinity:host_label_soft: drone_lb=true + io.rancher.scheduler.affinity:host_label_soft: ${drone_lb_host_label} diff --git a/templates/drone/4/rancher-compose.yml b/templates/drone/4/rancher-compose.yml index 2f7dc05..bac6c11 100644 --- a/templates/drone/4/rancher-compose.yml +++ b/templates/drone/4/rancher-compose.yml @@ -148,6 +148,12 @@ catalog: - 'true' - 'false' default: 'false' + - variable: drone_lb_host_label + label: Drone LB Host Label + description: Host Label (soft affinity) for scheduling of the load balancer service. + required: true + default: "drone_lb=true" + type: string services: agent: scale: ${agent_scale} From 38e577c1cabaaed07162d838c2cdf8d3006e0744 Mon Sep 17 00:00:00 2001 From: Chris Fordham Date: Tue, 25 Jul 2017 22:13:11 +1000 Subject: [PATCH 17/51] Minor casing fix. --- templates/drone/4/rancher-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/drone/4/rancher-compose.yml b/templates/drone/4/rancher-compose.yml index bac6c11..ee8bbec 100644 --- a/templates/drone/4/rancher-compose.yml +++ b/templates/drone/4/rancher-compose.yml @@ -150,7 +150,7 @@ catalog: default: 'false' - variable: drone_lb_host_label label: Drone LB Host Label - description: Host Label (soft affinity) for scheduling of the load balancer service. + description: Host label (soft affinity) for scheduling of the load balancer service. required: true default: "drone_lb=true" type: string From d755a32613c8345c407b552e8526d25f2a274385 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Tue, 25 Jul 2017 10:59:53 -0500 Subject: [PATCH 18/51] Added Reaction Commerce --- templates/reactioncommerce/0/README.md | 17 +++++ .../reactioncommerce/0/docker-compose.yml | 36 +++++++++ .../reactioncommerce/0/rancher-compose.yml | 69 ++++++++++++++++++ templates/reactioncommerce/README.md | 3 + .../catalogIcon-reactioncommerce.png | Bin 0 -> 1721 bytes templates/reactioncommerce/config.yml | 5 ++ 6 files changed, 130 insertions(+) create mode 100644 templates/reactioncommerce/0/README.md create mode 100644 templates/reactioncommerce/0/docker-compose.yml create mode 100644 templates/reactioncommerce/0/rancher-compose.yml create mode 100644 templates/reactioncommerce/README.md create mode 100644 templates/reactioncommerce/catalogIcon-reactioncommerce.png create mode 100644 templates/reactioncommerce/config.yml diff --git a/templates/reactioncommerce/0/README.md b/templates/reactioncommerce/0/README.md new file mode 100644 index 0000000..7f09fa4 --- /dev/null +++ b/templates/reactioncommerce/0/README.md @@ -0,0 +1,17 @@ +### Docs + +The Reaction Commerce official docs are +[here](https://docs.reactioncommerce.com/) + +This template implements the same method as found +[here](https://docs.reactioncommerce.com/reaction-docs/master/deploying-reaction-using-docker) + +### Traefik + +For external access you'll need to setup [traefik](https://github.com/rancher/community-catalog/tree/master/templates/traefik), all the appropriate +labels will be set when you set the hostname and domain below + +### Support + +There are experimental versions of this template in this catalog [here](https://github.com/ohmydocker/ohmydocker-catalog) which implement +other setups. Issues, PRs, etc are welcome there. diff --git a/templates/reactioncommerce/0/docker-compose.yml b/templates/reactioncommerce/0/docker-compose.yml new file mode 100644 index 0000000..78f4a8b --- /dev/null +++ b/templates/reactioncommerce/0/docker-compose.yml @@ -0,0 +1,36 @@ +version: '2' +services: + reaction: + image: reactioncommerce/reaction:v1.4.0 + restart: always + labels: + io.rancher.scheduler.affinity:host_label: ${host_label} + traefik.enable: true + traefik.alias: ${REACTION_HOST} + traefik.domain: ${REACTION_DOMAIN} + traefik.acme: true + traefik.port: 3000 + environment: + MONGO_URL: "mongodb://meango/reaction" + ROOT_URL: "http://${REACTION_HOST}.${REACTION_DOMAIN}" + REACTION_EMAIL: ${REACTION_EMAIL} + REACTION_USER: ${REACTION_USER} + REACTION_AUTH: ${REACTION_AUTH} + + meango: + command: mongod --storageEngine=wiredTiger + restart: always + environment: + MONGO_SERVICE_NAME: meango + CATTLE_SCRIPT_DEBUG: ${debug} + tty: true + image: mongo:3.4 + labels: + io.rancher.scheduler.affinity:host_label: ${host_label} + io.rancher.container.hostname_override: container_name + volumes: + - meangodata:/data/db + +volumes: + meangodata: + driver: ${VOLUME_DRIVER} diff --git a/templates/reactioncommerce/0/rancher-compose.yml b/templates/reactioncommerce/0/rancher-compose.yml new file mode 100644 index 0000000..05375ff --- /dev/null +++ b/templates/reactioncommerce/0/rancher-compose.yml @@ -0,0 +1,69 @@ +.catalog: + name: "reactiondemo" + version: 1.4.0-rancher1 + description: "E-commerce powered by reaction" + uuid: reaction-0 + minimum_rancher_version: v0.51.0 + questions: + - variable: "REACTION_HOST" + description: "Hostname to use for the reaction server" + label: "reaction Hostname" + required: true + default: "reaction" + type: "string" + - variable: "REACTION_DOMAIN" + description: "Domain to use for the reaction server" + label: "reaction Domain" + required: true + default: "" + type: "string" + - variable: host_label + label: "Host Label to reaction Tags" + description: | + Host label to use as reaction 'value' tag. + Example: 'reaction=true' + required: false + default: "private=true" + type: "string" + - variable: REACTION_EMAIL + label: "reaction Email" + required: true + default: "" + type: "string" + - variable: REACTION_USER + label: "reaction User" + required: true + default: "" + type: "string" + - variable: REACTION_AUTH + label: "reaction Auth" + required: true + default: "" + type: "password" + - variable: "VOLUME_DRIVER" + description: "The VOLUME driver to associate with this server" + label: "VOLUME Driver" + required: true + default: "local" + type: enum + options: + - local + - rancher-nfs + - rancher-efs + - rancher-ebs + +reaction: + scale: 1 + retain_ip: true + health_check: + healthy_threshold: 2 + response_timeout: 5000 + port: 3000 + unhealthy_threshold: 3 + interval: 5000 + strategy: recreate + request_line: GET / # HTTP/1.0 + +meango: + scale: 1 + retain_ip: true diff --git a/templates/reactioncommerce/README.md b/templates/reactioncommerce/README.md new file mode 100644 index 0000000..d507eac --- /dev/null +++ b/templates/reactioncommerce/README.md @@ -0,0 +1,3 @@ +#[ReactionCommerce](http://reactioncommerce.com/) + + diff --git a/templates/reactioncommerce/catalogIcon-reactioncommerce.png b/templates/reactioncommerce/catalogIcon-reactioncommerce.png new file mode 100644 index 0000000000000000000000000000000000000000..bd5e651a7a11fdc18b1941903c4287b903b4cbb0 GIT binary patch literal 1721 zcmV;q21fabP)Px*b4f%&R9Fe^n0agzbri?n`_0U5TUw;W8n1Sh+g*rJQW`uGhzd~=5RfC0D4^RS z#M^ivm=N&@NsUKnw+I@~ASx;;36OXrAcq>6wTf2SDp8uYXsp{n>*nskhW&Zgedn0`=-qg+(Ar?FRo`3?f0>4P=SAI|=G zPoIk__lU=(dK%>K?Eeqo!+b9 zievVDT4X(-ezZ(3@!?Fr(-Y^BvHdws(z;r-%wXoXvn^wG($!ZJ>WJ5ROmpWx8xH|& z3oxbwZ0X#x@RY8!UgWy^Ro_uP0(Va3S7RJUc8bs-B|KFHbDmfgi`R(gdztBl9)k;2 z+6!HBH#5mE0gFeIY1X>QPA?Izz;S0GM{e@rPMYQhZP*)3)~8lzlDP=uX3EQ*k?Lr_ zl-=};#N=S_9B=i>`m(7r{;m&qQoR_rPu@kxQ-)C#&H9NPxneHdW2Xph~Nqc%E<$2(om|co8u?||wC*s+s3?P3{I_RSl%A8#dxBKxo5 zimUAFQK#^-${jE;Q;8G;@?m7&CY&+EADc$bG*=QMB;{^ofkRkLlH8n+x3}0E5XNzs z^jxqwF#p@D1}6_u9sW3OI8WfIhSXCc5=F?iWRW?;DsY;@6n4L8{$^c*-G_wq&xIUb zdcd(40$@38*0E_#5=kp+YukZR5@N--HIzl3`aP82Kdyubt*kv4V4rwkp1=nTjf_c< zb8%Y>9oW`vf1fb)1r6ols1fY5tVzdL!B_=6w8;qOjAHE!6_>UN@hM7~iF0QmULDXZ( zkq@!B2et~^&1geXgVUOJBU}*(eCEI*;XB$}X-Qglt$~i7SB4eI7Hf#1WM@~}-G+G+ zvCabx<&hb?%KjP51I)l7^=q`Ir4aYpyaF!41#5px+t_{4@M2S`5%A;+!%(y4m4%~j zvSX1;v;lK}GL%^oG^{Okwe|-n8;h{!c?X9?2m*wtFe6e0wXK%?&?^46TI*sLjF=A=a16j7C{EP zQR&Y|;h4k0z(736+n93;LR*Eg1BPXkV%?hVLizLf(9bY@Gfag|IJ;ISJ6=GFUxN_T zK)5#g3t%7%Q`Td%9*ug|5B|P&ZZ!Pt>gxDn(X<2)_6_Dtg=gaa!d~K#%Oiq$*3;i! zKloRFygO%~DFdgJ8VTLKj-v>=y0@`BQZaN@ZJxtszf>yuBt(BLDt;X+bzP8*hJ>VF z1~>|+dbMwXM6q49cgJvd=J;@#Y(Y3l)Jm6>l2@lo4>i9I)6xdfDegz)& z_Vg3h{-ilry3yNaN(;_gw01h9j2&r*Vb*#hJpah}iS8ZIoTAAM(eOJBC)(mMte??b zV>I&4G2C}jre@$yinU`j@;}@$IxI82SN|uh@HSh9+V(>Rw>NYS|C|0Bq2bG+B<+Eb P00000NkvXXu0mjfGF)BE literal 0 HcmV?d00001 diff --git a/templates/reactioncommerce/config.yml b/templates/reactioncommerce/config.yml new file mode 100644 index 0000000..7719f54 --- /dev/null +++ b/templates/reactioncommerce/config.yml @@ -0,0 +1,5 @@ +name: Reaction Commerce +description: | + E-commerce powered by Reaction +version: 1.4.0-rancher1 +category: Repository From c8bc2f975ad37766c90fabe25691e8bfa6e94da1 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Tue, 25 Jul 2017 11:02:55 -0500 Subject: [PATCH 19/51] version2yml --- .../reactioncommerce/0/rancher-compose.yml | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/templates/reactioncommerce/0/rancher-compose.yml b/templates/reactioncommerce/0/rancher-compose.yml index 05375ff..7d5e135 100644 --- a/templates/reactioncommerce/0/rancher-compose.yml +++ b/templates/reactioncommerce/0/rancher-compose.yml @@ -1,4 +1,5 @@ -.catalog: +version: '2' +catalog: name: "reactiondemo" version: 1.4.0-rancher1 description: "E-commerce powered by reaction" @@ -52,18 +53,19 @@ - rancher-efs - rancher-ebs -reaction: - scale: 1 - retain_ip: true - health_check: - healthy_threshold: 2 - response_timeout: 5000 - port: 3000 - unhealthy_threshold: 3 - interval: 5000 - strategy: recreate - request_line: GET / # HTTP/1.0 +services: + reaction: + scale: 1 + retain_ip: true + health_check: + healthy_threshold: 2 + response_timeout: 5000 + port: 3000 + unhealthy_threshold: 3 + interval: 5000 + strategy: recreate + request_line: GET / # HTTP/1.0 -meango: - scale: 1 - retain_ip: true + meango: + scale: 1 + retain_ip: true From b041a2fa64121d20e9f917192eba108dc8933dba Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Tue, 25 Jul 2017 11:04:31 -0500 Subject: [PATCH 20/51] Removed excess whitespace --- templates/reactioncommerce/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/reactioncommerce/README.md b/templates/reactioncommerce/README.md index d507eac..675e427 100644 --- a/templates/reactioncommerce/README.md +++ b/templates/reactioncommerce/README.md @@ -1,3 +1 @@ #[ReactionCommerce](http://reactioncommerce.com/) - - From d81544c93bca5fdd38293cd60031ce38f23c1620 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Tue, 25 Jul 2017 11:29:34 -0500 Subject: [PATCH 21/51] Changing meango to mongo, not exactly a meanstack here --- templates/reactioncommerce/0/docker-compose.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/reactioncommerce/0/docker-compose.yml b/templates/reactioncommerce/0/docker-compose.yml index 78f4a8b..0dd55e8 100644 --- a/templates/reactioncommerce/0/docker-compose.yml +++ b/templates/reactioncommerce/0/docker-compose.yml @@ -11,17 +11,17 @@ services: traefik.acme: true traefik.port: 3000 environment: - MONGO_URL: "mongodb://meango/reaction" + MONGO_URL: "mongodb://mongo/reaction" ROOT_URL: "http://${REACTION_HOST}.${REACTION_DOMAIN}" REACTION_EMAIL: ${REACTION_EMAIL} REACTION_USER: ${REACTION_USER} REACTION_AUTH: ${REACTION_AUTH} - meango: + mongo: command: mongod --storageEngine=wiredTiger restart: always environment: - MONGO_SERVICE_NAME: meango + MONGO_SERVICE_NAME: mongo CATTLE_SCRIPT_DEBUG: ${debug} tty: true image: mongo:3.4 @@ -29,8 +29,8 @@ services: io.rancher.scheduler.affinity:host_label: ${host_label} io.rancher.container.hostname_override: container_name volumes: - - meangodata:/data/db + - mongodata:/data/db volumes: - meangodata: + mongodata: driver: ${VOLUME_DRIVER} From 7e1f4f1cd78348967eb5aa3177100c908662adc1 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Tue, 25 Jul 2017 11:33:12 -0500 Subject: [PATCH 22/51] mongo --- templates/reactioncommerce/0/rancher-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/reactioncommerce/0/rancher-compose.yml b/templates/reactioncommerce/0/rancher-compose.yml index 7d5e135..3ad84f6 100644 --- a/templates/reactioncommerce/0/rancher-compose.yml +++ b/templates/reactioncommerce/0/rancher-compose.yml @@ -66,6 +66,6 @@ services: strategy: recreate request_line: GET / # HTTP/1.0 - meango: + mongo: scale: 1 retain_ip: true From 4f2223d74013bc3318bfb822a83887937c33df25 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Tue, 25 Jul 2017 12:13:42 -0500 Subject: [PATCH 23/51] header --- templates/reactioncommerce/0/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/reactioncommerce/0/README.md b/templates/reactioncommerce/0/README.md index 7f09fa4..95b9406 100644 --- a/templates/reactioncommerce/0/README.md +++ b/templates/reactioncommerce/0/README.md @@ -1,3 +1,5 @@ +# [ReactionCommerce](http://reactioncommerce.com/) + ### Docs The Reaction Commerce official docs are From feb0eac179df4b8c40bcf2418760dd676b96c45c Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Tue, 25 Jul 2017 13:46:18 -0500 Subject: [PATCH 24/51] Upgrade to mongo 3.4 and added volume driver choice --- templates/MongoDB/3/README.md | 18 +++++++++ templates/MongoDB/3/docker-compose.yml | 42 ++++++++++++++++++++ templates/MongoDB/3/rancher-compose.yml | 52 +++++++++++++++++++++++++ templates/MongoDB/config.yml | 2 +- 4 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 templates/MongoDB/3/README.md create mode 100644 templates/MongoDB/3/docker-compose.yml create mode 100644 templates/MongoDB/3/rancher-compose.yml diff --git a/templates/MongoDB/3/README.md b/templates/MongoDB/3/README.md new file mode 100644 index 0000000..5d1109f --- /dev/null +++ b/templates/MongoDB/3/README.md @@ -0,0 +1,18 @@ +# MongoDB + + +### Info: + + This template creates MongoDB replica set on top of Rancher. Replica set size starts with 3 MongoDB instances, the replica set has the ability to scale up automatically when adding new instances. + + +### Usage: + + Select MongoDB from catalog. + + Enter the name of the replica set. + + Click deploy. + + MongoDB can now be accessed over the Rancher network. + diff --git a/templates/MongoDB/3/docker-compose.yml b/templates/MongoDB/3/docker-compose.yml new file mode 100644 index 0000000..fb26491 --- /dev/null +++ b/templates/MongoDB/3/docker-compose.yml @@ -0,0 +1,42 @@ +version: '2' +services: + mongo-cluster: + restart: always + environment: + MONGO_SERVICE_NAME: mongo-cluster + CATTLE_SCRIPT_DEBUG: ${debug} + entrypoint: /opt/rancher/bin/entrypoint.sh + command: + - --replSet + - "${replset_name}" + image: mongo:3.4 + labels: + io.rancher.scheduler.affinity:host_label: ${host_label} + io.rancher.container.hostname_override: container_name + io.rancher.sidekicks: mongo-base, mongo-datavolume + volumes_from: + - mongo-datavolume + - mongo-base + ports: + - 27017:27017/tcp + mongo-base: + restart: always + labels: + io.rancher.scheduler.affinity:host_label: ${host_label} + io.rancher.container.hostname_override: container_name + io.rancher.container.start_once: true + image: rancher/mongodb-conf:v0.1.1 + stdin_open: true + entrypoint: /bin/true + mongo-datavolume: + labels: + io.rancher.scheduler.affinity:host_label: ${host_label} + io.rancher.container.hostname_override: container_name + io.rancher.container.start_once: true + volumes: + - mongodata:/data/db + entrypoint: /bin/true + image: busybox +volumes: + mongodata: + driver: ${VOLUME_DRIVER} diff --git a/templates/MongoDB/3/rancher-compose.yml b/templates/MongoDB/3/rancher-compose.yml new file mode 100644 index 0000000..8c90ba7 --- /dev/null +++ b/templates/MongoDB/3/rancher-compose.yml @@ -0,0 +1,52 @@ +version: '2' +catalog: + name: "MongoDB" + version: "3.4-rancher1" + description: "MongoDB Replica Set" + uuid: mongodb-1 + minimum_rancher_version: v0.46.0 + questions: + - variable: replset_name + description: "Name of the MongoDB replicaSet" + label: "ReplicaSet Name" + type: "string" + required: true + default: "rs0" + - variable: host_label + label: "Host Label to MongoDB Tags" + description: | + Host label to use as MongoDB 'value' tag. + Example: 'database' + required: false + type: "string" + - variable: debug + description: "Enable Debug log for Mongo containers" + label: "Debug" + type: "string" + required: false + default: "" + - variable: "VOLUME_DRIVER" + description: "The VOLUME driver to associate with this server" + label: "VOLUME Driver" + required: true + default: "local" + type: enum + options: + - local + - rancher-nfs + - rancher-efs + - rancher-ebs + - variable: mongo_scale + description: "How many containers the MongoDB will scale to?" + label: "mongo scale" + type: "int" + required: true + default: "3" +services: + mongo-cluster: + scale: ${mongo_scale} + retain_ip: true + metadata: + mongo: + yml: + replset.name: "${replset_name}" diff --git a/templates/MongoDB/config.yml b/templates/MongoDB/config.yml index 4ea53c1..31cda18 100644 --- a/templates/MongoDB/config.yml +++ b/templates/MongoDB/config.yml @@ -1,5 +1,5 @@ name: MongoDB description: | MongoDB Replica Set. -version: 3.2-rancher2 +version: "3.4-rancher1" category: Databases From 00b8adbcf7b7f6358b2b08abd1f7346584e33209 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Tue, 25 Jul 2017 14:15:32 -0500 Subject: [PATCH 25/51] ommitted all the mongodb containers and added a question to set an external link in the next version --- templates/reactioncommerce/0/README.md | 6 ++ templates/reactioncommerce/1/README.md | 22 ++++++ .../reactioncommerce/1/docker-compose.yml | 20 ++++++ .../reactioncommerce/1/rancher-compose.yml | 70 +++++++++++++++++++ 4 files changed, 118 insertions(+) create mode 100644 templates/reactioncommerce/1/README.md create mode 100644 templates/reactioncommerce/1/docker-compose.yml create mode 100644 templates/reactioncommerce/1/rancher-compose.yml diff --git a/templates/reactioncommerce/0/README.md b/templates/reactioncommerce/0/README.md index 95b9406..8bd15d0 100644 --- a/templates/reactioncommerce/0/README.md +++ b/templates/reactioncommerce/0/README.md @@ -8,6 +8,12 @@ The Reaction Commerce official docs are This template implements the same method as found [here](https://docs.reactioncommerce.com/reaction-docs/master/deploying-reaction-using-docker) +### MongoDB + +This initial version pulls up its own mongodb just like the official +docker-compose.yml, if you have a mongo stack already running try the +`1.4.0-rancher2` version + ### Traefik For external access you'll need to setup [traefik](https://github.com/rancher/community-catalog/tree/master/templates/traefik), all the appropriate diff --git a/templates/reactioncommerce/1/README.md b/templates/reactioncommerce/1/README.md new file mode 100644 index 0000000..dd9a400 --- /dev/null +++ b/templates/reactioncommerce/1/README.md @@ -0,0 +1,22 @@ +### Docs + +The Reaction Commerce official docs are +[here](https://docs.reactioncommerce.com/) + +This template implements the same method as found +[here](https://docs.reactioncommerce.com/reaction-docs/master/deploying-reaction-using-docker) + +### MongoDB + +You'll need a mongodb stack running, choose it in the external link +question below + +### Traefik + +For external access you'll need to setup [traefik](https://github.com/rancher/community-catalog/tree/master/templates/traefik), all the appropriate +labels will be set when you set the hostname and domain below + +### Support + +There are experimental versions of this template in this catalog [here](https://github.com/ohmydocker/ohmydocker-catalog) which implement +other setups. Issues, PRs, etc are welcome there. diff --git a/templates/reactioncommerce/1/docker-compose.yml b/templates/reactioncommerce/1/docker-compose.yml new file mode 100644 index 0000000..8c80e37 --- /dev/null +++ b/templates/reactioncommerce/1/docker-compose.yml @@ -0,0 +1,20 @@ +version: '2' +services: + reaction: + image: reactioncommerce/reaction:v1.4.0 + restart: always + labels: + io.rancher.scheduler.affinity:host_label: ${host_label} + traefik.enable: true + traefik.alias: ${REACTION_HOST} + traefik.domain: ${REACTION_DOMAIN} + traefik.acme: true + traefik.port: 3000 + environment: + MONGO_URL: ${MONGO_URL} + ROOT_URL: "http://${REACTION_HOST}.${REACTION_DOMAIN}" + REACTION_EMAIL: ${REACTION_EMAIL} + REACTION_USER: ${REACTION_USER} + REACTION_AUTH: ${REACTION_AUTH} + external_links: + - ${mongo_link}:mongo diff --git a/templates/reactioncommerce/1/rancher-compose.yml b/templates/reactioncommerce/1/rancher-compose.yml new file mode 100644 index 0000000..7c7864a --- /dev/null +++ b/templates/reactioncommerce/1/rancher-compose.yml @@ -0,0 +1,70 @@ +version: '2' +catalog: + name: "reactiondemo" + version: 1.4.0-rancher2 + description: "E-commerce powered by reaction" + uuid: reaction-0 + minimum_rancher_version: v0.51.0 + questions: + - variable: "REACTION_HOST" + description: "Hostname to use for the reaction server" + label: "reaction Hostname" + required: true + default: "reaction" + type: "string" + - variable: "REACTION_DOMAIN" + description: "Domain to use for the reaction server" + label: "reaction Domain" + required: true + default: "" + type: "string" + - variable: host_label + label: "Host Label to reaction Tags" + description: | + Host label to use as reaction 'value' tag. + Example: 'reaction=true' + required: false + default: "private=true" + type: "string" + - variable: REACTION_EMAIL + label: "reaction Email" + required: true + default: "" + type: "string" + - variable: REACTION_USER + label: "reaction User" + required: true + default: "" + type: "string" + - variable: REACTION_AUTH + label: "reaction Auth" + required: true + default: "" + type: "password" + - variable: "mongo_link" + description: | + MongoDB external service link + cluster. + label: "External stack/service" + default: "" + required: true + type: "service" + - variable: "MONGO_URL" + default: "mongodb://mongo/reaction" + description: "The mongodb url to associate with this server. !!Do not change!! if you are setting the external link above!" + label: "mongo_url" + required: true + type: "string" + +services: + reaction: + scale: 1 + retain_ip: true + health_check: + healthy_threshold: 2 + response_timeout: 5000 + port: 3000 + unhealthy_threshold: 3 + interval: 5000 + strategy: recreate + request_line: GET / # HTTP/1.0 From 9852d3f53cdadb38e463f75e7825c1ac68a1458f Mon Sep 17 00:00:00 2001 From: Daniel Yu Date: Wed, 26 Jul 2017 16:48:55 +0800 Subject: [PATCH 26/51] persisting volume support, based on bitnami images --- templates/wordpress/1/docker-compose.yml | 29 +++++++++++++++++++++++ templates/wordpress/1/rancher-compose.yml | 26 ++++++++++++++++++++ templates/wordpress/config.yml | 2 +- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 templates/wordpress/1/docker-compose.yml create mode 100644 templates/wordpress/1/rancher-compose.yml diff --git a/templates/wordpress/1/docker-compose.yml b/templates/wordpress/1/docker-compose.yml new file mode 100644 index 0000000..c99aba0 --- /dev/null +++ b/templates/wordpress/1/docker-compose.yml @@ -0,0 +1,29 @@ +version: '2' +services: + mariadb: + image: 'bitnami/mariadb:latest' + volumes: + - 'mariadb_data:/bitnami' + environment: + - MARIADB_USER=bn_wordpress + - MARIADB_DATABASE=bitnami_wordpress + - ALLOW_EMPTY_PASSWORD=yes + wordpress: + image: 'bitnami/wordpress:latest' + ports: + - '${public_port}:80' + volumes: + - 'wordpress_data:/bitnami' + depends_on: + - mariadb + environment: + - MARIADB_HOST=mariadb + - MARIADB_PORT_NUMBER=3306 + - WORDPRESS_DATABASE_USER=bn_wordpress + - WORDPRESS_DATABASE_NAME=bitnami_wordpress + - ALLOW_EMPTY_PASSWORD=yes +volumes: + mariadb_data: + driver: rancher-nfs + wordpress_data: + driver: rancher-nfs \ No newline at end of file diff --git a/templates/wordpress/1/rancher-compose.yml b/templates/wordpress/1/rancher-compose.yml new file mode 100644 index 0000000..ad66201 --- /dev/null +++ b/templates/wordpress/1/rancher-compose.yml @@ -0,0 +1,26 @@ +.catalog: + name: "Wordpress" + version: "v0.2-bitnami" + description: "Blog tool, publishing platform and CMS based on bitnami images" + uuid: Wordpress-1 + minimum_rancher_version: v0.51.0 + questions: + - variable: public_port + description: "public port to access the wordpress site" + label: "Public Port" + required: true + default: "80" + type: "int" + - variable: "wordress_data" + description: "Data volume to save wordress data" + label: "Wordress data volume:" + required: true + default: "/var/lib/docker/wordress-data" + type: "string" + - variable: "mariadb_data" + description: "Data volume to save mariadb data" + label: "Mariadb data volume:" + required: true + default: "/var/lib/docker/mariadb-data" + type: "string" +wordpress: diff --git a/templates/wordpress/config.yml b/templates/wordpress/config.yml index 5f43d8b..eb08385 100644 --- a/templates/wordpress/config.yml +++ b/templates/wordpress/config.yml @@ -1,5 +1,5 @@ name: Wordpress description: | Blog tool, publishing platform and CMS -version: v0.1-educaas1 +version: v0.2-bitnami category: Blogging From 3ca99c82c89c5e1036c458deb9082c409b7f1986 Mon Sep 17 00:00:00 2001 From: Daniel Yu Date: Wed, 26 Jul 2017 16:54:35 +0800 Subject: [PATCH 27/51] remove unused config --- templates/wordpress/1/rancher-compose.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/templates/wordpress/1/rancher-compose.yml b/templates/wordpress/1/rancher-compose.yml index ad66201..9ab1cd4 100644 --- a/templates/wordpress/1/rancher-compose.yml +++ b/templates/wordpress/1/rancher-compose.yml @@ -11,16 +11,4 @@ required: true default: "80" type: "int" - - variable: "wordress_data" - description: "Data volume to save wordress data" - label: "Wordress data volume:" - required: true - default: "/var/lib/docker/wordress-data" - type: "string" - - variable: "mariadb_data" - description: "Data volume to save mariadb data" - label: "Mariadb data volume:" - required: true - default: "/var/lib/docker/mariadb-data" - type: "string" wordpress: From 93396bdba7bf39dbc5bbe4237c2fca9e645ee314 Mon Sep 17 00:00:00 2001 From: Daniel Yu Date: Wed, 26 Jul 2017 22:46:02 +0800 Subject: [PATCH 28/51] replace env infos with variables, add lb and healthcheck --- templates/wordpress/1/docker-compose.yml | 31 +++++----- templates/wordpress/1/rancher-compose.yml | 70 ++++++++++++++++++++++- 2 files changed, 85 insertions(+), 16 deletions(-) diff --git a/templates/wordpress/1/docker-compose.yml b/templates/wordpress/1/docker-compose.yml index c99aba0..9021b8d 100644 --- a/templates/wordpress/1/docker-compose.yml +++ b/templates/wordpress/1/docker-compose.yml @@ -1,29 +1,32 @@ version: '2' services: mariadb: - image: 'bitnami/mariadb:latest' + image: 'bitnami/mariadb:10.1' volumes: - 'mariadb_data:/bitnami' environment: - - MARIADB_USER=bn_wordpress - - MARIADB_DATABASE=bitnami_wordpress - - ALLOW_EMPTY_PASSWORD=yes + - MARIADB_ROOT_PASSWORD=${mariadb_root_password} + - MARIADB_USER=${mariadb_user} + - MARIADB_PASSWORD=${mariadb_user_password} + - MARIADB_DATABASE=${mariadb_database_name} wordpress: - image: 'bitnami/wordpress:latest' - ports: - - '${public_port}:80' + image: 'bitnami/wordpress:4' volumes: - 'wordpress_data:/bitnami' depends_on: - mariadb environment: - - MARIADB_HOST=mariadb - - MARIADB_PORT_NUMBER=3306 - - WORDPRESS_DATABASE_USER=bn_wordpress - - WORDPRESS_DATABASE_NAME=bitnami_wordpress - - ALLOW_EMPTY_PASSWORD=yes + - WORDPRESS_DATABASE_NAME=${mariadb_database_name} + - WORDPRESS_DATABASE_USER=${mariadb_user} + - WORDPRESS_DATABASE_PASSWORD=${mariadb_user_password} + - WORDPRESS_USERNAME=${wordpress_username} + - WORDPRESS_PASSWORD=${wordpress_password} + wordpress-lb: + image: rancher/lb-service-haproxy:v0.7.5 + ports: + - ${public_port}:${public_port} volumes: mariadb_data: - driver: rancher-nfs + driver: ${volume_driver} wordpress_data: - driver: rancher-nfs \ No newline at end of file + driver: ${volume_driver} \ No newline at end of file diff --git a/templates/wordpress/1/rancher-compose.yml b/templates/wordpress/1/rancher-compose.yml index 9ab1cd4..5b62eeb 100644 --- a/templates/wordpress/1/rancher-compose.yml +++ b/templates/wordpress/1/rancher-compose.yml @@ -1,4 +1,5 @@ -.catalog: +version: '2' +catalog: name: "Wordpress" version: "v0.2-bitnami" description: "Blog tool, publishing platform and CMS based on bitnami images" @@ -11,4 +12,69 @@ required: true default: "80" type: "int" -wordpress: + - variable: mariadb_root_password + description: "MariaDB root password, set on first run" + label: "MariaDB Root Password" + required: true + default: "mariadb_my_root" + type: "string" + - variable: mariadb_user + description: "MariaDB database user, created on first run" + label: "MariaDB Database User" + required: true + default: "wordpress_user" + type: "string" + - variable: mariadb_user_password + description: "MariaDB database user password, set on first run" + label: "MariaDB Database User Password" + required: true + default: "wordpress_password" + type: "string" + - variable: wordpress_username + description: " WordPress application username" + label: "WordPress application password" + required: true + default: "admin" + type: "string" + - variable: wordpress_password + description: "WordPress application password" + label: "WordPress application password" + required: true + default: "bitnami" + type: "string" + - variable: volume_driver + description: "Volume driver to use with this service" + label: "Volume driver" + required: true + default: "local" + type: enum + options: + - local + - rancher-nfs + - rancher-efs + - rancher-ebs +services: + wordpress-lb: + scale: 1 + lb_config: + certs: [] + port_rules: + - protocol: http + service: wordpress + source_port: ${public_port} + target_port: 80 + health_check: + response_timeout: 2000 + healthy_threshold: 2 + port: 42 + unhealthy_threshold: 3 + wordpress: + scale: 1 + retain_ip: true + health_check: + port: 80 + interval: 5000 + unhealthy_threshold: 3 + request_line: 'GET / HTTP/1.0' + healthy_threshold: 2 + response_timeout: 5000 \ No newline at end of file From 93bdc8d5a880f062edc52773435d82d6b3a152c7 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Wed, 26 Jul 2017 12:22:28 -0500 Subject: [PATCH 29/51] Affinity rule to distribute instances by hosts, preventing run more than one by host. --- templates/MongoDB/3/docker-compose.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/MongoDB/3/docker-compose.yml b/templates/MongoDB/3/docker-compose.yml index fb26491..98e7dd3 100644 --- a/templates/MongoDB/3/docker-compose.yml +++ b/templates/MongoDB/3/docker-compose.yml @@ -11,6 +11,7 @@ services: - "${replset_name}" image: mongo:3.4 labels: + io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} io.rancher.scheduler.affinity:host_label: ${host_label} io.rancher.container.hostname_override: container_name io.rancher.sidekicks: mongo-base, mongo-datavolume @@ -22,6 +23,7 @@ services: mongo-base: restart: always labels: + io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} io.rancher.scheduler.affinity:host_label: ${host_label} io.rancher.container.hostname_override: container_name io.rancher.container.start_once: true @@ -30,6 +32,7 @@ services: entrypoint: /bin/true mongo-datavolume: labels: + io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} io.rancher.scheduler.affinity:host_label: ${host_label} io.rancher.container.hostname_override: container_name io.rancher.container.start_once: true From 2ea779c878d3fe9d861af942f9bccf7fd58515a2 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Wed, 26 Jul 2017 12:42:43 -0500 Subject: [PATCH 30/51] simplification with selectable db name --- templates/reactioncommerce/2/README.md | 22 ++++++ .../reactioncommerce/2/docker-compose.yml | 20 ++++++ .../reactioncommerce/2/rancher-compose.yml | 70 +++++++++++++++++++ 3 files changed, 112 insertions(+) create mode 100644 templates/reactioncommerce/2/README.md create mode 100644 templates/reactioncommerce/2/docker-compose.yml create mode 100644 templates/reactioncommerce/2/rancher-compose.yml diff --git a/templates/reactioncommerce/2/README.md b/templates/reactioncommerce/2/README.md new file mode 100644 index 0000000..dd9a400 --- /dev/null +++ b/templates/reactioncommerce/2/README.md @@ -0,0 +1,22 @@ +### Docs + +The Reaction Commerce official docs are +[here](https://docs.reactioncommerce.com/) + +This template implements the same method as found +[here](https://docs.reactioncommerce.com/reaction-docs/master/deploying-reaction-using-docker) + +### MongoDB + +You'll need a mongodb stack running, choose it in the external link +question below + +### Traefik + +For external access you'll need to setup [traefik](https://github.com/rancher/community-catalog/tree/master/templates/traefik), all the appropriate +labels will be set when you set the hostname and domain below + +### Support + +There are experimental versions of this template in this catalog [here](https://github.com/ohmydocker/ohmydocker-catalog) which implement +other setups. Issues, PRs, etc are welcome there. diff --git a/templates/reactioncommerce/2/docker-compose.yml b/templates/reactioncommerce/2/docker-compose.yml new file mode 100644 index 0000000..1caf367 --- /dev/null +++ b/templates/reactioncommerce/2/docker-compose.yml @@ -0,0 +1,20 @@ +version: '2' +services: + reaction: + image: reactioncommerce/reaction:v1.4.0 + restart: always + labels: + io.rancher.scheduler.affinity:host_label: ${host_label} + traefik.enable: true + traefik.alias: ${REACTION_HOST} + traefik.domain: ${REACTION_DOMAIN} + traefik.acme: true + traefik.port: 3000 + environment: + MONGO_URL: "mongodb://mongo/${MONGO_DB}" + ROOT_URL: "http://${REACTION_HOST}.${REACTION_DOMAIN}" + REACTION_EMAIL: ${REACTION_EMAIL} + REACTION_USER: ${REACTION_USER} + REACTION_AUTH: ${REACTION_AUTH} + external_links: + - ${mongo_link}:mongo diff --git a/templates/reactioncommerce/2/rancher-compose.yml b/templates/reactioncommerce/2/rancher-compose.yml new file mode 100644 index 0000000..47ded12 --- /dev/null +++ b/templates/reactioncommerce/2/rancher-compose.yml @@ -0,0 +1,70 @@ +version: '2' +catalog: + name: "reactiondemo" + version: 1.4.0-rancher3 + description: "E-commerce powered by reaction" + uuid: reaction-0 + minimum_rancher_version: v0.51.0 + questions: + - variable: "REACTION_HOST" + description: "Hostname to use for the reaction server" + label: "reaction Hostname" + required: true + default: "reaction" + type: "string" + - variable: "REACTION_DOMAIN" + description: "Domain to use for the reaction server" + label: "reaction Domain" + required: true + default: "" + type: "string" + - variable: host_label + label: "Host Label to reaction Tags" + description: | + Host label to use as reaction 'value' tag. + Example: 'reaction=true' + required: false + default: "private=true" + type: "string" + - variable: REACTION_EMAIL + label: "reaction Email" + required: true + default: "" + type: "string" + - variable: REACTION_USER + label: "reaction User" + required: true + default: "" + type: "string" + - variable: REACTION_AUTH + label: "reaction Auth" + required: true + default: "" + type: "password" + - variable: "mongo_link" + description: | + MongoDB external service link + cluster. + label: "External stack/service" + default: "" + required: true + type: "service" + - variable: "MONGO_DB" + default: "reaction" + description: "The mongodb name to associate with this server." + label: "mongo_db" + required: true + type: "string" + +services: + reaction: + scale: 1 + retain_ip: true + health_check: + healthy_threshold: 2 + response_timeout: 5000 + port: 3000 + unhealthy_threshold: 3 + interval: 5000 + strategy: recreate + request_line: GET / # HTTP/1.0 From e6c8359e0d42426756db0829726b3f4d00685dd7 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Wed, 26 Jul 2017 13:01:38 -0500 Subject: [PATCH 31/51] templatized --- templates/reactioncommerce/0/README.md | 7 +- ...ker-compose.yml => docker-compose.yml.tpl} | 11 ++- .../reactioncommerce/0/rancher-compose.yml | 28 ++++---- templates/reactioncommerce/1/README.md | 22 ------ .../reactioncommerce/1/docker-compose.yml | 20 ------ .../reactioncommerce/1/rancher-compose.yml | 70 ------------------- templates/reactioncommerce/2/README.md | 22 ------ .../reactioncommerce/2/docker-compose.yml | 20 ------ .../reactioncommerce/2/rancher-compose.yml | 70 ------------------- 9 files changed, 25 insertions(+), 245 deletions(-) rename templates/reactioncommerce/0/{docker-compose.yml => docker-compose.yml.tpl} (82%) delete mode 100644 templates/reactioncommerce/1/README.md delete mode 100644 templates/reactioncommerce/1/docker-compose.yml delete mode 100644 templates/reactioncommerce/1/rancher-compose.yml delete mode 100644 templates/reactioncommerce/2/README.md delete mode 100644 templates/reactioncommerce/2/docker-compose.yml delete mode 100644 templates/reactioncommerce/2/rancher-compose.yml diff --git a/templates/reactioncommerce/0/README.md b/templates/reactioncommerce/0/README.md index 8bd15d0..dd9a400 100644 --- a/templates/reactioncommerce/0/README.md +++ b/templates/reactioncommerce/0/README.md @@ -1,5 +1,3 @@ -# [ReactionCommerce](http://reactioncommerce.com/) - ### Docs The Reaction Commerce official docs are @@ -10,9 +8,8 @@ This template implements the same method as found ### MongoDB -This initial version pulls up its own mongodb just like the official -docker-compose.yml, if you have a mongo stack already running try the -`1.4.0-rancher2` version +You'll need a mongodb stack running, choose it in the external link +question below ### Traefik diff --git a/templates/reactioncommerce/0/docker-compose.yml b/templates/reactioncommerce/0/docker-compose.yml.tpl similarity index 82% rename from templates/reactioncommerce/0/docker-compose.yml rename to templates/reactioncommerce/0/docker-compose.yml.tpl index 0dd55e8..1015358 100644 --- a/templates/reactioncommerce/0/docker-compose.yml +++ b/templates/reactioncommerce/0/docker-compose.yml.tpl @@ -11,12 +11,17 @@ services: traefik.acme: true traefik.port: 3000 environment: - MONGO_URL: "mongodb://mongo/reaction" + MONGO_URL: "mongodb://mongo/${MONGO_DB}" ROOT_URL: "http://${REACTION_HOST}.${REACTION_DOMAIN}" REACTION_EMAIL: ${REACTION_EMAIL} REACTION_USER: ${REACTION_USER} REACTION_AUTH: ${REACTION_AUTH} - +{{- if ne .Values.mongo_link ""}} + REACTION_TEST: ${REACTION_AUTH} + external_links: + - ${mongo_link}:mongo + tty: true +{{- else}} mongo: command: mongod --storageEngine=wiredTiger restart: always @@ -30,7 +35,7 @@ services: io.rancher.container.hostname_override: container_name volumes: - mongodata:/data/db - volumes: mongodata: driver: ${VOLUME_DRIVER} +{{- end}} diff --git a/templates/reactioncommerce/0/rancher-compose.yml b/templates/reactioncommerce/0/rancher-compose.yml index 3ad84f6..31de063 100644 --- a/templates/reactioncommerce/0/rancher-compose.yml +++ b/templates/reactioncommerce/0/rancher-compose.yml @@ -16,7 +16,7 @@ catalog: description: "Domain to use for the reaction server" label: "reaction Domain" required: true - default: "" + default: "local" type: "string" - variable: host_label label: "Host Label to reaction Tags" @@ -29,7 +29,7 @@ catalog: - variable: REACTION_EMAIL label: "reaction Email" required: true - default: "" + default: "test@local" type: "string" - variable: REACTION_USER label: "reaction User" @@ -41,17 +41,20 @@ catalog: required: true default: "" type: "password" - - variable: "VOLUME_DRIVER" - description: "The VOLUME driver to associate with this server" - label: "VOLUME Driver" + - variable: "mongo_link" + description: | + MongoDB external service link + cluster. + label: "External stack/service" + default: "" + required: false + type: "service" + - variable: "MONGO_DB" + default: "reaction" + description: "The mongodb name to associate with this server." + label: "mongo_db" required: true - default: "local" - type: enum - options: - - local - - rancher-nfs - - rancher-efs - - rancher-ebs + type: "string" services: reaction: @@ -65,7 +68,6 @@ services: interval: 5000 strategy: recreate request_line: GET / # HTTP/1.0 - mongo: scale: 1 retain_ip: true diff --git a/templates/reactioncommerce/1/README.md b/templates/reactioncommerce/1/README.md deleted file mode 100644 index dd9a400..0000000 --- a/templates/reactioncommerce/1/README.md +++ /dev/null @@ -1,22 +0,0 @@ -### Docs - -The Reaction Commerce official docs are -[here](https://docs.reactioncommerce.com/) - -This template implements the same method as found -[here](https://docs.reactioncommerce.com/reaction-docs/master/deploying-reaction-using-docker) - -### MongoDB - -You'll need a mongodb stack running, choose it in the external link -question below - -### Traefik - -For external access you'll need to setup [traefik](https://github.com/rancher/community-catalog/tree/master/templates/traefik), all the appropriate -labels will be set when you set the hostname and domain below - -### Support - -There are experimental versions of this template in this catalog [here](https://github.com/ohmydocker/ohmydocker-catalog) which implement -other setups. Issues, PRs, etc are welcome there. diff --git a/templates/reactioncommerce/1/docker-compose.yml b/templates/reactioncommerce/1/docker-compose.yml deleted file mode 100644 index 8c80e37..0000000 --- a/templates/reactioncommerce/1/docker-compose.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: '2' -services: - reaction: - image: reactioncommerce/reaction:v1.4.0 - restart: always - labels: - io.rancher.scheduler.affinity:host_label: ${host_label} - traefik.enable: true - traefik.alias: ${REACTION_HOST} - traefik.domain: ${REACTION_DOMAIN} - traefik.acme: true - traefik.port: 3000 - environment: - MONGO_URL: ${MONGO_URL} - ROOT_URL: "http://${REACTION_HOST}.${REACTION_DOMAIN}" - REACTION_EMAIL: ${REACTION_EMAIL} - REACTION_USER: ${REACTION_USER} - REACTION_AUTH: ${REACTION_AUTH} - external_links: - - ${mongo_link}:mongo diff --git a/templates/reactioncommerce/1/rancher-compose.yml b/templates/reactioncommerce/1/rancher-compose.yml deleted file mode 100644 index 7c7864a..0000000 --- a/templates/reactioncommerce/1/rancher-compose.yml +++ /dev/null @@ -1,70 +0,0 @@ -version: '2' -catalog: - name: "reactiondemo" - version: 1.4.0-rancher2 - description: "E-commerce powered by reaction" - uuid: reaction-0 - minimum_rancher_version: v0.51.0 - questions: - - variable: "REACTION_HOST" - description: "Hostname to use for the reaction server" - label: "reaction Hostname" - required: true - default: "reaction" - type: "string" - - variable: "REACTION_DOMAIN" - description: "Domain to use for the reaction server" - label: "reaction Domain" - required: true - default: "" - type: "string" - - variable: host_label - label: "Host Label to reaction Tags" - description: | - Host label to use as reaction 'value' tag. - Example: 'reaction=true' - required: false - default: "private=true" - type: "string" - - variable: REACTION_EMAIL - label: "reaction Email" - required: true - default: "" - type: "string" - - variable: REACTION_USER - label: "reaction User" - required: true - default: "" - type: "string" - - variable: REACTION_AUTH - label: "reaction Auth" - required: true - default: "" - type: "password" - - variable: "mongo_link" - description: | - MongoDB external service link - cluster. - label: "External stack/service" - default: "" - required: true - type: "service" - - variable: "MONGO_URL" - default: "mongodb://mongo/reaction" - description: "The mongodb url to associate with this server. !!Do not change!! if you are setting the external link above!" - label: "mongo_url" - required: true - type: "string" - -services: - reaction: - scale: 1 - retain_ip: true - health_check: - healthy_threshold: 2 - response_timeout: 5000 - port: 3000 - unhealthy_threshold: 3 - interval: 5000 - strategy: recreate - request_line: GET / # HTTP/1.0 diff --git a/templates/reactioncommerce/2/README.md b/templates/reactioncommerce/2/README.md deleted file mode 100644 index dd9a400..0000000 --- a/templates/reactioncommerce/2/README.md +++ /dev/null @@ -1,22 +0,0 @@ -### Docs - -The Reaction Commerce official docs are -[here](https://docs.reactioncommerce.com/) - -This template implements the same method as found -[here](https://docs.reactioncommerce.com/reaction-docs/master/deploying-reaction-using-docker) - -### MongoDB - -You'll need a mongodb stack running, choose it in the external link -question below - -### Traefik - -For external access you'll need to setup [traefik](https://github.com/rancher/community-catalog/tree/master/templates/traefik), all the appropriate -labels will be set when you set the hostname and domain below - -### Support - -There are experimental versions of this template in this catalog [here](https://github.com/ohmydocker/ohmydocker-catalog) which implement -other setups. Issues, PRs, etc are welcome there. diff --git a/templates/reactioncommerce/2/docker-compose.yml b/templates/reactioncommerce/2/docker-compose.yml deleted file mode 100644 index 1caf367..0000000 --- a/templates/reactioncommerce/2/docker-compose.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: '2' -services: - reaction: - image: reactioncommerce/reaction:v1.4.0 - restart: always - labels: - io.rancher.scheduler.affinity:host_label: ${host_label} - traefik.enable: true - traefik.alias: ${REACTION_HOST} - traefik.domain: ${REACTION_DOMAIN} - traefik.acme: true - traefik.port: 3000 - environment: - MONGO_URL: "mongodb://mongo/${MONGO_DB}" - ROOT_URL: "http://${REACTION_HOST}.${REACTION_DOMAIN}" - REACTION_EMAIL: ${REACTION_EMAIL} - REACTION_USER: ${REACTION_USER} - REACTION_AUTH: ${REACTION_AUTH} - external_links: - - ${mongo_link}:mongo diff --git a/templates/reactioncommerce/2/rancher-compose.yml b/templates/reactioncommerce/2/rancher-compose.yml deleted file mode 100644 index 47ded12..0000000 --- a/templates/reactioncommerce/2/rancher-compose.yml +++ /dev/null @@ -1,70 +0,0 @@ -version: '2' -catalog: - name: "reactiondemo" - version: 1.4.0-rancher3 - description: "E-commerce powered by reaction" - uuid: reaction-0 - minimum_rancher_version: v0.51.0 - questions: - - variable: "REACTION_HOST" - description: "Hostname to use for the reaction server" - label: "reaction Hostname" - required: true - default: "reaction" - type: "string" - - variable: "REACTION_DOMAIN" - description: "Domain to use for the reaction server" - label: "reaction Domain" - required: true - default: "" - type: "string" - - variable: host_label - label: "Host Label to reaction Tags" - description: | - Host label to use as reaction 'value' tag. - Example: 'reaction=true' - required: false - default: "private=true" - type: "string" - - variable: REACTION_EMAIL - label: "reaction Email" - required: true - default: "" - type: "string" - - variable: REACTION_USER - label: "reaction User" - required: true - default: "" - type: "string" - - variable: REACTION_AUTH - label: "reaction Auth" - required: true - default: "" - type: "password" - - variable: "mongo_link" - description: | - MongoDB external service link - cluster. - label: "External stack/service" - default: "" - required: true - type: "service" - - variable: "MONGO_DB" - default: "reaction" - description: "The mongodb name to associate with this server." - label: "mongo_db" - required: true - type: "string" - -services: - reaction: - scale: 1 - retain_ip: true - health_check: - healthy_threshold: 2 - response_timeout: 5000 - port: 3000 - unhealthy_threshold: 3 - interval: 5000 - strategy: recreate - request_line: GET / # HTTP/1.0 From b95ec9762b451d7031ecd4d9e36ca98796ef7b49 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Wed, 26 Jul 2017 13:02:50 -0500 Subject: [PATCH 32/51] delete mongo service in rancher-compose --- templates/reactioncommerce/0/rancher-compose.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/templates/reactioncommerce/0/rancher-compose.yml b/templates/reactioncommerce/0/rancher-compose.yml index 31de063..e295a7a 100644 --- a/templates/reactioncommerce/0/rancher-compose.yml +++ b/templates/reactioncommerce/0/rancher-compose.yml @@ -68,6 +68,3 @@ services: interval: 5000 strategy: recreate request_line: GET / # HTTP/1.0 - mongo: - scale: 1 - retain_ip: true From 82bcb770a29efd383f9629e8ccb987893654f682 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Wed, 26 Jul 2017 13:47:33 -0500 Subject: [PATCH 33/51] TEST removed --- templates/reactioncommerce/0/docker-compose.yml.tpl | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/reactioncommerce/0/docker-compose.yml.tpl b/templates/reactioncommerce/0/docker-compose.yml.tpl index 1015358..4ca7e1f 100644 --- a/templates/reactioncommerce/0/docker-compose.yml.tpl +++ b/templates/reactioncommerce/0/docker-compose.yml.tpl @@ -17,7 +17,6 @@ services: REACTION_USER: ${REACTION_USER} REACTION_AUTH: ${REACTION_AUTH} {{- if ne .Values.mongo_link ""}} - REACTION_TEST: ${REACTION_AUTH} external_links: - ${mongo_link}:mongo tty: true From 56d961fc230f24a0fad19bc4cb0ecb7cc69f0f48 Mon Sep 17 00:00:00 2001 From: Daniel Yu Date: Thu, 27 Jul 2017 09:49:20 +0800 Subject: [PATCH 34/51] correct configs --- templates/wordpress/1/rancher-compose.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/templates/wordpress/1/rancher-compose.yml b/templates/wordpress/1/rancher-compose.yml index 5b62eeb..a23a105 100644 --- a/templates/wordpress/1/rancher-compose.yml +++ b/templates/wordpress/1/rancher-compose.yml @@ -30,9 +30,15 @@ catalog: required: true default: "wordpress_password" type: "string" + - variable: mariadb_database_name + description: "Wordpress database name" + label: "Wordpress database name" + required: true + default: "bitnami_wordpress" + type: "string" - variable: wordpress_username - description: " WordPress application username" - label: "WordPress application password" + description: "WordPress application username" + label: "WordPress application username" required: true default: "admin" type: "string" @@ -72,7 +78,7 @@ services: scale: 1 retain_ip: true health_check: - port: 80 + port: 80 interval: 5000 unhealthy_threshold: 3 request_line: 'GET / HTTP/1.0' From 76c400fa2afc65c9cb217f0c2c3d957095903b9a Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Thu, 27 Jul 2017 10:57:51 -0500 Subject: [PATCH 35/51] Added 0.2.1 to accomodate upstream changes https://github.com/rancher/catalog-dockerfiles/pull/103 --- templates/rabbitmq-3/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/rabbitmq-3/config.yml b/templates/rabbitmq-3/config.yml index 7554719..5d3d836 100755 --- a/templates/rabbitmq-3/config.yml +++ b/templates/rabbitmq-3/config.yml @@ -1,5 +1,5 @@ name: RabbitMQ 3.6 description: | - Robust messaging for applications -version: 0.2.0 + Robust messaging for applications +version: "3.6-rancher0.2.1" category: Message queues From 2eeb1bbe227164e6e01fc17427295e1aef227a56 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Thu, 27 Jul 2017 11:05:08 -0500 Subject: [PATCH 36/51] Added directory --- templates/rabbitmq-3/2/README.md | 12 ++++ templates/rabbitmq-3/2/docker-compose.yml | 42 ++++++++++++ templates/rabbitmq-3/2/rancher-compose.yml | 74 ++++++++++++++++++++++ 3 files changed, 128 insertions(+) create mode 100644 templates/rabbitmq-3/2/README.md create mode 100755 templates/rabbitmq-3/2/docker-compose.yml create mode 100755 templates/rabbitmq-3/2/rancher-compose.yml diff --git a/templates/rabbitmq-3/2/README.md b/templates/rabbitmq-3/2/README.md new file mode 100644 index 0000000..5716bb4 --- /dev/null +++ b/templates/rabbitmq-3/2/README.md @@ -0,0 +1,12 @@ +RabbitMQ 3.6 with easy Rancher clustering +=== +Provides RabbitMQ image that can scale to a cluster. + +The following environment variables are passed to confd in order to set up RabbitMQ's configuration file: + +* Partition handling: RabbitMQ's cluster handling setting: default set to autoheal +* Erlang cookie: cookie to allow nodes communication: default set to defaultcookiepleasechange +* Net ticktime: adjusts the frequency of both tick messages and detection of failures: default set to 60 +* Confd args: additional confd args along with default --backend rancher --prefix /2015-07-25: default set to --interval 5 + +*Note*: You can pass an alternate `confd` configuration via the `ALTERNATE_CONF` environment variable. diff --git a/templates/rabbitmq-3/2/docker-compose.yml b/templates/rabbitmq-3/2/docker-compose.yml new file mode 100755 index 0000000..efa4e68 --- /dev/null +++ b/templates/rabbitmq-3/2/docker-compose.yml @@ -0,0 +1,42 @@ +version: '2' +services: + rabbitmq: + image: webhostingcoopteam/rabbitmq-conf:0.2.1 + labels: + io.rancher.container.hostname_override: container_name + io.rancher.sidekicks: rabbitmq-base,rabbitmq-datavolume + io.rancher.scheduler.affinity:host_label: ${host_label} + volumes_from: + - rabbitmq-datavolume + environment: + - RABBITMQ_NET_TICKTIME=${net_ticktime} + - RABBITMQ_CLUSTER_PARTITION_HANDLING=${cluster_partition_handling} + - CONFD_ARGS=${confd_args} + rabbitmq-datavolume: + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${host_label} + io.rancher.container.start_once: true + volume_driver: ${VOLUME_DRIVER} + volumes: + - rabbitconf:/etc/rabbitmq + - rancherbin:/opt/rancher/bin + entrypoint: /bin/true + image: rabbitmq:3.6-management-alpine + rabbitmq-base: + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${host_label} + image: rabbitmq:3.6-management-alpine + restart: always + volumes_from: + - rabbitmq-datavolume + entrypoint: + - /opt/rancher/bin/run.sh + environment: + - RABBITMQ_ERLANG_COOKIE=${erlang_cookie} +volumes: + rancherbin: + driver: ${VOLUME_DRIVER} + rabbitconf: + driver: ${VOLUME_DRIVER} diff --git a/templates/rabbitmq-3/2/rancher-compose.yml b/templates/rabbitmq-3/2/rancher-compose.yml new file mode 100755 index 0000000..e13e616 --- /dev/null +++ b/templates/rabbitmq-3/2/rancher-compose.yml @@ -0,0 +1,74 @@ +version: '2' +catalog: + name: "Rabbit MQ" + version: "3.6-rancher0.2.1" + decription: A reliable, distributed messaging broker + questions: + - variable: "erlang_cookie" + description: "Erlang cookie required for auth" + label: "Erlang cookie:" + required: true + default: + type: "string" + - variable: "cluster_partition_handling" + label: "Partition Handling:" + description: "Cluster partition handling mode" + required: true + type: "enum" + default: autoheal + options: + - autoheal + - ignore + - pause_minority + - variable: "net_ticktime" + description: "Rabbitmq net ticktime setting" + label: "Net ticktime:" + required: false + type: "int" + default: 60 + - variable: "confd_args" + description: "Confd additional args" + label: "Confd args" + required: false + type: "string" + default: --interval 5 + - variable: RABBITMQ_TAG + default: "rabbitmq:3.6.10-management-alpine" + label: "rabbitMQ_version" + required: true + type: enum + options: # List of options if using type of `enum` + - "rabbitmq:3.6.10-management-alpine" + - "rabbitmq:3.6.10-management" + - "rabbitmq:3.6.9-management-alpine" + - "rabbitmq:3.6.9-management" + - "rabbitmq:3.6.8-management-alpine" + - "rabbitmq:3.6.8-management" + - "rabbitmq:3.6-management-alpine" + - "rabbitmq:3.6-management" + - "rabbitmq:management" + - variable: "VOLUME_DRIVER" + description: "The VOLUME driver to associate with this server" + label: "VOLUME Driver" + required: true + default: "rancher-nfs" + type: enum + options: # List of options if using type of `enum` + - rancher-nfs + - rancher-efs + - rancher-ebs + - variable: host_label + label: "Host with Label to put rabbitmq on" + description: | + Host label to use as rabbitmq 'value' tag. + Example: 'rabbitmq=true' + required: true + default: "private=true" + type: "string" + +services: + rabbitmq: + metadata: + rabbitmq: + config: + node.name: "$${HOSTNAME}" From 9cdd709ef5dee08566af7d42477b34c3dcf975d4 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Thu, 27 Jul 2017 12:37:46 -0500 Subject: [PATCH 37/51] Added local to storage driver list --- templates/rabbitmq-3/2/rancher-compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/rabbitmq-3/2/rancher-compose.yml b/templates/rabbitmq-3/2/rancher-compose.yml index e13e616..8568755 100755 --- a/templates/rabbitmq-3/2/rancher-compose.yml +++ b/templates/rabbitmq-3/2/rancher-compose.yml @@ -51,9 +51,10 @@ catalog: description: "The VOLUME driver to associate with this server" label: "VOLUME Driver" required: true - default: "rancher-nfs" + default: "local" type: enum options: # List of options if using type of `enum` + - local - rancher-nfs - rancher-efs - rancher-ebs From 281ef8b6828d38cbbcce0887d7a80ac4184db1e2 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Thu, 27 Jul 2017 12:41:17 -0500 Subject: [PATCH 38/51] Changed version scheme --- templates/rabbitmq-3/2/rancher-compose.yml | 2 +- templates/rabbitmq-3/config.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/rabbitmq-3/2/rancher-compose.yml b/templates/rabbitmq-3/2/rancher-compose.yml index 8568755..4153b0a 100755 --- a/templates/rabbitmq-3/2/rancher-compose.yml +++ b/templates/rabbitmq-3/2/rancher-compose.yml @@ -1,7 +1,7 @@ version: '2' catalog: name: "Rabbit MQ" - version: "3.6-rancher0.2.1" + version: "0.2.1" decription: A reliable, distributed messaging broker questions: - variable: "erlang_cookie" diff --git a/templates/rabbitmq-3/config.yml b/templates/rabbitmq-3/config.yml index 5d3d836..80d25f7 100755 --- a/templates/rabbitmq-3/config.yml +++ b/templates/rabbitmq-3/config.yml @@ -1,5 +1,5 @@ name: RabbitMQ 3.6 description: | Robust messaging for applications -version: "3.6-rancher0.2.1" +version: "0.2.1" category: Message queues From 33a99554ae8726a0e167fc6d84587c0fb28df3cd Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Fri, 28 Jul 2017 08:28:00 -0500 Subject: [PATCH 39/51] Added rabbitMQ examples to test and demo rabbitMQ's various methods --- templates/rabbitmq-examples/0/README.md | 11 ++ .../rabbitmq-examples/0/docker-compose.yml | 171 ++++++++++++++++++ .../rabbitmq-examples/0/rancher-compose.yml | 38 ++++ .../catalogIcon-rabbitmq.png | Bin 0 -> 4090 bytes templates/rabbitmq-examples/config.yml | 7 + 5 files changed, 227 insertions(+) create mode 100644 templates/rabbitmq-examples/0/README.md create mode 100644 templates/rabbitmq-examples/0/docker-compose.yml create mode 100644 templates/rabbitmq-examples/0/rancher-compose.yml create mode 100755 templates/rabbitmq-examples/catalogIcon-rabbitmq.png create mode 100755 templates/rabbitmq-examples/config.yml diff --git a/templates/rabbitmq-examples/0/README.md b/templates/rabbitmq-examples/0/README.md new file mode 100644 index 0000000..a797d5a --- /dev/null +++ b/templates/rabbitmq-examples/0/README.md @@ -0,0 +1,11 @@ +# RabbitMQ Examples + +I needed to test a rabbitMQ with some basics so I forked the official tutorials and added a Dockerfile +[here](https://github.com/joshuacox/rabbitmq-tutorials/tree/jsdockerfile/javascript-nodejs) + +[dockerhub here](https://hub.docker.com/r/joshuacox/rabbitmq-tutorials/) + +In that fork, there is a `Makefile` that can run through the proof of +concept. `make` will start a rabbitmq container, then start all the +listeners as deamons, and the emitters to run once. The emitters are +ephemeral and will go away once their message is sent or they error out. diff --git a/templates/rabbitmq-examples/0/docker-compose.yml b/templates/rabbitmq-examples/0/docker-compose.yml new file mode 100644 index 0000000..cbe638b --- /dev/null +++ b/templates/rabbitmq-examples/0/docker-compose.yml @@ -0,0 +1,171 @@ +version: '2' +services: +{{- if eq .Values.rabbitmq_link ""}} + rabbit: + hostname: rabbit + image: rabbitmq:3 + send: + image: joshuacox/rabbitmq-tutorials + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${host_label} + io.rancher.container.start_once: true + environment: + - AMQ_HOST=rabbit + command: send +{{- end}} + receive: + command: receive +{{- if ne .Values.rabbitmq_link ""}} + external_links: + - ${rabbitmq_link}:rabbit +{{- end}} + image: joshuacox/rabbitmq-tutorials + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${host_label} + environment: + - AMQ_HOST=rabbit + send: + image: joshuacox/rabbitmq-tutorials + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${host_label} + io.rancher.container.start_once: true + environment: + - AMQ_HOST=rabbit + command: send +{{- if ne .Values.rabbitmq_link ""}} + external_links: + - ${rabbitmq_link}:rabbit +{{- end}} + + worker: + image: joshuacox/rabbitmq-tutorials + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${host_label} + environment: + - AMQ_HOST=rabbit + command: worker +{{- if ne .Values.rabbitmq_link ""}} + external_links: + - ${rabbitmq_link}:rabbit +{{- end}} + newtask: + image: joshuacox/rabbitmq-tutorials + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${host_label} + io.rancher.container.start_once: true + environment: + - AMQ_HOST=rabbit + command: new_task +{{- if ne .Values.rabbitmq_link ""}} + external_links: + - ${rabbitmq_link}:rabbit +{{- end}} + + rpcserver: + image: joshuacox/rabbitmq-tutorials + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${host_label} + environment: + - AMQ_HOST=rabbit + command: rpc_server +{{- if ne .Values.rabbitmq_link ""}} + external_links: + - ${rabbitmq_link}:rabbit +{{- end}} + rpcclient: + image: joshuacox/rabbitmq-tutorials + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${host_label} + io.rancher.container.start_once: true + environment: + - AMQ_HOST=rabbit + command: rpc_client 4 +{{- if ne .Values.rabbitmq_link ""}} + external_links: + - ${rabbitmq_link}:rabbit +{{- end}} + + receivelogs: + image: joshuacox/rabbitmq-tutorials + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${host_label} + environment: + - AMQ_HOST=rabbit + command: receive_logs +{{- if ne .Values.rabbitmq_link ""}} + external_links: + - ${rabbitmq_link}:rabbit +{{- end}} + emitlog: + image: joshuacox/rabbitmq-tutorials + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${host_label} + io.rancher.container.start_once: true + environment: + - AMQ_HOST=rabbit + command: emit_log +{{- if ne .Values.rabbitmq_link ""}} + external_links: + - ${rabbitmq_link}:rabbit +{{- end}} + + receivelogsdirect: + image: joshuacox/rabbitmq-tutorials + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${host_label} + environment: + - AMQ_HOST=rabbit + command: receive_logs_direct info +{{- if ne .Values.rabbitmq_link ""}} + external_links: + - ${rabbitmq_link}:rabbit +{{- end}} + emitlogdirect: + image: joshuacox/rabbitmq-tutorials + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${host_label} + io.rancher.container.start_once: true + environment: + - AMQ_HOST=rabbit + command: emit_log_direct +{{- if ne .Values.rabbitmq_link ""}} + external_links: + - ${rabbitmq_link}:rabbit +{{- end}} + + receivelogstopic: + image: joshuacox/rabbitmq-tutorials + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${host_label} + environment: + - AMQ_HOST=rabbit + command: receive_logs_topic anonymous.info +{{- if ne .Values.rabbitmq_link ""}} + external_links: + - ${rabbitmq_link}:rabbit +{{- end}} + emitlogtopic: + image: joshuacox/rabbitmq-tutorials + labels: + io.rancher.container.hostname_override: container_name + io.rancher.scheduler.affinity:host_label: ${host_label} + io.rancher.container.start_once: true + environment: + - AMQ_HOST=rabbit + command: emit_log_topic +{{- if ne .Values.rabbitmq_link ""}} + external_links: + - ${rabbitmq_link}:rabbit +{{- end}} diff --git a/templates/rabbitmq-examples/0/rancher-compose.yml b/templates/rabbitmq-examples/0/rancher-compose.yml new file mode 100644 index 0000000..1ad07d9 --- /dev/null +++ b/templates/rabbitmq-examples/0/rancher-compose.yml @@ -0,0 +1,38 @@ +version: '2' +catalog: + name: RabbitMQ_Examples + version: 3.6-rancher1 + description: | + tutorial storage examples + questions: + - variable: rabbitmq_link + description: "rabbitmq service link" + label: "rabbitmq stack/service" + default: "" + required: false + type: "service" +services: + receive: + scale: 1 + send: + scale: 1 + worker: + scale: 1 + newtask: + scale: 1 + rpcserver: + scale: 1 + rpcclient: + scale: 1 + receivelogs: + scale: 1 + emitlog: + scale: 1 + receivelogsdirect: + scale: 1 + emitlogdirect: + scale: 1 + receivelogstopic: + scale: 1 + emitlogtopic: + scale: 1 diff --git a/templates/rabbitmq-examples/catalogIcon-rabbitmq.png b/templates/rabbitmq-examples/catalogIcon-rabbitmq.png new file mode 100755 index 0000000000000000000000000000000000000000..f458f7f52aecea02277b92ee4e7a2bcb288d1a95 GIT binary patch literal 4090 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 literal 0 HcmV?d00001 diff --git a/templates/rabbitmq-examples/config.yml b/templates/rabbitmq-examples/config.yml new file mode 100755 index 0000000..a90ef55 --- /dev/null +++ b/templates/rabbitmq-examples/config.yml @@ -0,0 +1,7 @@ +name: RabbitMQ 3.6 Tutorial Examples +description: | + Robust messaging for applications Examples +version: 3.6-rancher1 +category: Message queues +maintainer: "Josh Cox " +minimum_rancher_version: v0.59.0 From 59ee50391146957d30c5bfbfb5426e869c349367 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Fri, 28 Jul 2017 08:32:53 -0500 Subject: [PATCH 40/51] tpl --- .../rabbitmq-examples/0/docker-compose.yml | 171 ------------------ 1 file changed, 171 deletions(-) delete mode 100644 templates/rabbitmq-examples/0/docker-compose.yml diff --git a/templates/rabbitmq-examples/0/docker-compose.yml b/templates/rabbitmq-examples/0/docker-compose.yml deleted file mode 100644 index cbe638b..0000000 --- a/templates/rabbitmq-examples/0/docker-compose.yml +++ /dev/null @@ -1,171 +0,0 @@ -version: '2' -services: -{{- if eq .Values.rabbitmq_link ""}} - rabbit: - hostname: rabbit - image: rabbitmq:3 - send: - image: joshuacox/rabbitmq-tutorials - labels: - io.rancher.container.hostname_override: container_name - io.rancher.scheduler.affinity:host_label: ${host_label} - io.rancher.container.start_once: true - environment: - - AMQ_HOST=rabbit - command: send -{{- end}} - receive: - command: receive -{{- if ne .Values.rabbitmq_link ""}} - external_links: - - ${rabbitmq_link}:rabbit -{{- end}} - image: joshuacox/rabbitmq-tutorials - labels: - io.rancher.container.hostname_override: container_name - io.rancher.scheduler.affinity:host_label: ${host_label} - environment: - - AMQ_HOST=rabbit - send: - image: joshuacox/rabbitmq-tutorials - labels: - io.rancher.container.hostname_override: container_name - io.rancher.scheduler.affinity:host_label: ${host_label} - io.rancher.container.start_once: true - environment: - - AMQ_HOST=rabbit - command: send -{{- if ne .Values.rabbitmq_link ""}} - external_links: - - ${rabbitmq_link}:rabbit -{{- end}} - - worker: - image: joshuacox/rabbitmq-tutorials - labels: - io.rancher.container.hostname_override: container_name - io.rancher.scheduler.affinity:host_label: ${host_label} - environment: - - AMQ_HOST=rabbit - command: worker -{{- if ne .Values.rabbitmq_link ""}} - external_links: - - ${rabbitmq_link}:rabbit -{{- end}} - newtask: - image: joshuacox/rabbitmq-tutorials - labels: - io.rancher.container.hostname_override: container_name - io.rancher.scheduler.affinity:host_label: ${host_label} - io.rancher.container.start_once: true - environment: - - AMQ_HOST=rabbit - command: new_task -{{- if ne .Values.rabbitmq_link ""}} - external_links: - - ${rabbitmq_link}:rabbit -{{- end}} - - rpcserver: - image: joshuacox/rabbitmq-tutorials - labels: - io.rancher.container.hostname_override: container_name - io.rancher.scheduler.affinity:host_label: ${host_label} - environment: - - AMQ_HOST=rabbit - command: rpc_server -{{- if ne .Values.rabbitmq_link ""}} - external_links: - - ${rabbitmq_link}:rabbit -{{- end}} - rpcclient: - image: joshuacox/rabbitmq-tutorials - labels: - io.rancher.container.hostname_override: container_name - io.rancher.scheduler.affinity:host_label: ${host_label} - io.rancher.container.start_once: true - environment: - - AMQ_HOST=rabbit - command: rpc_client 4 -{{- if ne .Values.rabbitmq_link ""}} - external_links: - - ${rabbitmq_link}:rabbit -{{- end}} - - receivelogs: - image: joshuacox/rabbitmq-tutorials - labels: - io.rancher.container.hostname_override: container_name - io.rancher.scheduler.affinity:host_label: ${host_label} - environment: - - AMQ_HOST=rabbit - command: receive_logs -{{- if ne .Values.rabbitmq_link ""}} - external_links: - - ${rabbitmq_link}:rabbit -{{- end}} - emitlog: - image: joshuacox/rabbitmq-tutorials - labels: - io.rancher.container.hostname_override: container_name - io.rancher.scheduler.affinity:host_label: ${host_label} - io.rancher.container.start_once: true - environment: - - AMQ_HOST=rabbit - command: emit_log -{{- if ne .Values.rabbitmq_link ""}} - external_links: - - ${rabbitmq_link}:rabbit -{{- end}} - - receivelogsdirect: - image: joshuacox/rabbitmq-tutorials - labels: - io.rancher.container.hostname_override: container_name - io.rancher.scheduler.affinity:host_label: ${host_label} - environment: - - AMQ_HOST=rabbit - command: receive_logs_direct info -{{- if ne .Values.rabbitmq_link ""}} - external_links: - - ${rabbitmq_link}:rabbit -{{- end}} - emitlogdirect: - image: joshuacox/rabbitmq-tutorials - labels: - io.rancher.container.hostname_override: container_name - io.rancher.scheduler.affinity:host_label: ${host_label} - io.rancher.container.start_once: true - environment: - - AMQ_HOST=rabbit - command: emit_log_direct -{{- if ne .Values.rabbitmq_link ""}} - external_links: - - ${rabbitmq_link}:rabbit -{{- end}} - - receivelogstopic: - image: joshuacox/rabbitmq-tutorials - labels: - io.rancher.container.hostname_override: container_name - io.rancher.scheduler.affinity:host_label: ${host_label} - environment: - - AMQ_HOST=rabbit - command: receive_logs_topic anonymous.info -{{- if ne .Values.rabbitmq_link ""}} - external_links: - - ${rabbitmq_link}:rabbit -{{- end}} - emitlogtopic: - image: joshuacox/rabbitmq-tutorials - labels: - io.rancher.container.hostname_override: container_name - io.rancher.scheduler.affinity:host_label: ${host_label} - io.rancher.container.start_once: true - environment: - - AMQ_HOST=rabbit - command: emit_log_topic -{{- if ne .Values.rabbitmq_link ""}} - external_links: - - ${rabbitmq_link}:rabbit -{{- end}} From 97e03837abc9b22c0114fd564cfd2de5b2140d42 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Fri, 28 Jul 2017 11:43:51 -0500 Subject: [PATCH 41/51] Removed examples --- templates/rabbitmq-examples/0/README.md | 11 ----- .../rabbitmq-examples/0/rancher-compose.yml | 38 ------------------ .../catalogIcon-rabbitmq.png | Bin 4090 -> 0 bytes templates/rabbitmq-examples/config.yml | 7 ---- 4 files changed, 56 deletions(-) delete mode 100644 templates/rabbitmq-examples/0/README.md delete mode 100644 templates/rabbitmq-examples/0/rancher-compose.yml delete mode 100755 templates/rabbitmq-examples/catalogIcon-rabbitmq.png delete mode 100755 templates/rabbitmq-examples/config.yml diff --git a/templates/rabbitmq-examples/0/README.md b/templates/rabbitmq-examples/0/README.md deleted file mode 100644 index a797d5a..0000000 --- a/templates/rabbitmq-examples/0/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# RabbitMQ Examples - -I needed to test a rabbitMQ with some basics so I forked the official tutorials and added a Dockerfile -[here](https://github.com/joshuacox/rabbitmq-tutorials/tree/jsdockerfile/javascript-nodejs) - -[dockerhub here](https://hub.docker.com/r/joshuacox/rabbitmq-tutorials/) - -In that fork, there is a `Makefile` that can run through the proof of -concept. `make` will start a rabbitmq container, then start all the -listeners as deamons, and the emitters to run once. The emitters are -ephemeral and will go away once their message is sent or they error out. diff --git a/templates/rabbitmq-examples/0/rancher-compose.yml b/templates/rabbitmq-examples/0/rancher-compose.yml deleted file mode 100644 index 1ad07d9..0000000 --- a/templates/rabbitmq-examples/0/rancher-compose.yml +++ /dev/null @@ -1,38 +0,0 @@ -version: '2' -catalog: - name: RabbitMQ_Examples - version: 3.6-rancher1 - description: | - tutorial storage examples - questions: - - variable: rabbitmq_link - description: "rabbitmq service link" - label: "rabbitmq stack/service" - default: "" - required: false - type: "service" -services: - receive: - scale: 1 - send: - scale: 1 - worker: - scale: 1 - newtask: - scale: 1 - rpcserver: - scale: 1 - rpcclient: - scale: 1 - receivelogs: - scale: 1 - emitlog: - scale: 1 - receivelogsdirect: - scale: 1 - emitlogdirect: - scale: 1 - receivelogstopic: - scale: 1 - emitlogtopic: - scale: 1 diff --git a/templates/rabbitmq-examples/catalogIcon-rabbitmq.png b/templates/rabbitmq-examples/catalogIcon-rabbitmq.png deleted file mode 100755 index f458f7f52aecea02277b92ee4e7a2bcb288d1a95..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4090 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 diff --git a/templates/rabbitmq-examples/config.yml b/templates/rabbitmq-examples/config.yml deleted file mode 100755 index a90ef55..0000000 --- a/templates/rabbitmq-examples/config.yml +++ /dev/null @@ -1,7 +0,0 @@ -name: RabbitMQ 3.6 Tutorial Examples -description: | - Robust messaging for applications Examples -version: 3.6-rancher1 -category: Message queues -maintainer: "Josh Cox " -minimum_rancher_version: v0.59.0 From 32471cd4c72fd388c470a8ac7b39fdc0abdb63d9 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Fri, 28 Jul 2017 11:46:39 -0500 Subject: [PATCH 42/51] defaultcookie --- templates/rabbitmq-3/2/rancher-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/rabbitmq-3/2/rancher-compose.yml b/templates/rabbitmq-3/2/rancher-compose.yml index 4153b0a..1e9871e 100755 --- a/templates/rabbitmq-3/2/rancher-compose.yml +++ b/templates/rabbitmq-3/2/rancher-compose.yml @@ -8,7 +8,7 @@ catalog: description: "Erlang cookie required for auth" label: "Erlang cookie:" required: true - default: + default: "defaultcookie" type: "string" - variable: "cluster_partition_handling" label: "Partition Handling:" From 15f3daf9f59ef6bfcbdbdcdb6502e4b80f66708f Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Fri, 28 Jul 2017 11:49:45 -0500 Subject: [PATCH 43/51] Scale selection --- templates/rabbitmq-3/2/rancher-compose.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/rabbitmq-3/2/rancher-compose.yml b/templates/rabbitmq-3/2/rancher-compose.yml index 1e9871e..1f809da 100755 --- a/templates/rabbitmq-3/2/rancher-compose.yml +++ b/templates/rabbitmq-3/2/rancher-compose.yml @@ -66,9 +66,16 @@ catalog: required: true default: "private=true" type: "string" + - variable: "initial_data_nodes" + type: "int" + required: true + label: "# of initial data nodes" + description: "Set the initial number of data nodes" + default: 1 services: rabbitmq: + scale: ${initial_data_nodes} metadata: rabbitmq: config: From d958f2d35be035c980104217644669aadc9f8676 Mon Sep 17 00:00:00 2001 From: Tayyeb Date: Sun, 30 Jul 2017 09:06:51 +0430 Subject: [PATCH 44/51] update sentry to 8.18.0 --- templates/sentry/2/README.md | 20 ++++ templates/sentry/2/docker-compose.yml | 114 ++++++++++++++++++++++ templates/sentry/2/rancher-compose.yml | 129 +++++++++++++++++++++++++ templates/sentry/config.yml | 2 +- 4 files changed, 264 insertions(+), 1 deletion(-) create mode 100644 templates/sentry/2/README.md create mode 100644 templates/sentry/2/docker-compose.yml create mode 100644 templates/sentry/2/rancher-compose.yml diff --git a/templates/sentry/2/README.md b/templates/sentry/2/README.md new file mode 100644 index 0000000..c35b928 --- /dev/null +++ b/templates/sentry/2/README.md @@ -0,0 +1,20 @@ +# Sentry + + +### Info: + This templates creates a complete [sentry](https://github.com/getsentry/sentry) setup including postgres and redis servers. + + Images are the offical images from: + * Sentry: [https://hub.docker.com/_/sentry/](https://hub.docker.com/_/sentry/) + * Postgres: [https://hub.docker.com/_/postgres/](https://hub.docker.com/_/postgres/) + * Redis: [https://hub.docker.com/_/redis/](https://hub.docker.com/_/redis/) + +### Usage: + + * Select Sentry from catalog. + + * Required: Enter a sentry secret + + * Optional: Email configuration + + * Click deploy. diff --git a/templates/sentry/2/docker-compose.yml b/templates/sentry/2/docker-compose.yml new file mode 100644 index 0000000..02fd700 --- /dev/null +++ b/templates/sentry/2/docker-compose.yml @@ -0,0 +1,114 @@ +sentry-postgres: + environment: + POSTGRES_DB: ${sentry_db_name} + POSTGRES_USER: ${sentry_db_user} + POSTGRES_PASSWORD: ${sentry_db_pass} + PGDATA: /data/postgres/data + log_driver: '' + labels: + io.rancher.sidekicks: sentry-postgres-datavolume + io.rancher.container.hostname_override: container_name + volumes_from: + - sentry-postgres-datavolume + tty: true + log_opt: {} + image: postgres:9.6-alpine + stdin_open: true +sentry-postgres-datavolume: + image: alpine + stdin_open: true + net: none + entrypoint: + - /bin/true + volumes: + - /data/postgres/data + tty: true + labels: + io.rancher.container.start_once: 'true' +sentry-cron: + environment: + SENTRY_EMAIL_HOST: ${sentry_email_host} + SENTRY_EMAIL_PASSWORD: ${sentry_email_password} + SENTRY_EMAIL_PORT: '${sentry_email_port}' + SENTRY_EMAIL_USER: ${sentry_email_user} + SENTRY_SECRET_KEY: ${sentry_secret_key} + SENTRY_SERVER_EMAIL: ${sentry_server_email} + SENTRY_POSTGRES_HOST: postgres + SENTRY_DB_NAME: ${sentry_db_name} + SENTRY_DB_USER: ${sentry_db_user} + SENTRY_DB_PASSWORD: ${sentry_db_pass} + log_driver: '' + labels: + io.rancher.container.hostname_override: container_name + tty: true + command: + - run + - cron + log_opt: {} + image: sentry:8.18.0 + links: + - sentry-postgres:postgres + - sentry-redis:redis + stdin_open: true +sentry-redis: + log_driver: '' + labels: + io.rancher.container.hostname_override: container_name + tty: true + log_opt: {} + image: redis:3.2-alpine + stdin_open: true +sentry: + ports: + - ${sentry_public_port}:9000/tcp + environment: + SENTRY_EMAIL_HOST: ${sentry_email_host} + SENTRY_EMAIL_PASSWORD: ${sentry_email_password} + SENTRY_EMAIL_PORT: '${sentry_email_port}' + SENTRY_EMAIL_USER: ${sentry_email_user} + SENTRY_SECRET_KEY: ${sentry_secret_key} + SENTRY_SERVER_EMAIL: ${sentry_server_email} + SENTRY_POSTGRES_HOST: postgres + SENTRY_DB_NAME: ${sentry_db_name} + SENTRY_DB_USER: ${sentry_db_user} + SENTRY_DB_PASSWORD: ${sentry_db_pass} + log_driver: '' + labels: + io.rancher.container.hostname_override: container_name + tty: true + command: + - /bin/bash + - -c + - sentry upgrade --noinput && sentry createuser --email ${sentry_initial_user_email} --password ${sentry_initial_user_password} --superuser && /entrypoint.sh run web || /entrypoint.sh run web + log_opt: {} + image: sentry:8.18.0 + links: + - sentry-postgres:postgres + - sentry-redis:redis + stdin_open: true +sentry-worker: + environment: + SENTRY_EMAIL_HOST: ${sentry_email_host} + SENTRY_EMAIL_PASSWORD: ${sentry_email_password} + SENTRY_EMAIL_PORT: '${sentry_email_port}' + SENTRY_EMAIL_USER: ${sentry_email_user} + SENTRY_SECRET_KEY: ${sentry_secret_key} + SENTRY_SERVER_EMAIL: ${sentry_server_email} + SENTRY_POSTGRES_HOST: postgres + SENTRY_DB_NAME: ${sentry_db_name} + SENTRY_DB_USER: ${sentry_db_user} + SENTRY_DB_PASSWORD: ${sentry_db_pass} + log_driver: '' + labels: + io.rancher.scheduler.global: 'true' + io.rancher.container.hostname_override: container_name + tty: true + command: + - run + - worker + log_opt: {} + image: sentry:8.18.0 + links: + - sentry-postgres:postgres + - sentry-redis:redis + stdin_open: true diff --git a/templates/sentry/2/rancher-compose.yml b/templates/sentry/2/rancher-compose.yml new file mode 100644 index 0000000..9631c30 --- /dev/null +++ b/templates/sentry/2/rancher-compose.yml @@ -0,0 +1,129 @@ +version: '2' +catalog: + name: Sentry + version: 8.18.0 + description: Sentry is a realtime event logging and aggregation platform + + questions: + - variable: "sentry_secret_key" + type: "password" + required: true + label: "SENTRY_SECRET_KEY" + description: "A secret key used for cryptographic functions within Sentry. see https://hub.docker.com/_/sentry/ for more info" + + - variable: "sentry_public_port" + type: "int" + required: true + label: "Sentry public port" + default: 9000 + description: "Port that Sentry will listen on. Alternatively you could point a load balancer to the port 9000 of this container" + + - variable: "sentry_db_name" + type: "string" + required: true + label: "Sentry db name" + default: "sentry" + description: "Sentry db name." + + - variable: "sentry_db_user" + type: "string" + required: true + label: "Sentry db user" + default: "sentry" + description: "Sentry db user." + + - variable: "sentry_db_pass" + type: "string" + required: true + label: "Sentry db pass" + default: "sentry" + description: "Sentry db pass." + + - variable: "sentry_initial_user_email" + type: "string" + required: true + label: "SENTRY_INITIAL_USER_EMAIL" + description: "The initial superuser email" + + - variable: "sentry_initial_user_password" + type: "password" + required: true + label: "SENTRY_INITIAL_USER_PASSWORD" + description: "The initial superuser password. Please use a simple initial password and change it afterwards in the Sentry interface" + + - variable: "sentry_server_email" + type: "string" + required: false + label: "SENTRY_SERVER_EMAIL" + description: "The email address used for 'From:'. see https://hub.docker.com/_/sentry/ for more info" + + - variable: "sentry_email_host" + type: "string" + required: false + label: "SENTRY_EMAIL_HOST" + description: "The smtp server address. see https://hub.docker.com/_/sentry/ for more info" + + - variable: "sentry_email_user" + type: "string" + required: false + label: "SENTRY_EMAIL_USER" + description: "The username for the email account. see https://hub.docker.com/_/sentry/ for more info" + + - variable: "sentry_email_password" + type: "password" + required: false + label: "SENTRY_EMAIL_PASSWORD" + description: "The password for the email account. see https://hub.docker.com/_/sentry/ for more info" + + - variable: "sentry_email_port" + type: "int" + required: false + label: "SENTRY_EMAIL_PORT" + description: "Port of the smtp server. see https://hub.docker.com/_/sentry/ for more info" + +services: + sentry-cron: + scale: 1 + start_on_create: true + sentry-postgres-datavolume: + scale: 1 + start_on_create: true + sentry-worker: + start_on_create: true + sentry-redis: + scale: 1 + start_on_create: true + health_check: + response_timeout: 2000 + healthy_threshold: 2 + port: 6379 + unhealthy_threshold: 3 + initializing_timeout: 60000 + interval: 2000 + strategy: recreate + reinitializing_timeout: 60000 + sentry-postgres: + scale: 1 + start_on_create: true + health_check: + response_timeout: 2000 + healthy_threshold: 2 + port: 5432 + unhealthy_threshold: 3 + initializing_timeout: 60000 + interval: 2000 + strategy: recreate + reinitializing_timeout: 60000 + sentry: + scale: 1 + start_on_create: true + health_check: + response_timeout: 2000 + healthy_threshold: 2 + port: 9000 + unhealthy_threshold: 3 + initializing_timeout: 600000 + interval: 2000 + strategy: recreate + request_line: GET "/auth/login/sentry" "HTTP/1.0" + reinitializing_timeout: 60000 diff --git a/templates/sentry/config.yml b/templates/sentry/config.yml index c1a9ea1..76276bb 100644 --- a/templates/sentry/config.yml +++ b/templates/sentry/config.yml @@ -1,4 +1,4 @@ name: Sentry -version: 8.17.0 +version: 8.18.0 description: Sentry is a realtime event logging and aggregation platform category: Error Tracking From 3174bec37928c9cec5e04faf751dda6975270b41 Mon Sep 17 00:00:00 2001 From: Tayyeb Date: Sun, 30 Jul 2017 09:14:15 +0430 Subject: [PATCH 45/51] change default to ignore *-datavolume containers in janitor:docker-cleanup --- templates/janitor/4/docker-compose.yml | 20 +++++++++ templates/janitor/4/rancher-compose.yml | 54 +++++++++++++++++++++++++ templates/janitor/config.yml | 2 +- 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 templates/janitor/4/docker-compose.yml create mode 100644 templates/janitor/4/rancher-compose.yml diff --git a/templates/janitor/4/docker-compose.yml b/templates/janitor/4/docker-compose.yml new file mode 100644 index 0000000..431ade2 --- /dev/null +++ b/templates/janitor/4/docker-compose.yml @@ -0,0 +1,20 @@ +cleanup: + image: meltwater/docker-cleanup:1.8.0 + environment: + CLEAN_PERIOD: ${FREQUENCY} + DELAY_TIME: "900" + KEEP_IMAGES: "${KEEP}" + KEEP_CONTAINERS: "${KEEPC}" + KEEP_CONTAINERS_NAMED: "${KEEPCN}" + LOOP: "${LOOP}" + DEBUG: "${DEBUG}" + labels: + io.rancher.scheduler.global: "true" + io.rancher.scheduler.affinity:host_label_ne: "${EXCLUDE_LABEL}" + net: none + privileged: true + tty: false + stdin_open: false + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /var/lib/docker:/var/lib/docker diff --git a/templates/janitor/4/rancher-compose.yml b/templates/janitor/4/rancher-compose.yml new file mode 100644 index 0000000..8db4a8a --- /dev/null +++ b/templates/janitor/4/rancher-compose.yml @@ -0,0 +1,54 @@ +.catalog: + name: "Janitor" + version: "v1.7.1" + description: "Docker cleanup" + uuid: janitor-3 + questions: + - variable: "FREQUENCY" + label: "Frequency" + description: "Run the cleanup on a cycle of this many seconds" + default: 3600 + required: true + type: "int" + - variable: "EXCLUDE_LABEL" + label: "Exclude label" + description: "Specify a Rancher host label here that will be used to determine on which hosts the Janitor container should not deploy." + default: janitor.exclude=true + required: true + type: "string" + - variable: "KEEP" + label: "Keep images" + description: "A comma separated list of images that should never be removed. These are left-anchored Bash Shell Wildcard patterns." + default: "rancher/" + required: false + type: "string" + - variable: "KEEPC" + label: "Keep containers" + description: "A comma separated list of images that should never have stopped containers removed. These are left-anchored Bash Shell Wildcard patterns." + default: "*:*" + required: false + type: "string" + - variable: "KEEPCN" + label: "Keep named containers" + description: "A comma separated list of names of exited or dead container that should never be removed. These are left-anchored Bash Shell Wildcard patterns." + default: "*-datavolume" + required: false + type: "string" + - variable: "DEBUG" + label: "Enable more debugging output on pattern matches" + description: "Read https://github.com/meltwater/docker-cleanup#environment-variables" + required: true + default: 0 + type: "enum" + options: + - 0 + - 1 + - variable: "LOOP" + label: "Ability to do non-looped cleanups, run it once and exit. Defaults to yes to run it forever in loops." + description: "Read https://github.com/meltwater/docker-cleanup#environment-variables" + required: true + default: true + type: "enum" + options: + - false + - true diff --git a/templates/janitor/config.yml b/templates/janitor/config.yml index 082b015..b128907 100644 --- a/templates/janitor/config.yml +++ b/templates/janitor/config.yml @@ -1,7 +1,7 @@ name: Janitor description: | Automatic cleanup of unused images on hosts, in order to save disk space. -version: v1.7 +version: v1.7.1 category: Monitoring maintainer: Steve Shipway From 0222583c707e74e4616847c3e1b104c862002786 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Mon, 31 Jul 2017 12:17:44 -0500 Subject: [PATCH 46/51] Added storage driver selection and upgraded to version 2 --- templates/zookeeper/3/README.md | 27 +++++++ templates/zookeeper/3/docker-compose.yml | 48 +++++++++++++ templates/zookeeper/3/rancher-compose.yml | 87 +++++++++++++++++++++++ templates/zookeeper/config.yml | 2 +- 4 files changed, 163 insertions(+), 1 deletion(-) create mode 100644 templates/zookeeper/3/README.md create mode 100644 templates/zookeeper/3/docker-compose.yml create mode 100644 templates/zookeeper/3/rancher-compose.yml diff --git a/templates/zookeeper/3/README.md b/templates/zookeeper/3/README.md new file mode 100644 index 0000000..ee2b770 --- /dev/null +++ b/templates/zookeeper/3/README.md @@ -0,0 +1,27 @@ +# Apache Zookeeper (Experimental) + +### Info: + + This template creates, scale in and scale out a multinodes zk (zookeeper) cluster on top of Rancher. The configuration is generated with confd from Rancher metadata. + Cluster size are variable after deployment, and get reconfigured if refresh interval > 0. + + +### Usage: + + Select Apache Zookeeper from catalog. + + Enter the number of nodes, mem and refresh interval for the zk cluster. (set refresh data to 0 to disable dinamic config) + + Change the following zookeeper default parameters, if you need: + +- ZK_DATA_DIR="/opt/zk/data" +- ZK_INIT_LIMIT="10" +- ZK_MAX_CLIENT_CXNS="500" +- ZK_SYNC_LIMIT="5" +- ZK_TICK_TIME="2000" + + Click deploy. + + Zookeeper can now be accessed over the Rancher network. + + Note: When you scale the cluster, zero downtime is expected... diff --git a/templates/zookeeper/3/docker-compose.yml b/templates/zookeeper/3/docker-compose.yml new file mode 100644 index 0000000..31aeffd --- /dev/null +++ b/templates/zookeeper/3/docker-compose.yml @@ -0,0 +1,48 @@ +version: '2' +services: + zk: + tty: true + image: rawmind/alpine-zk:3.4.9-3 + volumes_from: + - zk-volume + - zk-conf + environment: + - JVMFLAGS=-Xmx${zk_mem}m -Xms${zk_mem}m + - ZK_DATA_DIR=${zk_data_dir} + - ZK_INIT_LIMIT=${zk_init_limit} + - ZK_MAX_CLIENT_CXNS=${zk_max_client_cxns} + - ZK_SYNC_LIMIT=${zk_sync_limit} + - ZK_TICK_TIME=${zk_tick_time} + 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.scheduler.affinity:host_label: ${host_label} + io.rancher.sidekicks: zk-volume, zk-conf + zk-conf: + 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.scheduler.affinity:host_label: ${host_label} + io.rancher.container.start_once: true + image: rawmind/rancher-zk:3.4.9 + volumes: + - zkconfig:/opt/tools + zk-volume: + 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.scheduler.affinity:host_label: ${host_label} + io.rancher.container.start_once: true + environment: + - SERVICE_UID=10002 + - SERVICE_GID=10002 + - SERVICE_VOLUME=${zk_data_dir} + volumes: + - zkdata:${zk_data_dir} + volume_driver: local + image: rawmind/alpine-volume:0.0.2-1 +volumes: + zkconfig: + driver: ${VOLUME_DRIVER} + zkdata: + driver: ${VOLUME_DRIVER} diff --git a/templates/zookeeper/3/rancher-compose.yml b/templates/zookeeper/3/rancher-compose.yml new file mode 100644 index 0000000..46c74b0 --- /dev/null +++ b/templates/zookeeper/3/rancher-compose.yml @@ -0,0 +1,87 @@ +version: '2' +catalog: + name: Zookeeper + version: 3.4.9-rancher2 + description: | + (Experimental) Apache Zookeeper cluster. + minimum_rancher_version: v0.59.0 + maintainer: "Raul Sanchez " + uuid: zk-0 + questions: + - variable: "zk_scale" + description: "Number of zk nodes. Note: Recommended an odd number" + label: "Zk Nodes:" + required: true + default: 3 + type: "int" + - variable: "zk_mem" + description: "Amount of memory to config zk." + label: "Zk Memory (mb):" + required: true + default: 512 + type: "int" + - variable: "zk_init_limit" + description: "Time to allow followers to connect and sync with leader" + label: "Zk init limit (ticks):" + required: true + default: 10 + type: "int" + - variable: "zk_data_dir" + description: "Directory where zookeeper store data" + label: "Zk data dir:" + required: true + default: "/opt/zk/data" + type: "string" + - variable: "zk_max_client_cxns" + description: "Max client concurrent connections" + label: "Zk max client cxns:" + required: true + default: 500 + type: "int" + - variable: "zk_sync_limit" + description: "Time to allow followers to sync with leader" + label: "Zk sync limit (ticks):" + required: true + default: 5 + type: "int" + - variable: "zk_tick_time" + description: "Tick time length" + label: "Zk tick time (ms):" + required: true + default: 2000 + type: "int" + - variable: "zk_interval" + description: "Interval to poll/apply configuration changes. 0 to disable, reconfiguration will be done when you restart zk nodes" + label: "Zk Interval (s):" + required: true + default: 60 + type: "int" + - variable: host_label + label: "Host with Label to put zookeeper on" + description: | + Host label to use as zookeeper 'value' tag. + Example: 'zookeeper=true' + required: true + default: "private=true" + type: "string" + - variable: "VOLUME_DRIVER" + description: "The VOLUME driver to associate with this server" + label: "VOLUME Driver" + required: true + default: "rancher-nfs" + type: enum + options: # List of options if using type of `enum` + - rancher-nfs + - rancher-efs + - rancher-ebs +services: + zk: + scale: ${zk_scale} + retain_ip: true + health_check: + port: 2181 + interval: 5000 + unhealthy_threshold: 3 + request_line: '' + healthy_threshold: 2 + response_timeout: 5000 diff --git a/templates/zookeeper/config.yml b/templates/zookeeper/config.yml index 84ea903..d6b7d77 100644 --- a/templates/zookeeper/config.yml +++ b/templates/zookeeper/config.yml @@ -1,7 +1,7 @@ name: Apache Zookeeper description: | (Experimental) Zookeeper cluster -version: 3.4.9-rancher1 +version: 3.4.9-rancher2 category: Clustering maintainer: "Raul Sanchez " projectURL: https://github.com/rawmind0/alpine-zk From 8d622cff35c0bc3669184ed6c329cbf0f7030779 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Mon, 31 Jul 2017 12:21:05 -0500 Subject: [PATCH 47/51] Made local default --- templates/zookeeper/3/rancher-compose.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/zookeeper/3/rancher-compose.yml b/templates/zookeeper/3/rancher-compose.yml index 46c74b0..33fe7af 100644 --- a/templates/zookeeper/3/rancher-compose.yml +++ b/templates/zookeeper/3/rancher-compose.yml @@ -68,9 +68,10 @@ catalog: description: "The VOLUME driver to associate with this server" label: "VOLUME Driver" required: true - default: "rancher-nfs" + default: "local" type: enum options: # List of options if using type of `enum` + - local - rancher-nfs - rancher-efs - rancher-ebs From cd33234a223da5078e72d9be2dffade1e172ac6c Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Mon, 31 Jul 2017 15:38:01 -0500 Subject: [PATCH 48/51] Optional host_label --- .../3/{docker-compose.yml => docker-compose.yml.tpl} | 7 ++++++- templates/zookeeper/3/rancher-compose.yml | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) rename templates/zookeeper/3/{docker-compose.yml => docker-compose.yml.tpl} (92%) diff --git a/templates/zookeeper/3/docker-compose.yml b/templates/zookeeper/3/docker-compose.yml.tpl similarity index 92% rename from templates/zookeeper/3/docker-compose.yml rename to templates/zookeeper/3/docker-compose.yml.tpl index 31aeffd..59799ec 100644 --- a/templates/zookeeper/3/docker-compose.yml +++ b/templates/zookeeper/3/docker-compose.yml.tpl @@ -16,13 +16,17 @@ 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 ne .Values.host_label ""}} io.rancher.scheduler.affinity:host_label: ${host_label} +{{- end}} io.rancher.sidekicks: zk-volume, zk-conf zk-conf: 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 ne .Values.host_label ""}} io.rancher.scheduler.affinity:host_label: ${host_label} +{{- end}} io.rancher.container.start_once: true image: rawmind/rancher-zk:3.4.9 volumes: @@ -31,7 +35,9 @@ 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 ne .Values.host_label ""}} io.rancher.scheduler.affinity:host_label: ${host_label} +{{- end}} io.rancher.container.start_once: true environment: - SERVICE_UID=10002 @@ -39,7 +45,6 @@ services: - SERVICE_VOLUME=${zk_data_dir} volumes: - zkdata:${zk_data_dir} - volume_driver: local image: rawmind/alpine-volume:0.0.2-1 volumes: zkconfig: diff --git a/templates/zookeeper/3/rancher-compose.yml b/templates/zookeeper/3/rancher-compose.yml index 33fe7af..15751d9 100644 --- a/templates/zookeeper/3/rancher-compose.yml +++ b/templates/zookeeper/3/rancher-compose.yml @@ -61,8 +61,8 @@ catalog: description: | Host label to use as zookeeper 'value' tag. Example: 'zookeeper=true' - required: true - default: "private=true" + required: false + default: "" type: "string" - variable: "VOLUME_DRIVER" description: "The VOLUME driver to associate with this server" From d9ae2691b40a937ae57fdc27455b07342a5e364d Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Mon, 31 Jul 2017 15:38:26 -0500 Subject: [PATCH 49/51] Storage per container --- templates/zookeeper/3/docker-compose.yml.tpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/zookeeper/3/docker-compose.yml.tpl b/templates/zookeeper/3/docker-compose.yml.tpl index 59799ec..a6c73dc 100644 --- a/templates/zookeeper/3/docker-compose.yml.tpl +++ b/templates/zookeeper/3/docker-compose.yml.tpl @@ -49,5 +49,7 @@ services: volumes: zkconfig: driver: ${VOLUME_DRIVER} + per_container: true zkdata: driver: ${VOLUME_DRIVER} + per_container: true From 79383a528804b473e6f79f9b57072cfcbc914a28 Mon Sep 17 00:00:00 2001 From: Daniel Yu Date: Tue, 1 Aug 2017 11:44:53 +0800 Subject: [PATCH 50/51] Add readme --- templates/wordpress/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 templates/wordpress/README.md diff --git a/templates/wordpress/README.md b/templates/wordpress/README.md new file mode 100644 index 0000000..855556e --- /dev/null +++ b/templates/wordpress/README.md @@ -0,0 +1,12 @@ +## What is inside WordPress Stack? +* MariaDB Database +* WordPress (php/apache) +* Rancher Load Balancer (haproxy) + +## Info +* To persist website and database data, two volumes are created: mariadb_data, wordpress_data. +* You can choose from one of existing rancher volume types depending on your own environment. + +## Compatibility Notes + +* Version v0.2-bitnami has some known [issue](https://github.com/bitnami/bitnami-docker-testlink/issues/17#issuecomment-261783035) with Docker overlayfs and overlayfs2 storage driver. Please try to switch to aufs or devicemapper. \ No newline at end of file From 00036bccb76ed614a0f2e62785629918c57473e9 Mon Sep 17 00:00:00 2001 From: Daniel Yu Date: Tue, 1 Aug 2017 15:24:24 +0800 Subject: [PATCH 51/51] Update README.md --- templates/wordpress/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/wordpress/README.md b/templates/wordpress/README.md index 855556e..4de1c01 100644 --- a/templates/wordpress/README.md +++ b/templates/wordpress/README.md @@ -9,4 +9,4 @@ ## Compatibility Notes -* Version v0.2-bitnami has some known [issue](https://github.com/bitnami/bitnami-docker-testlink/issues/17#issuecomment-261783035) with Docker overlayfs and overlayfs2 storage driver. Please try to switch to aufs or devicemapper. \ No newline at end of file +* Version v0.2-bitnami has some known [issue](https://github.com/bitnami/bitnami-docker-testlink/issues/17#issuecomment-261783035) with Docker overlay and overlay2 storage driver. Please try to switch to aufs or devicemapper.