Docker Cloud - Docker (software)

What is Docker - Cloud?

Cloud is the platform for storing the data. Docker provides cloud service and below are operations we can operate -

  • Nodes – Using Nodes, we can make use of Cloud to connect to the Azure and AWS providers to work on containers.
  • Cloud Repository – This is the place where our own repos are stored.
  • Continuous Integration – Make use of Github and create a pipeline for continuous integration.
  • Application Deployment – This operation is for deploying containers.
  • Continuous Deployment – This operation automates the deployments.

Getting started

Click on the below link for starting the Docker Cloud − https://cloud.docker.com/

docker_cloud

After we log in, we will see the below interface −

basic_interface

Connecting to the Cloud Provider

Firstly we have to check for an existing provider and connect to it. Below are the steps that guide in helping to connect to Amazon Cloud Provider.

Step 1 – Check if you have the correct AWS keys or not. We can get that from aws console. Use the below link to login to your aws account − https://aws.amazon.com/console/

aws_management_console

Step 2 – After logging in, navigate to Security Credentials section. You will find the list of keys and note it down.

security_credentials_section

Step 3 – After noting the keys, a policy needs to be created in aws so that the EC2 instances can be seen from Docker. Navigate to the profiles section in aws. Click on the Create Policy button.

create_policy

Step 4 – You can see a button ‘Create Your Own Policy’, click on it. Mention dockercloudpolicy as the policy name and the policy definition as shown below.

review_policy

Later, proceed with clicking the Create Policy button

Step 5 – Our next step is to create a role, Docker uses this to spin up nodes. To do this, under Roles section in AWS click the Create New Role option.

create_new_role

Step 6 – Give dockercloud-role as the role name.

next_step

Step 7 – In the next step, navigate to ‘Role for Cross Account Access’ and select “Provide access between your account and a 3rd party AWS account".

select_role_type

Step 8 − Here, give in the below details −

Give the Docker Cloud service ID in the Account ID field : 689684103426.

Give the Docker Cloud username in the External ID field.

account_external_id

Step 9 – Click on the Next Step button to continue further and here you will need to attach the policy that was created in last step.

attach_policy

Step 10 – At last, role is created and you have to add the arn role which is created.

create_role_name_arn

Step 11 – Refer again to Docker Cloud, select the Cloud Providers, and click the plug symbol which is next to Amazon Web Services provider.

cloud_providers

Give the arn role and click the Save button.

aws_credentials

Once it is saved, we completed the AWS integration.

integration_with_aws

Setting Up Nodes

After AWS integration is done, a node has to setup. Under the Docker Cloud, refer the Nodes section. Remember that the node setup will create a node cluster before creating any.

Step 1 − Refer the Nodes section in Docker Cloud.

nodes_section

Step 2 – Next is to mention the node details that we will setup in AWS.

node_clusters_wizard

There will be Launch Node Cluster button at the bottom. Click that and once the deployment of node is executed, a notification is given.

actions

Deploying a Service

Once the node is deployed, next is the service deployment. Follow the below steps on how to do that.

Step 1 – Under Services Section in Docker Cloud. Click on the Create button

services_section

Step 2 – We are choosing mongo in our case.

mongo

Step 3 – Next, we have to choose the option Create & Deploy. The Mongo container will be deployed on your node cluster.

create_deploy

Finally after deployment, the container can be seen in running state.

container_in_running_state

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Docker (software) Topics