Creating the swarm

My machines are up and running so lets install a docker swarm

Activate swarm mode

The first thing to do is to create a master. In this case it will be the host
with the name silentmaxx

The output of this command neatly tells you what you have to do to add a worker:

Visualize the swarm

From the command line you can get some info of your swarm by typing

Some details about the swarm are included and should look like this:

The command  docker node  can also be used do get some infos about the nodes.

But the best looking information can be obtained when starting a swarm visualizer
This can be done using the  docker service create  command which only works for swarms:

When opening the page  you can see the current state of the swarms

Swarm Visualization


Add a node

It’s time to add a second node:

And the node directly appears in the visualizer as well

Swarm Visualization

As you can see it is very simple to add a machine running docker to the swarm. The other nodes can be added accordingly.

Next steps
Now that the swarm is up and running, lets code the microservice do deploy.

  • Application: Code the first draft of the REST service

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">