<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1194005000700189&amp;ev=PageView&amp;noscript=1">

From Vizuri's Experts

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


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 !!!


Brian Keyes

A former Vizuri systems engineer with more than twenty years of experience, Brian Keyes provided authority on subjects including VMware, storage, networking, and security. Interested in this post? Connect with our team of experts by