Sha256: 2375c094012b4fd3251e4a6741a9b888dafe3408a8a2c5fc6c2473feba9cf80b

Contents?: true

Size: 907 Bytes

Versions: 26

Compression:

Stored size: 907 Bytes

Contents

require 'securerandom'

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

    option "--memory", "MEMORY", "How much memory node has", default: '512'
    option "--version", "VERSION", "Define installed Kontena version", default: 'latest'
    option "--auth-provider-url", "AUTH_PROVIDER_URL", "Define authentication provider url"
    option "--vault-secret", "VAULT_SECRET", "Secret key for Vault"
    option "--vault-iv", "VAULT_IV", "Initialization vector for Vault"

    def execute
      require 'kontena/machine/vagrant'
      provisioner = Kontena::Machine::Vagrant::MasterProvisioner.new
      provisioner.run!(
        memory: memory,
        version: version,
        auth_server: auth_provider_url,
        vault_secret: vault_secret || SecureRandom.hex(24),
        vault_iv: vault_iv || SecureRandom.hex(24)
      )
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
kontena-cli-0.14.7 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.14.6 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.14.5 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.14.4 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.14.3 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.14.2 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.14.1 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.14.0 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.13.4 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.13.3 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.13.2 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.13.1 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.13.0.1 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.13.0 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.12.3 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.12.2 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.12.1 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.12.0 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.11.7 lib/kontena/cli/master/vagrant/create_command.rb
kontena-cli-0.11.6 lib/kontena/cli/master/vagrant/create_command.rb