Skip to content

Instantly share code, notes, and snippets.

@moul
Last active May 6, 2016 21:22
Show Gist options
  • Save moul/b8f604cac878a494dde123dc02d1863f to your computer and use it in GitHub Desktop.
Save moul/b8f604cac878a494dde123dc02d1863f to your computer and use it in GitHub Desktop.
start-swarm-cluster.md
+ docker-machine create -d scaleway --swarm --swarm-master --scaleway-name=swarm-manager --swarm-discovery=token://2f6677fde632b8999e880f560e1607b6 swarm-manager
+ docker-machine create -d scaleway --swarm --scaleway-name=swarm-node-1 --swarm-discovery=token://2f6677fde632b8999e880f560e1607b6 swarm-node-1
+ docker-machine create -d scaleway --swarm --scaleway-name=swarm-node-2 --swarm-discovery=token://2f6677fde632b8999e880f560e1607b6 swarm-node-2
+ docker-machine create -d scaleway --swarm --scaleway-name=swarm-node-3 --swarm-discovery=token://2f6677fde632b8999e880f560e1607b6 swarm-node-3
Running pre-create checks...
Running pre-create checks...
Running pre-create checks...
Running pre-create checks...
Creating machine...
Creating machine...
Creating machine...
Creating machine...
(swarm-node-2) Creating SSH key...
(swarm-node-3) Creating SSH key...
(swarm-manager) Creating SSH key...
(swarm-node-1) Creating SSH key...
(swarm-node-2) Creating server...
(swarm-manager) Creating server...
(swarm-node-3) Creating server...
(swarm-node-1) Creating server...
(swarm-node-1) Starting server...
Waiting for machine to be running, this may take a few minutes...
(swarm-node-2) Starting server...
Waiting for machine to be running, this may take a few minutes...
(swarm-node-3) Starting server...
Waiting for machine to be running, this may take a few minutes...
(swarm-manager) Starting server...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(upstart)...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(upstart)...
Detecting the provisioner...
Provisioning with ubuntu(upstart)...
Installing Docker...
Installing Docker...
Installing Docker...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(upstart)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Copying certs to the local machine directory...
Setting Docker configuration on the remote daemon...
Configuring swarm...
Copying certs to the remote machine...
Copying certs to the local machine directory...
Setting Docker configuration on the remote daemon...
Copying certs to the remote machine...
Configuring swarm...
Setting Docker configuration on the remote daemon...
Configuring swarm...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env swarm-node-3
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env swarm-node-1
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env swarm-manager
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Configuring swarm...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env swarm-node-2
NAME            ACTIVE      DRIVER     STATE     URL                          SWARM                    DOCKER    ERRORS
swarm-manager   * (swarm)   scaleway   Running   tcp://163.172.128.122:2376   swarm-manager (master)   v1.11.0
swarm-node-1    -           scaleway   Running   tcp://212.47.237.61:2376     swarm-manager            v1.11.0
swarm-node-2    -           scaleway   Running   tcp://212.47.233.104:2376    swarm-manager            v1.11.0
swarm-node-3    -           scaleway   Running   tcp://212.47.230.78:2376     swarm-manager            v1.11.0
+ docker version
Client:
 Version:      1.11.0
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   4dc5990
 Built:        Wed Apr 13 19:36:04 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      swarm/1.2.0
 API version:  1.22
 Go version:   go1.5.4
 Git commit:   a6c1f14
 Built:        Wed Apr 13 05:58:31 UTC 2016
 OS/Arch:      linux/amd64
+ docker info
Containers: 2
 Running: 2
 Paused: 0
 Stopped: 0
Images: 2
Server Version: swarm/1.2.0
Role: primary
Strategy: spread
Filters: health, port, dependency, affinity, constraint
Nodes: 2
 swarm-node-1: 212.47.237.61:2376
  └ Status: Healthy
  └ Containers: 1
  └ Reserved CPUs: 0 / 2
  └ Reserved Memory: 0 B / 2.053 GiB
  └ Labels: executiondriver=, kernelversion=4.4.6-docker-3, operatingsystem=Ubuntu 14.04.4 LTS, provider=scaleway, storagedriver=aufs
  └ Error: (none)
  └ UpdatedAt: 2016-04-19T11:44:09Z
  └ ServerVersion: 1.11.0
 swarm-node-3: 212.47.230.78:2376
  └ Status: Healthy
  └ Containers: 1
  └ Reserved CPUs: 0 / 2
  └ Reserved Memory: 0 B / 2.053 GiB
  └ Labels: executiondriver=, kernelversion=4.4.6-docker-3, operatingsystem=Ubuntu 14.04.4 LTS, provider=scaleway, storagedriver=aufs
  └ Error: (none)
  └ UpdatedAt: 2016-04-19T11:44:47Z
  └ ServerVersion: 1.11.0
Plugins:
 Volume:
 Network:
Kernel Version: 4.4.6-docker-3
Operating System: linux
Architecture: amd64
CPUs: 4
Total Memory: 4.105 GiB
Name: 83558c17c91a
Docker Root Dir:
Debug mode (client): false
Debug mode (server): false
WARNING: No kernel memory limit support
@pascalandy
Copy link

Thanks! This make the example very clear :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment