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".
You will see a user name and IP that you will use to ssh or Putty into your node-1.
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.
Click "Yes" to ignore the security alert
Step 3: Run any needed updates on your node-1
sudo yum update
Step 4: Confirm OS version
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 \ https://download.docker.com/linux/centos/docker-ce.repo
- Update the package index
sudo yum makecache fast
- Install Docker
ce( community edition) say yes to any dialog
sudo yum install docker-ce
After a few moments, you will see a "Complete!" message
Step 6: Start the Docker service,
start the Docker service
add the current logged in user to the docker group and verify the install.
sudo service docker startAdd 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 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.
In part 3 we will be setting up Swarm and testing it !!!