opdemand/deis — pull request #348 by tombh (2013-12-01 10:13:46+00:00)
Title: Use DO creds from knife.rb. Also, respond to failed knife bootstrap by deleting things.

I want to be able to use multiple Digital Ocean accounts on my machine, so I'm not putting my DO credentials in environment variables but rather using multiple `.chef` folders that I switch between using symlinks. The current provision script relies on the DO creds being in the environment.

Including the above error I had more errors and had to delete the failed DO server and Chef node/client a few times, so I thought I'd automate that process by detecting if `knife bootstrap` failed and doing the various deletions programatically.

I guess it would make sense if the CLI client also used `knife.rb` to get the credentials. In my case I just did `DIGITAL_OCEAN_CLIENT_ID=abc123 DIGITAL_OCEAN_API_KEY=abc123 deis providers:discover` to get around it.