In Episode 115 of the Microsoft Cloud Show we interviewed Ross Gardler from Microsoft about their new Azure Container Service which is currently in preview. I finally got some time a few weeks ago to play with ACS and thought I would share my first experiences here. This is my 0 to first container experience.
Currently ACS allows you to provision 2 types of container service. Either a Mesos based deployment or a Swarm one. I hadn’t played with Meso much so opted to try that out.
Getting started
Note: I followed the getting started guide for deploying a new container service on the Azure website.
To get started its as simple as clicking a “Deploy to Azure” button on the pre-canned Azure template. This will take you to your Azure management console where you can configure the various parameters for this template as shown below.
You need to name your cluster, pick the VM size for the nodes you want to run and set authentication details. The toughest part of this for most people will be generating the SSH keys as this is pretty foreign to many Windows folks. But they provide a fairly simple walkthrough for you to create a key pair.
When complete you hit OK and go get a coffee while your cluster is deployed 🙂 It can take a while as it spins up a few machines and configures everything.
Note: I got an error “\”The subscription is not registered to use namespace ‘Microsoft.Compute’.” during deployment the first time. I was deploying into a new MSDN Azure Subscription with free credit on it. Turns out I needed to manually create a VM in this subscription first (any VM will do) before deployment of a template would work. Once I had done this the template deployed fine.
I deployed a pretty simple cluster with 2 agent nodes and a mesos master node. In Azure you can see all the resources the template created in a new resource group such as the VMs, networks and security groups etc…
Now I had a cluster up and running I could log into Mesos. To find the URL click “Succeeded” on the resource groups deployment status and click “Microsoft.Template”. You should see a couple of fully qualified domain names.
To actually hit Meso you need to create an SSH tunnel from your box into the cluster. There is a decent write up on how to do this here.
Once you have your SSH tunnel running you can hit the Mesos web interface on http://localhost/mesos/ (this is redirected over the SSH tunnel to your meso box running in Azure).
Now you are ready to start running things! Hit http://localhost/marathon/ to open the Marathon web UI which makes it pretty simple to run jobs on your cluster.
Click create and give it a name, 256MB and 1 instance. Open the Docker container settings and specify “yeasy\simple-web” as the image name. Then in the Optional Settings area set Port = 80. This will map port 80 in the docker container to port 80 on the host. Create the app and let it spin up. You should see it in the UI similar to this:
Grab your load balancers fully qualified domain name from the Azure portal. It’s the AGENTFQDN url in the deployment details you found earlier.
You should be able to hit that URL and see your simple website running!
Summary
This is obviously only the most basic thing you can do with a Meso based cluster running in Azure, but was my attempt and seeing how Azure are approaching the setup. All in all it was surprisingly painless.
The goal of ACS right now so it make it simple to run a docker cluster in Azure using either Mesos or Swarm. It doesn’t take away the need to manage that cluster in Azure once its deployed, so you will need people who know how to run a Mesos cluster and feed and water it appropriately. Deployment is step one, but running it is a different beast all together from what I understand. I am no expert in this area and so you will want to tread carefully and make sure you have the appropriate skills on staff to do this.
I for one would LOVE to see Azure also add as Container as a Service (CaaS) offering where you just specify how much compute you want, how much memory etc… and then have Azure spin up and manage a Docker cluster for you with the infrastructure being invisible. This way you don’t need to be a Mesos master and you can let the pros run it for you.
I think CaaS is the final destination for Docker … just prior to everyone starting to espouse the virtues of true Platform as a Service (PaaS) and ditching this whole concept of apps running in containers and being aware of the OS at all.
When true CaaS comes to fruition, like it think it will in time, maybe Ray Ozzie (inventor of Azure, codename Red Dog) can all say “told ya so” about his vision of Platform as a Service being the ultimate destination for cloud computing (but being about 10 years too early).