A Test Kitchen Driver for Digital Ocean
From this version forward the driver uses API V2 only. Use of image_id, flavor_id, and region_id have been replaced with image, size, and region. You can now use slugs instead of relying on the old data.json to translate IDs. Please refer to the examples below, and the API documentation for more information.
There are no external system requirements for this driver. However you will need access to an DigitalOcean account.
Installation and Setup
You'll need to install the gem on your development machine.
gem install kitchen-digitalocean
or add it to your Gemfile if you are using Bundler
source 'https://rubygems.org' gem 'test-kitchen' gem 'kitchen-digitalocean'
At minimum, you'll need to tell test-kitchen to use the digitalocean driver.
--- driver: name: digitalocean platforms: - name: ubuntu-12-10-x64
You also have the option of providing your credentials from environment variables.
export DIGITALOCEAN_ACCESS_TOKEN="1234" export DIGITALOCEAN_SSH_KEY_IDS="1234, 5678"
Note that your
SSH_KEY_ID must be the numeric id of your ssh key, not the symbolic name. To get the numeric ID
of your keys, use something like to following command to get them from the digital ocean API:
curl -X GET https://api.digitalocean.com/v2/account/keys -H "Authorization: Bearer $DIGITALOCEAN_ACCESS_TOKEN"
Please refer to the Getting Started Guide for any further documentation.
The driver now uses api v2 which provides slugs for image names, sizes, and regions.
--- platforms: - name: debian-7-0-x64 driver_config: region: ams1 - name: centos-6-4-x64 driver_config: size: 2gb # ...
Private networking is enabled by default, but will only work in certain regions. You can disable private networking by changing private_networking to false. Example below.
--- driver: - private_networking: false
IPv6 is disabled by default, you can enable this if needed. IPv6 is only available in limited regions.
--- driver: - ipv6: true
Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:
- Fork the repo
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Added some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request
Will Farrington, His fork was a help during the creation of my api v2 driver.
Apache 2.0 (see LICENSE)