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

Posted by Brian Keyes

Jul 24, 2017 4:06:12 PM Docker, Azure


If you have completed step 1 of this blog post you now should have 3 CentOS instances setup from part 1 of this blog post series. We will install Docker and setup Swarm in this part.




Step 1: Find the first instance that you created in Part 1 of this blog, Click on the instance name and click on "Connect".

step 2-1 .jpgYou will see a user name and IP that you will use to ssh or Putty into your node-1.

step 2-1a.jpg


Step 2: Open Putty and configure a connection with the node-1 IP  and save it. click on "Open" at the bottom of the Putty dialog box. Log in with the user name and password that you provided in part 1.

step 2-2.jpg



Click "Yes" to ignore the security alert 


step 2-a2.jpg


step 2-2b.jpg

Step 3: Run any needed updates on your node-1

sudo yum update 

step 2-3aJPG.jpg

Step 4: Confirm OS version

cat /etc/*elease


step 2-4-.jpg

Step 5 : Install Docker CE

  • Install the required packages 
    sudo yum install -y yum-utils device-mapper-persistent-data lvm2
  • Add the correct repo

     sudo yum-config-manager \
        --add-repo \
  • Update  the package index
    sudo yum makecache fast
  • Install Docker ce ( community edition)  say yes to any dialog 
    sudo yum install docker-ce

step 5-b JPG.jpg 


After a few moments, you  will see a "Complete!" message step 7-aa.jpg

Step 6: Start the Docker service, add the current logged in user to the docker group and verify the install.

 start the Docker service
sudo service docker start
Add the current user to the Docker group so you will not have to supply the sudo password  when we run Docker commands
sudo usermod -aG docker $USER

Exit the session and log back in


Confirm that Docker working properly

docker run hello-world


step 2-6c.jpg

Step 7: Repeat the same process on node 2 and 3 


At the end of part 2 of the blog series, you will have 3 CentOS running Docker.

step 2-final .jpg



In part 3 we will be setting up Swarm and testing it !!!


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.