diff --git a/infra-templates/mesos/0/docker-compose.yml b/infra-templates/mesos/0/docker-compose.yml new file mode 100644 index 0000000..bf4c5c7 --- /dev/null +++ b/infra-templates/mesos/0/docker-compose.yml @@ -0,0 +1,48 @@ +zookeeper: + image: rancher/zookeeper:3.4.8 + environment: + ZK_ENSEMBLE_SIZE: 3 + JVMFLAGS: -Xmx512m -Xms512m + CONFD_INTERVAL: 0 + labels: + io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.sidekicks: zookeeper-data + volumes_from: + - zookeeper-data +zookeeper-data: + image: busybox + entrypoint: /bin/true + labels: + io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.start_once: 'true' + net: none + volumes: + - /data +mesos-master: + image: rancher/mesos-master:latest + environment: + MESOS_CLUSTER: Rancher + MESOS_QUORUM: 2 + MASTER_PORT: 5050 + ZK_SERVICE: Mesos/zookeeper + ZK_SESSION_TIMEOUT: 10secs + ports: + - "5050:5050" + labels: + io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + volumes: + - /data +mesos-slave: + image: rancher/mesos-slave:latest + environment: + SLAVE_PORT: 5051 + ZK_SERVICE: Mesos/zookeeper + ports: + - "5051:5051" + labels: + io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.scheduler.global: "true" + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /data + privileged: true diff --git a/infra-templates/mesos/0/rancher-compose.yml b/infra-templates/mesos/0/rancher-compose.yml new file mode 100644 index 0000000..c1308eb --- /dev/null +++ b/infra-templates/mesos/0/rancher-compose.yml @@ -0,0 +1,31 @@ +.catalog: + version: v0.28.0 + minimum_rancher_version: 1.2.0-pre4-rc1 +zookeeper: + scale: 3 + retain_ip: true + health_check: + port: 2181 + interval: 5000 + unhealthy_threshold: 3 + request_line: '' + healthy_threshold: 2 + response_timeout: 5000 +mesos-master: + scale: 3 + retain_ip: true + health_check: + port: 5050 + interval: 3000 + unhealthy_threshold: 2 + healthy_threshold: 2 + request_line: '/metrics/snapshot' + response_timeout: 2000 +mesos-slave: + health_check: + port: 5051 + interval: 5000 + unhealthy_threshold: 2 + healthy_threshold: 2 + request_line: '' + response_timeout: 3000 diff --git a/infra-templates/mesos/catalogIcon-mesos.svg b/infra-templates/mesos/catalogIcon-mesos.svg new file mode 100644 index 0000000..eb0e3d8 --- /dev/null +++ b/infra-templates/mesos/catalogIcon-mesos.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/infra-templates/mesos/config.yml b/infra-templates/mesos/config.yml new file mode 100644 index 0000000..68f8324 --- /dev/null +++ b/infra-templates/mesos/config.yml @@ -0,0 +1,3 @@ +name: Mesos +version: v0.28.0 +category: Orchestration diff --git a/infra-templates/swarm/0/docker-compose.yml b/infra-templates/swarm/0/docker-compose.yml new file mode 100644 index 0000000..9fcbc85 --- /dev/null +++ b/infra-templates/swarm/0/docker-compose.yml @@ -0,0 +1,23 @@ +version: '2' +services: + swarmkit-mon: + image: llparse/swarmkit:v1.12-4 + environment: + MANAGER_SCALE: ${MANAGER_SCALE} + labels: + io.rancher.container.agent.role: environment + io.rancher.container.create_agent: 'true' + io.rancher.container.dns: 'true' + io.rancher.container.pull_image: always + io.rancher.scheduler.affinity:host_label: io.rancher.host.docker_version=1.12 + io.rancher.scheduler.global: 'true' + network_mode: host + privileged: true + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /var/lib/rancher/state:/var/lib/rancher/state + logging: + driver: json-file + options: + max-size: 25m + max-file: '2' diff --git a/infra-templates/swarm/0/rancher-compose.yml b/infra-templates/swarm/0/rancher-compose.yml new file mode 100644 index 0000000..30b5446 --- /dev/null +++ b/infra-templates/swarm/0/rancher-compose.yml @@ -0,0 +1,24 @@ +.catalog: + version: v1.12-rancher0 + minimum_rancher_version: 1.2.0-pre4-rc1 + questions: + - variable: MANAGER_SCALE + label: Number of Managers + description: Desired number of managers to participating in service orchestration. This dictates host resilience. + required: true + default: 3 + type: enum + options: + - 1 + - 3 + - 5 + - 7 + - 9 +swarmkit-mon: + health_check: + request_line: GET /ping HTTP/1.0 + port: 2378 + interval: 15000 + response_timeout: 10000 + healthy_threshold: 1 + unhealthy_threshold: 2 diff --git a/infra-templates/swarm/README.md b/infra-templates/swarm/README.md new file mode 100644 index 0000000..614a4d1 --- /dev/null +++ b/infra-templates/swarm/README.md @@ -0,0 +1,20 @@ +## Prerequisites + +* Port `2377` and `2378` must be open +* Docker v1.12.1 installed + +SwarmKit's overlay network configuration must determine which interface will be used for cross-host communication. By default, Rancher routes traffic over public IP addresses. Swarm can't always detect the corresponding interface; you may need to do one of the following: + +* Register hosts with CATTLE_AGENT_IP environment variable set to a system address +* Specify the host interface for Swarm to listen on (hosts must have the same interface name) + +## Features + +* Automatically scale up/down a Swarm by adding/removing hosts to an environment + * Do not attempt to run `docker swarm` commands manually +* Configurable number of managers tunable to desired [failure tolerance](https://docs.docker.com/engine/swarm/admin_guide/#/add-manager-nodes-for-fault-tolerance) +* Reconciliation logic promotes/demotes managers/workers to maintain resilience + +## Limitations + +* Swarm over public networks is not supported in Docker 1.12.3 and older \ No newline at end of file diff --git a/infra-templates/swarm/catalogIcon-swarm.svg b/infra-templates/swarm/catalogIcon-swarm.svg new file mode 100644 index 0000000..9e51aa8 --- /dev/null +++ b/infra-templates/swarm/catalogIcon-swarm.svg @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/infra-templates/swarm/config.yml b/infra-templates/swarm/config.yml new file mode 100644 index 0000000..31c8ff0 --- /dev/null +++ b/infra-templates/swarm/config.yml @@ -0,0 +1,5 @@ +name: SwarmKit +description: > + A toolkit for orchestrating distributed systems at any scale +version: v1.12-rancher0 +category: Orchestration