Home

Awesome

dev-droplet

Recipes for building a DigitalOcean Droplet for my needs, fell free to fork and adapt to your own :)

Dependencies

Packer >= 0.3.10 for building DigitalOcean droplets and Vagrant 1.1+ for local testing.

What's included?

Initial setup

First clone the repo and install the required cookbooks to the right path:

$ git clone https://github.com/fgrehm/dev-droplet.git
$ cd dev-droplet
$ gem install librarian-chef
$ librarian-chef install --path=vendor

Testing on Vagrant

An example user and a Vagrantfile are provided along with the project, so just go ahead and vagrant up after installing the required cookbooks with librarian-chef.

Create Droplet image with Packer

Create a variables.json file with your DigitalOcean keys like:

{
  "do_client_id": "DIGITAL_OCEAN_CLIENT_ID",
  "do_api_key": "DIGITAL_OCEAN_API_KEY"
}

Copy the provided data_bags/users/developer.json.example over to data_bags/users/developer.json and add your desired password and public SSH key to the data bag and run ./build from the project's root.

To generate the password you can use openssl passwd -1 "theplaintextpassword"