Why Aren’t You Automating Database Deployments?

DevOps
Building out processes and mechanisms for automated code deployments and testing can be quite a lot of work and isn't easy. Now, try the same thing with data, and the challenges just shot through the roof. Anything from the simple fact that you must maintain the persistence of the data to data size to up time, and you have real problems in front of you. However, adopting database deployment automation and testing has enormous benefits. Faster, safer, production deployment enhances the protection built around your production systems. Whether we want to use the loaded term of DevOps or not, the benefits of this style of development and deployment are easily documented and measured. So, why are so few people doing it? Conservation of Momentum If we were talking about a…
Read More

DevOps for the DBA, Slide Deck

DevOps
I have an all day seminar I give called "DevOps for the DBA". If you're attending, thinking of attending, or you have attended, you might want to have the slide deck to review. I have published it here at SlideShare.Net. Fair warning. The slides are not the presentation. When you're attending a class that I teach, you're there for the live, in-person, interactive event of the training. The slides are not meant to be documentation. They are simply guideposts to keep me on track and to help illustrate certain points. If they are helpful to you, I'm happy to share. I just want you to know that reading through the slides can in no way be a substitute for actually showing up. If you would like to attend this seminar,…
Read More

How Do You Make DevOps Succeed?

DevOps
I love going to SQLSaturday events because I'm always asked questions that make me think. I was just at SQLSaturday Indianapolis (a great event, if you weren't there, you missed out). I was giving a session called "Extending DevOps to SQL Server" (which I'm giving this Saturday at SQLSaturday Providence). I was talking about the fact that I've been involved in successful DevOps implementations and I've been involved in failed DevOps implementations. The question that came up was, "What were the key differences between the failed and successful organizations?" Great Question. Management Buy-In I've seen attempts to implement DevOps strictly from the IT side of things. A relatively high functioning team recognizes the benefits an agile approach that's oriented towards improved collaboration between people that uses automation in support of…
Read More

Importance of Testing

DevOps
I've always said if you're running a script for the first time in a production environment, you're doing it wrong. Testing is fundamental to technology, yet it is one of the single most frequently skipped processes. Let's talk about this a moment. Developing in Production Through my work, I travel quite a bit. That means I get to meet a lot of different people with varying circumstances on their systems. I've even met someone who did all their development directly in production. Why? They ran a software that ran an assembly line. There wasn't a test assembly line. Oh yeah, they had checks and validations that all their inputs and outputs were valid prior to ever putting the code into production. However, they had no mechanisms, of any kind, for…
Read More

Implement DevOps One Step At a Time

DevOps
In preparation for my upcoming DevOps training days (see the bottom of this post for details) and for some articles I'm working on, I've been building all new automation processes for database deployments. In the past, I've been using a fairly simple (and far too simplistic) example to do most of my demos. I haven't built a full process in a little while. OH MY GOD!!! IT'S PAINFUL!!!!! Automation Ain't Easy The easy part of getting your DevOps done is the tooling. I say that all the time because it's true. The hard part is changing your organizations culture to support the level of communication necessary for a successful DevOps implementation. However, easy by comparison doesn't mean just simply easy. There's a lot of work involved and making mistakes early…
Read More

Containers: Create a Custom Container

Containers
Creating a custom container is where things get truly exciting. There's actually a ton of work and knowledge around this. To start with, I'm going to keep it simple. I'm going to create a container with a database & some data and a couple of general customizations. From that, we'll create our own container. To understand why I've got a series on containers, read here. Setting Up a Custom Container To start with, I'm going to spin up a container with nothing fancy: docker run -e 'ACCEPT_EULA=Y' ` -e 'SA_PASSWORD=$cthulhu1988' ` -p 1433:1433 ` --name DockerDemoTemplate ` -d mcr.microsoft.com/mssql/server:2019-CTP2.5-ubuntu With this running, let's connect up and make some changes: USE master; GO CREATE DATABASE CustomContainer; GO USE CustomContainer GO CREATE TABLE dbo.CustomTable (ID INT IDENTITY (1,1) NOT NULL PRIMARY KEY,…
Read More

Containers: Working With Volumes

Containers
In the previous two posts on containers I showed how use Docker commands to get an image and create a container. This time, we're going to create a container again, but, we're also going to create a volume so we can do some fun stuff. For an understanding of why I'm doing a series of blog posts on containers, read here. Docker Volumes You can create a container with a volume, or local, persistent storage. The usage is really simple: docker run -e 'ACCEPT_EULA=Y' ` -e 'SA_PASSWORD=$cthulhu1988' ` -p 1450:1433 ` --name DockerDemo17vol ` -v sqlvol:/var/opt/mssql ` -d mcr.microsoft.com/mssql/server:2017-latest This will create and kick off a new container based on SQL Server 2017. Nothing to it really. If you get the IP address for the machine, you can connect to…
Read More

Containers: Creating a Container

Containers
In yesterday's blog post we pulled SQL Server images in preparation for today's blog post where we create containers from those images. If you haven't already, get Docker installed and follow the instructions here to get at least one image on your machine. If you're interested in why I'm talking about containers all week, read this. I'm using all PowerShell commands to control Docker. Docker Run You can use 'docker create' to create an image and then start it up. However, we can just get started running a container from one of the images we downloaded yesterday. We can just simultaneously create and start the container using 'docker run': docker run -e 'ACCEPT_EULA=Y' ` -e 'SA_PASSWORD=$cthulhu1988' ` -p 1433:1433 ` --name dockerdemo ` -d mcr.microsoft.com/mssql/server:2017-latest Let's break this down a…
Read More

Containers: Getting an Image

Containers
I'm working with Docker running on Windows or Linux. There are other ways to do this, but Docker seems to be a pretty strong standard. I'll leave it to you to get Docker installed on your system. Go here to get the appropriate installation. I explain why I'm learning Docker and containers here if you're interested. Docker Pull The first command you have to learn is 'docker pull'. You then have to supply something for it to pull, an image that will be used to create your containers. I'm using Powershell for the commands I'm posting this week. Here's how you get an image with SQL Server 2017: docker pull mcr.microsoft.com/mssql/server:2017-latest Assuming you have Docker installed and running, you should get an image downloaded. Depending on your network bandwidth, this…
Read More

Learning Containers

DevOps
I find that I'm using containers more and more to get things done with SQL Server. They're so easy to set up for testing, spin 'em up, do stuff, turn 'em off, done. So, as I learn more and more about them, I figured it was time to start to share that learning here on the blog. First up, I'm NOT an expert on this topic. The two best people I know currently on this are Anthony Nocentino and Andrew Pruski. Those are the people you really should be learning the details from. I'm going to try to start to cover the introductory level of containers, Docker, and, at some point in the future, Kubernetes (maybe) and other orchestrators. However, I know that as my knowledge of how to work…
Read More