Skip to content

Instantly share code, notes, and snippets.

@benbonnet
Created September 10, 2016 11:59
Show Gist options
  • Save benbonnet/ecb3acaf35e4294688c5c52d91e2d689 to your computer and use it in GitHub Desktop.
Save benbonnet/ecb3acaf35e4294688c5c52d91e2d689 to your computer and use it in GitHub Desktop.
require "droplet_kit"
userdata = "
#cloud-config
package_update: true
package_upgrade: true
packages:
- redis-server
"
client = DropletKit::Client.new(access_token: ENV["DO_KEY"])
droplet = DropletKit::Droplet.new(
name: 'deemx-temp',
region: 'nyc1',
image: 'ubuntu-16-04-x64',
size: '1gb',
user_data: userdata
)
droplet = client.droplets.create(droplet)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment