From 682fc4f884f5f3a8a33033e311c73d31d1bd357a Mon Sep 17 00:00:00 2001 From: James Oliver Date: Wed, 25 Jan 2017 16:12:27 -0700 Subject: [PATCH 1/2] baseline --- infra-templates/swarm/3/docker-compose.yml | 23 ++++++++++++++++++++ infra-templates/swarm/3/rancher-compose.yml | 24 +++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 infra-templates/swarm/3/docker-compose.yml create mode 100644 infra-templates/swarm/3/rancher-compose.yml diff --git a/infra-templates/swarm/3/docker-compose.yml b/infra-templates/swarm/3/docker-compose.yml new file mode 100644 index 0000000..7003e81 --- /dev/null +++ b/infra-templates/swarm/3/docker-compose.yml @@ -0,0 +1,23 @@ +version: '2' +services: + swarmkit-mon: + image: rancher/swarmkit:v1.12.3-3 + 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/3/rancher-compose.yml b/infra-templates/swarm/3/rancher-compose.yml new file mode 100644 index 0000000..578c2f2 --- /dev/null +++ b/infra-templates/swarm/3/rancher-compose.yml @@ -0,0 +1,24 @@ +.catalog: + version: v1.12.3-3 + minimum_rancher_version: 1.2.2 + 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 From 76fbc95f97adfd2deb0af1c7971c597324d42ab6 Mon Sep 17 00:00:00 2001 From: James Oliver Date: Wed, 25 Jan 2017 16:15:42 -0700 Subject: [PATCH 2/2] bump template/image/affinity version --- infra-templates/swarm/{ => 0}/README.md | 0 infra-templates/swarm/1/README.md | 16 ++++++++++++++++ infra-templates/swarm/2/README.md | 16 ++++++++++++++++ infra-templates/swarm/3/README.md | 12 ++++++++++++ infra-templates/swarm/3/docker-compose.yml | 4 ++-- infra-templates/swarm/3/rancher-compose.yml | 2 +- infra-templates/swarm/config.yml | 2 +- 7 files changed, 48 insertions(+), 4 deletions(-) rename infra-templates/swarm/{ => 0}/README.md (100%) create mode 100644 infra-templates/swarm/1/README.md create mode 100644 infra-templates/swarm/2/README.md create mode 100644 infra-templates/swarm/3/README.md diff --git a/infra-templates/swarm/README.md b/infra-templates/swarm/0/README.md similarity index 100% rename from infra-templates/swarm/README.md rename to infra-templates/swarm/0/README.md diff --git a/infra-templates/swarm/1/README.md b/infra-templates/swarm/1/README.md new file mode 100644 index 0000000..15878fa --- /dev/null +++ b/infra-templates/swarm/1/README.md @@ -0,0 +1,16 @@ +## Prerequisites + +* Docker v1.12.1 to v1.12.3 +* Port `2377` and `2378` must be open +* Hosts are registered with `-e CATTLE_AGENT_IP=` flag (IP address must be a system address) + +## Features + +* Automatically scale up/down a Swarm by adding/removing hosts to/from an environment + * Please do not attempt to run `docker swarm` commands manually +* Configurable number of managers tunable to desired [fault tolerance](https://docs.docker.com/engine/swarm/admin_guide/#/add-manager-nodes-for-fault-tolerance) + * Reconciliation promotes/demotes managers/workers to maintain fault tolerance + +## Limitations + +* Swarm over public networks is not supported in Docker 1.12.3 and earlier diff --git a/infra-templates/swarm/2/README.md b/infra-templates/swarm/2/README.md new file mode 100644 index 0000000..15878fa --- /dev/null +++ b/infra-templates/swarm/2/README.md @@ -0,0 +1,16 @@ +## Prerequisites + +* Docker v1.12.1 to v1.12.3 +* Port `2377` and `2378` must be open +* Hosts are registered with `-e CATTLE_AGENT_IP=` flag (IP address must be a system address) + +## Features + +* Automatically scale up/down a Swarm by adding/removing hosts to/from an environment + * Please do not attempt to run `docker swarm` commands manually +* Configurable number of managers tunable to desired [fault tolerance](https://docs.docker.com/engine/swarm/admin_guide/#/add-manager-nodes-for-fault-tolerance) + * Reconciliation promotes/demotes managers/workers to maintain fault tolerance + +## Limitations + +* Swarm over public networks is not supported in Docker 1.12.3 and earlier diff --git a/infra-templates/swarm/3/README.md b/infra-templates/swarm/3/README.md new file mode 100644 index 0000000..4cf94dd --- /dev/null +++ b/infra-templates/swarm/3/README.md @@ -0,0 +1,12 @@ +## Prerequisites + +* Docker 1.13.x +* Port `2377` and `2378` must be open + +## Features + +* Automatically scale up/down a Swarm by adding/removing hosts to/from an environment + * Please do not attempt to run `docker swarm` commands manually +* Configurable number of managers tunable to desired [fault tolerance](https://docs.docker.com/engine/swarm/admin_guide/#/add-manager-nodes-for-fault-tolerance) + * Reconciliation promotes/demotes managers/workers to maintain fault tolerance + diff --git a/infra-templates/swarm/3/docker-compose.yml b/infra-templates/swarm/3/docker-compose.yml index 7003e81..496813f 100644 --- a/infra-templates/swarm/3/docker-compose.yml +++ b/infra-templates/swarm/3/docker-compose.yml @@ -1,7 +1,7 @@ version: '2' services: swarmkit-mon: - image: rancher/swarmkit:v1.12.3-3 + image: rancher/swarmkit:v1.13-1 environment: MANAGER_SCALE: ${MANAGER_SCALE} labels: @@ -9,7 +9,7 @@ services: 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.affinity:host_label: io.rancher.host.docker_version=1.13 io.rancher.scheduler.global: 'true' network_mode: host privileged: true diff --git a/infra-templates/swarm/3/rancher-compose.yml b/infra-templates/swarm/3/rancher-compose.yml index 578c2f2..e02b0ab 100644 --- a/infra-templates/swarm/3/rancher-compose.yml +++ b/infra-templates/swarm/3/rancher-compose.yml @@ -1,5 +1,5 @@ .catalog: - version: v1.12.3-3 + version: v1.13-beta.1 minimum_rancher_version: 1.2.2 questions: - variable: MANAGER_SCALE diff --git a/infra-templates/swarm/config.yml b/infra-templates/swarm/config.yml index 19cfdae..4e5b3be 100644 --- a/infra-templates/swarm/config.yml +++ b/infra-templates/swarm/config.yml @@ -1,5 +1,5 @@ name: SwarmKit description: > A toolkit for orchestrating distributed systems at any scale -version: v1.12.3-3 +version: v1.13-beta.1 category: Orchestration