Updated: April 14, 2014
Goal: Provision a server on Digital Ocean using an existing chef-solo project.
Audience: Sysadmins and developers with CLI experience and general Chef knowledge.
Dependencies: ruby, git, chef, knife-solo
Tested on OSX 10.9.2
Helpful links
Knife-solo berkshelf integration doc
Digital Ocean Example
Install Gems
$ gem install knife-digital_ocean --no-ri --no-rdoc
- Configure ssh key with digital ocean
Configure knife api keys:
nano ~/.chef/knife.rb
knife[:digital_ocean_client_id] = 'your_client_id'
knife[:digital_ocean_api_key] = 'your_api_key'
Ensure you are configured correctly
knife digital_ocean droplet list
Provision
$ cd {project_directory}
$ knife digital_ocean droplet create -N {hostname} --ssh-keys {key-id} --image {image-id} --location 1 --size 66 --solo
(For the future) Update server config
$ knife solo cook root@{ip} nodes/{hostname}.json
- Configure DNS at digitalocean.com