Sha256: 636970f8b6a5dba651531f3f6cfd8d027c53072c5c8c093b321e4ed89df688cf

Contents?: true

Size: 1.42 KB

Versions: 7

Compression:

Stored size: 1.42 KB

Contents

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

    option "--access-key", "ACCESS_KEY", "AWS access key ID", required: true
    option "--secret-key", "SECRET_KEY", "AWS secret key", required: true
    option "--key-pair", "KEY_PAIR", "EC2 Key Pair", required: true
    option "--ssl-cert", "SSL CERT", "SSL certificate file"
    option "--region", "REGION", "EC2 Region", default: 'eu-west-1'
    option "--zone", "ZONE", "EC2 Availability Zone", default: 'a'
    option "--vpc-id", "VPC ID", "Virtual Private Cloud (VPC) ID"
    option "--subnet-id", "SUBNET ID", "VPC option to specify subnet to launch instance into"
    option "--type", "SIZE", "Instance type", default: 't2.small'
    option "--storage", "STORAGE", "Storage size (GiB)", default: '30'
    option "--version", "VERSION", "Define installed Kontena version", default: 'latest'
    option "--auth-provider-url", "AUTH_PROVIDER_URL", "Define authentication provider url"

    def execute
      require 'kontena/machine/aws'

      provisioner = Kontena::Machine::Aws::MasterProvisioner.new(access_key, secret_key, region)
      provisioner.run!(
          type: type,
          vpc: vpc_id,
          zone: zone,
          subnet: subnet_id,
          ssl_cert: ssl_cert,
          storage: storage,
          version: version,
          key_pair: key_pair,
          auth_server: auth_provider_url
      )
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
kontena-cli-0.10.3 lib/kontena/cli/master/aws/create_command.rb
kontena-cli-0.10.2 lib/kontena/cli/master/aws/create_command.rb
kontena-cli-0.10.1 lib/kontena/cli/master/aws/create_command.rb
kontena-cli-0.10.0 lib/kontena/cli/master/aws/create_command.rb
kontena-cli-0.9.3 lib/kontena/cli/master/aws/create_command.rb
kontena-cli-0.9.2 lib/kontena/cli/master/aws/create_command.rb
kontena-cli-0.9.1 lib/kontena/cli/master/aws/create_command.rb