A couple of months ago, Microsoft announced their plans for Azure and containers where they would provide you with a first class citizen resource provider in Azure so that you could build, run and manage scalable clusters of hosts machines onto which containerized applications would be running.
What you also probably have noticed is that Microsoft is having an open approach to container management. In fact, the container service is currently based and pre-configured with Docker and Apache Mesos, so any tools you would prefer for management “should just work”.
This is a new game for me to play so I am learning a lot. J
In the meantime, I am also working a lot with Windows Server Containers in Windows Server Technical Preview 4 – which is an image that is available in the Azure gallery.
However, I wanted to extend the experience a bit and decided to create my own ARM template that will ‘mimic’ some of the functionality in the Azure Container Resource Provider, to actually instantiate a new container running IIS Web-Server and be available for requests.
The template will deploy:
· A Vnet
· Network interface
· Public IP address with DNS (the DNS will be based on the hostname.region.cloudapp.azure.com and provided as output once the deployment has completed)
· Storage account
· Network Security Group to allow RDP to the host – as well as http
· Virtual machine (based on the TP4 image)
o Custom Extension that will:
§ Spin up a new Windows Server Container based on the existing image (server core)
§ Install Web-Server within the newly created container
§ Stop the container – and create a new container image
§ Deploy a new container based on the newly created container image
§ Create a static NAT rule and a firewall rule to allow traffic on port 80 to the container from the host
This is a working experiment and I am planning to extend the template with more applicable tasks as we move forward.
The template can be explored and deployed from this GitHub repo: