Getting Started with Docker Cloud

Deploying Docker to Amazon using Tutum explained how to deploy a Docker image to Docker Tutum. Tutum is now Docker Cloud.

Read Announcing Docker Cloud for more details.

Docker Cloud Logo

The key features of Docker Cloud are:

  • Authentication using Docker ID
  • Integration with Docker Hub
  • Support for Docker official repositories
  • Commercially supported Docker Engine
  • Ability to deploy and scale your applications using GUI, API and CLI

This blog will show:

  • Key concepts of Docker Cloud
  • How to create a new Docker Cloud Node
  • How to install Docker Cloud CLI
  • How to create a new Docker Cloud Service
  • Access Couchbase Server in Docker Cloud
  • How to terminate the Docker Cloud Service and Node

And finally it’ll leave with some references for Docker Cloud docs.

The blog will use Couchbase Server – an open source, highly scalable,  JSON document database for the Docker image.

Docker Cloud TL;DR

Here are the quick commands to run a Docker image using Docker Cloud in Amazon:

More details below.

Key Concepts of Docker Cloud

Let’s understand the core concepts of Docker Cloud:

  • Nodes are individual Linux hosts/VMs used to deploy and run your applications. New nodes can be provisioned to increase the capacity. Docker Cloud does not provide hosting services. Nodes are provisioned using physical servers, virtual machine or cloud providers.
  • Node Clusters are logical groups of nodes of the same type. Node Clusters allow to scale the infrastructure easily by provisioning more nodes.
  • Services are logical groups of containers from the same image. Services make it simple to scale your application across different nodes.

Docker Cloud can be managed with Web, CLI or REST API. This blog will use the Docker Cloud CLI to perform all the commands.

Install Docker Cloud CLI

Install Docker Cloud CLI:

Complete installation instructions are at Installing CLI.

Check version:

Complete set of commands are:

Save the login credentials:

Create new Docker Cloud Node

Register your cloud provider credentials with Docker Cloud Web UI as explained in Link to a Cloud Service Provider. Amazon, Digital Ocean, Azure, and other cloud providers are supported.

Create a new node cluster with a single node:

This node cluster has a single node (-t 1) and uses the tag “couchbase” (--tag couchbase). Last four parameters are nodecluster name (couchbase-node, provider (aws, region (us-west-1 and nodetype (m3.large).

Each node in this node cluster will be given the assigned tag. This will be used later to assign services to a specific node or node cluster.

Status of this node cluster can be checked:

The dashboard at cloud.docker.com is updated to show:

Docker Cloud Node Created Dashboard

More information about each node can be seen as well:

Docker Cloud Created Node

Create a new Docker Cloud Service

Create a Docker Cloud Service:

If multiple node clusters exists, then --tag is used to assign a service to a node cluster.

docker-cli#10 is filed to ensure multiple ports can be exposed using -p 8091-8093:8091-8093 format. This will be aligned with the docker CLI.

Docker image used here is arungupta/couchbase. This image is based on the official couchbase image at Docker Hub and pre-configures it for different services.

Start the Docker Cloud Service:

The updated dashboard looks like:

Docker Cloud Service StartedGet the Docker Cloud Service logs:

The log shows output from the Couchbase REST API invoked to configure the Couchbase server.

Access Couchbase Server in Docker Cloud

Inspect the Docker Cloud service for the exposed container ports:

To be more specific, exact URI for the Couchbase Web Console can be obtained as:

Access the Couchbase Web Console at http://couchbase-b9132b42.936dbe58.svc.dockerapp.io:8091/ to see the Couchbase Web Console login screen. Enter the password credentials of Administrator and password.

Docker Cloud Couchbase Login Page

And the Couchbase Web Console looks like:

Docker Cloud Couchbase Web Console

Terminate the Docker Cloud Service and Node

Check the list of Docker Cloud services running:

Terminate the service:

Check the list of nodes:

Terminate the node as:

Docker Cloud References

In this blog, you learned:

  • Key concepts of Docker Cloud
  • How to create a new Docker Cloud Node
  • How to install Docker Cloud CLI
  • How to create a new Docker Cloud Service
  • Access Couchbase Server in Docker Cloud
  • How to terminate the Docker Cloud Service and Node

Enjoy!

Source: http://blog.couchbase.com/2016/march/getting-started-docker-cloud

 

Be Sociable, Share!

Leave a Reply

Your email address will not be published. Required fields are marked *