Skip to main content

How to - Sharing a data image

Working with a consistent dataset is important when in a team environment, but can cause issues when the data size grows. Sharing a data image with Spawn allows all members of your team to be able to quickly create data containers, all getting the same starting point but being isolated from each other's changes. You can also share data images created using the graduate command, allowing you to share changes you've made to your data container such as recreating a bug.

Spawn is currently in open beta. Complete the installation instructions to get access.

This is part of a series of short guides for getting up and running quickly with Spawn.

Data image graphic

Prerequisites#

In order to be able to share data images within your team, you and your teammates must be members of the same Spawn organization. Once you have successfully signed up with the Spawn service, you can add further users to your Spawn organization by running:

spawnctl create user --name <teammate's name> --email <teammate's email>

Now when the new user signs up with Spawn, they will be placed in your Spawn organization. Any other members of your team can be added to your Spawn organization in the same way. You can then follow the rest of the steps below to start sharing data images with your team.

note

If the users you want to share images with have already signed up to Spawn, please contact us and we will move those users into your Spawn organization manually.

Sharing with teams#

Sharing data images with Spawn is built on top of GitHub groups, allowing you to share a data image with any group that you are a member of, giving access to all its members.

GitHub groups are in the format of organization:groupname

You can share a data image both during and after creating the image, we'll cover both below.

During image creation#

When creating an image, we can share it with teams at the same time by adding them to the image definition file.

  1. Create a file developmentshared.yaml with your data image specifications.
sourceType: empty
name: devshared
engine: postgresql
version: 11.0
teams:
- "myorg:team1"
- "myorg:team2"
  1. Run the create data-image command to create and share the data-image.
spawnctl create data-image -f ./developmentshared.yaml

After image creation#

Share an existing data image using the update command.

spawnctl update data-image dev --team myorg:team2 --team myorg:team3

Identifying shared data images#

When viewing data images, any images which have been shared will have values in the Teams column.

spawnctl get data-images
ID Name Tags Engine Status CreatedAt Teams
00001 dev PostgreSQL Completed 1 day ago myorg:team2, myorg:team3
00002 devshared PostgreSQL Completed 2 minutes ago myorg:team1, myorg:team2

Using your data image#

Now you have a data image available and shared with team members, you can all create data containers and have access to the same data, in your own isolated environments.