T-SQL Tuesday #140 Wrap up: What have you been up to with containers?

Page content

I want to start by saying thank you to all who submitted, and an amazing collection of people submitted some fantastic content. Also, thanks to Steve for asking me to host and being patient with me for mixing up the dates and the hashtag. It’s #tsql2sday and it’s on Tuesday not Wednesday :P

T SQL Tuesday Logo

Now, onto the posts in submission order.

Rob Farley – On containers

Rob discusses how he uses containers to quickly spin up SQL Server instances without installing them on his local OS, replacing the virtual machine-based environments he used in the past. And I can’t agree with this more. I’ve used Macs for 20 years and have used VMs to do SQL Server-based work. That’s no longer the case. I can run SQL Server in containers without VMs*. And you can do the same you can run a container in minutes anywhere you have a container runtime like docker. Thanks for sharing, Rob!

Jeff Hill – Container Convenience

Jeff introduces us to some non-SQL Server container images he uses at home, like pi-hole, a media server, a personal CRM, and more. The big idea in this post is that due to the isolation principles of containers, you and spin up containers from container images super easy via a container repository like docker hub…which enable you to test out new software or even new versions of existing software and if you don’t want that container anymore delete it. There’s no leftover crud on your system like config files etc. Great post, Jeff! And as Jeff suggests, head over to docker hub and see what software you can find that’s useful for you!

PS: If you aren’t using Pi-Hole, oh, you really should. Check it out…I run it in a container on my laptop for when I’m traveling, and I have one in Azure that my home network is using.

Kevin Chant – Easy demos using containers

Kevin shows us how he’s been using containers in demos, specifically for sessions based on DevOps. Using tools like Azure Pipelines in Azure DevOps or GitHub Actions, you can build automated testing and deployments of SQL Server instances and databases for the various environments needed in your deployment, such as prod, stage, etc. This is truly one of the superpowers of containers…building deployment automation in code so that you can roll out in a defined, tested way…every time you roll out a new instance or database or change to an instance or database. Kevin also introduces us to the idea that many of us are already using containers and might not even know that we are. He points out that several Azure services like Databricks and Synapse Analytics use containers behind the scenes. Excellent post, Kevin!

Aaron Bertrand – What have you been up to with containers?

Aaron shows us what he’s been up to with containers, specifically spinning up containers to test out application compatibility when making changes around case-sensitivity and binary collation settings at the instance level. He describes how he can quickly spin up the container, run the test and remove the container quickly…and like we discussed earlier…this used to be something that would require provisioning a whole VM and installing SQL Server. Such a huge time saver. In addition to describing how he uses containers, Aaron also gives us some example code to start up a container with some of the unique settings he wanted to test. Thanks, Aaron, great stuff!

Tom – Containers and me

Tom discusses how he’s containers to deploy RabbitMQ, a monitoring stack using Grafana, and deploying a SQL Server environment via a build pipeline. Excellent stuff. Thanks for sharing, Tom! Tom also mentions my container-mate Andrew Pruski’s SQL Server and Containers Guide, this is fantastic stuff check it out! everything from getting started to deep dive is available there.

Todd Kleinhans – RAPIDS and SQL Server Containers

Todd shows us how you can use containers to enable data science scenarios. In his post, he shows you how to start up a RAPIDS container with access to your system’s GPU. There are two cool things to unpack there. First, RAPIDS, as Todd points out, is a suite of open-source software libraries and APIs, giving you an end-to-end data science and an analytics pipeline all in one container image. Spin that container up with access to your GPU, and you’re off to the races performing GPU accelerated data science without having to struggle with downloading software and setting it up…just grab the container and go. Of course, to do data science, you need data, so he also dives into how to spin up a SQL Server container and access that data from the RAPIDS application suite. Super awesome stuff, Todd!

Kendra Little – Create a Disposable SQL Server Database Container in an Azure DevOps Pipeline With Spawn

Kendra shows us how to create a disposable SQL Server Database Container in an Azure Pipeline using Spawn in this post. As discussed in the post, Spawn is a tool that addresses two key challenges when working with data in development processes, testing against realistic datasets and resetting that data after changes. Spawn brings the power of containers to help instantiate datasets rather than just applications. Combine that with Azure DevOps Pipelines, and you have a super slick way of building automated workflows and testing code changes against realistic datasets. Outstanding post, Kendra!

PS: I saw Spawn a few years back at a SQLSaturday…watch this space. I think they’re building something special here!

Mark Wilkinson – Baselining SQL Server with the TIG Stack

Next up, my fellow EightKB organizer Mark Wilkinson shows us how to stand up a STIG (Telegraf, InfluxDB, Grafana) monitoring stack using Docker Compose. Grab the code here! The STIG monitoring stack enables you to collect baseline metrics for your SQL Server instances and use visualization dashboards via Grafana. This post hits home for me. I will use this code to stand up performance monitoring environments for testing and spot troubleshooting. As a consultant, this would have been SO super valuable since I can quickly spin up the whole monitoring stack and collect metrics on instances…I’ve had many clients over the years that have no monitoring. This project would have been a HUGE time saver for me. Banging post, Mark!

Barney Lawrence – Containers for Business and Pleasure

In Barney’s post, he mixes business and pleasure…showing us how to deploy SQL Server in a container on docker backed by Windows Services for Linux (WSL) and how to deploy a Minecraft Bedrock Server using Docker Compose. There are a couple of cool things to point out here: first, how data is managed in both scenarios using Docker Volumes, and second, leveraging Docker Compose to manage the configuration and state of the Minecraft Server defining environment variables and volumes in code. Well done, Barney!

Cathrine Wilhelmsen – Developing in Containers using Visual Studio Code

In this post, Catherine walks us through setting up a development environment using containers in Visual Studio Code. She highlights some core reasons for using containers containers. First, containers give organizations the ability to control which libraries and tools developers are using. Second, containers enable organizations to quickly onboard new developers and consultants like herself online with the proper tooling as fast as possible to be productive as quickly as possible. Thank you for sharing this super valuable content, Catherine!

Deborah Melkin – What have I been doing with Containers

Deborah highlights the various use cases for running SQL Server in containers, things like quick deployment, and code and upgrade testing. She also introduces the term ‘virtual instance’, which is a fantastic way to describe to DBAs what you get when you run SQL Server in a container. Deborah also links to some other posts that where she describes her experiences getting started with docker and setting up ports for SQL Server in containers. Awesome post(s) :) thanks for this, Deborah!

And Last But Not Least, the Rule Breakers!!!

They didn’t post on my invite post, but I found them on that pesky #tsql2sday hashtag on Twitter.

Shane O’Neill – What have you been up to with containers?

In this post, Shane shares with us what happens when you run a Kubernetes cluster on your laptop…things get hot…fast. (Y’all remember when my laptop caught fire 🔥???) But anyway, Shane isolats the problem, cleans things up, and gets back to running SQL Server in containers in Docker on his laptop to keep things cool 😎 . Thanks for sharing this, Shane!

KUBERNETES…drink!

Rob Sewell – TSql2sday video – Azure Arc Enabled Data Services in AKS Cluster

The Beard brings it all together…in his “post” (which is a YouTube video because Rob is incredible and also a rule breaker), Rob shows you Azure Arc enabled Data Services (something near and dear to my heart)…he deploys an Azure Kubernetes Service cluster, an Azure Arc enabled Data Services deployment, a couple of SQL Server Managed Instances, and a complete monitoring and logging stack using Grafana and Kibana. And this, my friend, is the magic of containers and Kubernetes…Rob does all of this in code in a repeatable fashion in just about 30 minutes.

Summary

Summing this all up, there are a couple of primary themes here, speed and consistency. Containers enable you to develop, deploy and maintain applications quickly and consistently in code. And as we discussed in the Invitation post, containers are the foundation for the next generation of the Microsoft Data Platform; Azure Arc enabled Data Services! Thank you all again for your fantastic posts!