Setting up a Swarm cluster with Docker Machine and AWS CLI

We'll continue using the vfarcic/cloud-provisioning ( repository. It contains configurations and scripts that'll help us out. You already have it cloned. To be on the safe side, we'll pull the latest version:

cd cloud-provisioninggit pull

Let's create the first EC2 instance:

docker-machine create \    --driver amazonec2 \    --amazonec2-zone ${AWS_ZONE[1]} \    --amazonec2-tags "Type,manager" \    swarm-1

We specified that the Docker Machine should use the amazonec2 driver to create an instance in the zone we defined as the environment variable AWS_ZONE_1.

We made a tag with the key type and the value manager. Tag are mostly for informational ...

Get The DevOps 2.1 Toolkit: Docker Swarm now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.