Merge remote-tracking branch 'upstream/master' into zammad

This commit is contained in:
André Bauer
2017-12-08 22:29:15 +01:00
123 changed files with 4614 additions and 75 deletions
-11
View File
@@ -1,11 +0,0 @@
# Autospotting
### Info
This service builds upon the open source autospotting at [https://github.com/cristim/autospotting](https://github.com/cristim/autospotting)
This has been turned into a Rancher catalog entry with a couple of minor tweaks and the removal of the requirement to run it as a lambda function, it now runs as a docker container.
Autospotting works by taking a tag that you specify and adding it to an AWS Auto-Scaling Group with a value of true.
The container will then run and check for on-demand instances and replace them with cheap spot instances. This is a gradual process and will only replace one host in an ASG at a time.
@@ -1,13 +0,0 @@
aws-spot-instance-helper:
image: chrisurwin/autospotting:v0.1.0
tty: true
labels:
io.rancher.container.pull_image: always
environment:
AWS_ACCESS_KEY_ID: "${AWS_ACCESS_KEY_ID}"
AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY}"
regions: "${regions}"
min_on_demand_number: "${min_on_demand_number}"
min_on_demand_percentage: "${min_on_demand_percentage}"
allowed_instance_types: "${allowed_instance_types}"
tag_name: "${tag_name}"
@@ -1,51 +0,0 @@
.catalog:
name: "Autospotting"
version: "v0.1.0"
description: "Autospotting"
minimum_rancher_version: v1.0.0
questions:
- variable: "AWS_ACCESS_KEY_ID"
description: "AWS Access Key"
label: "AWS Access Key"
required: true
type: "string"
- variable: "AWS_SECRET_ACCESS_KEY"
description: "AWS Secret Key"
label: "Access Secret"
required: true
type: "string"
- variable: "regions"
description: "Regions where it should be activated (comma or whitespace separated list, also supports globs), by default it runs on all regions. Example: 'eu-*,us-east-1"
label: "AWS Regions"
required: false
type: "string"
- variable: "min_on_demand_number"
description: "On-demand capacity (as absolute number) ensured to be running in each of your groups"
label: "Minimum on demand number"
required: false
type: "string"
- variable: "min_on_demand_percentage"
description: "On-demand capacity (percentage of the total number of instances in the group) ensured to be running in each of your groups. Defaults to 0"
label: "Minimum on demand percentage"
required: false
type: "string"
- variable: "allowed_instance_types"
description: "If specified, the spot instances will have a specific instance type"
label: "Allowed instance types"
required: false
type: "string"
- variable: "tag_name"
description: "If specified you can tag instances with a specific tag to process, default is spot-enabled"
label: "Tag name"
required: false
type: "string"
aws-spot-instance-helper:
health_check:
port: 9777
interval: 2000
unhealthy_threshold: 3
strategy: recreate
response_timeout: 2000
request_line: GET /ping HTTP/1.0
healthy_threshold: 2
File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 29 KiB

-5
View File
@@ -1,5 +0,0 @@
name: AutoSpotting
description: |
Replaces AWS On-Demand instances with cheaper Spot-Instances where possible
version: v0.1.0
category: Infrastructure Services
+32
View File
@@ -0,0 +1,32 @@
Avi Vantage Platform Load Balancer Provider
========
## About Avi Vantage Platform
The [Avi Vantage Platform](https://avinetworks.com/software-load-balancer-for-any-cloud/) is built on software-defined architectural principles to create a centrally managed pool of distributed load balancers to deliver application services close to the applications.
## About this provider
This provider load balances Rancher services using Avi Vantage Platform Load Balancer. It uses REST API to update the Avi controller which enables the Avi Service Engines to load balance the Rancher Services.
## Usage
1. Deploy the stack for this provider from Rancher Community Catalog.
While deploying, you need to give the username, password (optional,
read below), Avi Controller IP address, Avi Controller Port, the
Cloud name where Virtual Services and Pools are created.
2. Create Virtual Services using Avi Controller console. Make sure you
create VS in given cloud in Avi. Leave the Virtual Service pool as
empty. Configure any policies or rules for Virtual Service.
3. Create services in Rancher with public host port mapping and adding
label `io.rancher.service.external_lb.endpoint` with value as Virtual
Service name created in previous step. You can scale out/in the
service or stop the service and the changes will get reflected on Avi
Controller and Service Engine.
### Using Rancher Secrets for Avi Password
Optionally, you can use the Rancher Secrets to pass the Avi controller
password instead of using environment variable.
1. Run the Rancher Secrets service before deploying this provider stack.
2. Create a secret named "avi-creds".
3. While deploying the Avi provider stack, use the "avi-creds" secret
for Avi Provider service.
+16
View File
@@ -0,0 +1,16 @@
avi:
image: rancher/external-lb:v0.3.4
command: -provider=Avi
expose:
- 1000
environment:
AVI_USER: ${AVI_USER}
AVI_PASSWORD: ${AVI_PASSWORD}
AVI_CONTROLLER_ADDR: ${AVI_CONTROLLER_ADDR}
AVI_CONTROLLER_PORT: ${AVI_CONTROLLER_PORT}
AVI_SSL_VERIFY: ${AVI_SSL_VERIFY}
AVI_CLOUD_NAME: ${AVI_CLOUD_NAME}
LB_TARGET_RANCHER_SUFFIX: ${LB_TARGET_RANCHER_SUFFIX}
labels:
io.rancher.container.create_agent: "true"
io.rancher.container.agent.role: "external-lb"
+52
View File
@@ -0,0 +1,52 @@
.catalog:
name: Avi Vantange Platform Load Balancer
version: "v0.3.4-rancher1"
description: "External LB service powered by Avi Vantage Platform"
minimum_rancher_version: v1.1.0
questions:
- variable: "AVI_USER"
label: "Avi account username"
description: "User name for your account on Avi Controller"
type: "string"
required: true
- variable: "AVI_PASSWORD"
label: "Avi user account password"
description: "Password for your account on Avi Controller"
type: "string"
required: false
- variable: "AVI_CONTROLLER_ADDR"
label: "Avi Controller IP Address"
description: "IP Address of the Avi Controller"
type: "string"
required: true
- variable: "AVI_CONTROLLER_PORT"
label: "Avi Controller Port (Optional)"
description: "Port on which Avi Controller is listening for API requests"
type: "string"
required: false
- variable: "AVI_CLOUD_NAME"
label: "Avi Cloud Name (Optional)"
description: "Name of Avi Cloud in which Virtual Services are created"
required: false
type: "string"
- variable: "AVI_SSL_VERIFY"
label: "Avi SSL Verify (Optional)"
description: "SSL certificate validation while connecting to Avi Controller"
required: false
type: "boolean"
default: false
- variable: "LB_TARGET_RANCHER_SUFFIX"
label: "Avi pool name suffix"
description: "Pool names in Avi created/updated by Rancher will have this suffix"
type: "string"
required: true
default: rancher.internal
avi:
health_check:
port: 1000
interval: 5000
unhealthy_threshold: 2
request_line: GET / HTTP/1.0
healthy_threshold: 2
response_timeout: 2000
+29
View File
@@ -0,0 +1,29 @@
Avi Vantage Platform Load Balancer Provider
========
## About Avi Vantage Platform
The [Avi Vantage Platform](https://avinetworks.com/software-load-balancer-for-any-cloud/) is built on software-defined architectural principles to create a centrally managed pool of distributed load balancers to deliver application services close to the applications.
## About this provider
This provider load balances Rancher services using Avi Vantage Platform Load Balancer. It uses REST API to update the Avi controller which enables the Avi Service Engines to load balance the Rancher Services.
## Usage
1. Deploy the stack for this provider from Rancher Community Catalog.
While deploying, you need to give the username, password,
Avi Controller IP address, Avi Controller Port, the Cloud name
where Virtual Services and Pools are created.
2. Create services in Rancher with public host port mapping and corresponding
Virtual services are created in Avi. All CRUD operations on services get
reflected in Avi Controller and Service Engine.
3. You can scale out/in the service and the changes will get reflected on
Avi Controller and Service Engine.
### Using Rancher Secrets for Avi Password
Optionally, you can use the Rancher Secrets to pass the Avi controller
password instead of using environment variable.
1. Run the Rancher Secrets service before deploying this provider stack.
2. Create a secret named "avi-creds".
3. While deploying the Avi provider stack, use the "avi-creds" secret
for Avi Provider service.
+13
View File
@@ -0,0 +1,13 @@
avi:
image: avinetworks/avi-rancher-controller:2017-12-01T194110.475015629Z
expose:
- 1000
environment:
AVI_USER: ${AVI_USER}
AVI_PASSWORD: ${AVI_PASSWORD}
AVI_CONTROLLER_ADDR: ${AVI_CONTROLLER_ADDR}
AVI_CONTROLLER_PORT: ${AVI_CONTROLLER_PORT}
AVI_SSL_VERIFY: ${AVI_SSL_VERIFY}
AVI_CLOUD_NAME: ${AVI_CLOUD_NAME}
AVI_DNS_SUBDOMAIN: ${AVI_DNS_SUBDOMAIN}
AVI_TENANT: ${AVI_TENANT}
+57
View File
@@ -0,0 +1,57 @@
.catalog:
name: Avi Vantange Platform Load Balancer
version: "v1-Avi"
description: "External LB service powered by Avi Vantage Platform"
minimum_rancher_version: v1.1.0
questions:
- variable: "AVI_USER"
label: "Avi account username"
description: "User name for your account on Avi Controller"
type: "string"
required: true
- variable: "AVI_PASSWORD"
label: "Avi user account password"
description: "Password for your account on Avi Controller"
type: "password"
required: false
- variable: "AVI_CONTROLLER_ADDR"
label: "Avi Controller IP Address"
description: "IP Address of the Avi Controller"
type: "string"
required: true
- variable: "AVI_CONTROLLER_PORT"
label: "Avi Controller Port (Optional)"
description: "Port on which Avi Controller is listening for API requests"
type: "string"
required: false
- variable: "AVI_CLOUD_NAME"
label: "Avi Cloud Name (Optional)"
description: "Name of Avi Cloud in which Virtual Services are created"
required: false
type: "string"
- variable: "AVI_SSL_VERIFY"
label: "Avi SSL Verify (Optional)"
description: "SSL certificate validation while connecting to Avi Controller"
required: false
type: "boolean"
default: false
- variable: "AVI_DNS_SUBDOMAIN"
label: "Avi VS subdomain"
description: "Avi Virtual services are created with the subdomain config"
type: "string"
required: false
- variable: "AVI_TENANT"
label: "Avi tenant name"
description: "Avi Virtual service created in tenant"
type: "string"
required: false
default: admin
avi:
health_check:
port: 1000
interval: 5000
unhealthy_threshold: 2
request_line: GET / HTTP/1.0
healthy_threshold: 2
response_timeout: 2000
+1 -1
View File
@@ -1,5 +1,5 @@
name: Avi Vantage Platform
description: |
External LB service powered by Avi Vantage Platform
version: v0.3.2-rancher1
version: v1-Avi
category: Load Balancing
+15
View File
@@ -0,0 +1,15 @@
AWS ELB Classic External LB Service
==========
#### About ELB Classic Load Balancers
The [Classic Load Balancer](https://aws.amazon.com/elasticloadbalancing/classicloadbalancer/) option in AWS routes traffic based on application or network level information and is ideal for simple load balancing of traffic across multiple EC2 instances.
#### About this service
Load balance Rancher services using Elastic Load Balancing.
This service keeps existing ELB Classic load balancers updated with the EC2 instances on which Rancher services that have one or more exposed ports and the label `io.rancher.service.external_lb.endpoint` are running on.
#### Usage
1. Deploy this stack
2. Using the AWS Console create a Classic ELB load balancer with one or more listeners and configure it according to your applications requirements. Configure the listener(s) with an instance protocol and port matching that of the Rancher service that you want to forward traffic to.
3. Create or update your service to expose host ports that match the configuration of the ELB listener(s). Add the service label `io.rancher.service.external_lb.endpoint` using as value the name of the ELB load balancer you created.
+14
View File
@@ -0,0 +1,14 @@
elbv1:
image: rancher/external-lb:v0.3.3
command: -provider=elbv1
expose:
- 1000
environment:
ELBV1_AWS_ACCESS_KEY: ${ELBV1_AWS_ACCESS_KEY}
ELBV1_AWS_SECRET_KEY: ${ELBV1_AWS_SECRET_KEY}
ELBV1_AWS_REGION: ${ELBV1_AWS_REGION}
ELBV1_AWS_VPCID: ${ELBV1_AWS_VPCID}
ELBV1_USE_PRIVATE_IP: ${ELBV1_USE_PRIVATE_IP}
labels:
io.rancher.container.create_agent: "true"
io.rancher.container.agent.role: "external-dns"
+41
View File
@@ -0,0 +1,41 @@
.catalog:
name: ELB Classic Load Balancer
version: "v0.3.3-rancher1"
description: "External LB service powered by AWS Elastic Load Balancing"
minimum_rancher_version: v1.1.0
questions:
- variable: "ELBV1_AWS_ACCESS_KEY"
label: "AWS Access Key ID"
description: "Access key ID for your AWS account"
type: "string"
required: false
- variable: "ELBV1_AWS_SECRET_KEY"
label: "AWS Secret Access Key"
description: "Secret access key for your AWS account"
type: "string"
required: false
- variable: "ELBV1_AWS_REGION"
label: "AWS Region (Optional)"
description: "The region for load balancers and EC2 instances in this Rancher environment. Defaults to the region of the instance the service will be running on."
type: "string"
required: false
- variable: "ELBV1_AWS_VPCID"
label: "AWS VPC ID (Optional)"
description: "The VPC for the load balancers and EC2 instances in this Rancher environment. Defaults to the VPC of the instance the service will be running on."
type: "string"
required: false
- variable: "ELBV1_USE_PRIVATE_IP"
label: "EC2 Private IP Lookup"
description: "If your EC2 instances are registered in Rancher with their private IP addresses, then this must be set to true."
required: true
type: "boolean"
default: false
elbv1:
health_check:
port: 1000
interval: 5000
unhealthy_threshold: 2
request_line: GET / HTTP/1.0
healthy_threshold: 2
response_timeout: 2000
+1 -1
View File
@@ -1,5 +1,5 @@
name: ELB Classic Load Balancer
description: |
External LB service powered by AWS Elastic Load Balancing
version: v0.3.0-rancher1
version: v0.3.3-rancher1
category: Load Balancing
+24
View File
@@ -0,0 +1,24 @@
version: '2'
services:
bitbucket:
image: atlassian/bitbucket-server:5.6.1
volumes_from:
- bitbucket-data
ports:
- ${BITBUCKET_PORT}:7990
labels:
io.rancher.sidekicks: bitbucket-data
io.rancher.container.hostname_override: container_name
bitbucket-data:
image: atlassian/bitbucket-server:5.6.1
entrypoint:
- /bin/true
volumes:
- /var/atlassian/application-data/bitbucket
labels:
io.rancher.container.start_once: 'true'
io.rancher.container.hostname_override: container_name
+22
View File
@@ -0,0 +1,22 @@
version: '2'
catalog:
name: bitbucket
version: 5.6.1
description: Git Server
questions:
- variable: BITBUCKET_PORT
label: Port
default: 80
required: true
type: int
services:
bitbucket:
scale: 1
start_on_create: true
bitbucket-data:
scale: 1
start_on_create: true
+1 -3
View File
@@ -1,6 +1,4 @@
name: bitbucket
description: Git Server
version: 0.0.1
version: 5.6.1
category: Versioning
projectURL: https://github.com/ellerbrock/rancher-collection
+23
View File
@@ -0,0 +1,23 @@
# Datadog agent
This template deploys a [Datadog](https://www.datadoghq.com/) agent stack consisting of the official [docker-dd-agent](https://www.github.com/Datadog/docker-dd-agent) image and a configuration sidekick that provides closer integration with Rancher:
* Hosts in Datadog are named correctly
* Host labels can be exported as Datadog host tags
* Service labels can be exported as Datadog metric tags
## Service Discovery
Please refer to the Datadog documentation [here](http://docs.datadoghq.com/guides/servicediscovery/) to learn how to provide configuration templates for Service Discovery in etcd or Consul.
## Changelog
**1.1.1-11.0.5140**
* Datadog image updated to v5.1.40 which includes the following Rancher specific changes:
* Service Discovery: Add ability to get docker IP address from Rancher labels for Rancher
* Docker: Fix cgroup parsing on RancherOS
* Switched to use the Alpine based agent image
* Added template configuration of Proxy settings
* Added template configuration to disable DogStatsD
* Added template configuration to overwrite DD intake URL
+47
View File
@@ -0,0 +1,47 @@
datadog-init:
image: janeczku/datadog-rancher-init:v2.2.5
net: none
command: /bin/true
volumes:
- /opt/rancher
labels:
io.rancher.container.start_once: "true"
io.rancher.container.pull_image: always
datadog-agent:
image: datadog/docker-dd-agent:11.0.5140
command: supervisord -n -c /etc/dd-agent/supervisor.conf
entrypoint: /opt/rancher/entrypoint-wrapper.py
restart: always
environment:
# Evaluated by datadog-agent image
API_KEY: ${api_key}
EC2_TAGS: ${dd_ec2_tags}
DD_LOG_LEVEL: ${dd_log_level}
USE_DOGSTATSD: ${dd_dogstatsd_enabled}
STATSD_METRIC_NAMESPACE: ${statsd_namespace}
DD_URL: ${custom_dd_url}
PROXY_HOST: ${proxy_host}
PROXY_PORT: ${proxy_port}
DD_APM_ENABLED: ${dd_apm_enabled}
# Evaluated by datadog-init script
DD_HOST_LABELS: ${host_labels}
DD_HOST_TAGS: ${host_tags}
DD_CONTAINER_LABELS: ${service_labels}
DD_SERVICE_DISCOVERY: ${service_discovery}
DD_SD_CONFIG_BACKEND: ${sd_config_backend}
DD_SD_BACKEND_HOST: ${sd_backend_host}
DD_SD_BACKEND_PORT: ${sd_backend_port}
DD_SD_TEMPLATE_DIR: ${sd_template_dir}
DD_CONSUL_TOKEN: ${dd_consul_token}
DD_CONSUL_SCHEME: ${dd_consul_scheme}
DD_CONSUL_VERIFY: ${dd_consul_verify}
DD_METADATA_HOSTNAME: rancher-metadata
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /proc/:/host/proc/:ro
- ${cgroups_location}:/host/sys/fs/cgroup:ro
volumes_from:
- datadog-init
labels:
io.rancher.scheduler.global: "${global_service}"
io.rancher.sidekicks: "datadog-init"
+168
View File
@@ -0,0 +1,168 @@
.catalog:
name: "Datadog"
version: "1.1.1-11.0.5140"
description: "Real-time performance tracking and visualization of your container-based application deployment"
minimum_rancher_version: v1.2.0
questions:
- variable: "api_key"
label: "Datadog API Key"
description: |
Enter your Datadog API key.
required: true
type: "string"
- variable: "global_service"
label: "Global Service"
description: |
Enable this option to run a Datadog agent container on every host in the environment.
required: true
type: "boolean"
default: true
- variable: "host_labels"
label: "Export Host Labels as Tags"
description: |
Comma delimited list of host labels to export as Datadog host tags, e.g. 'region,zone'.
required: false
type: "string"
- variable: "service_labels"
label: "Export Service Labels as Tags"
description: |
Comma delimited list of service labels to export as Datadog metric tags.
'io.rancher.stack.name' and 'io.rancher.stack_service.name' are exported by default.
required: false
type: "string"
- variable: "host_tags"
label: "Global Host Tags"
description: |
Comma delimited list of host tags to apply to metrics, e.g. 'simple-tag-0,tag-key-1:tag-value-1'.
required: false
type: "string"
- variable: "dd_ec2_tags"
label: "Collect AWS EC2 Tags"
description: |
Collect AWS EC2 custom tags as agent tags (requires an IAM role associated with the instance).
required: true
type: "boolean"
default: false
- variable: cgroups_location
label: Cgroup directory location
description: |
Set this to '/cgroups/' if your hosts are running Amazon Linux AMIs.
required: true
type: enum
default: '/sys/fs/cgroup/'
options:
- '/sys/fs/cgroup/'
- '/cgroups/'
- variable: "dd_apm_enabled"
label: "Enable APM agent"
description: |
Enable the Datadog trace-agent along with the infrastructure agent, allowing the container to accept traces on 8126/tcp.
This will run the agent from the Debian based Datadog image instead of the Alpine based one.
required: true
type: "boolean"
default: false
- variable: "service_discovery"
label: "Enable Service Discovery"
description: |
Collect metrics from supported applications running in Docker containers.
required: true
type: "boolean"
default: false
- variable: "sd_config_backend"
label: Service Discovery Configuration Backend
description: |
Choose a key/value store to use for looking up application configuration templates.
If none is provided only auto config templates will be used.
required: true
type: enum
default: none
options:
- none
- etcd
- consul
- variable: "sd_backend_host"
label: "Configuration Backend Host"
description: |
IP address or DNS name to use to connect to the configuration backend.
required: false
type: "string"
- variable: "sd_backend_port"
label: "Configuration Backend Port"
description: |
Port to use to connect to the configuration backend.
required: false
type: "int"
- variable: "sd_template_dir"
label: "Configuration Backend Template Path"
description: |
Specify a custom path where the agent should look for configuration templates in the backend.
The default is '/datadog/check_configs'.
required: false
type: "string"
- variable: "dd_consul_scheme"
label: "Consul Connection Scheme"
description: |
Scheme to use for requests to a Consul backend.
required: false
type: enum
default: http
options:
- http
- https
- variable: "dd_consul_verify"
label: "Verify Consul SSL Certificate"
description: |
Whether to verify the SSL certificate for HTTPS requests to a Consul backend.
required: false
type: "boolean"
default: true
- variable: "dd_consul_token"
label: "Consul ACL Token"
description: |
If the Consul backend uses ACL, specify a token granting read access to the configuration templates.
required: false
type: "string"
- variable: "dd_dogstatsd_enabled"
label: "Enable DogStatsD"
description: |
Enable a DogStatsD instance to run along with the infrastructure agent.
required: true
type: "boolean"
default: true
- variable: "statsd_namespace"
label: "StatsD Metric Namespace"
description: |
Optional namespace for aggregated StatsD metrics.
required: false
type: "string"
- variable: "custom_dd_url"
label: "Custom Datadog Intake URL"
description: |
Set a custom Intake URL to send Agent data to.
required: false
type: "string"
- variable: "dd_log_level"
label: "Agent log level"
description: |
Set the logging verbosity of the Datadog agent.
required: false
type: enum
default: INFO
options:
- CRITICAL
- ERROR
- WARNING
- INFO
- DEBUG
- variable: "proxy_host"
label: "Proxy Host"
description: |
Use a proxy to send Agent data to the Datadog servers.
required: false
type: "string"
- variable: "proxy_port"
label: "Proxy Port"
description: |
Use a proxy to send Agent data to the Datadog servers.
required: false
type: "string"
+1 -1
View File
@@ -1,7 +1,7 @@
name: Datadog
description: |
Real-time performance tracking and visualization of your container-based application deployment
version: 1.1.0-11.0.5123
version: 1.1.1-11.0.5140
category: Monitoring
maintainer: "Jan Bruder <jan@rancher.com>"
license: The MIT License
+1 -1
View File
@@ -62,7 +62,7 @@ services:
{{- end}}
{{- if eq .Values.drone_driver "GitLab"}}
DRONE_GITLAB: true
DRONE_GITLAB_CLIENT: ${drone_driver_secret}
DRONE_GITLAB_CLIENT: ${drone_driver_client}
DRONE_GITLAB_SECRET: ${drone_driver_secret}
DRONE_GITLAB_URL: ${drone_driver_url}
{{- end}}
+19
View File
@@ -0,0 +1,19 @@
# Drone
### Info:
This template creates an instance of Drone CI server 0.8.1 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.
+116
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_admin}
{{- 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}
+188
View File
@@ -0,0 +1,188 @@
version: 2
catalog:
name: Drone
version: 0.8.1-rancher1
upgrade_from: 0.8.0-rc.1-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.1"
options:
- 0.8.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
+19
View File
@@ -0,0 +1,19 @@
# Drone
### Info:
This template creates an instance of Drone CI server 0.8.2 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.
+116
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_admin}
{{- 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.7.15
ports:
- ${host_port}:${host_port}
labels:
io.rancher.scheduler.global: 'true'
io.rancher.scheduler.affinity:host_label_soft: ${drone_lb_host_label}
+189
View File
@@ -0,0 +1,189 @@
version: 2
catalog:
name: Drone
version: 0.8.2-rancher1
upgrade_from: 0.8.2-rc.1-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.2"
options:
- 0.8.2
- 0.8.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
+1 -1
View File
@@ -1,5 +1,5 @@
name: Drone
description: |
Drone CI Server
version: 0.8.0-rc.1-rancher1
version: 0.8.2-rancher1
category: Continuous Integration
+3 -11
View File
@@ -4,10 +4,7 @@ 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
io.rancher.sidekicks: es-storage
{{- if eq .Values.UPDATE_SYSCTL "true" -}}
,es-sysctl
{{- end}}
io.rancher.sidekicks: es-storage{{- if eq .Values.UPDATE_SYSCTL "true" -}},es-sysctl{{- end}}
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
environment:
- "cluster.name=${cluster_name}"
@@ -38,9 +35,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
io.rancher.sidekicks: es-storage
{{- if eq .Values.UPDATE_SYSCTL "true" -}}
,es-sysctl
{{- end}}
{{- if eq .Values.UPDATE_SYSCTL "true" -}},es-sysctl{{- end}}
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
environment:
- "cluster.name=${cluster_name}"
@@ -71,10 +66,7 @@ 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
io.rancher.sidekicks: es-storage
{{- if eq .Values.UPDATE_SYSCTL "true" -}}
,es-sysctl
{{- end}}
io.rancher.sidekicks: es-storage{{- if eq .Values.UPDATE_SYSCTL "true" -}},es-sysctl{{- end}}
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
environment:
- "cluster.name=${cluster_name}"
+3 -12
View File
@@ -4,10 +4,7 @@ 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
io.rancher.sidekicks: es-storage
{{- if eq .Values.UPDATE_SYSCTL "true" -}}
,es-sysctl
{{- end}}
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}"
@@ -37,10 +34,7 @@ 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
io.rancher.sidekicks: es-storage
{{- if eq .Values.UPDATE_SYSCTL "true" -}}
,es-sysctl
{{- end}}
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}"
@@ -71,10 +65,7 @@ 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
io.rancher.sidekicks: es-storage
{{- if eq .Values.UPDATE_SYSCTL "true" -}}
,es-sysctl
{{- end}}
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}"
+3 -12
View File
@@ -4,10 +4,7 @@ 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
io.rancher.sidekicks: es-storage
{{- if eq .Values.UPDATE_SYSCTL "true" -}}
,es-sysctl
{{- end}}
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}"
@@ -37,10 +34,7 @@ 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
io.rancher.sidekicks: es-storage
{{- if eq .Values.UPDATE_SYSCTL "true" -}}
,es-sysctl
{{- end}}
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}"
@@ -71,10 +65,7 @@ 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
io.rancher.sidekicks: es-storage
{{- if eq .Values.UPDATE_SYSCTL "true" -}}
,es-sysctl
{{- end}}
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}"
+3 -12
View File
@@ -4,10 +4,7 @@ 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
io.rancher.sidekicks: es-storage
{{- if eq .Values.UPDATE_SYSCTL "true" -}}
,es-sysctl
{{- end}}
io.rancher.sidekicks: es-storage{{- if eq .Values.UPDATE_SYSCTL "true" -}},es-sysctl{{- end}}
image: docker.elastic.co/elasticsearch/elasticsearch:5.5.1
environment:
- "cluster.name=${cluster_name}"
@@ -37,10 +34,7 @@ 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
io.rancher.sidekicks: es-storage
{{- if eq .Values.UPDATE_SYSCTL "true" -}}
,es-sysctl
{{- end}}
io.rancher.sidekicks: es-storage{{- if eq .Values.UPDATE_SYSCTL "true" -}},es-sysctl{{- end}}
image: docker.elastic.co/elasticsearch/elasticsearch:5.5.1
environment:
- "cluster.name=${cluster_name}"
@@ -71,10 +65,7 @@ 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
io.rancher.sidekicks: es-storage
{{- if eq .Values.UPDATE_SYSCTL "true" -}}
,es-sysctl
{{- end}}
io.rancher.sidekicks: es-storage{{- if eq .Values.UPDATE_SYSCTL "true" -}},es-sysctl{{- end}}
image: docker.elastic.co/elasticsearch/elasticsearch:5.5.1
environment:
- "cluster.name=${cluster_name}"
+20
View File
@@ -0,0 +1,20 @@
# Gitea - Git with a cup of tea
> A painless self-hosted Git service.
Gitea is a community managed fork of Gogs, lightweight code hosting solution written in Go and published under the MIT license.
## Installation
Note the mysql-root password from below, you will need it during installation.
When launching Gitea for the first time, you will greeted with an installer. You'll need to change two things:
* The database settings:
* Username: `root`
* Password: the previously mentioned password
* Database: `gitea`
* Database Host: `db:3306`
* Change the domain name to the one you use to access Gitea
* Change the public ssh port to the one you defined earlier if you want to enable ssh
* Change the public URL to the one you defined previously, this is needed to access Gitea's web UI.
+34
View File
@@ -0,0 +1,34 @@
version: '2'
services:
gitea:
image: gitea/gitea:1.3.0
volumes:
- gitea-data:/data
{{- if ne .Values.db_link ""}}
external_links:
- ${db_link}:db
{{- else}}
links:
- db:db
db:
image: mariadb:10
environment:
MYSQL_ROOT_PASSWORD: ${mysql_password}
MYSQL_DATABASE: 'gitea'
volumes:
- gitea-db:/var/lib/mysql
{{- end}}
lb:
image: rancher/lb-service-haproxy:v0.7.9
ports:
- ${http_port}:${http_port}/tcp
- ${ssh_port}:${ssh_port}/tcp
volumes:
gitea-data:
driver: ${volume_driver}
{{- if eq .Values.db_link ""}}
gitea-db:
driver: ${volume_driver}
{{- end}}
+82
View File
@@ -0,0 +1,82 @@
version: '2'
catalog:
name: "Gitea"
version: "v1.3"
description: "A painless self-hosted Git service."
uuid: gitea-0
minimum_rancher_version: v0.56.0
maintainer: "Konrad Langenberg <k@knt.li>"
questions:
- variable: http_port
description: "Public HTTP port to access Gitea's webui."
label: "HTTP Port"
required: true
default: "3000"
type: "int"
- variable: ssh_port
description: "Public ssh port to clone repositories via ssh."
label: "SSH Port"
required: true
default: "2222"
type: "int"
- variable: "volume_driver"
description: "Volume driver to associate with this service."
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
- variable: "db_link"
description: "External DB service to use with gitea instead of its own DB-Container."
label: "External DB service"
default: ""
required: false
type: "service"
- variable: mysql_password
description: "MySQL root password to use for Gitea."
label: "MySQL Password"
required: true
default: "default_pass"
type: "password"
services:
gitea:
scale: 1
retain_ip: true
health_check:
response_timeout: 2000
healthy_threshold: 2
port: 3000
unhealthy_threshold: 3
initializing_timeout: 300000
interval: 2000
strategy: recreate
request_line: GET "/" "HTTP/1.0"
reinitializing_timeout: 120000
lb:
scale: 1
start_on_create: true
lb_config:
certs: []
port_rules:
- priority: 1
protocol: http
service: gitea
source_port: ${http_port}
target_port: 3000
- priority: 2
protocol: tcp
service: gitea
source_port: ${ssh_port}
target_port: 22
health_check:
response_timeout: 2000
healthy_threshold: 2
port: 42
unhealthy_threshold: 3
initializing_timeout: 60000
interval: 2000
reinitializing_timeout: 60000
+160
View File
@@ -0,0 +1,160 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="512"
height="512"
viewBox="0 0 135.46667 135.46667"
version="1.1"
id="svg8"
sodipodi:docname="logo.svg"
inkscape:version="0.92.1 r15371"
inkscape:export-filename=""
inkscape:export-xdpi="48.000004"
inkscape:export-ydpi="48.000004">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.70710678"
inkscape:cx="418.13805"
inkscape:cy="177.57445"
inkscape:document-units="mm"
inkscape:current-layer="layer2"
showgrid="false"
units="px"
width="256px"
showguides="false"
inkscape:window-width="1920"
inkscape:window-height="1137"
inkscape:window-x="1912"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:pagecheckerboard="false"
inkscape:measure-start="283.373,243.952"
inkscape:measure-end="290.267,236.527">
<sodipodi:guide
position="0,0"
orientation="0,512"
id="guide3699"
inkscape:locked="false" />
<sodipodi:guide
position="135.46667,0"
orientation="-512,0"
id="guide3701"
inkscape:locked="false" />
<sodipodi:guide
position="135.46667,135.46667"
orientation="0,-512"
id="guide3703"
inkscape:locked="false" />
<sodipodi:guide
position="0,135.46667"
orientation="512,0"
id="guide3705"
inkscape:locked="false" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-161.53334)"
style="display:inline">
<path
style="fill:#609926;fill-opacity:1;stroke:#428f29;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="m 27.709937,195.15095 c -9.546573,-0.0272 -22.3392732,6.79805 -21.6317552,23.90397 1.105534,26.72889 25.4565952,29.20839 35.1916502,29.42301 1.068023,5.01357 12.521798,22.30563 21.001818,23.21667 h 37.15277 c 22.27763,-1.66785 38.9607,-75.75671 26.59321,-76.03825 -46.781583,2.47691 -49.995146,2.13838 -88.599758,0 -2.495053,-0.0266 -5.972321,-0.49474 -9.707935,-0.5054 z m 2.491319,9.45886 c 1.351378,13.69267 3.555849,21.70359 8.018216,33.94345 -11.382872,-1.50473 -21.069822,-5.22443 -22.851515,-19.10984 -0.950962,-7.4112 2.390428,-15.16769 14.833299,-14.83361 z"
id="path3722"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sscccccsccsc" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<rect
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.24757317;stroke-opacity:1"
id="rect4599"
width="34.762054"
height="34.762054"
x="87.508659"
y="18.291576"
transform="rotate(25.914715)"
ry="5.4825778" />
<path
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26644793px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 79.804947,57.359056 3.241146,1.609954 V 35.255731 h -3.262698 z"
id="path4525"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="Layer 3"
style="display:inline">
<g
style="display:inline"
id="g4539">
<circle
transform="rotate(-19.796137)"
r="3.4745038"
cy="90.077766"
cx="49.064713"
id="path4606"
style="fill:#609926;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1" />
<circle
transform="rotate(-19.796137)"
r="3.4745038"
cy="102.1049"
cx="36.810425"
id="path4606-3"
style="fill:#609926;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1" />
<circle
transform="rotate(-19.796137)"
r="3.4745038"
cy="111.43928"
cx="46.484283"
id="path4606-1"
style="fill:#609926;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1" />
<rect
transform="rotate(26.024158)"
y="18.061695"
x="97.333458"
height="27.261492"
width="2.6726954"
id="rect4629-8"
style="fill:#609926;fill-opacity:1;stroke:none;stroke-width:0.27444693;stroke-opacity:1" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path4514"
d="m 76.558096,68.116343 c 12.97589,6.395378 13.012989,4.101862 4.890858,20.907244"
style="fill:none;stroke:#609926;stroke-width:2.68000007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.6 KiB

+5
View File
@@ -0,0 +1,5 @@
name: Gitea
description: |
A painless self-hosted Git service
version: v1.3
category: Git
+9
View File
@@ -0,0 +1,9 @@
# GitLab CE
GitLab CE is a free alternative to GitHub
Stack based on official GitLab version: latest
https://hub.docker.com/r/gitlab/gitlab-ce/
+27
View File
@@ -0,0 +1,27 @@
version: '2'
volumes:
gitlab-app-data:
driver: ${volumedriver}
gitlab-log-data:
driver: ${volumedriver}
gitlab-conf-files:
driver: ${volumedriver}
services:
gitlab-server:
ports:
- ${ssh_port}:22/tcp
- ${http_port}:80/tcp
- ${https_port}:443/tcp
labels:
io.rancher.container.hostname_override: container_name
image: gitlab/gitlab-ce:9.5.10-ce.0
volumes:
- gitlab-app-data:/var/opt/gitlab
- gitlab-log-data:/var/log/gitlab
- gitlab-conf-files:/etc/gitlab
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url '${gitlab_omnipus_prefix}${gitlab_hostname}'
registry_external_url '${gitlab_omnipus_prefix}${registry_gitlab_hostname}'
gitlab_rails['gitlab_shell_ssh_port'] = ${ssh_port}
+69
View File
@@ -0,0 +1,69 @@
.catalog:
name: Gitlab Community
version: 9.5.10-ce.0
description: |
Gitlab CE is a free GitHub alternative
minimum_rancher_version: v0.56.0
maintainer: "Alexis Ducastel <alexis@ducastel.net>"
uuid: gitlab-0
questions:
- variable: "gitlab_hostname"
description: "Gitlab hostname (without uri scheme http:// or https://)"
label: "Hostname:"
required: true
default: "git.example.com"
type: "string"
- variable: "registry_gitlab_hostname"
description: "Registry Gitlab hostname (without uri scheme http:// or https://)"
label: "Registry hostname:"
required: true
default: "registry.example.com"
type: "string"
- variable: "gitlab_omnipus_prefix"
label: "Gitlab external_url prefix:"
description: |
This is needed for the docker-compose file to set the correct external_url
default: 'http://'
required: true
type: "enum"
options:
- 'http://'
- 'https://'
- variable: "http_port"
description: "HTTP port to expose on host. Will be used to bind TCP"
label: "HTTP port:"
required: true
default: 80
type: "int"
- variable: "https_port"
description: "HTTPS port to expose on host. Will be used to bind TCP"
label: "HTTPS port:"
required: true
default: 443
type: "int"
- variable: "ssh_port"
description: "SSH port to expose on host. Will be used to bind TCP"
label: "SSH port:"
required: true
default: 22
type: "int"
- variable: "volumedriver"
description: "Choose the Volume Driver being used.(Option: local or rancher-nfs)"
label: "Volume Driver:"
required: true
default: local
type: "enum"
options:
- local
- rancher-nfs
gitlab-server:
scale: 1
retain_ip: true
health_check:
port: 80
interval: 30000
unhealthy_threshold: 3
strategy: recreate
response_timeout: 3000
healthy_threshold: 2
+1 -1
View File
@@ -1,5 +1,5 @@
name: Gitlab Community
description: |
Gitlab CE is a free GitHub alternative
version: 9.5.1-ce.0
version: 9.5.10-ce.0
category: Versioning
+35
View File
@@ -0,0 +1,35 @@
version: '2'
services:
gogs:
image: gogs/gogs:0.11.34
volumes:
- gogs-data:/data
{{- if ne .Values.db_link ""}}
external_links:
- ${db_link}:db
{{- else}}
links:
- db:db
db:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: ${mysql_password}
MYSQL_USER: ${mysql_user}
MYSQL_PASSWORD: ${mysql_password}
MYSQL_DATABASE: ${mysql_db}
volumes:
- gogs-db:/var/lib/mysql
{{- end}}
lb:
image: rancher/lb-service-haproxy:v0.7.9
ports:
- ${http_port}:${http_port}/tcp
- ${ssh_port}:${ssh_port}/tcp
volumes:
gogs-data:
driver: ${volume_driver}
{{- if eq .Values.db_link ""}}
gogs-db:
driver: ${volume_driver}
{{- end}}
+94
View File
@@ -0,0 +1,94 @@
version: '2'
catalog:
name: "Gogs"
version: "v0.11.34"
description: "A painless self-hosted Git service"
uuid: gogs-0
minimum_rancher_version: v0.51.0
questions:
- variable: http_port
description: "http port to access gogs webui"
label: "Http Port"
required: true
default: "8080"
type: "int"
- variable: ssh_port
description: "ssh port to access gogs cli"
label: "SSH Port"
required: true
default: "2222"
type: "int"
- variable: "volume_driver"
description: "Volume driver to associate with this service"
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
- variable: "db_link"
description: |
DB external service link cluster.
label: "External db service"
default: ""
required: false
type: "service"
- variable: mysql_db
description: "mysql db"
label: "Mysql db"
required: true
default: "gogs"
type: "string"
- variable: mysql_user
description: "mysql user"
label: "Mysql User"
required: true
default: "gogs"
type: "string"
- variable: mysql_password
description: "mysql root password"
label: "Mysql Password"
required: true
default: "default_pass"
type: "password"
services:
gogs:
scale: 1
retain_ip: true
health_check:
response_timeout: 2000
healthy_threshold: 2
port: 3000
unhealthy_threshold: 3
initializing_timeout: 300000
interval: 2000
strategy: recreate
request_line: GET "/" "HTTP/1.0"
reinitializing_timeout: 120000
lb:
scale: 1
start_on_create: true
lb_config:
certs: []
port_rules:
- priority: 1
protocol: http
service: gogs
source_port: ${http_port}
target_port: 3000
- priority: 2
protocol: tcp
service: gogs
source_port: ${ssh_port}
target_port: 22
health_check:
response_timeout: 2000
healthy_threshold: 2
port: 42
unhealthy_threshold: 3
initializing_timeout: 60000
interval: 2000
reinitializing_timeout: 60000
+1 -1
View File
@@ -1,5 +1,5 @@
name: Gogs
description: |
A painless self-hosted Git service
version: v0.11.19
version: v0.11.34
category: Git
+20
View File
@@ -0,0 +1,20 @@
jenkins-primary:
image: "jenkins/jenkins:2.92"
ports:
- "${PORT}:8080"
labels:
io.rancher.sidekicks: jenkins-plugins,jenkins-datavolume
io.rancher.container.hostname_override: container_name
volumes_from:
- jenkins-plugins
- jenkins-datavolume
entrypoint: /usr/share/jenkins/rancher/jenkins.sh
jenkins-plugins:
image: rancher/jenkins-plugins:v0.1.1
jenkins-datavolume:
image: "busybox"
volumes:
- ${volume_work}:/var/jenkins_home
labels:
io.rancher.container.start_once: true
entrypoint: ["chown", "-R", "1000:1000", "/var/jenkins_home"]
@@ -0,0 +1,42 @@
.catalog:
name: Jenkins
version: 2.92-rancher1
description: |
Jenkins CI management server.
questions:
- variable: "PORT"
type: "int"
label: "Port Number"
description: "Which port should Jenkins listen on?"
default: 8080
required: true
- variable: "volume_work"
description: "Work volume to save jenkins data"
label: "Work volume:"
required: true
default: "/var/lib/docker/jenkins-ci"
type: "string"
- variable: "plugins"
type: "multiline"
label: "List of Plugins"
description: |
List of plugins in the format <plugin_name>[:<version>]
one entry per line.
default: |
credentials
git
git-client
github
github-api
github-oauth
greenballs
junit
plain-credentials
scm-api
ssh-credentials
ssh-slaves
swarm
jenkins-primary:
metadata:
plugins: |
${plugins}
+1 -1
View File
@@ -1,5 +1,5 @@
name: Jenkins
description: |
Jenkins CI server (LTS)
version: 2.60.1-rancher1
version: 2.92-rancher1
category: Continuous Integration
+32
View File
@@ -0,0 +1,32 @@
# Apache Kafka
### Info:
This template creates, scale in and scale out a multinodes kafka broker cluster on top of Rancher. The configuration is generated with confd from Rancher metadata.
Cluster size are variable after deployment, and get reconfigured after refresh interval.
### Usage:
Select Apache Kafka from catalog.
Enter the number of nodes, mem and refresh interval for the kafka cluster.
Change the following kafka default parameters, if you need:
- kafka_scale=3 # kafka scale to deploy.
- kafka_mem=512 # kafka broker memory.
- kafka_log_dir="/opt/kafka/logs" # Kafka log dir.
- kafka_log_retention="168" # kafka log retention.
- kafka_num_partitions="1" # Kafka partitions number
- kafka_delete_topics="false" # kafka delete topics
- kafka_auto_create_topics="true" # kafka auto create topics
- kafka_replication_factor=1 # Kafka replication factor
- kafka_pub_ip= < true | false > # Advertise public ip to zookeeper.
- zk_link="kafka-zk/zk" # zookeeper stack/service to connect to.
Click deploy.
Kafka can now be accessed over the Rancher network.
Note: When you scale the cluster, zero downtime is not guaranteed..yet..
+46
View File
@@ -0,0 +1,46 @@
broker:
tty: true
image: rawmind/alpine-kafka:1.0.0-2
volumes_from:
- broker-volume
- broker-conf
environment:
- JVMFLAGS=-Xmx${kafka_mem}m -Xms${kafka_mem}m
- CONFD_INTERVAL=${kafka_interval}
- ZK_SERVICE=${zk_link}
- KAFKA_DELETE_TOPICS=${kafka_delete_topics}
- KAFKA_LOG_DIRS=${kafka_log_dir}
- KAFKA_LOG_RETENTION_HOURS=${kafka_log_retention}
- KAFKA_NUM_PARTITIONS=${kafka_num_partitions}
- ADVERTISE_PUB_IP=${kafka_pub_ip}
- KAFKA_AUTO_CREATE_TOPICS=${kafka_auto_create_topics}
- KAFKA_REPLICATION_FACTOR=${kafka_replication_factor}
external_links:
- ${zk_link}:zk
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: broker-volume, broker-conf
broker-conf:
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
image: rawmind/rancher-kafka:0.11.0.0-1
volumes:
- /opt/tools
broker-volume:
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=10003
- SERVICE_GID=10003
- SERVICE_VOLUME=${kafka_log_dir}
volumes:
- ${kafka_log_dir}
volume_driver: local
image: rawmind/alpine-volume:0.0.2-1
+96
View File
@@ -0,0 +1,96 @@
.catalog:
name: Kafka
version: 1.0.0-rancher1
description: |
(Experimental) Apache Kafka cluster.
minimum_rancher_version: v0.59.0
maintainer: "Raul Sanchez <rawmind@gmail.com>"
uuid: kafka-0
questions:
- variable: "kafka_scale"
description: "Number of brokers nodes. Note: Recommended an odd number"
label: "Broker Nodes:"
required: true
default: 3
type: "int"
- variable: "kafka_mem"
description: "Amount of memory to config brokers."
label: "Broker Memory (mb):"
required: true
default: 1024
type: "string"
- variable: "kafka_log_dir"
description: "Broker volume to log data"
label: "Broker log volume:"
required: true
default: "/opt/kafka/logs"
type: "string"
- variable: "kafka_log_retention"
description: "Broker log retention in hours"
label: "Broker log retention (h):"
required: true
default: "168"
type: "int"
- variable: "kafka_num_partitions"
description: "Number of broker partitions"
label: "Broker partitions:"
required: true
default: "1"
type: "int"
- variable: "kafka_delete_topics"
label: "Delete topics:"
description: |
Enable delete topics in kafka.
default: false
required: true
type: enum
options:
- false
- true
- variable: "kafka_auto_create_topics"
label: "Auto create topics:"
description: |
Enable auto create topics in kafka.
default: true
required: true
type: enum
options:
- false
- true
- variable: "kafka_replication_factor"
description: "Topics replication factor"
label: "Replication factor:"
required: true
default: 1
type: "int"
- variable: "kafka_interval"
description: "Interval to poll/apply configuration changes. 0 to disable"
label: "Broker Interval (s):"
required: true
default: 60
type: "int"
- variable: "kafka_pub_ip"
description: "Advertise local and host public ip"
label: "Broker public ip:"
required: false
default: false
type: "boolean"
- variable: "zk_link"
description: |
Choose the Zookeeper service to use.
It's really recommended a dedicated zookeeper service just for Kafka.
label: "Zookeeper stack/service"
default: "kafka-zk/zk"
required: true
type: "service"
broker:
scale: ${kafka_scale}
retain_ip: true
health_check:
port: 9092
interval: 5000
unhealthy_threshold: 3
request_line: ''
healthy_threshold: 2
response_timeout: 5000
+2 -2
View File
@@ -1,7 +1,7 @@
name: Apache Kafka
description: |
(Experimental) Kafka cluster
version: 0.11.0.0-rancher1
Kafka cluster
version: 1.0.0-rancher1
category: Clustering
maintainer: "Raul Sanchez <rawmind@gmail.com>"
minimum_rancher_version: v0.59.0
+13
View File
@@ -0,0 +1,13 @@
netdata:
image: titpetric/netdata:latest
labels:
io.rancher.scheduler.global: 'true'
uts: host
cap_add:
- SYS_PTRACE
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
NETDATA_PORT: "${NETDATA_PORT}"
+13
View File
@@ -0,0 +1,13 @@
.catalog:
name: netdata
version: v1.8.0
description: Real-time performance monitoring, done right!
questions:
- variable: NETDATA_PORT
label: Port
description: Container port to access netdata
required: true
type: int
default: 19999
netdata:
scale: 1
+2 -2
View File
@@ -1,5 +1,5 @@
allinone:
image: neuvector/allinone:rancher1.2
image: neuvector/allinone:rancher1.3
container_name: neuvector.allinone
restart: always
privileged: true
@@ -18,7 +18,7 @@ allinone:
io.rancher.scheduler.affinity:host_label: ${NV_ALLINONE_LABEL}
io.rancher.container.hostname_override: container_name
enforcer:
image: neuvector/enforcer:rancher1.2
image: neuvector/enforcer:rancher1.3
container_name: neuvector.enforcer
restart: always
privileged: true
+2 -2
View File
@@ -1,7 +1,7 @@
.catalog:
name: "NeuVector"
version: "rancher1.2"
description: "Container Security Solution"
version: "rancher1.3"
description: "Cloud Native Container Firewall"
questions:
- variable: "NV_ALLINONE_LABEL"
label: "Allinone Host label"
+1 -1
View File
@@ -1,6 +1,6 @@
name: NeuVector
description: |
Container Security Solution
version: rancher1.2
version: rancher1.3
category: Security
maintainer: neuvector support <support@neuvector.com>
+3
View File
@@ -0,0 +1,3 @@
This is a catalog that spins up an OpenFaaS(https://github.com/alexellis/faas) stack with Rancher as the backend. The `faas-rancher` container is the proxy that connects OpenFaas and Rancher.
`faas-rancher` is in an extremely early stage and is meant only to be used in development.
+56
View File
@@ -0,0 +1,56 @@
version: '2'
services:
lb:
image: rancher/lb-service-haproxy:v0.7.9
ports:
- 8080:8080/tcp
- 9090:9090/tcp
- 9093:9093/tcp
labels:
io.rancher.container.agent.role: environmentAdmin
io.rancher.container.create_agent: 'true'
prometheus:
image: kenfdev/prometheus:latest-cattle
environment:
no_proxy: gateway
stdin_open: true
tty: true
command:
- -config.file=/etc/prometheus/prometheus.yml
- -storage.local.path=/prometheus
- -storage.local.memory-chunks=10000
- --alertmanager.url=http://alertmanager:9093
labels:
io.rancher.container.pull_image: always
faas-rancher:
image: kenfdev/faas-rancher
environment:
FUNCTION_STACK_NAME: ${FUNCTION_STACK_NAME}
CATTLE_URL: ${CATTLE_URL}
CATTLE_ACCESS_KEY: ${CATTLE_ACCESS_KEY}
CATTLE_SECRET_KEY: ${CATTLE_SECRET_KEY}
stdin_open: true
tty: true
labels:
io.rancher.container.pull_image: always
gateway:
image: functions/gateway:0.6.2
environment:
dnsrr: 'true'
functions_provider_url: http://faas-rancher:8080/
stdin_open: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
tty: true
labels:
io.rancher.container.pull_image: always
alertmanager:
image: functions/alertmanager:latest
environment:
no_proxy: gateway
stdin_open: true
tty: true
command:
- -config.file=/alertmanager.yml
labels:
io.rancher.container.pull_image: always
+72
View File
@@ -0,0 +1,72 @@
.catalog:
name: "OpenFaaS"
version: "v0.0.2"
description: "Enable Rancher as a backend for Functions as a Service (OpenFaaS)"
uuid: "openfaas-0"
minimum_rancher_version: v1.5.0
questions:
- variable: "CATTLE_URL"
description: "The v2-beta Rancher Server Endpoint. e.g. https://try.rancher.com/v2-beta"
label: "Rancher Server Endpoint URL"
required: true
type: "string"
- variable: "CATTLE_ACCESS_KEY"
description: "The Rancher API Access Key"
label: "API Access Key"
required: true
type: "string"
- variable: "CATTLE_SECRET_KEY"
description: "The Rancher API Secret Key"
label: "API Secret Key"
required: true
type: "string"
- variable: "FUNCTION_STACK_NAME"
description: "The stack name faas functions will be deployed to. It will automatically be created."
default: "faas-functions"
label: "Functions Stack Name"
required: true
type: "string"
version: '2'
services:
lb:
scale: 1
start_on_create: true
lb_config:
certs: []
port_rules:
- priority: 1
protocol: http
service: gateway
source_port: 8080
target_port: 8080
- priority: 2
protocol: http
service: prometheus
source_port: 9090
target_port: 9090
- priority: 3
protocol: http
service: alertmanager
source_port: 9093
target_port: 9093
health_check:
healthy_threshold: 2
response_timeout: 2000
port: 42
unhealthy_threshold: 3
initializing_timeout: 60000
interval: 2000
reinitializing_timeout: 60000
prometheus:
scale: 1
start_on_create: true
faas-rancher:
scale: 1
start_on_create: true
gateway:
scale: 1
start_on_create: true
alertmanager:
scale: 1
start_on_create: true
Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

+7
View File
@@ -0,0 +1,7 @@
name: OpenFaaS
description: |
Functions as a Service - a serverless framework for Docker
version: v0.0.2
category: Platform
license: MIT
projectURL: https://github.com/alexellis/faas
+1
View File
@@ -1,5 +1,6 @@
portworx:
labels:
io.rancher.container.dns: 'true'
io.rancher.container.create_agent: 'true'
io.rancher.scheduler.global: 'true'
io.rancher.container.pull_image: 'always'
+19
View File
@@ -0,0 +1,19 @@
## What is inside SonarQube Stack?
* [SonarQube Server](http://www.sonarqube.org/) + Sidekick for storing plugins
* Postgres Database + Sidekick for storing data
## Info
* In default SonarQube package will install alpine docker version and will create "sonar" postgres database, user and password.
* SonarQube service is exposed by a loadbalancer.
* Optional, you could install non alpine version. Use it if your software needs glibc.
* Optional, you could use an external postgres database link.
* Once SonarQube will start, make sure you setup correct information in setup page.
* For easy upgrades there are sidekicks for postgres data with dedicated storage.
## Installing Plugins Manually
* Go to [Plugin Library](http://docs.sonarqube.org/display/PLUG/Plugin+Library) and find your favourite plugins
* Execute `docker exec -it [sonarqube-data bash]`, go to /opt/sonarqube/extensions/plugins and put your plugins here
* Restart SonarQube container.
## First Start
* Use admin/admin to login to the SonarQube interface.
@@ -0,0 +1,67 @@
version: '2'
services:
sonarqube-lb:
image: rancher/lb-service-haproxy:v0.7.6
ports:
- ${http_port}:${http_port}
sonarqube-storage:
network_mode: none
labels:
io.rancher.container.hostname_override: container_name
io.rancher.container.start_once: true
environment:
- SERVICE_UID=0
- SERVICE_GID=0
- SERVICE_VOLUME=/opt/sonarqube/extensions/plugins
volumes:
- sonarqube-plugin:/opt/sonarqube/extensions/plugins
image: rawmind/alpine-volume:0.0.2-1
sonarqube:
labels:
io.rancher.container.hostname_override: container_name
io.rancher.sidekicks: sonarqube-storage
image: sonarqube:${docker_version}
environment:
SONARQUBE_WEB_JVM_OPTS: ${jvm_opts}
SONARQUBE_JDBC_USERNAME: ${postgres_user}
SONARQUBE_JDBC_PASSWORD: ${postgres_password}
SONARQUBE_JDBC_URL: jdbc:postgresql://db:${postgres_port}/${postgres_db}
volumes_from:
- sonarqube-storage
{{- if ne .Values.postgres_link ""}}
external_links:
- ${postgres_link}:db
{{- else}}
links:
- db:db
db:
labels:
io.rancher.container.hostname_override: container_name
io.rancher.sidekicks: db-storage
image: postgres:9.6.3-alpine
environment:
POSTGRES_USER: ${postgres_user}
POSTGRES_PASSWORD: ${postgres_password}
POSTGRES_DB: ${postgres_db}
volumes_from:
- db-storage
db-storage:
network_mode: none
labels:
io.rancher.container.hostname_override: container_name
io.rancher.container.start_once: true
environment:
- SERVICE_UID=0
- SERVICE_GID=0
- SERVICE_VOLUME=/var/lib/postgresql
volumes:
- db-data:/var/lib/postgresql
image: rawmind/alpine-volume:0.0.2-1
{{- end}}
volumes:
sonarqube-plugin:
driver: local
{{- if eq .Values.postgres_link ""}}
db-data:
driver: local
{{- end}}
+84
View File
@@ -0,0 +1,84 @@
version: '2'
catalog:
name: "SonarQube"
version: "v6.7"
description: "SonarQube"
uuid: sonarqube-0
minimum_rancher_version: v0.51.0
questions:
- variable: docker_version
description: "SonarQube docker version"
label: "SonarQube docker version"
required: true
default: "6.7-alpine"
type: "enum"
options:
- 6.7-alpine
- 6.7
- variable: http_port
description: "SonarQube http port"
label: "SonarQube http Port"
required: true
default: "9000"
type: "int"
- variable: jvm_opts
description: "SonarQube web jvm options"
label: "SonarQube web jvm options"
required: false
default: ""
type: "string"
- variable: postgres_port
description: "Postgres Port"
label: "Postgres Port"
required: true
default: "5432"
type: "int"
- variable: postgres_db
description: "Postgres Database Name"
label: "Postgres Database"
required: true
default: "sonar"
type: "string"
- variable: postgres_user
description: "Postgres User"
label: "Postgres User"
required: true
default: "sonar"
type: "string"
- variable: postgres_password
description: "Postgres Password"
label: "Postgres Password"
required: true
default: "sonar"
type: "password"
- variable: "postgres_link"
description: |
Optional external postgres service to use.
label: "Postgres stack/service"
default: ""
required: false
type: "service"
services:
sonarqube-lb:
scale: 1
lb_config:
port_rules:
- protocol: http
service: sonarqube
source_port: ${http_port}
target_port: 9000
health_check:
response_timeout: 2000
healthy_threshold: 2
port: 42
unhealthy_threshold: 3
sonarqube:
scale: 1
retain_ip: true
health_check:
port: 9000
interval: 5000
unhealthy_threshold: 3
request_line: 'GET / HTTP/1.0'
healthy_threshold: 2
response_timeout: 5000
+1 -1
View File
@@ -1,5 +1,5 @@
name: SonarQube
description: |
SonarQube - an open source quality management platform.
version: v6.5
version: v6.7
category: Test Automation
+80
View File
@@ -0,0 +1,80 @@
# Traefik active load balancer
### 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:
- rancher_integration = "metadata" # Rancher integration method.
- 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.
- acme_caserver = "https://acme-v01.api.letsencrypt.org/directory" # acme caServer parameter.
- acme_vol_name = "traefik_acme_vol" # Volume name to user by acme sidekick
- acme_vol_driver = "local" # Volume driver to user by acme sidekick
- 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.
- compress_enable = true # Enable traefik compression
- refresh_interval = 10s # Interval to refresh traefik rules.toml from rancher-metadata.
- admin_readonly = false # Set REST API to read-only mode.
- admin_statistics = 10 # Enable more detailed statistics, extend recent errors number.
- admin_auth_method = "basic" # Selec auth method, basic or digest.
- admin_users = "" # Paste basic or digest users created with htdigest, one user per line.
- prometheus_enable = false # Enable prometheus statistics
- prometheus_buckets = "[0.1,0.3,1.2,5.0]" # Prometheus buckets
- cattle_url = "" # Cattle url if you choose api integration
- cattle_access_key = "" # Cattle access key if you choose api integration
- cattle_secret_key = "" # Cattle secret key if you choose api integration
### Service configuration labels:
Traefik labels has to be added to your services, in order to get included in traefik config.
## Metadata or api
Please use traefik defined labels if you choose metadata or api rancher integration.
[Traefik rancher backend labels][traefik rancher backend]
Metadata is the prefered and recommended rancher integration.
Api integration needs you create an environment API key in your rancher environment. Also, it needs you provide CATTLE_URL, CATTLE_ACCESS_KEY and CATTLE_SECRET_KEY.
## External
Use this labels if you choose extenal rancher integration.
- 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.alias = < alias > # Alternate names to route rule. Multiple values separated by ",". WARNING: You could have collisions BE CAREFULL
- traefik.domain = < domain > # Domain names to route rule. Multiple values separated by ","
- traefik.path = < path > # Path to route rule. Multiple paths separated by ","
- traefik.port = < port > # Port to expose throught traefik
- traefik.acme = < true | false > # Enable/disable ACME traefik feature
### Usage:
Select Traefik from catalog.
Set the params.
Click deploy.
Access your traefik admin service at $admin_port to see your published services.
Note: To access the services, you need to create A or CNAMES dns entries for every one.
[traefik rancher backend]: https://docs.traefik.io/configuration/backends/rancher/#labels-overriding-default-behaviour
+107
View File
@@ -0,0 +1,107 @@
version: '2'
services:
traefik:
ports:
- ${admin_port}:8000/tcp
- ${http_port}:${http_port}/tcp
- ${https_port}:${https_port}/tcp
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}
{{- if or (eq .Values.rancher_integration "external") (eq .Values.acme_enable "true")}}
io.rancher.sidekicks:
{{- if eq .Values.rancher_integration "external"}} traefik-conf
{{- if eq .Values.acme_enable "true" -}},{{- end -}}
{{- end -}}
{{- if eq .Values.acme_enable "true" -}}
{{- if ne .Values.rancher_integration "external"}} traefik-acme
{{- else -}}traefik-acme
{{- end -}}
{{- end -}}
{{- end}}
io.rancher.container.hostname_override: container_name
image: rawmind/alpine-traefik:1.4.0-3
environment:
- TRAEFIK_HTTP_PORT=${http_port}
- TRAEFIK_HTTP_COMPRESSION=${compress_enable}
- TRAEFIK_HTTPS_PORT=${https_port}
- TRAEFIK_HTTPS_ENABLE=${https_enable}
- TRAEFIK_HTTPS_COMPRESSION=${compress_enable}
- TRAEFIK_INSECURE_SKIP=${insecure_skip}
- TRAEFIK_ADMIN_ENABLE=true
- TRAEFIK_ADMIN_READ_ONLY=${admin_readonly}
- TRAEFIK_ADMIN_STATISTICS=${admin_statistics}
- TRAEFIK_ADMIN_AUTH_METHOD=${admin_auth_method}
- TRAEFIK_ADMIN_AUTH_USERS=${admin_users}
{{- if eq .Values.rancher_integration "external"}}
- CONF_INTERVAL=${refresh_interval}
{{- end}}
{{- 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}
- TRAEFIK_ACME_CASERVER="${acme_caserver}"
{{- end}}
{{- if ne .Values.rancher_integration "external"}}
- TRAEFIK_RANCHER_ENABLE=true
- TRAEFIK_RANCHER_MODE=${rancher_integration}
{{- if eq .Values.rancher_integration "api"}}
- CATTLE_URL=${cattle_url}
- CATTLE_ACCESS_KEY=${cattle_access_key}
- CATTLE_SECRET_KEY=${cattle_secret_key}
{{- end}}
{{- end}}
{{- if eq .Values.prometheus_enable "true"}}
- TRAEFIK_PROMETHEUS_ENABLE=${prometheus_enable}
- TRAEFIK_PROMETHEUS_BUCKETS=${prometheus_buckets}
{{- end}}
{{- if or (eq .Values.rancher_integration "external") (eq .Values.acme_enable "true")}}
volumes_from:
{{- if eq .Values.rancher_integration "external"}}
- traefik-conf
{{- end}}
{{- if eq .Values.acme_enable "true"}}
- traefik-acme
{{- end}}
{{- end}}
{{- if eq .Values.rancher_integration "external"}}
traefik-conf:
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'
image: rawmind/rancher-traefik:1.3.6
network_mode: none
volumes:
- tools-volume:/opt/tools
{{- end}}
{{- if eq .Values.acme_enable "true"}}
traefik-acme:
network_mode: none
labels:
io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
io.rancher.container.hostname_override: container_name
io.rancher.container.start_once: true
environment:
- SERVICE_UID=10001
- SERVICE_GID=10001
- SERVICE_VOLUME=/opt/traefik/acme
volumes:
- ${acme_vol_name}:/opt/traefik/acme
image: rawmind/alpine-volume:0.0.2-1
{{- end}}
{{- if or (eq .Values.rancher_integration "external") (eq .Values.acme_enable "true")}}
volumes:
{{- if eq .Values.rancher_integration "external"}}
tools-volume:
driver: local
per_container: true
{{- end}}
{{- if eq .Values.acme_enable "true"}}
${acme_vol_name}:
driver: ${acme_vol_driver}
{{- end}}
{{- end}}
+208
View File
@@ -0,0 +1,208 @@
version: '2'
catalog:
name: traefik
version: v1.4.0-rancher1
description: |
Traefik load balancer.
minimum_rancher_version: v0.59.0
maintainer: "Raul Sanchez <rawmind@gmail.com>"
uuid: traefik-0
questions:
- variable: "rancher_integration"
label: "Choose rancher integration:"
description: |
Enable rancher integration mode. Traefik built in integration, metadata or api, or external sidekick integration with confd.
default: metadata
required: true
type: enum
options:
- metadata
- api
- external
- 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: "Https enable:"
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: "ACME enable:"
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: "acme_caserver"
description: "ACME caServer to use."
label: "ACME caServer:"
required: true
default: "https://acme-v01.api.letsencrypt.org/directory"
type: "string"
- variable: "acme_vol_name"
description: "The volume name shared to store ACME certs"
label: "ACME Volume Name"
required: true
default: "traefik_acme_vol"
type: "string"
- variable: "acme_vol_driver"
description: "The volume driver shared to store ACME certs"
label: "ACME Volume Driver"
required: true
default: "local"
type: enum
options: # List of options if using type of `enum`
- local
- rancher-nfs
- rancher-efs
- rancher-ebs
- variable: "ssl_key"
description: "SSL key to secure the service. *Required if you enable https"
label: "Https key"
type: "multiline"
required: false
default: ""
- variable: "ssl_crt"
description: "SSL cert to secure the service. *Required if you enable https"
label: "Https crt"
type: "multiline"
required: false
default: ""
- variable: "insecure_skip"
description: "Enable InsecureSkipVerify param."
label: "InsecureSkipVerify:"
required: true
default: false
type: "boolean"
- variable: "compress_enable"
label: "Enable compression:"
description: |
Enable Traefik compression for entrypoints.
default: true
required: true
type: "boolean"
- variable: "refresh_interval"
description: "Interval to poll/apply configuration changes."
label: "Refresh Interval (s):"
required: true
default: 10
type: "int"
- variable: "admin_readonly"
label: "Admin readonly:"
description: |
Set admin to readonly mode.
default: false
required: true
type: "boolean"
- variable: "admin_statistics"
description: "Enable more detailed statistics."
label: "Admin statistics history:"
required: true
default: 10
type: "int"
- variable: "admin_auth_method"
description: "Admin auth method on the webui."
label: "Admin auth method:"
required: true
default: "basic"
type: enum
options: # List of options if using type of `enum`
- basic
- digest
- variable: "admin_users"
description: "Admin auth user list on the webui. Generate with htpassword for basic or htdigest with traefik realm for digest."
label: "Admin users:"
type: "multiline"
required: false
default: ""
- variable: "prometheus_enable"
description: "To enable statistics to be pulled by Prometheus."
label: "Prometheus enable"
default: false
required: true
type: "boolean"
- variable: "prometheus_buckets"
description: "To define your own buckets"
label: "Prometheus buckets"
default: "[0.1,0.3,1.2,5.0]"
required: true
type: "string"
- variable: "cattle_url"
description: "API cattle url"
label: "Cattle URL"
default: ""
required: false
type: "string"
- variable: "cattle_access_key"
description: "API environment access key"
label: "Cattle access key"
default: ""
required: false
type: "string"
- variable: "cattle_secret_key"
description: "API environment secret key"
label: "Cattle secret key"
default: ""
required: false
type: "string"
services:
traefik:
retain_ip: true
health_check:
healthy_threshold: 2
response_timeout: 5000
port: 8000
unhealthy_threshold: 3
interval: 5000
strategy: recreate
metadata:
traefik:
ssl_key: |
${ssl_key}
ssl_crt: |
${ssl_crt}
+81
View File
@@ -0,0 +1,81 @@
# Traefik active load balancer
### 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:
- rancher_integration = "metadata" # Rancher integration method.
- rancher_healthcheck = false # Enable/Disable traefik rancher services healthcheck filter. Only valid for api and metadata integration.
- 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.
- acme_caserver = "https://acme-v01.api.letsencrypt.org/directory" # acme caServer parameter.
- acme_vol_name = "traefik_acme_vol" # Volume name to user by acme sidekick
- acme_vol_driver = "local" # Volume driver to user by acme sidekick
- 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.
- compress_enable = true # Enable traefik compression
- refresh_interval = 10s # Interval to refresh traefik rules.toml from rancher-metadata.
- admin_readonly = false # Set REST API to read-only mode.
- admin_statistics = 10 # Enable more detailed statistics, extend recent errors number.
- admin_auth_method = "basic" # Selec auth method, basic or digest.
- admin_users = "" # Paste basic or digest users created with htdigest, one user per line.
- prometheus_enable = false # Enable prometheus statistics
- prometheus_buckets = "[0.1,0.3,1.2,5.0]" # Prometheus buckets
- cattle_url = "" # Cattle url if you choose api integration
- cattle_access_key = "" # Cattle access key if you choose api integration
- cattle_secret_key = "" # Cattle secret key if you choose api integration
### Service configuration labels:
Traefik labels has to be added to your services, in order to get included in traefik config.
## Metadata or api
Please use traefik defined labels if you choose metadata or api rancher integration.
[Traefik rancher backend labels][traefik rancher backend]
Metadata is the prefered and recommended rancher integration.
Api integration needs you create an environment API key in your rancher environment. Also, it needs you provide CATTLE_URL, CATTLE_ACCESS_KEY and CATTLE_SECRET_KEY.
## External
Use this labels if you choose extenal rancher integration.
- 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.alias = < alias > # Alternate names to route rule. Multiple values separated by ",". WARNING: You could have collisions BE CAREFULL
- traefik.domain = < domain > # Domain names to route rule. Multiple values separated by ","
- traefik.path = < path > # Path to route rule. Multiple paths separated by ","
- traefik.port = < port > # Port to expose throught traefik
- traefik.acme = < true | false > # Enable/disable ACME traefik feature
### Usage:
Select Traefik from catalog.
Set the params.
Click deploy.
Access your traefik admin service at $admin_port to see your published services.
Note: To access the services, you need to create A or CNAMES dns entries for every one.
[traefik rancher backend]: https://docs.traefik.io/configuration/backends/rancher/#labels-overriding-default-behaviour
+108
View File
@@ -0,0 +1,108 @@
version: '2'
services:
traefik:
ports:
- ${admin_port}:8000/tcp
- ${http_port}:${http_port}/tcp
- ${https_port}:${https_port}/tcp
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}
{{- if or (eq .Values.rancher_integration "external") (eq .Values.acme_enable "true")}}
io.rancher.sidekicks:
{{- if eq .Values.rancher_integration "external"}} traefik-conf
{{- if eq .Values.acme_enable "true" -}},{{- end -}}
{{- end -}}
{{- if eq .Values.acme_enable "true" -}}
{{- if ne .Values.rancher_integration "external"}} traefik-acme
{{- else -}}traefik-acme
{{- end -}}
{{- end -}}
{{- end}}
io.rancher.container.hostname_override: container_name
image: rawmind/alpine-traefik:1.4.3-0
environment:
- TRAEFIK_HTTP_PORT=${http_port}
- TRAEFIK_HTTP_COMPRESSION=${compress_enable}
- TRAEFIK_HTTPS_PORT=${https_port}
- TRAEFIK_HTTPS_ENABLE=${https_enable}
- TRAEFIK_HTTPS_COMPRESSION=${compress_enable}
- TRAEFIK_INSECURE_SKIP=${insecure_skip}
- TRAEFIK_ADMIN_ENABLE=true
- TRAEFIK_ADMIN_READ_ONLY=${admin_readonly}
- TRAEFIK_ADMIN_STATISTICS=${admin_statistics}
- TRAEFIK_ADMIN_AUTH_METHOD=${admin_auth_method}
- TRAEFIK_ADMIN_AUTH_USERS=${admin_users}
{{- if eq .Values.rancher_integration "external"}}
- CONF_INTERVAL=${refresh_interval}
{{- end}}
{{- 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}
- TRAEFIK_ACME_CASERVER=${acme_caserver}
{{- end}}
{{- if ne .Values.rancher_integration "external"}}
- TRAEFIK_RANCHER_ENABLE=true
- TRAEFIK_RANCHER_HEALTHCHECK=${rancher_healthcheck}
- TRAEFIK_RANCHER_MODE=${rancher_integration}
{{- if eq .Values.rancher_integration "api"}}
- CATTLE_URL=${cattle_url}
- CATTLE_ACCESS_KEY=${cattle_access_key}
- CATTLE_SECRET_KEY=${cattle_secret_key}
{{- end}}
{{- end}}
{{- if eq .Values.prometheus_enable "true"}}
- TRAEFIK_PROMETHEUS_ENABLE=${prometheus_enable}
- TRAEFIK_PROMETHEUS_BUCKETS=${prometheus_buckets}
{{- end}}
{{- if or (eq .Values.rancher_integration "external") (eq .Values.acme_enable "true")}}
volumes_from:
{{- if eq .Values.rancher_integration "external"}}
- traefik-conf
{{- end}}
{{- if eq .Values.acme_enable "true"}}
- traefik-acme
{{- end}}
{{- end}}
{{- if eq .Values.rancher_integration "external"}}
traefik-conf:
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'
image: rawmind/rancher-traefik:1.3.6
network_mode: none
volumes:
- tools-volume:/opt/tools
{{- end}}
{{- if eq .Values.acme_enable "true"}}
traefik-acme:
network_mode: none
labels:
io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
io.rancher.container.hostname_override: container_name
io.rancher.container.start_once: true
environment:
- SERVICE_UID=10001
- SERVICE_GID=10001
- SERVICE_VOLUME=/opt/traefik/acme
volumes:
- ${acme_vol_name}:/opt/traefik/acme
image: rawmind/alpine-volume:0.0.2-1
{{- end}}
{{- if or (eq .Values.rancher_integration "external") (eq .Values.acme_enable "true")}}
volumes:
{{- if eq .Values.rancher_integration "external"}}
tools-volume:
driver: local
per_container: true
{{- end}}
{{- if eq .Values.acme_enable "true"}}
${acme_vol_name}:
driver: ${acme_vol_driver}
{{- end}}
{{- end}}
+216
View File
@@ -0,0 +1,216 @@
version: '2'
catalog:
name: traefik
version: v1.4.3-rancher1
description: |
Traefik load balancer.
minimum_rancher_version: v0.59.0
maintainer: "Raul Sanchez <rawmind@gmail.com>"
uuid: traefik-0
questions:
- variable: "rancher_integration"
label: "Choose rancher integration:"
description: |
Enable rancher integration mode. Traefik built in integration, metadata or api, or external sidekick integration with confd.
default: metadata
required: true
type: enum
options:
- metadata
- api
- external
- variable: "rancher_healthcheck"
description: |
Enable/disable rancher services healtcheck filter. If enable, just healthy services will be published.
Only valid for api and metadata integration.
label: "Rancher healthcheck filter:"
required: true
default: false
type: "boolean"
- 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: "Https enable:"
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: "ACME enable:"
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: "acme_caserver"
description: "ACME caServer to use."
label: "ACME caServer:"
required: true
default: "https://acme-v01.api.letsencrypt.org/directory"
type: "string"
- variable: "acme_vol_name"
description: "The volume name shared to store ACME certs"
label: "ACME Volume Name"
required: true
default: "traefik_acme_vol"
type: "string"
- variable: "acme_vol_driver"
description: "The volume driver shared to store ACME certs"
label: "ACME Volume Driver"
required: true
default: "local"
type: enum
options: # List of options if using type of `enum`
- local
- rancher-nfs
- rancher-efs
- rancher-ebs
- variable: "ssl_key"
description: "SSL key to secure the service. *Required if you enable https"
label: "Https key"
type: "multiline"
required: false
default: ""
- variable: "ssl_crt"
description: "SSL cert to secure the service. *Required if you enable https"
label: "Https crt"
type: "multiline"
required: false
default: ""
- variable: "insecure_skip"
description: "Enable InsecureSkipVerify param."
label: "InsecureSkipVerify:"
required: true
default: false
type: "boolean"
- variable: "compress_enable"
label: "Enable compression:"
description: |
Enable Traefik compression for entrypoints.
default: true
required: true
type: "boolean"
- variable: "refresh_interval"
description: "Interval to poll/apply configuration changes."
label: "Refresh Interval (s):"
required: true
default: 10
type: "int"
- variable: "admin_readonly"
label: "Admin readonly:"
description: |
Set admin to readonly mode.
default: false
required: true
type: "boolean"
- variable: "admin_statistics"
description: "Enable more detailed statistics."
label: "Admin statistics history:"
required: true
default: 10
type: "int"
- variable: "admin_auth_method"
description: "Admin auth method on the webui."
label: "Admin auth method:"
required: true
default: "basic"
type: enum
options: # List of options if using type of `enum`
- basic
- digest
- variable: "admin_users"
description: "Admin auth user list on the webui. Generate with htpassword for basic or htdigest with traefik realm for digest."
label: "Admin users:"
type: "multiline"
required: false
default: ""
- variable: "prometheus_enable"
description: "To enable statistics to be pulled by Prometheus."
label: "Prometheus enable"
default: false
required: true
type: "boolean"
- variable: "prometheus_buckets"
description: "To define your own buckets"
label: "Prometheus buckets"
default: "[0.1,0.3,1.2,5.0]"
required: true
type: "string"
- variable: "cattle_url"
description: "API cattle url"
label: "Cattle URL"
default: ""
required: false
type: "string"
- variable: "cattle_access_key"
description: "API environment access key"
label: "Cattle access key"
default: ""
required: false
type: "string"
- variable: "cattle_secret_key"
description: "API environment secret key"
label: "Cattle secret key"
default: ""
required: false
type: "string"
services:
traefik:
retain_ip: true
health_check:
healthy_threshold: 2
response_timeout: 5000
port: 8000
unhealthy_threshold: 3
interval: 5000
strategy: recreate
metadata:
traefik:
ssl_key: |
${ssl_key}
ssl_crt: |
${ssl_crt}
+82
View File
@@ -0,0 +1,82 @@
# Traefik active load balancer
### 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:
- rancher_integration = "metadata" # Rancher integration method.
- rancher_healthcheck = false # Enable/Disable traefik rancher services healthcheck filter. Only valid for api and metadata integration.
- constraints = "" # Traefik constraints for rancher provider. Only valid for api and metadata integration.
- 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.
- acme_caserver = "https://acme-v01.api.letsencrypt.org/directory" # acme caServer parameter.
- acme_vol_name = "traefik_acme_vol" # Volume name to user by acme sidekick
- acme_vol_driver = "local" # Volume driver to user by acme sidekick
- 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.
- compress_enable = true # Enable traefik compression
- refresh_interval = 10s # Interval to refresh traefik rules.toml from rancher-metadata.
- admin_readonly = false # Set REST API to read-only mode.
- admin_statistics = 10 # Enable more detailed statistics, extend recent errors number.
- admin_auth_method = "basic" # Selec auth method, basic or digest.
- admin_users = "" # Paste basic or digest users created with htdigest, one user per line.
- prometheus_enable = false # Enable prometheus statistics
- prometheus_buckets = "[0.1,0.3,1.2,5.0]" # Prometheus buckets
- cattle_url = "" # Cattle url if you choose api integration
- cattle_access_key = "" # Cattle access key if you choose api integration
- cattle_secret_key = "" # Cattle secret key if you choose api integration
### Service configuration labels:
Traefik labels has to be added to your services, in order to get included in traefik config.
## Metadata or api
Please use traefik defined labels if you choose metadata or api rancher integration.
[Traefik rancher backend labels][traefik rancher backend]
Metadata is the prefered and recommended rancher integration.
Api integration needs you create an environment API key in your rancher environment. Also, it needs you provide CATTLE_URL, CATTLE_ACCESS_KEY and CATTLE_SECRET_KEY.
## External
Use this labels if you choose extenal rancher integration.
- 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.alias = < alias > # Alternate names to route rule. Multiple values separated by ",". WARNING: You could have collisions BE CAREFULL
- traefik.domain = < domain > # Domain names to route rule. Multiple values separated by ","
- traefik.path = < path > # Path to route rule. Multiple paths separated by ","
- traefik.port = < port > # Port to expose throught traefik
- traefik.acme = < true | false > # Enable/disable ACME traefik feature
### Usage:
Select Traefik from catalog.
Set the params.
Click deploy.
Access your traefik admin service at $admin_port to see your published services.
Note: To access the services, you need to create A or CNAMES dns entries for every one.
[traefik rancher backend]: https://docs.traefik.io/configuration/backends/rancher/#labels-overriding-default-behaviour
+109
View File
@@ -0,0 +1,109 @@
version: '2'
services:
traefik:
ports:
- ${admin_port}:8000/tcp
- ${http_port}:${http_port}/tcp
- ${https_port}:${https_port}/tcp
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}
{{- if or (eq .Values.rancher_integration "external") (eq .Values.acme_enable "true")}}
io.rancher.sidekicks:
{{- if eq .Values.rancher_integration "external"}} traefik-conf
{{- if eq .Values.acme_enable "true" -}},{{- end -}}
{{- end -}}
{{- if eq .Values.acme_enable "true" -}}
{{- if ne .Values.rancher_integration "external"}} traefik-acme
{{- else -}}traefik-acme
{{- end -}}
{{- end -}}
{{- end}}
io.rancher.container.hostname_override: container_name
image: rawmind/alpine-traefik:1.4.4-1
environment:
- TRAEFIK_HTTP_PORT=${http_port}
- TRAEFIK_HTTP_COMPRESSION=${compress_enable}
- TRAEFIK_HTTPS_PORT=${https_port}
- TRAEFIK_HTTPS_ENABLE=${https_enable}
- TRAEFIK_HTTPS_COMPRESSION=${compress_enable}
- TRAEFIK_INSECURE_SKIP=${insecure_skip}
- TRAEFIK_ADMIN_ENABLE=true
- TRAEFIK_ADMIN_READ_ONLY=${admin_readonly}
- TRAEFIK_ADMIN_STATISTICS=${admin_statistics}
- TRAEFIK_ADMIN_AUTH_METHOD=${admin_auth_method}
- TRAEFIK_ADMIN_AUTH_USERS=${admin_users}
{{- if eq .Values.rancher_integration "external"}}
- CONF_INTERVAL=${refresh_interval}
{{- end}}
{{- 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}
- TRAEFIK_ACME_CASERVER=${acme_caserver}
{{- end}}
{{- if ne .Values.rancher_integration "external"}}
- TRAEFIK_RANCHER_ENABLE=true
- TRAEFIK_CONSTRAINTS=${constraints}
- TRAEFIK_RANCHER_HEALTHCHECK=${rancher_healthcheck}
- TRAEFIK_RANCHER_MODE=${rancher_integration}
{{- if eq .Values.rancher_integration "api"}}
- CATTLE_URL=${cattle_url}
- CATTLE_ACCESS_KEY=${cattle_access_key}
- CATTLE_SECRET_KEY=${cattle_secret_key}
{{- end}}
{{- end}}
{{- if eq .Values.prometheus_enable "true"}}
- TRAEFIK_PROMETHEUS_ENABLE=${prometheus_enable}
- TRAEFIK_PROMETHEUS_BUCKETS=${prometheus_buckets}
{{- end}}
{{- if or (eq .Values.rancher_integration "external") (eq .Values.acme_enable "true")}}
volumes_from:
{{- if eq .Values.rancher_integration "external"}}
- traefik-conf
{{- end}}
{{- if eq .Values.acme_enable "true"}}
- traefik-acme
{{- end}}
{{- end}}
{{- if eq .Values.rancher_integration "external"}}
traefik-conf:
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'
image: rawmind/rancher-traefik:1.3.6
network_mode: none
volumes:
- tools-volume:/opt/tools
{{- end}}
{{- if eq .Values.acme_enable "true"}}
traefik-acme:
network_mode: none
labels:
io.rancher.scheduler.affinity:container_label_soft_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
io.rancher.container.hostname_override: container_name
io.rancher.container.start_once: true
environment:
- SERVICE_UID=10001
- SERVICE_GID=10001
- SERVICE_VOLUME=/opt/traefik/acme
volumes:
- ${acme_vol_name}:/opt/traefik/acme
image: rawmind/alpine-volume:0.0.2-1
{{- end}}
{{- if or (eq .Values.rancher_integration "external") (eq .Values.acme_enable "true")}}
volumes:
{{- if eq .Values.rancher_integration "external"}}
tools-volume:
driver: local
per_container: true
{{- end}}
{{- if eq .Values.acme_enable "true"}}
${acme_vol_name}:
driver: ${acme_vol_driver}
{{- end}}
{{- end}}
+224
View File
@@ -0,0 +1,224 @@
version: '2'
catalog:
name: traefik
version: v1.4.4-rancher1
description: |
Traefik load balancer.
minimum_rancher_version: v0.59.0
maintainer: "Raul Sanchez <rawmind@gmail.com>"
uuid: traefik-0
questions:
- variable: "rancher_integration"
label: "Choose rancher integration:"
description: |
Enable rancher integration mode. Traefik built in integration, metadata or api, or external sidekick integration with confd.
default: metadata
required: true
type: enum
options:
- metadata
- api
- external
- variable: "rancher_healthcheck"
description: |
Enable/disable rancher services healtcheck filter. If enable, just healthy services will be published.
Only valid for api and metadata integration.
label: "Rancher healthcheck filter:"
required: true
default: false
type: "boolean"
- variable: "constraints"
description: |
Traefik constraints for rancher provider. Eg: "tag==api"
Only valid for api and metadata integration.
label: "Traefik constraints:"
required: false
default: ""
type: "string"
- 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: "Https enable:"
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: "ACME enable:"
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: "acme_caserver"
description: "ACME caServer to use."
label: "ACME caServer:"
required: true
default: "https://acme-v01.api.letsencrypt.org/directory"
type: "string"
- variable: "acme_vol_name"
description: "The volume name shared to store ACME certs"
label: "ACME Volume Name"
required: true
default: "traefik_acme_vol"
type: "string"
- variable: "acme_vol_driver"
description: "The volume driver shared to store ACME certs"
label: "ACME Volume Driver"
required: true
default: "local"
type: enum
options: # List of options if using type of `enum`
- local
- rancher-nfs
- rancher-efs
- rancher-ebs
- variable: "ssl_key"
description: "SSL key to secure the service. *Required if you enable https"
label: "Https key"
type: "multiline"
required: false
default: ""
- variable: "ssl_crt"
description: "SSL cert to secure the service. *Required if you enable https"
label: "Https crt"
type: "multiline"
required: false
default: ""
- variable: "insecure_skip"
description: "Enable InsecureSkipVerify param."
label: "InsecureSkipVerify:"
required: true
default: false
type: "boolean"
- variable: "compress_enable"
label: "Enable compression:"
description: |
Enable Traefik compression for entrypoints.
default: true
required: true
type: "boolean"
- variable: "refresh_interval"
description: "Interval to poll/apply configuration changes."
label: "Refresh Interval (s):"
required: true
default: 10
type: "int"
- variable: "admin_readonly"
label: "Admin readonly:"
description: |
Set admin to readonly mode.
default: false
required: true
type: "boolean"
- variable: "admin_statistics"
description: "Enable more detailed statistics."
label: "Admin statistics history:"
required: true
default: 10
type: "int"
- variable: "admin_auth_method"
description: "Admin auth method on the webui."
label: "Admin auth method:"
required: true
default: "basic"
type: enum
options: # List of options if using type of `enum`
- basic
- digest
- variable: "admin_users"
description: "Admin auth user list on the webui. Generate with htpassword for basic or htdigest with traefik realm for digest."
label: "Admin users:"
type: "multiline"
required: false
default: ""
- variable: "prometheus_enable"
description: "To enable statistics to be pulled by Prometheus."
label: "Prometheus enable"
default: false
required: true
type: "boolean"
- variable: "prometheus_buckets"
description: "To define your own buckets"
label: "Prometheus buckets"
default: "[0.1,0.3,1.2,5.0]"
required: true
type: "string"
- variable: "cattle_url"
description: "API cattle url"
label: "Cattle URL"
default: ""
required: false
type: "string"
- variable: "cattle_access_key"
description: "API environment access key"
label: "Cattle access key"
default: ""
required: false
type: "string"
- variable: "cattle_secret_key"
description: "API environment secret key"
label: "Cattle secret key"
default: ""
required: false
type: "string"
services:
traefik:
retain_ip: true
health_check:
healthy_threshold: 2
response_timeout: 5000
port: 8000
unhealthy_threshold: 3
interval: 5000
strategy: recreate
metadata:
traefik:
ssl_key: |
${ssl_key}
ssl_crt: |
${ssl_crt}
+2 -2
View File
@@ -1,7 +1,7 @@
name: Traefik
description: |
(Experimental) Traefik active load balancer
version: v1.3.6-rancher1
Traefik active load balancer
version: v1.4.4-rancher1
category: Load Balancing
maintainer: "Raul Sanchez <rawmind@gmail.com>"
minimum_rancher_version: v0.59.0
+1 -1
View File
@@ -1,5 +1,5 @@
wekandb:
image: mongo
image: mongo:3.2.11
# volumes:
# - ./data/runtime/db:/data/db
# - ./data/dump:/dump
+85
View File
@@ -0,0 +1,85 @@
# Zinst
## Install
* Git clone 1st
```
git clone https://github.com/goody80/zinst_repository_docker.git
```
* Git clone for zinst packages (optional)
```
git clone https://github.com/goody80/Zinst_packages.git
cp -Rfv ./Zinst_packages/* ./zinst_repository_docker/dist/
```
## Use
* How to start the zinst repository server
```
cd zinst_repository_docker
docker-compose up -d
```
* How to set the zinst client
```
curl -sL bit.ly/online-install |bash
zinst self-config ip=[IP address of the docker Host] host=[Hostname of docker host]:8080
```
* check the server alive
```
zinst find
```
## Setup
* You can modify the docker-compose.yml for setup as below
* for example: I need to change the port 8080 to 80. - You can do as below
* `8080:80/tcp` -> `80:80/tcp`
```
version: '2'
services:
zinst-repository:
image: zinst/zinst_repository:latest
ports:
- 8080:80/tcp
volumes:
- ./dist:/data/dist:rw
```
## What is the Zinst ?
### zinst?
* Package install manager. It very similar that concept of yinst command in Yahoo!
### Summary
* For the centralized package manage & distributed systems
* Centralized control:
* Install the Package to the destination server
* *ex) zinst install apache_server-1.0.1.zinst apache_conf-1.0.1.zinst -h web0[1-7,9]*
* list-up the package in each server
* *ex) zinst ls*
* list-up the file of package in each server
* *ex) zinst ls -files apache_server*
* Easy find out the installed package-name of a some distributed file
* *ex) zinst ls -files /data/z/httpd/conf/include/_temp.conf*
* Can tracking the release history with who could controlled
* *ex) zinst history*
* Easy can change the configuration setup
* *ex) zinst set apache_conf.maxclient=64*
* Then you can see the configuration has been changed on the Apache server for example.
* Package remove
* Send a command to the distributed systems
* *ex) zinst ssh "whoami" -h web[0-1][0-9], web20*
* Can makes a list of multiple host for the target control
* *ex) zinst ssh "whoami" -H ./hostlist.txt*
* One package, can makes a differnt output
* *ex) zinst install apache_server -set apache_server.maxclient=32 -h web01 web02*
* *zinst install apache_server -set apache_server.maxclient=64 -h news01 news02*
* Daemon controll
* *ex) zinst start httpd*
* Then we can recognize that who managed the daemon in the server as a history
* Easy to find out the package has been released to somewhere
* *ex) zinst track hwconfig-1.
* Supported a package restore & roll-back as a save file
* *ex) zinst restore -file /data/z/save/zinst-save.56*
* Without difficult language and environment. Due to it made by Bash only
+14
View File
@@ -0,0 +1,14 @@
version: '2'
services:
zinst-repository:
image: zinst/zinst_repository:0.4
volumes:
- zinst-data:/data/dist
zinst-lb:
image: rancher/lb-service-haproxy:v0.6.4
ports:
- ${public_port}:${public_port}/tcp
volumes:
zinst-data:
driver: local
+44
View File
@@ -0,0 +1,44 @@
version: '2'
catalog:
name: "zinst-repository"
version: "7.0.5"
description: "Infra as a code by your own packages. http://zinst.me"
uuid: zinstrepo-0
minimum_rancher_version: v1.5.5
questions:
- variable: public_port
description: "public port to access the zinst repository"
label: "Public Port"
required: true
default: "8080"
type: "int"
services:
zinst-repository:
retain_ip: true
scale: 1
start_on_create: true
health_check:
port: 80
interval: 5000
unhealthy_threshold: 3
request_line: ''
healthy_threshold: 2
response_timeout: 5000
zinst-lb:
scale: 1
start_on_create: true
lb_config:
certs: []
port_rules:
- priority: 1
protocol: http
service: zinst-repository
source_port: ${public_port}
target_port: 80
health_check:
response_timeout: 2000
healthy_threshold: 2
port: 42
unhealthy_threshold: 3
interval: 2000
+56
View File
@@ -0,0 +1,56 @@
# Zinst
## Install
1. How to install the zinst client
```
curl -sL bit.ly/online-install |bash
zinst self-config ip=[IP address of the zinst-repository] host=[Hostname of zinst-repository]:[http_port]
```
2. check the server alive
```
zinst find
```
3. You can clone and copy the open-source zinst packages from the Github to the Volume dircetory as below.
* https://github.com/goody80/Zinst_packages
## What is the Zinst ?
### zinst?
* Package install manager. It very similar that concept of yinst command in Yahoo!
### Summary
* For the centralized package manage & distributed systems
* Centralized control:
* Install the Package to the destination server
* *ex) zinst install apache_server-1.0.1.zinst apache_conf-1.0.1.zinst -h web0[1-7,9]*
* list-up the package in each server
* *ex) zinst ls*
* list-up the file of package in each server
* *ex) zinst ls -files apache_server*
* Easy find out the installed package-name of a some distributed file
* *ex) zinst ls -files /data/z/httpd/conf/include/_temp.conf*
* Can tracking the release history with who could controlled
* *ex) zinst history*
* Easy can change the configuration setup
* *ex) zinst set apache_conf.maxclient=64*
* Then you can see the configuration has been changed on the Apache server for example.
* Package remove
* Send a command to the distributed systems
* *ex) zinst ssh "whoami" -h web[0-1][0-9], web20*
* Can makes a list of multiple host for the target control
* *ex) zinst ssh "whoami" -H ./hostlist.txt*
* One package, can makes a differnt output
* *ex) zinst install apache_server -set apache_server.maxclient=32 -h web01 web02*
* *zinst install apache_server -set apache_server.maxclient=64 -h news01 news02*
* Daemon controll
* *ex) zinst start httpd*
* Then we can recognize that who managed the daemon in the server as a history
* Easy to find out the package has been released to somewhere
* *ex) zinst track hwconfig-1.
* Supported a package restore & roll-back as a save file
* *ex) zinst restore -file /data/z/save/zinst-save.56*
* Without difficult language and environment. Due to it made by Bash only
+15
View File
@@ -0,0 +1,15 @@
version: '2'
services:
zinst-repository:
image: zinst/zinst_repository:0.5
volumes:
- zinst-data:/data/dist
zinst-lb:
image: rancher/lb-service-haproxy:v0.7.6
ports:
- ${http_port}:${http_port}/tcp
volumes:
zinst-data:
driver: ${volume_driver}
+54
View File
@@ -0,0 +1,54 @@
version: '2'
catalog:
name: "zinst-repository"
version: "7.0.5"
description: "Infra as a code by your own packages. http://zinst.me"
uuid: zinstrepo-0
minimum_rancher_version: v1.5.5
questions:
- variable: http_port
description: "http port to access the zinst repository"
label: "Public Port"
required: true
default: "8080"
type: "int"
- variable: "volume_driver"
description: "Volume driver to associate with this service"
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:
zinst-repository:
retain_ip: true
scale: 1
start_on_create: true
health_check:
port: 80
interval: 5000
unhealthy_threshold: 3
request_line: ''
healthy_threshold: 2
response_timeout: 5000
zinst-lb:
scale: 1
start_on_create: true
lb_config:
certs: []
port_rules:
- priority: 1
protocol: http
service: zinst-repository
source_port: ${http_port}
target_port: 80
health_check:
response_timeout: 2000
healthy_threshold: 2
port: 42
unhealthy_threshold: 3
interval: 2000
Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

+5
View File
@@ -0,0 +1,5 @@
name: Zinst Package repository
description: |
Infra as a code by your own packages. http://zinst.me
version: 7.0.5
category: DevOps
+27
View File
@@ -0,0 +1,27 @@
# Apache Zookeeper
### 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...
@@ -0,0 +1,56 @@
version: '2'
services:
zk:
tty: true
image: rawmind/alpine-zk:3.4.10-0
volumes_from:
- zk-volume
- zk-conf
environment:
- JVMFLAGS=-Xmx${zk_mem}m -Xms${zk_mem}m
- CONFD_INTERVAL=${zk_interval}
- 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
+88
View File
@@ -0,0 +1,88 @@
version: '2'
catalog:
name: Zookeeper
version: 3.4.10-rancher1
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
+2 -2
View File
@@ -1,7 +1,7 @@
name: Apache Zookeeper
description: |
(Experimental) Zookeeper cluster
version: 3.4.9-rancher2
Zookeeper cluster
version: 3.4.10-rancher1
category: Clustering
maintainer: "Raul Sanchez <rawmind@gmail.com>"
projectURL: https://github.com/rawmind0/alpine-zk