Spawn

Spawn

  • Docs
  • Help
  • Blog

›Commands

Spawn

  • Getting started

Concepts

  • Introduction
  • Source
  • Data image
  • Team
  • Tag
  • Data Container
  • Branch
  • Summary

Source Configuration

  • Source configuration
  • Empty
  • Scripts
  • Backup

Engine Support

  • Database engine Support

Commands

  • Introduction
  • Authenticate
  • Create data-image
  • Get data-image
  • Delete data-image
  • Update data-image
  • Create data-container
  • Get data-container
  • Delete data-container
  • Save data-container
  • Reset data-container
  • Load data-container
  • Graduate data-container
  • Logs data-container
  • Create access-token
  • Get access-token
  • Delete access-token
  • Bash completion

Other

  • Set up SSL for Redis

Get data-container

Overview

You can review your Data Container by using the get command.

Commands

$ spawnctl get data-containers
$ spawnctl get data-container <ContainerName_Or_ContainerID>

You can change the output format when getting data containers to return more information. -o json will print the data container information out as JSON, including connection details (hostname, port, username, password). This makes it easier to consume Spawn as part of a startup script for an application as you can dynamically configure database connection details.

$ spawnctl get data-container <ContainerName_Or_ContainerID> -o json

Tutorial

In this tutorial we will create a Data Image, then create a Data Container from that image. We will then review the Data Container information.

As a prerequisite you should've followed the instructions to install spawnctl

  1. Create a file development.yaml with your Data Image specifications.

    sourceType: empty
    name: dev
    engine: postgresql
    

    In this case we want to create a PostgreSQL Data Image that is completely empty and is named dev.

  2. Run the following command to create a Data Image.

    $ spawnctl create data-image -f ./development.yaml
    Data image 'dev' created!
    
  3. Create a Data Container from the newly created Data Image.

    $ spawnctl create data-container --image dev
    Data container 'dev-rambbomj' created!
    -> Host=instances.spawn.cc;Port=53223;User ID=<some_user_id>;Password=<some_password>;
    
  4. You can verify your Data Container was properly created by running the following command.

    $ spawnctl get data-containers
    NAME          CONTAINER ID  REVISION  STATUS  MESSAGE  ENGINE      CREATED
    dev-rambbomj  10001         rev.0     2       Running  PostgreSQL  1 minute ago
    
  5. You can also get only that specific container.

    $ spawnctl get data-container dev-rambbomj
    NAME          CONTAINER ID  REVISION  STATUS  ENGINE      MESSAGE  CREATED
    dev-rambbomj  10005         rev.0     2       PostgreSQL  Running  11 seconds ago
    
← Create data-containerDelete data-container →
  • Overview
  • Commands
  • Tutorial
Spawn
Docs
Getting StartedConceptsSpawnctl
More
BlogBeta
Copyright © 2019 Red Gate Software Ltd