Sha256: e8e8a74e575987779c7511970ed28da875260ed3236cf59ac08549edddcb6fea
Contents?: true
Size: 1.69 KB
Versions: 2
Compression:
Stored size: 1.69 KB
Contents
module Kontena::Plugin::Azure::Nodes class CreateCommand < Kontena::Command include Kontena::Cli::Common include Kontena::Cli::GridOptions option "--subscription-id", "SUBSCRIPTION ID", "Azure subscription id", required: true option "--subscription-cert", "CERTIFICATE", "Path to Azure management certificate", attribute_name: :certificate, required: true option "--size", "SIZE", "SIZE", default: 'Small' option "--network", "NETWORK", "Virtual Network name" option "--subnet", "SUBNET", "Subnet name" option "--ssh-key", "SSH KEY", "SSH private key file", required: true option "--location", "LOCATION", "Location", default: 'West Europe' option "--version", "VERSION", "Define installed Kontena version", default: 'latest' parameter "[NAME]", "Node name" def execute require_api_url require_current_grid require 'kontena/machine/azure' grid = fetch_grid provisioner = provisioner(client(require_token), subscription_id, certificate) provisioner.run!( master_uri: api_url, grid_token: grid['token'], grid: current_grid, ssh_key: ssh_key, name: name, size: size, virtual_network: network, subnet: subnet, location: location, version: version ) end # @param [Kontena::Client] client # @param [String] subscription_id # @param [String] certificate # @return [Kontena::Machine::Azure::NodeProvisioner] def provisioner(client, subscription_id, certificate) Kontena::Machine::Azure::NodeProvisioner.new end # @return [Hash] def fetch_grid client(require_token).get("grids/#{current_grid}") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kontena-plugin-azure-0.2.0.pre1 | lib/kontena/plugin/azure/nodes/create_command.rb |
kontena-plugin-azure-0.1.0 | lib/kontena/plugin/azure/nodes/create_command.rb |