Setting up Digital Ocean provider for Vagrant25 Aug 2014 devops
In this post I’ll detail the steps I followed to get one up and running.
These steps were tried on
Mac OS X 10.9.4, I would hope that they apply to other *nix family of operating systems as well. I am running
Vagrant v1.3.5 which I realize is not the most recent version.
Get the right Plugin
There seem to be two plugins out there
vagrant-digital_ocean. The latter worked for me.
vagrant plugin install vagrant-digital_ocean
The other plugin still sets up things right (I could see it listed in
~/.vagrant.d/plugins.json but could never use it).
OpenSSL and Certificates
brew install openssl
which setup some paths for me under
Now I needed a certificate file which OpenSSL could use to connect to Digital Ocean. Apparently, this file used to be provided as part of
curl-ca-bundle homebrew bundle, but I couldn’t install it (Not found). Instead I used this URL to get it and un-tarred it into
/usr/local/etc/openssl/certs. This gave me
After the certificate file was setup, I modified my
~/.profile to include:
Digital Ocean Access Token
I then went to the Apps & API section on my Digital Ocean Web Interface and created a new Personal Access Token. Digital Ocean gave me a long hex string which I exported as an environment variable in my
I then re-sourced my
Digital Ocean Provider configuration in Vagrantfile
Finally, I setup Digital Ocean configuration in my
Bringing up Vagrant
I was then able to provision a Vagrant instance on Digital Ocean using:
vagrant up --provider=digital_ocean
Things seemed to work fine thereafter. Hope this helps.