Source: https://api.octoperf.com/doc/on-premise-agent/provider-type/digitalocean/

# DigitalOcean

## DigitalOcean

![DigitalOcean](https://api.octoperf.com/doc/on-premise-agent/provider-type/img/do/digital-ocean.png)

### Prerequisites

OctoPerf can **automatically start and stop DigitalOcean Droplets** on-demand using your **own DigitalOcean Account**.

In order to setup DigitalOcean in OctoPerf, the following items are required:

- **DigitalOcean Account**: a valid paid account is required,
- **Access Token**: a personal access token to allow driving your account programmatically (by OctoPerf EE).

### Access Token

![DigitalOcean Access Token](https://api.octoperf.com/doc/on-premise-agent/provider-type/img/do/do-access-token.png)

To create a personal access token:

- Login on your [DigitalOcean](https://digitalocean.com) account,
- Click on `API` from top menu,
- Click on `Generate new Token`,
- Enter token name (Example: `octoperf`),
- Select `Read and Write` access,
- Click on `Generate Token`.

Keep the generated token in a safe location for later use.

### Droplet Image

By default Octoperf EE uses the **Docker Once-click App** as the base image when launching the droplets. You can create your own droplet image with [Packer](https://packer.io) very easily.

!!! info
    When creating the droplet image using packer, save the image id. Also, make sure to copy the image to all the region you would like to use to provision machines.

## OctoPerf DO Provider

You can now setup the **DigitalOcean** Provider using the [On-Premise configuration panel](https://api.octoperf.com/doc/on-premise-agent/providers/#create-a-new-provider).

### Access

![do-configure](https://api.octoperf.com/doc/on-premise-agent/provider-type/img/do/do-configure.png)

The DigitalOcean provider has the following settings:

- **Provider Name**: the name as displayed when selecting the provider for a test run.

- **Access Token**: DigitalOcean API Key.

!!! info
    The Access token should give both `read` and `write` access to the account.

### Locations

![DigitalOcean Regions](https://api.octoperf.com/doc/on-premise-agent/provider-type/img/do/do-regions.png "DigitalOcean Regions")

Using the previously entered credentials, OctoPerf scans all the regions and looks for:

- **Images**: a digitalocean snapshot whose name starts with `octoperf`, otherwise it uses the `docker-18-04` image by default.

Each Region can be edited and all the automatically detected settings can be changed.

!!! Info
    The search functions are detailed in [this section of the navigation page](https://api.octoperf.com/doc/navigation/#filters).

### Floating IPs

[Floating IPs](https://www.digitalocean.com/docs/networking/floating-ips/) can be allocated using [Dedicated IPs](https://api.octoperf.com/doc/on-premise-agent/dedicated-ips/) management panel.
