- Docker - Working of Kubernetes
- Docker - Kubernetes Architecture
- Docker - Continuous Integration
- Docker - Compose
- Docker - Logging
- Docker - Cloud
- Docker - Setting ASP.Net
- Docker - Toolbox
- Docker - Setting NGINX
- Docker - Setting MongoDB
- Docker - Setting Node.js
- Docker - Networking
- Docker - Storage
- Docker - Container Linking
- Docker - Instruction Commands
- Building a Web Server Docker File
- Docker - Private Registries
- Docker - Managing Ports
- Docker - Public Repositories
- Docker - Building Files
- Docker - File
- Docker - Containers & Shells
- Docker - Configuring
- Docker - Container & Hosts
- Docker - Architecture
- Docker - Working With Containers
- Docker - Containers
- Docker - Images
- Docker - Hub
- Docker - Installation
- Docker - Installing Docker on Linux
- Docker - Overview
- Docker - Home
Docker Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Docker - Cloud
The Docker Cloud is a service provided by Docker in which you can carry out the following operations −
Nodes − You can connect the Docker Cloud to your existing cloud providers such as Azure and AWS to spin up containers on these environments.
Cloud Repository − Provides a place where you can store your own repositories.
Continuous Integration − Connect with Github and build a continuous integration pipepne.
Apppcation Deployment − Deploy and scale infrastructure and containers.
Continuous Deployment − Can automate deployments.
Getting started
You can go to the following pnk to getting started with Docker Cloud −
Once logged in, you will be provided with the following basic interface −
Connecting to the Cloud Provider
The first step is to connect to an existing cloud provider. The following steps will show you how to connect with an Amazon Cloud provider.
Step 1 − The first step is to ensure that you have the right AWS keys. This can be taken from the aws console. Log into your aws account using the following pnk −
Step 2 − Once logged in, go to the Security Credentials section. Make a note of the access keys which will be used from Docker Hub.
Step 3 − Next, you need to create a popcy in aws that will allow Docker to view EC2 instances. Go to the profiles section in aws. Cpck the Create Popcy button.
Step 4 − Cpck on ‘Create Your Own Popcy’ and give the popcy name as dockercloudpopcy and the popcy definition as shown below.
{ "Version": "2012-10-17", "Statement": [ { "Action": [ "ec2:*", "iam:ListInstanceProfiles" ], "Effect": "Allow", "Resource": "*" } ] }
Next, cpck the Create Popcy button
Step 5 − Next, you need to create a role which will be used by Docker to spin up nodes on AWS. For this, go to the Roles section in AWS and cpck the Create New Role option.
Step 6 − Give the name for the role as dockercloud-role.
Step 7 − On the next screen, go to ‘Role for Cross Account Access’ and select “Provide access between your account and a 3rd party AWS account".
Step 8 − On the next screen, enter the following details −
In the Account ID field, enter the ID for the Docker Cloud service: 689684103426.
In the External ID field, enter your Docker Cloud username.
Step 9 − Then, cpck the Next Step button and on the next screen, attach the popcy which was created in the earper step.
Step 10 − Finally, on the last screen when the role is created, make sure to copy the arn role which is created.
arn:aws:iam::085363624145:role/dockercloud-role
Step 11 − Now go back to Docker Cloud, select Cloud Providers, and cpck the plug symbol next to Amazon Web Services.
Enter the arn role and cpck the Save button.
Once saved, the integration with AWS would be complete.
Setting Up Nodes
Once the integration with AWS is complete, the next step is to setup a node. Go to the Nodes section in Docker Cloud. Note that the setting up of nodes will automatically setup a node cluster first.
Step 1 − Go to the Nodes section in Docker Cloud.
Step 2 − Next, you can give the details of the nodes which will be setup in AWS.
You can then cpck the Launch Node cluster which will be present at the bottom of the screen. Once the node is deployed, you will get the notification in the Node Cluster screen.
Deploying a Service
The next step after deploying a node is to deploy a service. To do this, we need to perform the following steps.
Step 1 − Go to the Services Section in Docker Cloud. Cpck the Create button
Step 2 − Choose the Service which is required. In our case, let’s choose mongo.
Step 3 − On the next screen, choose the Create & Deploy option. This will start deploying the Mongo container on your node cluster.
Once deployed, you will be able to see the container in a running state.
Advertisements