So, how do you do it when running SQL Server in Azure Container Services?
Well there’s a couple of options available.
The first one is to change the port that SQL is listening on in the container, open that port on the container, and direct to that port from the service.
The second one is to leave SQL Server listening on the default port and direct a non-default port to port 1433 from the service.
Read on to see Andrew try out both of these methods.
Akshay Wadia, et al, introduce a new open source tool:
Data scientists are not always equipped with the requisite engineering skills to deploy robust code to a production job execution and scheduling system. Yet, forcing reliance on data platform engineers will impede the scientists’ autonomy. If only there was another way.
Today we’re excited to introduce Flotilla, our latest open source project. Flotilla is a human friendly service for task execution. It allows you to focus on the work you’re doing rather than how to do it. In other words, Flotilla takes the struggle out of defining and running containerized jobs.
It looks like an interesting service.
Windows Server version 1709 brings the following important improvements that developers can take advantage of with the updated container images.
First of all, the microsoft/windowsservercore image underneath SQL shrunk by more than 2GB, so the SQL Server images are also 2GB smaller.
The networking support for containers was improved to support Kubernetes, now at beta in version 1.9 beta on Windows, and routing mesh with Docker Swarm.
If you want to store your databases on remote storage, you can now by using global SMB mounts (New-SMBGlobalMapping) along with a docker volume (docker run -v c:\shared:c:\data microsoft/mssql-express-…).
Seems like a useful improvement.
Andrew Pruski is two buzzwords away from sending me into sensory overload:
Now, if this is the first time working with Kubernetes you won’t have to perform the next couple of steps but just to confirm, run the following: –
kubectl config current-contextIf your shell cannot find the kubectl command, add
C:\Program Files\Docker\Docker\Resources\bin\
to your PATH environment variable and restart your shell.If the command outputs anything other than docker-for-desktop you will need to switch to the desktop cluster.
Click through to see how to set this up.
Mark Broadbent shows how to install Docker on Linux Mint:
A web search will almost certainly point you to lots of similar posts, mostly (if not) all of which start instructing you to add unofficial or unrecognized sources, keys etc. Therefore my intention with this post is not to replace official documentation, but to make the process as simple as possible, whilst still pointing to all the official documentation so that you can be confident you are not breaking security or other such things!
You can head over to the following Docker page Get Docker CE for Ubuntu for the initial setup and updates, but for simplicity, you can follow along below.
The installation instructions will also work for Ubuntu and other related variants.
Andrew Pruski shows how to store a credential using Powershell and pass it into a Docker container:
I work with SQL Server in containers pretty much exclusively when testing code and one of my real bug bears is that SQL Server in containers does not support Windows authentication (unless you’re using Windocks).
So when I’m working I find it quite annoying to have to specify a SA username & password when I want to connect.
OK, I can use Get-Credential, assign to a variable, and then reference that in a connection string but I want something a bit more permanent especially as I always use the same password for all my containers
Read on for Andrew’s method, and check out Rob Sewell’s method in the comments.
Jatin Demla shows how to create Docker secrets:
Managing the password, access tokens and private keys are being tedious in the application. Any small mistakes accidentally expose all the secret information. Even storing such thing in docker images can be easily accessible one should just run the image in the interactive mode container and all your application code is available in containers. Docker provides secrets to protect all secret data.
This blog explains the low-level of storage information as well as secured access to docker secret. so, let’s get started.
Read the whole thing, especially if you’ve gone container-happy.
Chris Adkin has a few tips for loading SQL Server in Jenkins as part of testing or deployment:
Problem 1 Image Tag
There is no image tag specified for the microsoft/mssql-server-linux image, therefore, if Microsoft push a newer version of the image to docker hub, this will be pulled down from docker hub when the build pipeline runs. This is easily fixed by tagging the image with a tag for an explicit version, e.g. microsoft/mssql-server-linux:2017-GA.
Click through for the starting code, two additional issues, and the corrected code.
Mara Averick has some resources to help you get started with running R in a Docker container:
liftr 📦 by Nan Xiao
🐳📜 Docker your docs: “liftr: Containerize R Markdown Documents” by @road2stathttps://t.co/nSN1ylZXsy #rstats #docker #rmarkdown pic.twitter.com/9xJQ4rANjy
— Mara Averick (@dataandme) October 15, 2017
liftr aims to solve the problem of persistent reproducible reporting. To achieve this goal, it extends the R Markdown metadata format, and uses Docker to containerize and render R Markdown documents.
Click through for those resources as well as an addictive 8-bit animated GIF.
In only a few seconds you have a SQL 2017 instance up and running (Take a look at Andrews blog at dbafromthecold.com for a great container series with much greater detail)
Now that we have our container we need to connect to it. We need to gather the IPAddress. We can do this using docker command docker inspect but I like to make things a little more programmatical. This works for my Windows 10 machine for Windows SQL Containers. There are some errors with other machines it appears but there is an alternative below
Read the whole thing.
Kevin Feasel
2018-04-05
Cloud, Containers
No Comment