Azure Container Service : Using the Azure File Storage as a persistent (kubernetes) volume

Introduction

Today’s post is a brief one… Though it packs some punch! In the past I talked about storage patterns for docker/containers. Today we’ll touch how you can leverage the Azure File Storage as a shared & persistent storage for your container deployments. Kubernetes has been gaining a lot of traction, and that one has support for the Azure File Storage as a persistent volume too.

 

Demo Files

Want to run this yourself? Check out the following GitHub repository!

Continue reading “Azure Container Service : Using the Azure File Storage as a persistent (kubernetes) volume”

How to try out the experimental windows 2016 support in the Rancher 1.3.0 release candidate?

Introduction

Yesterday Rancher commented on my github request for windows support ;

Tested with rancher-server version – v1.3.0-rc1 with catalog “library” set to vnext branch in https://github.com/rancher/rancher-catalog

Able to add “Windows Server 2016 Standard Evaluation” hosts successfully to rancher environment with orchestration set to “windows”.

Able to launch containers in “nat” network and “transparent” network.

@kvaes , Windows 2016 support will be available as experimental feature in rancher-server 1.3.0 release.

Great news! Let’s take it out for a spin… 😀

 

Rancher Host

Installing the host(s) is the same as any other time…  Though the host will still be a Linux machine off course ;

sudo docker run -d –restart=unless-stopped -p 8080:8080 rancher/server:v1.3.0-rc1

Though notice that I specified the v1.3.0-rc1 tag… And let the system do its magic!

(Update : For the stable, release you can omit the -rc1 part!)

Note ; Be aware that this is an early release candidate. Do not use this for your production! There is for instance a bug with the GUI, where the “Auto”-theme is malfunctioning. So switch to light or dark to get that one fixed. 😉

Continue reading “How to try out the experimental windows 2016 support in the Rancher 1.3.0 release candidate?”

Testdriving the Azure Container Registry Service with Rancher

Introduction

A few weeks ago there was an announcement that the Azure Container Registry has went into public preview. That is great to hear! So let’s test drive it today… We’re going to set up the registry in Azure. Push a container image into it. And pull/run it via rancher towards our cluster. (To do this, I basically followed a lot of the following guide.

 

Setting up the Azure Container Registry (ACR)

So start by searching for the “Container Registry” in the marketplace ;

2016-12-07-13_40_08-everything-microsoft-azure

Continue reading “Testdriving the Azure Container Registry Service with Rancher”

Running the Powershell AzureRM module in a Linux Docker container

Introduction

Given my affinity towards containers & azure, it will not come as a surprise when I say I published a small container from which you can launch AzureRM commands!

 

Repositories

  • Docker Hub (build) : https://hub.docker.com/r/kvaes/docker-powershell-azure/
  • GitHub (source) : https://github.com/kvaes/docker-powershell-azure

 

Getting Started

First of all, we’ll launch the container ;

docker run -ti kvaes/docker-powershell-azure

2016-09-23-10_09_10-rootdocker02_

Next up you do the device login ;

Login-AzureRmAccount

2016-09-23-10_08_33-rootdocker02_

And check out which commands are available…

get-command *azure*”

2016-09-23-10_08_20-rootdocker02_
As you notice, the current preview release is quite limited in available commands. Expect more to be added over time off course!

 

TL;DR

  • Powershell on Linux works
  • The AzureRM module is in preview, and limited in commands
  • It all works inside a container too! 😀

Deploying OMS for Docker via Rancher

Introduction
Today we’ll be deploying Microsoft Operations Management Suite (OMS) for Docker via Rancher… Sound cool? It is! Basically we’re going to do the following guide and add Rancher to the twist.

For those unfamiliar with the Microsoft offering and more knowledgeable  in the OSS community. Imaging OMS as being the Microsoft counterpart of a typical ELK stack. The advantage is that it’s managed and that there are already a lot of integrations possible.

Continue reading “Deploying OMS for Docker via Rancher”

Behind the scenes : Creating a Microsoft SQL Server as a Windows / Docker Container

Introduction

This post is the first of a series in my journey to build a flexible / production ready MSSQL windows container. I thought this would have been a breeze with my experience on Docker for Linux, though I must admit running into multiple issues… This post will not provide you with a working container, as I’m still developing that one.

2016-07-06 14_23_15-kvaeschost01 - 104.45.23.120_3389 - Remote Desktop Connection

Once I deem it as production ready, it’ll be released to the community to be used freely. Though I want it to meet my personal quality standards, being that it should be stable and flexible enough to run in production mode.

 

Blueprint Braindump

For those who have been following me for a while (real life, twitter, yammer, linkedin, …); you probably know I’ve been preaching about MSSQL as a container for way too long. My personal vision was to have a MSSQL run in a container. The data should be located outside of the container, which would enable a (more/relative) easy path for the changes you want to implement.

kvaes-mssql-container-blueprint-docker-persistent-storage-identity-repository

So where volume mapping would be an option… I was also considering an integration with an external storage service. As an Azure fanatic, I (also) want to leverage the option of storing my data/temp files on Azure storage. This would provide my with total host independent storage persistence on Docker! For those who have been playing with Docker for a while, this is truly a powerful combination.

As a long term goal, I would like to see this running on a “serverless” platform. From what I have seen in the market, this is still an unreachable utopia/Walhalla at this point. So my current objective in that areas is to investigate the option of deploying this setup on a Service Fabric or to leverage the power of Rancher with Windows containers.

Continue reading “Behind the scenes : Creating a Microsoft SQL Server as a Windows / Docker Container”

Issue : Exposing ports with Windows Containers on TP5

A brief post today, so assist people who are probably going to “enjoy” the same networking issue. When coming from docker on linux and working with docker on windows, the first thing you’ll probably run into is the port exposing…

I built a MSSQL 2016 container with the default port (1433) exposed.

PS C:\Users\kvaes> docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
efc7a981f6b9 kvaessql2016 “cmd /S /C ‘powershel” 6 minutes go Up 6 minutes 1433/tcp

Though I was unable to connect from the container host to this port…

PS C:\Users\kvaes> Test-NetConnection -Port 1433 -ComputerName Localhost
WARNING: TCP connect to Localhost:1433 failed

ComputerName : Localhost
RemoteAddress : ::1
RemotePort : 1433
InterfaceAlias : Loopback Pseudo-Interface 1
SourceAddress : ::1
PingSucceeded : True
PingReplyDetails (RTT) : 0 ms
TcpTestSucceeded : False

Now let’s try that directly from the container…

PS C:\Users\kvaes> docker exec -ti efc7a981f6b9 powershell Test-NetConnection -Port 1433 -ComputerName Localhost

ComputerName : Localhost
RemoteAddress : ::1
RemotePort : 1433
InterfaceAlias : Loopback Pseudo-Interface 2
SourceAddress : ::1
PingSucceeded : True
PingReplyDetails (RTT) : 0 ms
TcpTestSucceeded : True

This had me totally flabbergasted! After searching for a solution, I ran into the following github issue ; https://github.com/Microsoft/Virtualization-Documentation/issues/253 

Which pointed me to the following statement ;

This is a known limitation in our Windows NAT implementation (WinNAT) that you cannot access the external port in a static port mapping directly from the container (NAT) host.

The following github issue showed a workaround ; https://github.com/docker/docker/issues/15740

So let’s check the IP of our container…

PS C:\Users\kvaes> docker exec -ti efc7a981f6b9 ipconfig

Windows IP Configuration

Ethernet adapter vEthernet (Temp Nic Name):

Connection-specific DNS Suffix . : 404nupum1doencwb55jgqiwlph.ax.internal.cloudapp.net
Link-local IPv6 Address . . . . . : fe80::3077:b4b4:3a8c:5d83%31
IPv4 Address. . . . . . . . . . . : 172.27.75.141
Subnet Mask . . . . . . . . . . . : 255.240.0.0
Default Gateway . . . . . . . . . : 172.16.0.1

And then setup a proxy to reroute the traffic ;

PS C:\Users\kvaes> netsh interface portproxy add v4tov4 listenaddress=127.0.0.1 listenport=1433 connectaddress=172.27.75
.141 connectport=1433

What does the test from our container host say now?

PS C:\Users\kvaes> Test-NetConnection -Port 1433 -ComputerName Localhost

ComputerName : Localhost
RemoteAddress : ::1
RemotePort : 1433
InterfaceAlias : Loopback Pseudo-Interface 1
SourceAddress : ::1
PingSucceeded : True
PingReplyDetails (RTT) : 0 ms
TcpTestSucceeded : True

And now it works! In all honesty, I find this a serious flaw in the Windows implementation and truly annoying to anyone making the shift from containers in the Linux ecosystem to the Windows ecosystem.