diff --git a/templates/MongoDB/1/README.md b/templates/MongoDB/1/README.md
new file mode 100644
index 0000000..5d1109f
--- /dev/null
+++ b/templates/MongoDB/1/README.md
@@ -0,0 +1,18 @@
+# MongoDB
+
+
+### Info:
+
+ This template creates MongoDB replica set on top of Rancher. Replica set size starts with 3 MongoDB instances, the replica set has the ability to scale up automatically when adding new instances.
+
+
+### Usage:
+
+ Select MongoDB from catalog.
+
+ Enter the name of the replica set.
+
+ Click deploy.
+
+ MongoDB can now be accessed over the Rancher network.
+
diff --git a/templates/MongoDB/1/docker-compose.yml b/templates/MongoDB/1/docker-compose.yml
new file mode 100644
index 0000000..bd37783
--- /dev/null
+++ b/templates/MongoDB/1/docker-compose.yml
@@ -0,0 +1,35 @@
+mongo-cluster:
+ restart: always
+ environment:
+ MONGO_SERVICE_NAME: mongo-cluster
+ tty: true
+ entrypoint: /opt/rancher/bin/entrypoint.sh
+ command:
+ - --replSet
+ - "${replset_name}"
+ image: mongo:3.2
+ labels:
+ io.rancher.container.hostname_override: container_name
+ io.rancher.sidekicks: mongo-base, mongo-datavolume
+ volumes_from:
+ - mongo-datavolume
+ - mongo-base
+mongo-base:
+ restart: always
+ net: none
+ tty: true
+ labels:
+ io.rancher.container.hostname_override: container_name
+ io.rancher.container.start_once: true
+ image: rancher/mongodb-conf:v0.1.0
+ stdin_open: true
+ entrypoint: /bin/true
+mongo-datavolume:
+ net: none
+ labels:
+ io.rancher.container.hostname_override: container_name
+ io.rancher.container.start_once: true
+ volumes:
+ - /data/db
+ entrypoint: /bin/true
+ image: busybox
diff --git a/templates/MongoDB/1/rancher-compose.yml b/templates/MongoDB/1/rancher-compose.yml
new file mode 100644
index 0000000..f52c0cb
--- /dev/null
+++ b/templates/MongoDB/1/rancher-compose.yml
@@ -0,0 +1,19 @@
+.catalog:
+ name: "MongoDB"
+ version: "3.2-rancher1"
+ description: "MongoDB Replica Set"
+ uuid: mongodb-1
+ minimum_rancher_version: v0.46.0
+ questions:
+ - variable: replset_name
+ description: "Name of the MongoDB replicaSet"
+ label: "ReplicaSet Name"
+ type: "string"
+ required: true
+ default: "rs0"
+mongo-cluster:
+ scale: 3
+ metadata:
+ mongo:
+ yml:
+ replset.name: "${replset_name}"
diff --git a/templates/MongoDB/config.yml b/templates/MongoDB/config.yml
index de44927..eacc787 100644
--- a/templates/MongoDB/config.yml
+++ b/templates/MongoDB/config.yml
@@ -1,5 +1,5 @@
name: MongoDB
description: |
MongoDB Replica Set.
-version: 3.0.0-rancher1
+version: 3.2-rancher1
category: Database
diff --git a/templates/Prometheus/0/docker-compose.yml b/templates/Prometheus/0/docker-compose.yml
index 30aa44b..3872143 100644
--- a/templates/Prometheus/0/docker-compose.yml
+++ b/templates/Prometheus/0/docker-compose.yml
@@ -3,6 +3,7 @@ ranch-eye:
- 9104:9104/tcp
labels:
io.rancher.scheduler.global: 'true'
+ io.rancher.container.dns: true
tty: true
image: rucknar/ranch-eye:01
stdin_open: true
@@ -13,6 +14,7 @@ node-exporter:
- 9100:9100
labels:
io.rancher.scheduler.global: 'true'
+ io.rancher.container.dns: true
tty: true
image: prom/node-exporter:latest
stdin_open: true
@@ -20,16 +22,13 @@ node-exporter:
prom-conf:
tty: true
- labels:
- io.rancher.container.pull_image: always
- image: rucknar/prom-conf:02
- command: /bin/sh -c "/usr//bin/confd -onetime -backend rancher -prefix /2015-12-19 && cat"
+ image: rucknar/prom-conf:08
volumes:
- /etc/prom-conf/
prometheus:
tty: true
- image: prom/prometheus:latest
+ image: prom/prometheus:0.17.0
command: -alertmanager.url=http://alertmanager:9093 -config.file=/etc/prom-conf/prometheus.yml -storage.local.path=/prometheus -web.console.libraries=/etc/prometheus/console_libraries -web.console.templates=/etc/prometheus/consoles
ports:
- 9090:9090
@@ -42,15 +41,6 @@ prometheus:
- node-exporter:node-exporter
- rancher-api-integration:rancher-api-integration
-graf-db:
- tty: true
- image: rucknar/graf-db:01
- labels:
- io.rancher.container.pull_image: always
- command: cat
- volumes:
- - /var/lib/grafana/
-
influxdb:
image: tutum/influxdb:0.10
ports:
@@ -63,6 +53,13 @@ influxdb:
- GRAPHITE_DB=rancher
- GRAPHITE_BINDING=:2003
+graf-db:
+ tty: true
+ image: rucknar/graf-db:02
+ command: cat
+ volumes:
+ - /var/lib/grafana/
+
grafana:
tty: true
image: grafana/grafana:2.6.0
diff --git a/templates/Prometheus/0/rancher-compose.yml b/templates/Prometheus/0/rancher-compose.yml
index 04a5025..320097d 100644
--- a/templates/Prometheus/0/rancher-compose.yml
+++ b/templates/Prometheus/0/rancher-compose.yml
@@ -1,6 +1,6 @@
.catalog:
name: "Prometheus"
- version: "1.0.2"
+ version: "1.0.3"
description: "Prometheus Monitoring Solution"
uuid: prometheus-1
minimum_rancher_version: v0.56.0
diff --git a/templates/Prometheus/config.yml b/templates/Prometheus/config.yml
index 94a0411..77da5c2 100644
--- a/templates/Prometheus/config.yml
+++ b/templates/Prometheus/config.yml
@@ -1,5 +1,5 @@
name: Prometheus
description: |
Prometheus and friends, auto-discovering monitoring solution for Rancher deployments.
-version: 1.0.2
+version: 1.0.3
category: Monitoring
diff --git a/templates/alfresco/0/README.md b/templates/alfresco/0/README.md
new file mode 100644
index 0000000..0a9862e
--- /dev/null
+++ b/templates/alfresco/0/README.md
@@ -0,0 +1,33 @@
+# Alfresco
+
+### Note:
+
+If you can read French, you can look my [blog](https://blog.webcenter.fr) to look how to upgrade container after deployement for a production usage.
+
+### Info:
+
+This template deploys a collection of containers based upon the technologies below, once deployed you should have a
+ Electronic Document Management (EDM) plateform based on Alfresco.
+* **Alfresco** - Used to manage all aspect of EDM. (https://github.com/disaster37/rancher-alfresco)
+* **Postgresql** - It's the SGBD to store metadatas of your EDM. (https://github.com/docker-library/postgres)
+
+This template is just a base to test Alfresco. If you should use in production sky, You must upgrade it after install to setting it in your context (see all parameters you can use to set Alfresco on github). You must at minimal setting that :
+* **Volume** : You must mount a database volume and alfresco volume on storage pool (convoy-gluster is a good idea).
+ * For Postgresql `/var/lib/postgresql/data/pgdata`
+ * For Alfresco `/opt/alfresco/alf_data`
+* **Reverse Proxy / Load balancer** : You probably put load balancer like a endpoint for user. To do that, you must add extra parameter on your Alfresco container.
+ * **REVERSE_PROXY_URL** : put your url like `https://ged.my-domain.com`
+* **Mail setting** : There are a lot of parameter to set mail context.
+* **CIFS setting** : There are a lot of parameter to set CIFS context.
+* **LDAP authentification** : There are a lot of parameter to set LDAP authentification
+
+All components in this stack are open source tools available in the community. All this template does is to bound them together in an easy to use package.
+
+
+
+## Deployment:
+* Select Alfresco from the community catalog.
+* Click deploy.
+
+## Usage
+* Alfresco Share is now available on port 8080 with the following url `http://your_ip:8080/share`. Authentication is with the default `admin/admin`.
diff --git a/templates/alfresco/0/docker-compose.yml b/templates/alfresco/0/docker-compose.yml
new file mode 100644
index 0000000..b9c580c
--- /dev/null
+++ b/templates/alfresco/0/docker-compose.yml
@@ -0,0 +1,24 @@
+alfresco:
+ environment:
+ CIFS_ENABLED: 'false'
+ FTP_ENABLED: 'false'
+ labels:
+ io.rancher.container.pull_image: always'
+ tty: true
+ image: webcenter/rancher-alfresco:v5.1.0-2
+ links:
+ - postgres:db
+ stdin_open: true
+ ports:
+ - 8080:8080/tcp
+postgres:
+ environment:
+ PGDATA: /var/lib/postgresql/data/pgdata
+ POSTGRES_DB: ${database_name}
+ POSTGRES_PASSWORD: ${database_password}
+ POSTGRES_USER: ${database_user}
+ labels:
+ io.rancher.container.pull_image: always
+ tty: true
+ image: postgres:9.4
+ stdin_open: true
diff --git a/templates/alfresco/0/rancher-compose.yml b/templates/alfresco/0/rancher-compose.yml
new file mode 100644
index 0000000..7e1186a
--- /dev/null
+++ b/templates/alfresco/0/rancher-compose.yml
@@ -0,0 +1,45 @@
+.catalog:
+ name: "Alfresco"
+ version: "5.1.0"
+ description: "Alfresco Electronic Document Management"
+ uuid: alfresco-5.1.0-2
+ minimum_rancher_version: v0.56.0
+ questions:
+ - variable: database_name
+ description: "Name of the Alfresco database"
+ label: "Database name"
+ type: "string"
+ required: true
+ default: "alfresco"
+ - variable: database_user
+ description: "Login for the Alfresco database"
+ label: "Database login"
+ type: "string"
+ required: true
+ default: "alfresco"
+ - variable: database_password
+ description: "Password for the Alfresco database"
+ label: "Database password"
+ type: "string"
+ required: true
+ default: "alfresco"
+
+alfresco:
+ scale: 1
+ health_check:
+ port: 8080
+ interval: 5000
+ unhealthy_threshold: 3
+ strategy: recreate
+ healthy_threshold: 2
+ response_timeout: 5000
+
+postgres:
+ scale: 1
+ health_check:
+ port: 5432
+ interval: 5000
+ unhealthy_threshold: 3
+ strategy: recreate
+ response_timeout: 5000
+ healthy_threshold: 2
diff --git a/templates/alfresco/catalogIcon-alfresco.svg b/templates/alfresco/catalogIcon-alfresco.svg
new file mode 100644
index 0000000..278bd66
--- /dev/null
+++ b/templates/alfresco/catalogIcon-alfresco.svg
@@ -0,0 +1,21 @@
+
+
diff --git a/templates/alfresco/config.yml b/templates/alfresco/config.yml
new file mode 100644
index 0000000..4750406
--- /dev/null
+++ b/templates/alfresco/config.yml
@@ -0,0 +1,5 @@
+name: Alfresco
+description: |
+ Slef hosted your EDM with Alfresco on few seconds.
+version: 5.1.0
+category: EDM
diff --git a/templates/datadog/0/README.md b/templates/datadog/0/README.md
new file mode 100644
index 0000000..b141d24
--- /dev/null
+++ b/templates/datadog/0/README.md
@@ -0,0 +1,13 @@
+# DataDog Agent Service
+
+## Info
+Based on the official [Datadog Agent Docker image](github.com/DataDog/docker-dd-agent) with a few changes to the init script to better support the Rancher environment.
+
+## Notable Improvements
+* Hostname reported to DataDog is the actual name of the host (per Rancher Metadata service)
+* User can specify host labels which will be sent to DataDog as key:value tags for the host
+* User can either deploy the DogStat Agent globally on every host or deploy a single instance of a standalone DogStatsD
+* The later is useful if you just want a StatsD aggregator to which other services can send metrics
+
+[Github repository for the image](https://github.com/janeczku/dd-agent-rancher)
+[Docker Hub trusted image builds](https://hub.docker.com/r/janeczku/dd-agent-rancher)
diff --git a/templates/datadog/0/docker-compose.yml b/templates/datadog/0/docker-compose.yml
new file mode 100755
index 0000000..da22bbb
--- /dev/null
+++ b/templates/datadog/0/docker-compose.yml
@@ -0,0 +1,14 @@
+datadog-agent:
+ image: janeczku/dd-agent-rancher:11.0.563
+ restart: always
+ environment:
+ API_KEY: ${api_key}
+ DOGSTATSD_ONLY: ${statsd_standalone}
+ STATSD_METRIC_NAMESPACE: ${statsd_namespace}
+ HOST_LABELS: ${host_labels}
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock
+ - /proc/:/host/proc/:ro
+ - /sys/fs/cgroup/:/host/sys/fs/cgroup:ro
+ labels:
+ io.rancher.scheduler.global: ${global_service}
diff --git a/templates/datadog/0/rancher-compose.yml b/templates/datadog/0/rancher-compose.yml
new file mode 100755
index 0000000..fdf3fc9
--- /dev/null
+++ b/templates/datadog/0/rancher-compose.yml
@@ -0,0 +1,42 @@
+.catalog:
+ name: "DataDog"
+ version: "11.0.563-rancher1"
+ description: "Datadog Agent and DogStatsD"
+ minimum_rancher_version: v0.46.0
+ questions:
+ - variable: "api_key"
+ label: "DataDog Api Key"
+ description: "Your DataDog API key"
+ required: true
+ type: "string"
+ - variable: "host_labels"
+ label: "Host Labels to Tags"
+ description: |
+ Comma delimited list (no spaces) of host labels to set as DataDog key/value tags.
+ Example: 'provider,region'
+ required: false
+ type: "string"
+ - variable: "global_service"
+ label: "Global Service"
+ description: |
+ Enable this option to run an instance of the DataDog Agent on every host.
+ If you merely want a StatsD aggregator to which other services can send
+ metrics, then you may uncheck this and instead enable the Standalone mode.
+ required: true
+ type: "boolean"
+ default: true
+ - variable: "statsd_standalone"
+ label: "Standalone StatsD"
+ description: |
+ Enable this option to run only DogStatsD without the full Agent.
+ You can then send StatsD metrics to port 8125/udp of the service.
+ required: true
+ type: "boolean"
+ default: false
+ - variable: "statsd_namespace"
+ label: "StatsD Metric Namespace"
+ description: |
+ You may optionally set a namespace for all StatsD metrics aggregated by this service.
+ If set then 'metric.name' will become 'namespace.metric.name'.
+ required: false
+ type: "string"
diff --git a/templates/datadog/catalogIcon-datadog.svg b/templates/datadog/catalogIcon-datadog.svg
new file mode 100644
index 0000000..48947ad
--- /dev/null
+++ b/templates/datadog/catalogIcon-datadog.svg
@@ -0,0 +1,39 @@
+
+
+
\ No newline at end of file
diff --git a/templates/datadog/config.yml b/templates/datadog/config.yml
new file mode 100755
index 0000000..51d3baa
--- /dev/null
+++ b/templates/datadog/config.yml
@@ -0,0 +1,8 @@
+name: Datadog
+description: |
+ Datadog Agent and DogStatsD
+version: 11.0.563-rancher1
+category: Monitoring
+maintainer: "Jan Broer "
+license: The MIT License
+projectURL: http://www.github.com/janeczku/dd-agent-rancher
diff --git a/templates/gogs/0/docker-compose.yml b/templates/gogs/0/docker-compose.yml
new file mode 100644
index 0000000..cc95838
--- /dev/null
+++ b/templates/gogs/0/docker-compose.yml
@@ -0,0 +1,14 @@
+gogs:
+ image: gogs/gogs:latest
+ ports:
+ - ${http_port}:3000
+ - ${ssh_port}:22
+ links:
+ - mysql:db
+
+mysql:
+ image: mysql:latest
+ ports:
+ - ${public_port}:3306
+ environment:
+ MYSQL_ROOT_PASSWORD: ${mysql_password}
diff --git a/templates/gogs/0/rancher-compose.yml b/templates/gogs/0/rancher-compose.yml
new file mode 100644
index 0000000..7b5983b
--- /dev/null
+++ b/templates/gogs/0/rancher-compose.yml
@@ -0,0 +1,33 @@
+.catalog:
+ name: "Gogs"
+ version: "v0.8.43"
+ description: "A painless self-hosted Git service"
+ uuid: gogs-0
+ minimum_rancher_version: v0.51.0
+ questions:
+ - variable: public_port
+ description: "public port to access the mysql server"
+ label: "Public Port"
+ required: true
+ default: "3306"
+ type: "int"
+ - variable: http_port
+ description: "http port to access gogs webui"
+ label: "Http Port"
+ required: true
+ default: "10080"
+ type: "int"
+ - variable: ssh_port
+ description: "ssh port to access gogs cli"
+ label: "Ssh Port"
+ required: true
+ default: "222"
+ type: "int"
+ - variable: mysql_password
+ description: "mysql root password"
+ label: "Mysql Password"
+ required: true
+ default: "password"
+ type: "string"
+
+gogs:
diff --git a/templates/gogs/catalogIcon-gogs.png b/templates/gogs/catalogIcon-gogs.png
new file mode 100644
index 0000000..efc606b
Binary files /dev/null and b/templates/gogs/catalogIcon-gogs.png differ
diff --git a/templates/gogs/config.yml b/templates/gogs/config.yml
new file mode 100644
index 0000000..be2e008
--- /dev/null
+++ b/templates/gogs/config.yml
@@ -0,0 +1,5 @@
+name: Gogs
+description: |
+ A painless self-hosted Git service
+version: v0.8.43
+category: Git
diff --git a/templates/janitor/0/docker-compose.yml b/templates/janitor/0/docker-compose.yml
new file mode 100644
index 0000000..5cce2d9
--- /dev/null
+++ b/templates/janitor/0/docker-compose.yml
@@ -0,0 +1,15 @@
+cleanup:
+ image: meltwater/docker-cleanup:1.4.0
+ environment:
+ CLEAN_PERIOD: ${FREQUENCY}
+ DELAY_TIME: "900"
+ KEEP_IMAGES: ${KEEP}
+ labels:
+ io.rancher.scheduler.global: "true"
+ io.rancher.scheduler.affinity:host_label_ne: ${EXCLUDE_LABEL}
+ privileged: true
+ tty: true
+ stdin_open: true
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock
+ - /var/lib/docker:/var/lib/docker
diff --git a/templates/janitor/0/rancher-compose.yml b/templates/janitor/0/rancher-compose.yml
new file mode 100644
index 0000000..ca4ae8b
--- /dev/null
+++ b/templates/janitor/0/rancher-compose.yml
@@ -0,0 +1,25 @@
+.catalog:
+ name: "Janitor"
+ version: "v1.4.0"
+ description: "Docker cleanup"
+ uuid: janitor-0
+ questions:
+ - variable: "FREQUENCY"
+ label: "Frequency"
+ description: "Run the cleanup on a cycle of this many seconds"
+ default: 3600
+ required: true
+ type: "int"
+ - variable: "EXCLUDE_LABEL"
+ label: "Exclude label"
+ description: "Specify a Rancher host label here that will be used to determine on which hosts the container should not deploy."
+ default: janitor.exclude=true
+ required: true
+ type: "string"
+ - variable: "KEEP"
+ label: "Keep images"
+ description: "A comma separated list of images that should never be removed"
+ default: "rancher/agent:v0.8.2,rancher/agent-instance:v0.6.0"
+ required: false
+ type: "string"
+
diff --git a/templates/janitor/README.md b/templates/janitor/README.md
new file mode 100644
index 0000000..fdfb873
--- /dev/null
+++ b/templates/janitor/README.md
@@ -0,0 +1,17 @@
+# Janitor
+
+### Topology
+
+A Janitor instance will be started on every host that does not match the
+scheduling rule (default is `janitor.exclude=true`).
+
+### Operation
+
+This will run a task daily (by default) that will delete any unused
+image, and any orphaned volume. The rancher container images are excluded
+from the list of images to clean up, and you can add your own containers to
+the exclude list if you wish.
+
+This will halp to prevent the /var/lib/docker filesystem from filling up
+with old and unused container images.
+
diff --git a/templates/janitor/catalogIcon-janitor.svg b/templates/janitor/catalogIcon-janitor.svg
new file mode 100644
index 0000000..936390a
--- /dev/null
+++ b/templates/janitor/catalogIcon-janitor.svg
@@ -0,0 +1,31 @@
+
\ No newline at end of file
diff --git a/templates/janitor/config.yml b/templates/janitor/config.yml
new file mode 100644
index 0000000..aa8322e
--- /dev/null
+++ b/templates/janitor/config.yml
@@ -0,0 +1,7 @@
+name: Janitor
+description: |
+ Automatic cleanup of unused images on hosts, in order to save disk space.
+version: v1.4.0
+category: monitoring
+maintainer: Steve Shipway
+
diff --git a/templates/logspout/0/README.md b/templates/logspout/0/README.md
new file mode 100644
index 0000000..c985949
--- /dev/null
+++ b/templates/logspout/0/README.md
@@ -0,0 +1,14 @@
+# Add Logspout Stack
+
+Glider Labs Logspout with Logstash adapter
+
+### Info:
+
+For any services launched from the Rancher UI to use Logspout, please make sure to disable the '-t' [tty] option in the Advanced Options of the service definition.
+
+### Community Version
+
+This version adds the Environment option, where you can specify the name of the Environment.
+All Syslogs will then be sent with this as the Source Hostname rather than the hostname of
+the Docker Host on which the container is running.
+
diff --git a/templates/logspout/0/docker-compose.yml b/templates/logspout/0/docker-compose.yml
new file mode 100644
index 0000000..f6005e9
--- /dev/null
+++ b/templates/logspout/0/docker-compose.yml
@@ -0,0 +1,14 @@
+logspout:
+ restart: always
+ environment:
+ ROUTE_URIS: "${route_uri}"
+ LOGSPOUT: 'ignore'
+ SYSLOG_HOSTNAME: "${envname}"
+ volumes:
+ - '/var/run/docker.sock:/var/run/docker.sock'
+ labels:
+ io.rancher.scheduler.global: 'true'
+ io.rancher.container.hostname_override: container_name
+ tty: true
+ image: rancher/logspout-logstash:v0.2.0
+ stdin_open: true
diff --git a/templates/logspout/0/rancher-compose.yml b/templates/logspout/0/rancher-compose.yml
new file mode 100644
index 0000000..027a841
--- /dev/null
+++ b/templates/logspout/0/rancher-compose.yml
@@ -0,0 +1,33 @@
+.catalog:
+ name: Logspout
+ version: 0.2.0-1
+ description: |
+ Logspout is a log router for Docker containers. This community template
+ allows you to log against the Rancher Environment rather than the hostname for
+ easier analysis.
+ questions:
+ - variable: "route_uri"
+ label: "Logspout route for logs"
+ type: "string"
+ required: true
+ default: "syslog://syslog.example.com:514"
+ description: |
+ This will be the target where all logs are sent.
+ - variable: "envname"
+ label: "Environment"
+ type: "string"
+ required: true
+ default: "Rancher:"
+ description: |
+ This is the environment name, which will be used as the Hostname
+ label in Syslog instead of the Host or Container name.
+ - variable: "format"
+ label: "Format"
+ type: "enum"
+ options:
+ - "rfc5424"
+ - "rfc3164"
+ required: true
+ default: "rfc5424"
+ description: |
+ The Syslog format to use. If not certain, use rfc5424
diff --git a/templates/logspout/catalogIcon-gliderlabs.png b/templates/logspout/catalogIcon-gliderlabs.png
new file mode 100644
index 0000000..5858302
Binary files /dev/null and b/templates/logspout/catalogIcon-gliderlabs.png differ
diff --git a/templates/logspout/config.yml b/templates/logspout/config.yml
new file mode 100644
index 0000000..d066319
--- /dev/null
+++ b/templates/logspout/config.yml
@@ -0,0 +1,5 @@
+name: Logspout
+description: |
+ Glider Labs Logspout with Logstash adapter with extra options
+version: 0.2.0-1
+category: Logging
diff --git a/templates/minecraft/0/docker-compose.yml b/templates/minecraft/0/docker-compose.yml
new file mode 100644
index 0000000..b3420a2
--- /dev/null
+++ b/templates/minecraft/0/docker-compose.yml
@@ -0,0 +1,24 @@
+Minecraft:
+ environment:
+ EULA: ${EULA}
+ VERSION: ${VERSION}
+ DIFFICULTY: ${DIFFICULTY}
+ MODE: ${MODE}
+ PVP: ${PVP}
+ WHITELIST: ${WHITELIST}
+ OPS: ${OPS}
+ MOTD: ${MOTD}
+ SEED: ${SEED}
+ WORLD: ${WORLD}
+ tty: true
+ image: itzg/minecraft-server
+ stdin_open: true
+MinecraftLB:
+ ports:
+ - ${PORT}:25565/tcp
+ tty: true
+ image: rancher/load-balancer-service
+ links:
+ - Minecraft:Minecraft
+ stdin_open: true
+
diff --git a/templates/minecraft/0/rancher-compose.yml b/templates/minecraft/0/rancher-compose.yml
new file mode 100644
index 0000000..3511458
--- /dev/null
+++ b/templates/minecraft/0/rancher-compose.yml
@@ -0,0 +1,92 @@
+.catalog:
+ name: "Minecraft"
+ version: "v1.8"
+ description: "Minecraft server"
+ uuid: minecraft-0
+ questions:
+ - variable: "EULA"
+ label: "Accept EULA"
+ description: "Select TRUE to accept the Minecraft EULA"
+ required: true
+ type: "enum"
+ options:
+ - TRUE
+ - variable: "SCALE"
+ label: "Scale"
+ description: "How many servers to run"
+ default: 1
+ required: true
+ type: "int"
+ - variable: "PORT"
+ label: "Port number"
+ description: "On which port should the Load Balancer listen?"
+ default: 25565
+ required: true
+ type: "int"
+ - variable: "VERSION"
+ label: "Minecraft Version"
+ description: "Select the version of Minecraft server to run. Default is the latest available"
+ required: false
+ type: "enum"
+ default: LATEST
+ options:
+ - LATEST
+ - SNAPSHOT
+ - 1.8.9
+ - 1.7.10
+ - 1.6.4
+ - variable: "DIFFICULTY"
+ label: "Difficulty level"
+ description: "Select the Minecraft difficulty level. Default is normal"
+ default: normal
+ required: true
+ type: "enum"
+ options:
+ - peaceful
+ - easy
+ - normal
+ - hard
+ - variable: "MODE"
+ label: "Default game mode"
+ description: "Select the game mode to connect in. Default is survival"
+ default: survival
+ required: true
+ type: "enum"
+ options:
+ - survival
+ - creative
+ - adventure
+ - spectator
+ - variable: "PVP"
+ label: "PvP mode"
+ description: "Check here to enable PvP mode. Default is no PvP."
+ default: false
+ type: "boolean"
+ required: true
+ - variable: "MOTD"
+ label: "Description"
+ description: "Description string for Minecraft server"
+ default: "A Minecraft server powered by Docker"
+ type: "string"
+ required: true
+ - variable: "WHITELIST"
+ label: "Whitelist"
+ description: "Player names to whitelist, comma separated"
+ type: "string"
+ - variable: "OPS"
+ label: "Operators"
+ description: "Player names to give operator privileges, comma separated"
+ type: "string"
+ - variable: "SEED"
+ label: "Level seed"
+ description: "Optional level seed number for world generation"
+ type: "int"
+ - variable: "WORLD"
+ label: "World URL"
+ description: "URL to download zipped world directory"
+ type: "string"
+Minecraft:
+ scale: ${SCALE}
+MinecraftLB:
+ load_balancer_config: {}
+
diff --git a/templates/minecraft/README.md b/templates/minecraft/README.md
new file mode 100644
index 0000000..6f5352c
--- /dev/null
+++ b/templates/minecraft/README.md
@@ -0,0 +1,19 @@
+# Minecraft
+
+### Topology
+
+This will start up several Minecraft servers of the specified type. If no
+world seed is specified, then a random one will be used. A Load Balancer
+will be created over the top so that they can be accessed.
+
+The servers use ephemeral disk and so will not be persistent. You can also
+specify a URL from which to download an ZIP archive of a world save, which
+will be used in all containers.
+
+### Options
+
+You **must** accept the [EULA](https://account.mojang.com/documents/minecraft_eula) by selecting **TRUE** in the dropdown.
+
+You should specify a unique port number for the load balancers to listen on.
+
+The other options for the server may be left as their defaults.
diff --git a/templates/minecraft/catalogIcon-minecraft.svg b/templates/minecraft/catalogIcon-minecraft.svg
new file mode 100644
index 0000000..68f0e53
--- /dev/null
+++ b/templates/minecraft/catalogIcon-minecraft.svg
@@ -0,0 +1,367 @@
+
+
+
+
diff --git a/templates/minecraft/config.yml b/templates/minecraft/config.yml
new file mode 100644
index 0000000..f106ac5
--- /dev/null
+++ b/templates/minecraft/config.yml
@@ -0,0 +1,6 @@
+name: Minecraft
+description: |
+ Multiplayer block game for wasting lots of time
+version: v1.8
+category: entertainment
+maintainer: Steve Shipway
diff --git a/templates/registry/0/docker-compose.yml b/templates/registry/0/docker-compose.yml
new file mode 100644
index 0000000..dd53860
--- /dev/null
+++ b/templates/registry/0/docker-compose.yml
@@ -0,0 +1,99 @@
+db:
+ image: mysql:5.7.10
+ environment:
+ MYSQL_DATABASE: portus
+ MYSQL_ROOT_PASSWORD: ${ROOTPASSWORD}
+ MYSQL_USER: portus
+ MYSQL_PASSWORD: ${DBPASSWORD}
+ tty: true
+ stdin_open: true
+ volumes:
+ - ${DIR}/db:/var/lib/mysql
+sslproxy:
+ image: nginx:1.9.9
+ tty: true
+ stdin_open: true
+ links:
+ - portus:portus
+ volumes:
+ - ${DIR}/certs:/etc/nginx/certs:ro
+ - ${DIR}/proxy:/etc/nginx/conf.d:ro
+registry:
+ image: registry:2.1
+ environment:
+ REGISTRY_LOG_LEVEL: warn
+ REGISTRY_STORAGE_DELETE_ENABLED: true
+ REGISTRY_AUTH_TOKEN_REALM: https://${DOMAIN}:${PPORT}/v2/token
+ REGISTRY_AUTH_TOKEN_SERVICE: ${DOMAIN}:${RPORT}
+ REGISTRY_AUTH_TOKEN_ISSUER: ${DOMAIN}
+ REGISTRY_AUTH_TOKEN_ROOTCERTBUNDLE: /certs/registry.crt
+ REGISTRY_HTTP_TLS_CERTIFICATE: /certs/registry.crt
+ REGISTRY_HTTP_TLS_KEY: /certs/registry.key
+ REGISTRY_HTTP_SECRET: httpsecret
+ REGISTRY_NOTIFICATIONS_ENDPOINTS: >
+ - name: portus
+ url: http://portus:3000/v2/webhooks/events
+ timeout: 500
+ threshold: 5
+ backoff: 1
+ tty: true
+ stdin_open: true
+ links:
+ - portus:portus
+ volumes:
+ - ${DIR}/certs:/certs:ro
+ - ${DIR}/data:/var/lib/registry
+lb:
+ image: rancher/load-balancer-service
+ tty: true
+ stdin_open: true
+ ports:
+ - ${RPORT}:5000/tcp
+ - ${PPORT}:443/tcp
+ labels:
+ io.rancher.loadbalancer.target.sslproxy: ${PPORT}=443
+ io.rancher.loadbalancer.target.registry: ${RPORT}=5000
+ io.rancher.scheduler.global: 'true'
+ io.rancher.scheduler.affinity:not_host_label: lb=0
+ links:
+ - registry:registry
+ - sslproxy:sslproxy
+portus:
+ image: sshipway/portus:2.0.3
+ environment:
+ PORTUS_MACHINE_FQDN: ${DOMAIN}
+ PORTUS_PRODUCTION_HOST: db
+ PORTUS_PRODUCTION_DATABASE: portus
+ PORTUS_PRODUCTION_USERNAME: portus
+ PORTUS_PRODUCTION_PASSWORD: ${DBPASSWORD}
+ PORTUS_GRAVATAR_ENABLED: true
+ PORTUS_KEY_PATH: /certs/registry.key
+ PORTUS_PASSWORD: ${DBPASSWORD}
+ PORTUS_SECRET_KEY_BASE: ${ROOTPASSWORD}
+ PORTUS_CHECK_SSL_USAGE_ENABLED: true
+ PORTUS_SMTP_ENABLED: false
+ PORTUS_LDAP_ENABLED: ${LDAP}
+ PORTUS_LDAP_HOSTNAME: ${LDAPHOST}
+ PORTUS_LDAP_PORT: ${LDAPPORT}
+ PORTUS_LDAP_METHOD: ${LDAPTLS}
+ PORTUS_LDAP_BASE: ${LDAPBASE}
+ PORTUS_LDAP_UID: cn
+ PORTUS_LDAP_AUTHENTICATION_ENABLED: ${LDAPBIND}
+ PORTUS_LDAP_AUTHENTICATION_BIND_DN: ${LDAPBINDDN}
+ PORTUS_LDAP_AUTHENTICATION_PASSWORD: ${LDAPBINDPASS}
+ PORTUS_LDAP_GUESS_EMAIL_ENABLED: true
+ PORTUS_LDAP_GUESS_EMAIL_ATTR: mail
+ PORTUS_PORT: ${PPORT}
+ REGISTRY_SSL_ENABLED: true
+ REGISTRY_HOSTNAME: ${DOMAIN}
+ REGISTRY_PORT: ${RPORT}
+ REGISTRY_NAME: Registry
+ tty: true
+ stdin_open: true
+ volumes:
+ - ${DIR}/certs:/certs
+ - ${DIR}/proxy:/etc/nginx/conf.d
+ links:
+ - db:db
+ labels:
+ io.rancher.container.pull_image: always
diff --git a/templates/registry/0/rancher-compose.yml b/templates/registry/0/rancher-compose.yml
new file mode 100644
index 0000000..2634876
--- /dev/null
+++ b/templates/registry/0/rancher-compose.yml
@@ -0,0 +1,109 @@
+.catalog:
+ name: "Registry"
+ version: "v2.1.0-2.0"
+ description: "Docker Registry"
+ uuid: registry-2
+ questions:
+ - variable: "RPORT"
+ label: "Registry Port"
+ description: "Port on which to run the registry service"
+ default: 5000
+ required: true
+ type: "int"
+ - variable: "PPORT"
+ label: "Admin Port"
+ description: "Port on which to run the SSL Portus administration service and API"
+ default: 443
+ required: true
+ type: "int"
+ - variable: "DBPASSWORD"
+ label: "DB Password"
+ description: "Password for Portus database access, must be 8 characters or longer"
+ required: true
+ default: password
+ type: "password"
+ - variable: "ROOTPASSWORD"
+ label: "DB Root Password"
+ description: "Root Password for MySQL database, must be 8 characters or longer. This is not normally used."
+ required: true
+ default: password
+ type: "password"
+ - variable: "DIR"
+ label: "Storage directory"
+ description: "Path of shared storage to use for registry, database, and certificates. This should be available on all hosts"
+ required: true
+ type: "string"
+ - variable: "DOMAIN"
+ label: "FQDN"
+ description: "FQDN of server. This should be the CN in the certificates and will be the URL to contact the Registry and Web interface"
+ required: true
+ type: "string"
+ - variable: "LDAP"
+ label: "LDAP Enabled"
+ description: "Enable LDAP authentication"
+ required: true
+ default: false
+ type: "boolean"
+ - variable: "LDAPHOST"
+ label: "LDAP Server"
+ description: "The FQDN of the LDAP server (if LDAP authentication is being used)"
+ required: false
+ default: "ldap.company.com"
+ type: "string"
+ - variable: "LDAPPORT"
+ label: "LDAP Server port"
+ description: "The port number on the LDAP server (if LDAP authentication is being used)"
+ required: false
+ default: 389
+ type: "int"
+ - variable: "LDAPTLS"
+ label: "LDAP TLS"
+ description: "The TLS option for the LDAP server (if LDAP authentication is being used)"
+ required: false
+ default: "starttls"
+ type: "enum"
+ options:
+ - starttls
+ - simple_tls
+ - plain
+ - variable: "LDAPBASE"
+ label: "LDAP Base DN"
+ description: "The Base DN for User lookups on the LDAP server (if LDAP authentication is being used)"
+ required: false
+ default: "ou=People,dc=company,dc=com"
+ type: "string"
+ - variable: "LDAPBIND"
+ label: "LDAP Bind enabled"
+ description: "Should an authenticated Bind be used to access LDAP (if LDAP authentication is being used)"
+ required: false
+ default: false
+ type: "boolean"
+ - variable: "LDAPBINDDN"
+ label: "LDAP Bind DN"
+ description: "The DN to use for binding to the LDAP server (if LDAP authentication is being used with Bind enabled)"
+ required: false
+ default: "ou=portus,dc=company,dc=com"
+ type: "string"
+ - variable: "LDAPBINDPASS"
+ label: "LDAP Bind Password"
+ description: "The password to use for binding to the LDAP server (if LDAP authentication is being used with Bind enabled)"
+ required: false
+ default: "password"
+ type: "password"
+db:
+ scale: 1
+sslproxy:
+ scale: 1
+lb:
+ load_balancer_config:
+ haproxy_config: {}
+ health_check:
+ port: 42
+ interval: 2000
+ unhealthy_threshold: 3
+ healthy_threshold: 2
+ response_timeout: 2000
+registry:
+ scale: 1
+portus:
+ scale: 1
diff --git a/templates/registry/README.md b/templates/registry/README.md
new file mode 100644
index 0000000..7a0165f
--- /dev/null
+++ b/templates/registry/README.md
@@ -0,0 +1,79 @@
+# Registry
+
+This catalogue item consists of a Registry, and the Portus web UI for
+authentication. There is also a MySQL database for storage, and a nginx
+proxy to provide SSL for the web frontend.
+
+A directory path is required for storage of the Registry data, Database,
+Certificates and generated Nginx configuration files. If you have
+multiple Hosts then this needs to be a shared mount across all Hosts which
+will run any of these containers.
+
+If no certificates are provided in the /certs directory, then the system
+will generate self-signed SSL certificates to use.
+
+Note that the containers will take a significant amount of time to initialse after
+they are started. You may need to wait 15 minutes for the Portus instance
+to finally spot the registry instance and perform its first synchronisation,
+after which the web interface will come online.
+
+## Backing Store
+
+A persistent shared filesystem is required to host the Registry, and also the
+MySQL database. This will also hold the certificates under certs/server.crt
+and certs/server.key; if no certificate is present, then a self-signed
+certificate will be created (valid for one year only) that can later be
+replaced.
+
+## LDAP Authentication
+
+If you enable LDAP authentication, then this will be used for both the
+Web interface and for Registry authentication. The LDAP configuration
+may optionally have authenticated Bind credentials, and TLS options.
+
+## Security
+
+All connections are protected by SSL. A self-signed certificate is
+automatically generated as certs/server.crt and certs/server.key in
+the persistent shared storage; this can be replaced if necessary.
+
+The certificate is used for registry access, for web admin access,
+and for signing API access keys.
+
+Registry access is controlled by the same user access as the web interface;
+so if you link to LDAP then this will also lock the Registry access.
+
+If not using LDAP, then the 'portus' use password is the Database Password
+as defined in the template options.
+
+## Access
+
+The template will create a Load Balancer for access to the Registry and
+to the Web Admin interface. This will run on all Hosts with the label
+LB=1, listening on the defined ports.
+
+To access the web UI, use https on the hostname and port you configured.
+
+To upload to the repository, use an SSL connection to the hostname and
+registry port you configured.
+
+## Administration
+
+The first user to log in to the web interface will be granted Admin
+privileges.
+
+## Synchronisation with Registry
+
+The Web interface will be initially configured to use the incorporated
+registry. A periodic synchronisation task and the upload webhook will
+ensure they are in synch. If, for some reason, your registry already
+has items (for example, if you are recreating the stack on preexisting
+shared storage) then it may take up to 5min for the Portus Web UI to
+synchronise the registry content to its database.
+
+## Feedback
+
+This is a complex setup, and uses a custom build of the Portus container,
+which is not yet available as an official release. You may need to
+customise this heavily for your own site. Any feedback can
+be logged against https://github.com/sshipway/Portus
diff --git a/templates/registry/catalogIcon-registry.svg b/templates/registry/catalogIcon-registry.svg
new file mode 100644
index 0000000..557f9ca
--- /dev/null
+++ b/templates/registry/catalogIcon-registry.svg
@@ -0,0 +1,201 @@
+
+
+
+
+
+
+
+
+
+
+
+]>
+
diff --git a/templates/registry/config.yml b/templates/registry/config.yml
new file mode 100644
index 0000000..b48856a
--- /dev/null
+++ b/templates/registry/config.yml
@@ -0,0 +1,7 @@
+name: Registry
+description: |
+ Secure Docker registry. Web based administration. Optional LDAP authentication.
+version: v2.1.0-2.0
+category: Applications
+maintainer: Steve Shipway
+