No description
Find a file
2024-02-06 09:16:34 -05:00
license add LGPL license 2022-07-11 12:33:35 -04:00
.gitignore add gitignore 2023-05-27 13:17:57 -04:00
nemo general fixes and improvements 2024-02-06 09:16:34 -05:00
README.md add license to README header 2022-07-11 12:34:33 -04:00

Nemo: Navigate the DigitalOcean (LGPLv3)

Usage

Variables

Variables can be set at execution, or by placing a .nemo dotfile in your working directory.

NEMO_DOAPIKEY

Your DigitalOcean API Key

NEMO_DOAPIKEY=yourkey; nemo --create --droplet --file payload.json

Actions

-c, --create

Create a resource

nemo --create --droplet --file payload.json

-D, --destroy, --delete

Destroy a resource

nemo --destroy --droplet --name my-droplet

-l, --list

Lists resources

nemo --list --project

Resources

Droplets -d, --droplet

Actions: list, create, destroy

SSH Keys -k, --key

Actions: list

Projects -p, --project

Actions: list

Virtual Private Clouds -v, --vpc

Actions: list

Options

-C <path>, --cloud-config <path>

An input cloud-config file

Example: cloud-config.yml
#cloud-config
package_update: true
package_upgrade: true
package_reboot_if_required: true
packages:
  - build-essential
runcmd:
  - /usr/local/config
write_files:
  - path: /usr/local/config
    owner: root:root
    permissions: '0500'
    content: |
      #!/bin/bash
      echo Hello, World!
nemo --create --droplet --file payload.json --cloud-config my-cloud-config.yml

-h, --help

View help text

-f <path>, --file <path>

An input JSON file for POST/PATCH requests. The file must contain an array of objects.

Example: payload.json
[{
    "name": "my-droplet",
    "region": "sfo3",
    "size": "s-1vcpu-1gb-amd",
    "image": "ubuntu-22-04-x64"
}]
nemo --create --droplet --file payload.json

-i <resource-id>, --id <resource-id>

Specify the unique identifier of a resource

nemo --destroy --droplet --id 106926987

-n <resource-name>, --name <resource-name>

Specify the name of a resource

nemo --destroy --droplet --name my-droplet

-P <project-id>, --target-project <project-id>

The project to which to deploy

nemo --create --droplet --file payload.json --target-project 55608511-eaa0-47aa-8fa6-e82299e938fd

-t <tag>, --tag <tag>

Specify the tag of a resource

nemo --destroy --droplet --tag my-tag