Couchbase Server

Primeiros Passos com o Docker Cloud

11 MIN DE LEITURA

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

Ler Announcing Docker Cloud para mais detalhes.

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 ou API REST. 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 e pre-configures it for different services.

Start the Docker Cloud Service:

The updated dashboard looks like:

Docker Cloud Service Started

Get 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:

0

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

1

Access the Couchbase Web Console at https://couchbase-b9132b42.936dbe58.svc.dockerapp.io:8091/ to see the Couchbase Web Console login screen. Enter the password credentials of Administrador e senha. Docker Cloud Couchbase Login Page

And the Console da Web do Couchbase looks like:

Docker Cloud Couchbase Web Console

Terminate the Docker Cloud Service and Node

Check the list of Docker Cloud services running:

2

Terminate the service:

3

Check the list of nodes:

4

Terminate the node as:

5

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: https://www.couchbase.com/blog/getting-started-docker-cloud/

Compartilhe este artigo

Autor

Arun Gupta é o vice-presidente de defesa de desenvolvedores (developer advocacy) na Couchbase. Ele construiu e liderou comunidades de desenvolvedores por mais de 10 anos na Sun, Oracle e Red Hat. Ele possui vasta experiência na liderança de equipes multifuncionais para desenvolver e executar estratégias, planejamento e execução de conteúdos, campanhas de marketing e programas. Antes disso, ele liderou equipes de engenharia na Sun e é um membro fundador da equipe do Java EE. Gupta é autor de mais de 2.000 posts em blogs sobre tecnologia. Ele tem ampla experiência em palestras em mais de 40 países sobre uma miríade de tópicos e é um JavaOne Rock Star por três anos consecutivos. Gupta também fundou o capítulo do Devoxx4Kids nos EUA e continua a promover a educação tecnológica entre crianças. Autor de vários livros sobre tecnologia, um corredor ávido, um viajante do mundo, um Java Champion, líder de JUG, membro do NetBeans Dream Team e um Docker Captain, ele é facilmente acessível em @arungupta.

Deixe um comentário

Pronto para começar com o Couchbase Capella?

Começar a construir

Confira nosso portal para desenvolvedores para explorar o NoSQL, navegar por recursos e começar com tutoriais.

Use o Capella free

Coloque a mão na massa com o Couchbase em apenas alguns cliques. O Capella DBaaS é a maneira mais fácil e rápida de começar.

Entre em contato

Quer saber mais sobre as ofertas do Couchbase? Deixe-nos ajudar.