Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
maystery committed Oct 16, 2020
2 parents 330d8de + 30a4dac commit 961722b
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion sphinx/source/tutorial-building-clusters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This tutorial sets up a complete Docker infrastructure with Swarm, Docker and Co
**Prerequisites**

- accessing an Occopus compatible interface
- target cloud contains an Ubuntu 14.04 image with cloud-init support
- target cloud contains an Ubuntu 18.04 image with cloud-init support

**Download**

Expand Down
4 changes: 2 additions & 2 deletions sphinx/source/tutorial-resource-plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ You can download the example as `tutorial.examples.nova-helloworld <https://raw.

.. important::

You can get help on collecting identifiers for the resources section at `this page <createinfra.html#collecting-resource-attributes>`__ ! Alternatively, detailed explanation can be found at the :ref:`node definition's resource section <userdefinitionresourcesection>` of the User Guide.
You can get help on collecting identifiers for the resources section at :ref:`this page <collect_openstack_horizon>` ! Alternatively, detailed explanation can be found at the :ref:`node definition's resource section <userdefinitionresourcesection>` of the User Guide.

.. code:: yaml
Expand Down Expand Up @@ -378,7 +378,7 @@ You can download the example as `tutorial.examples.nova-ping <https://raw.github

.. important::

You can get help on collecting identifiers for the resources section at :ref:`this page <collect_amazon>` ! Alternatively, detailed explanation can be found at the :ref:`node definition's resource section <userdefinitionresourcesection>` of the User Guide.
You can get help on collecting identifiers for the resources section at :ref:`this page <collect_openstack_horizon>` ! Alternatively, detailed explanation can be found at the :ref:`node definition's resource section <userdefinitionresourcesection>` of the User Guide.

.. code:: yaml
Expand Down
Binary file modified tutorials/docker-swarm.tar.gz
Binary file not shown.
2 changes: 2 additions & 0 deletions tutorials/docker-swarm/infra-docker-swarm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ nodes:
type: dockerswarm_worker_node
scaling:
min: 2
variables:
DOCKER_VERSION: 5:19.03.13~3-0~ubuntu-bionic

dependencies:
- [ *W, *M ]
16 changes: 9 additions & 7 deletions tutorials/docker-swarm/nodes/cloud_init_master_node.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#cloud-config

runcmd:
- export DEBIAN_FRONTEND=noninteractive
- apt-get update
- apt-get install -y --no-install-recommends linux-image-extra-$(uname -r) linux-image-extra-virtual apt-transport-https ca-certificates curl software-properties-common
- echo deb http://apt.dockerproject.org/repo ubuntu-trusty main > /etc/apt/sources.list.d/docker.list
- curl -fsSL https://apt.dockerproject.org/gpg | apt-key add -
- add-apt-repository "deb https://apt.dockerproject.org/repo/ ubuntu-$(lsb_release -cs) main"
- apt-get install -y --no-install-recommends apt-transport-https ca-certificates curl gnupg-agent software-properties-common
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
- add-apt-repository "deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- apt-get update
- apt-get install -y docker-engine
- echo "DOCKER_OPTS='-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock'" > /etc/default/docker
- service docker restart
- apt-get install -y docker-ce={{variables.DOCKER_VERSION}} docker-ce-cli={{variables.DOCKER_VERSION}} containerd.io
- mkdir -p /etc/systemd/system/docker.service.d
- printf "[Service]\nExecStart=\nExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375\n" | sudo tee /etc/systemd/system/docker.service.d/override.conf
- systemctl daemon-reload
- systemctl restart docker
- export IP=$(hostname --ip-address)
- docker swarm init --advertise-addr=$IP
10 changes: 5 additions & 5 deletions tutorials/docker-swarm/nodes/cloud_init_worker_node.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#cloud-config

runcmd:
- export DEBIAN_FRONTEND=noninteractive
- apt-get update
- apt-get install -y --no-install-recommends linux-image-extra-$(uname -r) linux-image-extra-virtual apt-transport-https ca-certificates curl software-properties-common
- echo deb http://apt.dockerproject.org/repo ubuntu-trusty main > /etc/apt/sources.list.d/docker.list
- curl -fsSL https://apt.dockerproject.org/gpg | apt-key add -
- add-apt-repository "deb https://apt.dockerproject.org/repo/ ubuntu-$(lsb_release -cs) main"
- apt-get install -y --no-install-recommends apt-transport-https ca-certificates curl gnupg-agent software-properties-common
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
- add-apt-repository "deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- apt-get update
- apt-get install -y docker-engine
- apt-get install -y docker-ce={{variables.DOCKER_VERSION}} docker-ce-cli={{variables.DOCKER_VERSION}} containerd.io
- wget --retry-connrefused -qO /tmp/swarm_join {{getip('master')}}:2375/v1.26/swarm
- export TOKEN=$(grep -Eo 'SWMTKN-[[:alnum:]]*-[[:alnum:]]*-[[:alnum:]]*' /tmp/swarm_join | head -1)
- docker swarm join --token $TOKEN {{getip('master')}}:2377

0 comments on commit 961722b

Please sign in to comment.