So I just noticed yesterday that Rancher now have gained experimental support for Windows Server Containres as part of their latest experimental build. This RC build has simple support for running Windows Server Containers.
So in order to set it up we need to download the RC build from Docker Hub
sudo docker pull rancher/server:v1.3.0-rc1
and spin it up on a Linux VM or in Azure. Now after we have setup Rancher we need to add a catalog template to the vNext repository which is https://github.com/rancher/rancher-catalog and Branch must be set to vnext
After we have added the catalog go into and add Windows Experimental to the catalog so we can select Windows from the enviroment setup.
After we have added Windows to the catalog, we can now create a new enviroment which will consist of Windows Server Hosts.
We we now select Window Server hosts in the enviroment and click create we will be given a script which we be needed to run on the Docker hosts. Which will allow it to register against the Rancher Master
New-Item -Path ‘C:\Program Files\rancher’ -Type Directory
Invoke-WebRequest -UseBasicParsing ‘https://github.com/rancher/agent/releases/download/v0.3.0/agent.exe’ -OutFile ‘C:\Program Files\rancher\agent.exe’
& ‘C:\Program Files\rancher\agent.exe’ -register-service http://22.214.171.124:8080/v1/scripts/51320A6F65B24DA1D7D7:1482415200000:0o8e1qiTpW4YViEyCubG658k54
Of course this script will not be the same for your enviroment, but after you have run the script you can see that the agent is appearing under hosts.
Note since this experimental support you will notice that alot of services are not working. For instance Rancer uses IPsec as the overlay network between the docker hosts, but this is not working for Windows Container hosts as of now, guessing there needs more work there to make it work properly, but I can fire up a Windows instance based upon an existing Windows Server Image stored locally on the docker host.
But we can provision containers against Windows Server hosts directly, from within the Rancher UI, and that it can also leverage AzureAD for authentication as well makes it quite flexible.
Rancher supports Windows Server networking with stuff like NAT and Transparent rules –> https://docs.microsoft.com/nb-no/virtualization/windowscontainers/manage-containers/container-networking