test-kitchen / kitchen-digitalocean

A Test Kitchen driver for DigitalOcean

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#config[:digitalocean_client_id] cannot be blank

jmreicha opened this issue · comments

Not sure if I'm just inputting something incorrectly but I receive the following error when I attempt to run a kitchen list.

aboutme_admin@jenkins:/tmp/me-test-cookbook$ kitchen list
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::UserError
>>>>>> Message: Kitchen::Driver::Digitalocean<default-ubuntu-12-10-x64>#config[:digitalocean_client_id] cannot be blank
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

Here is my .kitchen.yml:

driver:
  name: digitalocean
  require_chef_omnibus: 11.14.2

provisioner:
  name: chef_zero

platforms:
  - name: ubuntu-13-10-x64

I am using version 0.7.3 - Looks like I missed the newest release, how do I install?

Looks like you need to export your digitalocean client_id which was part of apiv1. I don't think there is a way to get these anymore unless you happen to have one.

0.8 is a beta release and supports apiv2. With apiv2 you have a access token instead. gem install --pre kitchen-digitalocean to get the pre-release.

You will need to set a environment variable in your shell. If you go with 0.8 there is only a access token.

export DIGITALOCEAN_ACCESS_TOKEN="mytoken"

If you have a client id and api key laying around and you want to stay on 0.7.3 you would do.

export DIGITALOCEAN_CLIENT_ID="myid"
export DIGITALOCEAN_API_KEY="apikey"

Alternatively you can add these to your .kitchen.yml like so.

driver:
  digitalocean_client_id: myid
  digitalocean_api_key: apikey

If you're still having problems feel free to ping me on irc.freenode.net / gregf

Thanks I will try it out.

You can still create v1 tokens at https://cloud.digitalocean.com/api_access

Looks like this is taking care of, I'm going to close this out. Feel free to reopen if you still need help.