[Azure] Container Service, how to start correctly?

Posted by Florent Appointaire on February 2, 2017
Share on Facebook0Share on Google+0Share on LinkedIn2Share on Reddit4Tweet about this on Twitter0
5/5 (3)
5/53

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)  🙂

Related materials:

 

 

 

 

Views All Time
3
Views Today
10

Please rate this

To download the software products, please, make your choice below. An installer link and a license key will be sent to the e-mail address you’ve specified. If you consider StarWind Virtual SAN but are uncertain of the version, please check the following document Free vs. Paid. The recent build of Release Notes. A totally unrestricted NFR (Not For Resale) version of StarWind Virtual SAN is available for certain use cases. Learn more details here.



Return to all posts

Microsoft Keeps Going Big on CyberSecurity: Investing $1 Billion a Year
Design a ROBO (Part 1): Introduction and high-level design
The following two tabs change content below.
Florent Appointaire
Florent Appointaire is Microsoft Engineer with 5 years of experience, specialized in Cloud Technologies (Public/Hybrid/Private). He is a freelance consultant in Belgium from the beginning of 2017. He is MVP Cloud and Datacentre Management. He is MCSE Private Cloud and Hyper-V certified. His favorite products are SCVMM, SCOM, Windows Azure pack/Azure Stack and Microsoft Azure.