Getting Started with Spawn

I’m excited that the Redgate Foundry is working on some cool projects. The Future of DevOps is one and part of that work is with Spawn. I’ve played with this a little, and I wanted to write about a few adventures I’ve had.

First, you need an account as Spawn is hosted and there is a login. The idea here is that the service (hosted now, but could be on premise) handles all of the complexity of databases in containers, spinning them up and managing them, with you just connecting to an endpoint to use the database. We can spin up SQL Server, PostgreSQL, MongoDB, MySQL, and Redis in this fashion. It’s truly a Database-as-a-Service (DBaaS).

Spawn on Windows

For once, this is easier, or I think it is. I downloaded the spawnctl.exe CLI and then put it in a folder in my path. For me, I have a “utilities” folder where I drop stuff and that’s where this lives. I can check this working with a version parameter.

2019-06-21 14_30_24-cmd

So far, so good. Now we need to log in. I like integrated authentication schemes, and this one works well. I start with a “spawnctl auth” call from the command line.

2019-06-21 14_32_40-cmd - spawnctl  auth

This pauses and opens a web browser window. It’s here I need to log in. We support Github and Microsoft, but have mostly been using Github for our demo work.


Once I click that, since I have a Github session elsewhere, I’m logged in and I get a code back.


I paste that back in the cmdline and I am authenticated. From here, I can then see what images I have. As you can see, there are both MSSQL and PostgreSQL images for me.

2019-06-21 14_33_55-cmd

I also have a few containers from my demo work.

2019-06-21 14_35_10-cmd

Let’s make a new container and connect to it. I’ll use Azure Data Studio, since I can connect to both SQL Server and PostgreSQL.

Logging In

To get a database, I’ll use a CREATE verb and the DATA-CONTAINER noun, along with an image. When this runs, I get a note this container is being created, then I get a response with login information.

2019-06-21 14_42_51-cmd

Let’s put that in ADS. I can copy/paste my credentials into a connection dialog and then hit Connect.

2019-06-21 14_43_52-SQLQuery_1 - disconnected - CoolADSNotebooks - Azure Data Studio

As you can see, I’m connected.

2019-06-21 14_44_21-● SQLQuery_1 -,53231.master (sa) - CoolADSNotebooks - Azure D

I see the demo database we’ve been using and the tables in there. How this works is worthy of more posts, but for now, this is pretty cool.

2019-06-21 14_45_04-● SQLQuery_1 -,53231.master (sa) - CoolADSNotebooks - Azure D

I can do the same thing with PostgreSQL. Create a container.

2019-06-21 14_48_00-cmd

Then connect (need to specify the port in Advanced)

2019-06-21 14_51_57-Window

And query:

2019-06-21 14_52_59-● SQLQuery_1 - (spawn_admin_bsiw) - CoolADSNotebooks

Pretty cool. Simple, easy, and I think about as fast and easy as any other cloud database. Here, though, I am spinning up a container from an image template. That’s valuable for dev work, and I’ll talk about that in the future.

About way0utwest

Editor, SQLServerCentral
This entry was posted in Blog and tagged , , , , . Bookmark the permalink.

2 Responses to Getting Started with Spawn

  1. paschott says:

    Looks interesting. I’m finally getting around to playing with Docker and K8 locally, though the Windows implementations apparently need a bit more work to get the same flexibility as Linux. Spawn looks interesting and along the lines of the sort of tech we’d want to use around our DBs (at least from what I’m reading so far).


Comments are closed.