Sha256: bca938a78e52a446a1501b866064dba642cdb1484274d1c26c8a1970cf6aca10
Contents?: true
Size: 1.02 KB
Versions: 16
Compression:
Stored size: 1.02 KB
Contents
module Kontena::Cli::Nodes::DigitalOcean class CreateCommand < Clamp::Command include Kontena::Cli::Common parameter "[NAME]", "Node name" option "--token", "TOKEN", "DigitalOcean API token", required: true option "--ssh-key", "SSH_KEY", "Path to ssh public key", required: true option "--size", "SIZE", "Droplet size", default: '1gb' option "--region", "REGION", "Region", default: 'ams2' option "--version", "VERSION", "Define installed Kontena version", default: 'latest' def execute require_api_url require_current_grid require 'kontena/machine/digital_ocean' grid = client(require_token).get("grids/#{current_grid}") provisioner = Kontena::Machine::DigitalOcean::NodeProvisioner.new(client(require_token), token) provisioner.run!( master_uri: api_url, grid_token: grid['token'], grid: current_grid, ssh_key: ssh_key, name: name, size: size, region: region, version: version ) end end end
Version data entries
16 entries across 16 versions & 1 rubygems