Sha256: 68406013c2e51c170e608774393d1f202157b27a5e2db45c9df6f72e1e96a14e

Contents?: true

Size: 788 Bytes

Versions: 6

Compression:

Stored size: 788 Bytes

Contents

module Kontena::Cli::Nodes::Vagrant
  class CreateCommand < Clamp::Command
    include Kontena::Cli::Common

    option "--name", "NAME", "Node name"
    option "--memory", "MEMORY", "How much memory node has", default: '1024'
    option "--version", "VERSION", "Define installed Kontena version", default: 'latest'

    def execute
      require_api_url
      require_current_grid

      require 'kontena/machine/vagrant'
      grid = client(require_token).get("grids/#{current_grid}")
      provisioner = Kontena::Machine::Vagrant::NodeProvisioner.new(client(require_token))
      provisioner.run!(
        master_uri: api_url,
        grid_token: grid['token'],
        grid: current_grid,
        name: name,
        memory: memory,
        version: version
      )
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
kontena-cli-0.8.4 lib/kontena/cli/nodes/vagrant/create_command.rb
kontena-cli-0.8.3 lib/kontena/cli/nodes/vagrant/create_command.rb
kontena-cli-0.8.2 lib/kontena/cli/nodes/vagrant/create_command.rb
kontena-cli-0.8.1 lib/kontena/cli/nodes/vagrant/create_command.rb
kontena-cli-0.8.0.1 lib/kontena/cli/nodes/vagrant/create_command.rb
kontena-cli-0.8.0 lib/kontena/cli/nodes/vagrant/create_command.rb