Search
StarWind is a hyperconverged (HCI) vendor with focus on Enterprise ROBO, SMB & Edge

[Azure] Container Service, how to start correctly?

  • February 2, 2017
  • 8 min read
Cloud and Virtualization Architect. Florent is specializing in public, hybrid, and private cloud technologies. He is a Microsoft MVP in Cloud and Datacenter Management and an MCSE in Private Cloud.
Cloud and Virtualization Architect. Florent is specializing in public, hybrid, and private cloud technologies. He is a Microsoft MVP in Cloud and Datacenter Management and an MCSE in Private Cloud.

Azure Container Service

Azure Container Service is a new technology, on Microsoft Azure, and that help you to deploy quickly and in production, with the ARM technology, a Docker cluster, orchestrated by Marathon and DC/OS, Docker Swarm, or Kubernetes to give your applications highly available, but also to deploy many nodes quickly and without any problems. The Microsoft’s documentation is available here: https://docs.microsoft.com/en-us/azure/container-service/container-service-intro

In this article, I will use the Docker Swarm solution:

Docker Swarm solution

To start, in Azure, search Azure Container Service:

Azure Container Service

To start the deployment, you need a public key on the computer: the server from where you want to connect the first time to your swarm cluster. To get this key on Windows, download PuttyGen : http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Click on Generate and move the mouse until the green bar is full:

PuttyGen

You should have this:

PuttyGen

Click on Save public key and save the key. Do the same with the private key. Open the public key and paste it on Azure:

Create Azure Container Service

Choose which orchestrator you would like to use, in my case, Docker Swarm:

Azure Container Service Framework configuration

Choose the number of nodes/masters for your cluster, a public DNS name and the size of virtual machines:

Azure Container Service Azure Container service settings

If the validation is ok, you can continue. You can download the template if you want to deploy more quickly the same configuration next time:

Azure Container Service Summary

Accept the license to start the deployment:

Azure Container Service Purchase

Microsoft Azure operation details

The deployment is now finished:

Azure Container Service

By default, you can’t connect from outside to your cluster. You need to use an SSH tunnel. On Windows, with putty connect with the following parameters:

  • Host Name : user@dnspublicname
  • Port : 2200
  • Connection > Auth > SSH : Select your private key

PuttyGen

PuttyGen

Because I’m using Swarm, I’ll associate the port 2375 for the source and for the destination, localhost on port 2375 in Connection > Auth > Tunnels, and click on Add:

PuttyGen

Save the configuration and click on Open to open the SSH tunnel.

Get the private IP address of your master (172.16.0.5 by default) and watch nodes that are composing your Swarm cluster:

Here, I’ve 3 nodes:

Swarm cluster

I’ll deploy a simple website, customized by myself, on port 80. This port is exposed on the load-balancer, like port 8080 and 443. I created a Dockerfile and an index.html:

Dockerfile :

index.html :

Execute the following command to build the image:

command for image building

And to deploy it:

command to build the image

You can see on which node the container is running.

To access the website publicly, go on your Azure interface, in the ACS part, in your ACS and on Agents. Here, select the URL bottom the FQDN:

Azure interface

Open it in a browser. You should have this:

Hello from ACS

If you want to add the node, nothing’s easier J On your ACS, go to Agents and change the value of VM Count, and click on Save (I passed from 2 to 3). A new VM with the new agent will be deployed:

Azure Container services

In the next article, we will see the Azure Container Registry (Preview)  🙂

 

 

 

 

Hey! Found Florent’s article helpful? Looking to deploy a new, easy-to-manage, and cost-effective hyperconverged infrastructure?
Alex Bykovskyi
Alex Bykovskyi StarWind Virtual HCI Appliance Product Manager
Well, we can help you with this one! Building a new hyperconverged environment is a breeze with StarWind Virtual HCI Appliance (VHCA). It’s a complete hyperconverged infrastructure solution that combines hypervisor (vSphere, Hyper-V, Proxmox, or our custom version of KVM), software-defined storage (StarWind VSAN), and streamlined management tools. Interested in diving deeper into VHCA’s capabilities and features? Book your StarWind Virtual HCI Appliance demo today!