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. By default
all keys in the digital ocean account will be tried, so no user
configuration is needed. A specific key to utilize can be specified with
the environment variable DO_SSH_KEY=”key_name” where key_name is the name of
the key in the digital ocean management console.

Juju Config

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

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.

‘region’ to denote the digital ocean data center to utilize. All digitalocean
data centers are supported and various short hand aliases are defined. ie. valid
values include ams2, nyc1, nyc2, sfo1, sg1. The plugin defaults to nyc2.

‘transfer’ to denote the terabytes of transfer included in the
instance montly cost (integer size in gigabytes).