Plugin installation is done via pip/easy_install which is the python language
package managers, its available by default on ubuntu. Also recommended
is virtualenv to sandbox this install from your system packages:

$ pip install -U juju-docean

Fwiw, currently the transitive dependency tree is PyYAML, requests, dop.

Setup

There are three steps for configuration and setup of this
provider. Configuring your digital ocean api keys, adding an
environment to juju’s config file, and setting up an ssh key for usage
on digital ocean machines.

DO API Keys

A digital ocean account is a pre-requisite, If you don’t have a
digital ocean account you can sign up here.

This digital ocean plugin uses the manual provisioning capabilities of
juju core. As a result its required to allocate machines in the
environment before deploying workloads. We’ll explore that more in a
moment.

SSH Key

An ssh key is required for use by this plugin and the public key
must be uploaded to the digital ocean control panel. If you have
multiple keys there you can specify the key name to use when creating
instances via the environment variable DO_SSH_KEY, config file, or cli
parameter.

Note If you have a large number of ssh keys, ssh will only attempt
a certain number of key logins before giving up, ideally you want to
use one the keys it will select first. Its not possible at this moment
to specify a private key to use for ssh. (see http://pad.lv/1270466)

Juju Config

Next let’s configure a juju environment for digital ocean, add an
a null provider enviroment to ‘environments.yaml’, for example:

We can terminate allocated machines by their machine id. By default
machines are forcibly terminated, which will also terminate any
units on those machines, and is not dependent on the machine actually
running.:

$ juju docean terminate-machine 1 2 3

And we can destroy the entire environment via:

$ juju docean destroy-environment

All commands have builtin help facilities and accept a -v option which will
print verbose output while running.

Constraints

Constraints are selection criteria used to determine what type of
machine to allocate for an environment. Those criteria can be related
to size of the machine, its location, or other provider specific
criteria.