How to: Docker Swarm on CentOS in Azure step by step  part 1 of 3

Posted by Brian Keyes

Jul 21, 2017 12:12:26 PM

In this blog we are going to go step by step through the process of building a Docker Swarm in Azure running on CentOS.

The audience for this blog post is anyone who has an interest in Docker and or Azure. There is very little assumed knowledge other than a power user's level of knowledge and how to use ssh or Putty. This post is written in a simple way to guide the uninitiated thru the process. The take away from this blog post will be an enhanced knowledge of both Docker and Azure.You will also have a functioning non-prod, Docker Swarm, running Nginx web servers horizontally scaled in the Azure cloud!


First of all, what is Swarm?

Docker Swarm will allow you to run containers scaled horizontally across several hosts for scalability, redundancy and load balancing.The end product if you complete 3 parts of the blog post would be a functioning Swarm cluster that you can run stuff on.

Docker Swarm is an orchestration tool for Docker containers. The Swarm can abstract away the containers to a concept known as "services". Where the engineer is interacting with nodes as a single virtual system.

There are many ways to use containers in Azure, we are only exploring one of them.


Step 1: Acquire an Azure subscription and log into Click on the green plus sign and search for "centos"

step one .jpg

Step 2 : Select the CentOS 7.3 that is returned from the search , keep the drop down at "Resource Manager" and click "Create"


Step 2 .jpg



 Step 3: Fill in a descriptive name (docker-node-01), pick a user name and password, set authentication type to "Password"


Step 4: If necessary select the appropriate "Subscription", create and name a new "Resource group" and leave the "Location" as is. Verify all the information you entered and if you are satisfied click the blue "OK" at the bottom of the screen.

Step 5 .jpg

Step 5: This is your call here, but I would select at least a "DS2" VM size for any practical "Select"


step 5.jpg

Step 6: Click "OK at the next page, we will not be changing anything on this page. However, it would be valuable to glance over the settings for a bit.Finally, you will see the validation page, review the information here and click the blue "OK" on the bottom of the page.


Step 6 .jpg


Step 7: Go back to Step 1 and repeat the possess two more times EXCEPT you will want to use a unique name for the instance and will be using the same resource group you set up for the first node.In our case, the Resource Group  is "Docker".



 step 7 .jpg





 Step 8 : Verify your current setup, you should have 3 CentOS images in a single Resource Group. note that many of the ancillary items have been created automatically for you. To look at this in Azure click on the Resource Group icon, select the correct resource group and filter by "Virtual machines" and you will see the 3 nodes you just set up.

step 8 a .jpg



step 8 .jpg





Posted by Brian Keyes

Brian has over 20 years of experience as a Systems Engineer with a strong background in VMware, storage, networking and security. Brian has worked for variety of US Govt. entities over the years;DOD,NGA,NNSA and others. Currently focused on Docker technologies

Find me on:


Posts by Topic

see all
Request a Complimentary Docker Consultation

An Open View

Vizuri Blog

Subscribing to our blog is a great way to stay up to date with the latest information from Vizuri, as well as our strategic partners. We focus on providing a range of content that is practically useful and relevant from both a technical and business perspective.

We promise to respect your privacy.