In this guide you will learn how to quickly deploy a cluster of servers running Flocker and Docker Swarm. You will launch four EC2 instances in your AWS account, as illustrated below:
Follow the steps below to create your cluster. Once it’s up and running we’ll guide you through a tutorial to deploy a sample app.
The AWS Key Pair allows you to login to your AWS cluster securely.
Log in to AWS
This button will open AWS in a new window.
Start CloudFormation Configuration Process
This button will open CloudFormation in a new window.
Stack name
. This can be any descriptive name.
KeyPair
name from Step 1. Then enter your AWS AccessKeyID
and SecretAccessKey
credentials.
<YourToken>
part from {"token": "<YourToken>"}
into the VolumeHubToken
field.It will take 5-10 minutes for the cluster servers to boot and to configure the Flocker and Docker Swarm services on each server.
Click on the "Outputs" tab for your stack. The values displayed on this tab will be used for verifying your installation and also any tutorials you go through.
Now open a Terminal window, and run the following commands to log in and verify your cluster is working.
Where a command includes a string like <ClientNodeIP>
, use the corresponding value from the Outputs tab.
Where a command has <KeyPath>
use the path on your machine to the .pem
file you downloaded in Step 1, for example: ~/Downloads/<username>-flocker-test.pem
.
chmod 0600 <KeyPath> ssh -i <KeyPath> ubuntu@<ClientNodeIP> # enter "yes" if prompted export FLOCKER_CERTS_PATH=/etc/flocker export FLOCKER_USER=user1 export FLOCKER_CONTROL_SERVICE=<ControlNodeIP> # not ClientNodeIP! flockerctl status # should list two servers (nodes) running flockerctl ls # should display no datasets yet export DOCKER_TLS_VERIFY=1 export DOCKER_HOST=tcp://<ControlNodeIP>:2376 docker info |grep Nodes # should output "Nodes: 2" exit
If the commands succeeded, then your Flocker and Docker Swarm cluster is up and running.
You can also verify that your cluster has shown up in the Volume Hub:
Volume Hub
It should look like this:
Your cluster is now ready. Now try a tutorial.
Deploy an app on your Swarm/Flocker cluster