Docker Swarm Cluster using Azure Container Services

Azure Container Service (ACS) is an Azure Compute resource provider to create and manage a cluster of virtual machines that act as container hosts together with a number of “master” machines that are used to orchestrate your application containers. Currently ACS is in preview, and my subscriptions got access to the preview service last week. I will be exploring ACS and blogging about them.

ACS works with Apache Mesos as well as Docker Swarm. In this article, I am sharing my experience on creating Docker Swarm cluster on ACS. For build the service, I used the guidance provided at https://github.com/rgardler/azure-quickstart-templates/blob/acs/acs-docs/101%20Creating%20a%20Service%20using%20the%20Portal.md as the primary reference.

Prerequisites

  • Microsoft Azure Subscription enabled with ACS preview: If you need access, please request here – http://aka.ms/acspreview.
  • Client (Git or Open SSH) to generate RSA Keys

Setup Sequence

  • Create SSH RSA Public Key
  • Deploy Swarm ACS Template
  • Explore Resources in Container Service

Create SSH RSA Public Key

I used Git Client on my Windows Laptop to create the SSH key pair.

# Use ssh-keygen to create RSA key pair

# id_rsa and id_rsa.pub files are created in ~/.ssh folder

ssh-keygen –t rsa –b 2048

Open id_rsa.pub file, which has three parts (ssh-rsa <key> user@machinename). We need to copy all these content and provide as the SSHRSAPUBLICKEY, while deploying the template for ACS.

Deploy Swarm ACS Template

Open Browser and navigate to https://github.com/rgardler/azure-quickstart-templates/tree/acs/acs-swarm-full-template.

Click on Deploy to Azure button.

Provide parameter values for the custom deployment and click OK.

  • DNSNAMEPREFIX: Unique DNS prefix
  • AGENTCOUNT: You can choose 1 through 40. Provide 3.
  • MASTERCOUNT: 1, 3 or 5 are allowed now. Choose 3.
  • AGENTVMSIZE: For experiments, choose lower size (helps with reduced cost)
  • SSHRSAPUBLICKEY: Ensure that you copy all the three parts created in previous step and provide here.

Choose to Create a new Resource Group, name it ACSExperiment.

Ensure that you choose Japan East
as the resource group location as this is the only supported region for ACS now.

Click on Legal Terms, review the terms and click Create.

Click on Create from the custom deployment blade.

Wait for the deployment to complete.

Explore Resources in Container Service

Once the template deployment is complete, open the Resource Group, ACSExperiment. You can see that there are four categories of resources.

  • Azure Container Service Resource – Which manages all other resources
  • A number of agent nodes with in an availability set for agents
  • A number of master nodes with in an availability set for masters
  • Availability set (one for agents and another for master)

In the next article, I will be going through in-detail on exploring the above resources, followed by publishing apps to Swarm cluster. J

About Manesh

Manesh is a software consultant and solutions architect specializing in cloud, data, Linux and devops in the azure realm with key focus on hybrid workloads. He has been working on Azure technologies since its inception and has helped many enterprises to onboard and adapt to Azure cloud, build solutions for datacenter scale / high consumer applications and services. Currently, he is Microsoft certified for Developing Microsoft Azure Solutions (70-532), Implementing Microsoft Azure Infrastructure Solutions(70-533) and Architecting Microsoft Azure Solutions (70-534).

Posted on 2015/12/17, in DevOps, Microsoft Azure and tagged , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

https://hyper-v.nu/

My views on technology

Virtualization and some coffee

My views on technology

Thomas Maurer

Cloud and Datacenter Blog focusing on Microsoft Azure

Cloud Administrator in Azure World

Begin Your Azure Management Journey with the Cloud Administrator

%d bloggers like this: