Digital Ocean

Ops can integrate with your existing Digital Ocean account.

Pre-requisites

  1. Create an account in Digital Ocean;

  2. Access Application & API page:

    • Generate a token and export the value to the environment variable DO_TOKEN.

    • Generate space access keys and export the key and the secret to the environment variables SPACES_KEY and SPACES_SECRET.

  3. Access Spaces page and create a space;

  4. Set your bucket name with the space name and set the region name where the space was created in the configuration file;

Configuration example.

{
  "CloudConfig": {
    "BucketName": "ops",
    "Zone": "sfo3"
  }
}

Image Operations

Create Image

You can create an image in Digital Ocean with the following command.

For creating an image using a particular package, you need to provide the package name to ops image create command with -p option.

List Images

You can list existing images on Digital Ocean with ops image list -t do -c config.json.

Delete Image

ops image delete <imagename> can be used to delete an image from Digital Ocean.

Instance Operations

Create Instance

After the successful creation of an image in Digital Ocean, we can create an instance from an existing image.

List Instances

You can list instance on Digital Ocean using ops instance list command.

Get Logs for Instance

Work in progress.

Delete Instance

ops instance delete command can be used to delete instance on Digital Ocean.

Last updated

Was this helpful?