rset(1) : Formulas

Digital Ocean

droplet_kit is a library for administering Digital Ocean accounts.

Instance Creation

interpreter=/usr/local/bin/ruby25

digital_ocean:
    require 'droplet_kit'
    client = DropletKit::Client.new(access_token: 'XXXXXX')
    my_ssh_keys = client.ssh_keys.all.collect {|key| key.fingerprint}
    droplet = DropletKit::Droplet.new(
        :name => 'scriptedconfiguration',
        :region => 'nyc3',
        :image => 'freebsd-11-2-x64',
        :size => 's-1vcpu-1gb',
        :ssh_keys => my_ssh_keys
    )
    created = client.droplets.create(droplet)
    puts client.droplets.find(id: created.id.to_s).status

Last updated on September 12, 2018