This commit is contained in:
Raul Sanchez 2017-08-01 19:05:56 +02:00
commit dd7ca4c80c
49 changed files with 2002 additions and 11 deletions

View File

@ -0,0 +1 @@
100bf1dc97f5016602457ba397433561

View File

@ -0,0 +1,3 @@
.catalog:
name: cloudca
version: "v1.0.2"

View File

@ -0,0 +1 @@
https://objects-east.cloud.ca/v1/5ef827605f884961b94881e928e7a250/rancher-ui-driver/v1.0.2/component.js

View File

@ -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

View File

@ -1,2 +1,2 @@
name: cloudca
version: "v1.0.1"
version: "v1.0.2"

View File

@ -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.

View File

@ -0,0 +1,45 @@
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: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
volumes_from:
- mongo-datavolume
- mongo-base
ports:
- 27017:27017/tcp
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
image: rancher/mongodb-conf:v0.1.1
stdin_open: true
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
volumes:
- mongodata:/data/db
entrypoint: /bin/true
image: busybox
volumes:
mongodata:
driver: ${VOLUME_DRIVER}

View File

@ -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}"

View File

@ -1,5 +1,5 @@
name: MongoDB
description: |
MongoDB Replica Set.
version: 3.2-rancher2
version: "3.4-rancher1"
category: Databases

View File

@ -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.

View File

@ -0,0 +1,116 @@
version: '2'
services:
agent:
image: drone/agent:${drone_version}
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/drone:${drone_version}
environment:
DRONE_HOST: ${drone_host}
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/lb-service-haproxy:v0.6.4
ports:
- ${host_port}:${host_port}
labels:
io.rancher.scheduler.global: 'true'
io.rancher.scheduler.affinity:host_label_soft: ${drone_lb_host_label}

View File

@ -0,0 +1,188 @@
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: 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: Public 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: 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: Remote 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: "drone:9000"
- 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."
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'
- 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}
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:
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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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}

View File

@ -1,5 +1,5 @@
name: Elasticsearch Cluster 5.4.2
description: |
Elasticsearch, you know for search!
version: 5.4.2-rancher1
category: ELK
version: 5.4.2-rancher2
category: ELK

View File

@ -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

View File

@ -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

View File

@ -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 <s.shipway@auckland.ac.nz>

View File

@ -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.

View File

@ -0,0 +1,40 @@
version: '2'
services:
mysql-lb:
image: rancher/lb-service-haproxy:v0.6.4
ports:
- ${mysql_lb_port}:${mysql_lb_port}
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

View File

@ -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

View File

@ -0,0 +1,3 @@
## What is inside the MySQL Stack?
* MySQL database server + sidekick with volume data
* Load Balancer

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="391pt" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" height="202pt" viewBox="0 0 391 202" >
<g transform="translate(0.738281, 121.593)" style="fill:#00618a; fill-rule:nonzero; stroke:none; stroke-width:0.87088; stroke-linecap:butt; stroke-linejoin:miter; stroke-dasharray:none;" >
<path d="M0 62.235 C0 62.235 12.8418 62.235 12.8418 62.235 C12.8418 62.235 12.8418 11.524 12.8418 11.524 C12.8418 11.524 32.7226 55.732 32.7226 55.732 C35.0683 61.083 38.2793 62.976 44.5762 62.976 C50.874 62.976 53.9609 61.083 56.3076 55.732 C56.3076 55.732 76.1875 11.524 76.1875 11.524 C76.1875 11.524 76.1875 62.235 76.1875 62.235 C76.1875 62.235 89.0303 62.235 89.0303 62.235 C89.0303 62.235 89.0303 11.607 89.0303 11.607 C89.0303 6.668 87.0537 4.28 82.9795 3.046 C73.2246 0 66.6797 2.634 63.7158 9.22 C63.7158 9.22 44.206 52.85 44.206 52.85 C44.206 52.85 25.3135 9.22 25.3135 9.22 C22.4736 2.634 15.8056 0 6.05078 3.046 C1.97559 4.28 0 6.668 0 11.607 C0 11.607 0 62.235 0 62.235 Z" />
</g>
<g transform="translate(100.444, 142.416)" style="fill:#00618a; fill-rule:nonzero; stroke:none; stroke-width:0.87088; stroke-linecap:butt; stroke-linejoin:miter; stroke-dasharray:none;" >
<path d="M0.002 0.136 C0.002 0.136 12.84 0.136 12.84 0.136 C12.84 0.136 12.84 28.074 12.84 28.074 C12.72 29.592 13.327 33.154 20.362 33.265 C23.951 33.321 48.062 33.265 48.287 33.265 C48.287 33.265 48.287 0 48.287 0 C48.287 0 61.155 0 61.155 0 C61.214 0 61.142 45.364 61.143 45.557 C61.214 56.745 47.261 59.175 40.83 59.363 C40.83 59.363 0.281 59.363 0.281 59.363 C0.281 59.363 0.281 50.724 0.281 50.724 C0.352 50.724 40.8 50.732 40.902 50.722 C49.167 49.849 48.191 45.741 48.19 44.358 C48.19 44.358 48.19 40.99 48.19 40.99 C48.19 40.99 20.895 40.99 20.895 40.99 C8.196 40.873 0.109 35.331 0.009 28.955 C0 28.364 0.283 0.415 0.002 0.136 Z" />
</g>
<g transform="translate(171.496, 124.557)" style="fill:#e48e00; fill-rule:nonzero; stroke:none; stroke-width:0.87088; stroke-linecap:butt; stroke-linejoin:miter; stroke-dasharray:none;" >
<path d="M0 59.271 C0 59.271 36.92 59.271 36.92 59.271 C41.242 59.271 45.441 58.366 48.775 56.801 C54.331 54.25 57.048 50.793 57.048 46.264 C57.048 46.264 57.048 36.88 57.048 36.88 C57.048 33.175 53.961 29.717 47.91 27.413 C44.699 26.177 40.748 25.519 36.92 25.519 C36.92 25.519 21.361 25.519 21.361 25.519 C16.176 25.519 13.706 23.955 13.089 20.498 C12.965 20.086 12.965 19.756 12.965 19.345 C12.965 19.345 12.965 13.501 12.965 13.501 C12.965 13.171 12.965 12.841 13.089 12.43 C13.706 9.796 15.065 9.054 19.633 8.643 C20.004 8.643 20.497 8.56 20.868 8.56 C20.868 8.56 57.542 8.56 57.542 8.56 C57.542 8.56 57.542 0 57.542 0 C57.542 0 21.485 0 21.485 0 C16.299 0 13.582 0.329 11.113 1.069 C3.457 3.457 0.123 7.244 0.123 13.83 C0.123 13.83 0.123 21.321 0.123 21.321 C0.123 27.084 6.668 32.023 17.657 33.175 C18.893 33.257 20.127 33.339 21.361 33.339 C21.361 33.339 34.697 33.339 34.697 33.339 C35.192 33.339 35.686 33.339 36.056 33.422 C40.131 33.752 41.859 34.492 43.095 35.974 C43.835 36.714 44.082 37.456 44.082 38.279 C44.082 38.279 44.082 45.77 44.082 45.77 C44.082 46.676 43.465 47.829 42.231 48.816 C41.119 49.804 39.267 50.463 36.797 50.628 C36.303 50.628 35.933 50.71 35.439 50.71 C35.439 50.71 0 50.71 0 50.71 C0 50.71 0 59.271 0 59.271 Z" />
</g>
<g transform="translate(308.656, 124.557)" style="fill:#e48e00; fill-rule:nonzero; stroke:none; stroke-width:0.87088; stroke-linecap:butt; stroke-linejoin:miter; stroke-dasharray:none;" >
<path d="M0 44.371 C0 53.179 6.544 58.119 19.757 59.107 C20.991 59.189 22.227 59.271 23.461 59.271 C23.461 59.271 56.925 59.271 56.925 59.271 C56.925 59.271 56.925 50.71 56.925 50.71 C56.925 50.71 23.214 50.71 23.214 50.71 C15.682 50.71 12.842 48.816 12.842 44.289 C12.842 44.289 12.842 0 12.842 0 C12.842 0 0 0 0 0 C0 0 0 44.371 0 44.371 Z" />
</g>
<g transform="translate(236.74, 124.666)" style="fill:#e48e00; fill-rule:nonzero; stroke:none; stroke-width:0.87088; stroke-linecap:butt; stroke-linejoin:miter; stroke-dasharray:none;" >
<path d="M0 44.711 C0 44.711 0 14.189 0 14.189 C0 6.435 5.445 1.732 16.209 0.247 C17.323 0.083 18.561 0 19.674 0 C19.674 0 44.05 0 44.05 0 C45.287 0 46.402 0.083 47.639 0.247 C58.404 1.732 63.848 6.435 63.848 14.189 C63.848 14.189 63.848 44.711 63.848 44.711 C63.848 51.002 61.536 54.369 56.207 56.563 C56.207 56.563 68.857 67.981 68.857 67.981 C68.857 67.981 53.946 67.981 53.946 67.981 C53.946 67.981 43.712 58.743 43.712 58.743 C43.712 58.743 33.409 59.396 33.409 59.396 C33.409 59.396 19.674 59.396 19.674 59.396 C17.323 59.396 14.849 59.065 12.126 58.323 C3.96 56.096 0 51.806 0 44.711 Z M13.861 43.969 C13.861 44.382 13.984 44.794 14.108 45.289 C14.85 48.836 18.191 50.816 23.264 50.816 C23.264 50.816 34.931 50.816 34.931 50.816 C34.931 50.816 24.214 41.141 24.214 41.141 C24.214 41.141 39.125 41.141 39.125 41.141 C39.125 41.141 48.472 49.579 48.472 49.579 C50.194 48.661 51.328 47.257 51.724 45.454 C51.847 45.042 51.847 44.629 51.847 44.217 C51.847 44.217 51.847 14.932 51.847 14.932 C51.847 14.602 51.847 14.189 51.724 13.776 C50.981 10.477 47.64 8.58 42.691 8.58 C42.691 8.58 23.264 8.58 23.264 8.58 C17.573 8.58 13.861 11.055 13.861 14.932 C13.861 14.932 13.861 43.969 13.861 43.969 Z" />
</g>
<g transform="translate(241.59, -4.64258)" style="fill:#00618a; fill-rule:nonzero; stroke:none; stroke-width:0.87088; stroke-linecap:butt; stroke-linejoin:miter; stroke-dasharray:none;" >
<path d="M135.289 114.997 C127.395 114.783 121.365 115.517 116.21 117.691 C114.745 118.309 112.409 118.325 112.17 120.161 C112.975 121.005 113.1 122.265 113.74 123.303 C114.971 125.295 117.049 127.964 118.903 129.364 C120.929 130.893 123.017 132.529 125.189 133.853 C129.052 136.209 133.365 137.554 137.085 139.914 C139.277 141.305 141.455 143.057 143.594 144.627 C144.651 145.403 145.362 146.61 146.736 147.096 C146.736 147.022 146.736 146.947 146.736 146.872 C146.014 145.953 145.828 144.689 145.165 143.729 C144.193 142.757 143.22 141.784 142.247 140.811 C139.394 137.024 135.772 133.698 131.922 130.935 C128.852 128.731 121.98 125.754 120.699 122.181 C120.624 122.106 120.55 122.031 120.474 121.956 C122.651 121.711 125.2 120.923 127.209 120.385 C130.584 119.48 133.6 119.714 137.085 118.814 C138.656 118.365 140.227 117.915 141.799 117.467 C141.799 117.167 141.799 116.869 141.799 116.569 C140.037 114.761 138.781 112.369 136.86 110.733 C131.834 106.453 126.348 102.177 120.699 98.6114 C117.566 96.6338 113.694 95.3487 110.374 93.6729 C109.257 93.1094 107.295 92.8164 106.557 91.877 C104.813 89.6533 103.863 86.835 102.518 84.2451 C99.7 78.8194 96.933 72.8936 94.437 67.1856 C92.734 63.293 91.622 59.4541 89.499 55.9619 C79.307 39.2051 68.336 29.0908 51.341 19.1494 C47.725 17.0352 43.371 16.2002 38.77 15.1094 C36.302 14.96 33.832 14.8096 31.363 14.6602 C29.856 14.0303 28.288 12.1865 26.874 11.293 C21.244 7.73633 6.803 0 2.633 10.1709 C0 16.5908 6.568 22.8555 8.917 26.1084 C10.566 28.3906 12.677 30.9492 13.855 33.5156 C14.63 35.2022 14.764 36.8936 15.427 38.6787 C17.059 43.0752 18.478 47.8584 20.589 51.9219 C21.656 53.9776 22.832 56.1436 24.181 57.9824 C25.008 59.1104 26.425 59.6074 26.649 61.3496 C25.263 63.2891 25.184 66.2998 24.405 68.7569 C20.897 79.8184 22.22 93.5674 27.323 101.754 C28.889 104.267 32.577 109.657 37.648 107.59 C42.084 105.783 41.093 100.184 42.362 95.2442 C42.649 94.124 42.473 93.3008 43.035 92.5508 C43.035 92.625 43.035 92.7002 43.035 92.7754 C44.382 95.4688 45.729 98.1621 47.076 100.855 C50.066 105.671 55.373 110.704 59.87 114.1 C62.202 115.861 64.038 118.906 67.053 119.936 C67.053 119.861 67.053 119.787 67.053 119.711 C66.977 119.711 66.903 119.711 66.828 119.711 C66.244 118.8 65.33 118.423 64.584 117.691 C62.827 115.969 60.874 113.828 59.421 111.855 C55.331 106.302 51.716 100.224 48.423 93.8975 C46.85 90.877 45.483 87.544 44.157 84.4697 C43.646 83.2842 43.652 81.4922 42.587 80.878 C41.135 83.1309 38.996 84.9522 37.873 87.6123 C36.077 91.8643 35.845 97.0498 35.18 102.427 C34.786 102.568 34.961 102.471 34.73 102.651 C31.604 101.897 30.505 98.6787 29.344 95.918 C26.405 88.9356 25.859 77.6924 28.445 69.6553 C29.114 67.5762 32.138 61.0264 30.914 59.1055 C30.33 57.1885 28.402 56.0801 27.323 54.6153 C25.988 52.8047 24.655 50.4209 23.731 48.3301 C21.326 42.8858 20.203 36.7744 17.671 31.2715 C16.461 28.6406 14.414 25.9785 12.733 23.6397 C10.872 21.0489 8.788 19.1406 7.346 16.0069 C6.833 14.8936 6.136 13.1113 6.897 11.9668 C7.139 11.1943 7.48 10.8721 8.244 10.6201 C9.546 9.61621 13.172 10.9541 14.528 11.5176 C18.128 13.0127 21.132 14.4365 24.181 16.4561 C25.645 17.4268 27.125 19.3037 28.894 19.8233 C29.567 19.8233 30.241 19.8233 30.914 19.8233 C34.074 20.5498 37.614 20.0489 40.566 20.9453 C45.784 22.5313 50.46 24.9981 54.707 27.6797 C67.645 35.8487 78.223 47.4776 85.459 61.3496 C86.623 63.583 87.127 65.7149 88.152 68.084 C90.221 72.8614 92.827 77.7774 94.885 82.4492 C96.939 87.1104 98.941 91.8145 101.844 95.6934 C103.371 97.7324 109.266 98.8262 111.945 99.958 C113.823 100.752 116.9 101.579 118.679 102.651 C122.077 104.701 125.369 107.141 128.556 109.386 C130.149 110.508 135.045 112.969 135.289 114.997 Z" />
</g>
<g transform="translate(272.504, 24.8027)" style="fill:#00618a; fill-rule:evenodd; stroke:none; stroke-width:0.87088; stroke-linecap:butt; stroke-linejoin:miter; stroke-dasharray:none;" >
<path d="M4.041 0.0303 C2.395 0 1.231 0.21 0 0.4786 C0 0.5537 0 0.6289 0 0.7032 C0.075 0.7032 0.15 0.7032 0.225 0.7032 C1.01 2.3164 2.396 3.3545 3.367 4.7442 C4.115 6.3155 4.863 7.8868 5.612 9.4571 C5.686 9.3828 5.762 9.3077 5.836 9.2334 C7.226 8.2539 7.863 6.6866 7.856 4.295 C7.299 3.709 7.217 2.9737 6.734 2.2744 C6.092 1.3428 4.85 0.8135 4.041 0.0303 Z" />
</g>
<g transform="translate(371.609, 165.56)" style="fill:#e48e00; fill-rule:evenodd; stroke:none; stroke-width:1; stroke-linecap:butt; stroke-linejoin:miter; stroke-dasharray:none;" >
<path d="M0 9.463 C0 15.117 4.467 18.927 9.464 18.927 C14.461 18.927 18.928 15.117 18.928 9.463 C18.928 3.81 14.461 0 9.464 0 C4.467 0 0 3.81 0 9.463 Z M16.808 9.463 C16.808 13.753 13.528 16.959 9.464 16.959 C5.351 16.959 2.12 13.753 2.12 9.463 C2.12 5.173 5.351 1.967 9.464 1.967 C13.528 1.967 16.808 5.173 16.808 9.463 Z M12.014 14.864 C12.014 14.864 14.133 14.864 14.133 14.864 C14.133 14.864 11.03 10.12 11.03 10.12 C12.695 9.943 13.956 9.135 13.956 7.167 C13.956 4.971 12.569 4.063 9.894 4.063 C9.894 4.063 5.679 4.063 5.679 4.063 C5.679 4.063 5.679 14.864 5.679 14.864 C5.679 14.864 7.496 14.864 7.496 14.864 C7.496 14.864 7.496 10.195 7.496 10.195 C7.496 10.195 9.187 10.195 9.187 10.195 C9.187 10.195 12.014 14.864 12.014 14.864 Z M7.496 8.681 C7.496 8.681 7.496 5.577 7.496 5.577 C7.496 5.577 9.59 5.577 9.59 5.577 C10.676 5.577 11.988 5.779 11.988 7.041 C11.988 8.554 10.802 8.681 9.439 8.681 C9.439 8.681 7.496 8.681 7.496 8.681 Z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,5 @@
name: MySQL
description: |
MySQL — an open-source relational database management system (RDBMS)
version: v0.0.1
category: Database

View File

@ -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}

View File

@ -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.

View File

@ -0,0 +1,40 @@
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}
{{- if ne .Values.mongo_link ""}}
external_links:
- ${mongo_link}:mongo
tty: true
{{- else}}
mongo:
command: mongod --storageEngine=wiredTiger
restart: always
environment:
MONGO_SERVICE_NAME: mongo
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:
- mongodata:/data/db
volumes:
mongodata:
driver: ${VOLUME_DRIVER}
{{- end}}

View File

@ -0,0 +1,70 @@
version: '2'
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: "local"
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: "test@local"
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: false
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

View File

@ -0,0 +1 @@
#[ReactionCommerce](http://reactioncommerce.com/)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,5 @@
name: Reaction Commerce
description: |
E-commerce powered by Reaction
version: 1.4.0-rancher1
category: Repository

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 | true | only>
- 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 | false>
- 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 = <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.

View File

@ -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}}

View File

@ -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 <rawmind@gmail.com>"
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}

View File

@ -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 <rawmind@gmail.com>"
minimum_rancher_version: v0.59.0
license:
license:
projectURL: https://github.com/rawmind0/alpine-traefik

View File

@ -0,0 +1,32 @@
version: '2'
services:
mariadb:
image: 'bitnami/mariadb:10.1'
volumes:
- 'mariadb_data:/bitnami'
environment:
- MARIADB_ROOT_PASSWORD=${mariadb_root_password}
- MARIADB_USER=${mariadb_user}
- MARIADB_PASSWORD=${mariadb_user_password}
- MARIADB_DATABASE=${mariadb_database_name}
wordpress:
image: 'bitnami/wordpress:4'
volumes:
- 'wordpress_data:/bitnami'
depends_on:
- mariadb
environment:
- 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: ${volume_driver}
wordpress_data:
driver: ${volume_driver}

View File

@ -0,0 +1,86 @@
version: '2'
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: 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: 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 username"
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

View File

@ -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 overlay and overlay2 storage driver. Please try to switch to aufs or devicemapper.

View File

@ -1,5 +1,5 @@
name: Wordpress
description: |
Blog tool, publishing platform and CMS
version: v0.1-educaas1
version: v0.2-bitnami
category: Blogging

View File

@ -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...

View File

@ -0,0 +1,55 @@
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
{{- 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:
- 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
{{- if ne .Values.host_label ""}}
io.rancher.scheduler.affinity:host_label: ${host_label}
{{- end}}
io.rancher.container.start_once: true
environment:
- SERVICE_UID=10002
- SERVICE_GID=10002
- SERVICE_VOLUME=${zk_data_dir}
volumes:
- zkdata:${zk_data_dir}
image: rawmind/alpine-volume:0.0.2-1
volumes:
zkconfig:
driver: ${VOLUME_DRIVER}
per_container: true
zkdata:
driver: ${VOLUME_DRIVER}
per_container: true

View File

@ -0,0 +1,88 @@
version: '2'
catalog:
name: Zookeeper
version: 3.4.9-rancher2
description: |
(Experimental) Apache Zookeeper cluster.
minimum_rancher_version: v0.59.0
maintainer: "Raul Sanchez <rawmind@gmail.com>"
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: false
default: ""
type: "string"
- variable: "VOLUME_DRIVER"
description: "The VOLUME driver to associate with this server"
label: "VOLUME Driver"
required: true
default: "local"
type: enum
options: # List of options if using type of `enum`
- local
- rancher-nfs
- rancher-efs
- rancher-ebs
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

View File

@ -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 <rawmind@gmail.com>"
projectURL: https://github.com/rawmind0/alpine-zk