Module: Chef::Knife::Bootstrap::CommonBootstrapOptions

Included in:
AzureServerCreate, AzurermServerCreate, Chef::Knife::BootstrapAzure, Chef::Knife::BootstrapAzurerm
Defined in:
lib/chef/knife/bootstrap/common_bootstrap_options.rb

Class Method Summary collapse

Class Method Details

.included(includer) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/chef/knife/bootstrap/common_bootstrap_options.rb', line 24

def self.included(includer)
  includer.class_eval do

    deps do
      require "chef/knife/bootstrap"
      Chef::Knife::Bootstrap.load_deps
    end

    option :azure_availability_set,
      long: "--azure-availability-set NAME",
      description: "Optional. Name of availability set to add virtual machine into."

    option :azure_extension_client_config,
      long: "--azure-extension-client-config CLIENT_PATH",
      description: "Optional. Path to a client.rb file for use by the bootstrapped node."

    option :azure_os_disk_name,
      short: "-o DISKNAME",
      long: "--azure-os-disk-name DISKNAME",
      description: "Optional. Specifies the friendly name of the disk containing the guest OS image in the image repository."

    option :azure_service_location,
      short: "-m LOCATION",
      long: "--azure-service-location LOCATION",
      description: "Required if not using an Affinity Group. Specifies the geographic location - the name of the data center location that is valid for your subscription.
                    Eg: West US, East US, East Asia, Southeast Asia, North Europe, West Europe"

    option :azure_storage_account,
      short: "-a NAME",
      long: "--azure-storage-account NAME",
      description: "Required for advanced server-create option.
                    A name for the storage account that is unique within Windows Azure. Storage account names must be
                    between 3 and 24 characters in length and use numbers and lower-case letters only.
                    This name is the DNS prefix name and can be used to access blobs, queues, and tables in the storage account.
                    For example: http://ServiceName.blob.core.windows.net/mycontainer/"

    option :azure_vm_name,
      long: "--azure-vm-name NAME",
      description: "Required. Specifies the name for the virtual machine.
                    The name must be unique within the ResourceGroup.
                    The azure vm name cannot be more than 15 characters long"

    option :azure_vm_size,
      short: "-z SIZE",
      long: "--azure-vm-size SIZE",
      description: "Optional. Size of virtual machine. Default is Standard_A1_v2.
                    Eg: Standard_A1_v2, Standard_F2, Standard_G1 etc.",
      default: "Standard_A1_v2"

    deprecated_option :bootstrap_protocol,
      replacement: :connection_protocol,
      long: "--bootstrap-protocol PROTOCOL"

    option :cert_passphrase,
      long: "--cert-passphrase PASSWORD",
      description: "SSL Certificate Password"

    option :cert_path,
      long: "--cert-path PATH",
      description: "SSL Certificate Path"

    option :chef_daemon_interval,
      long: "--chef-daemon-interval INTERVAL",
      description: "Optional. Provide this option when --connection-protocol is set to 'cloud-api'.
                    It specifies the frequency (in minutes) at which the chef-service runs.
                    Pass 0 if you don't want the chef-service to be installed on the target machine."

    option :daemon,
      long: "--daemon DAEMON",
      description: "Optional. Configures the chef-client service for unattended execution. Requires --connection-protocol to be 'cloud-api' and the node platform to be Windows.
                    Options: 'none' or 'service' or 'task'.
                    none - Currently prevents the chef-client service from being configured as a service.
                    service - Configures the chef-client to run automatically in the background as a service.
                    task - Configures the chef-client to run automatically in the background as a scheduled task."

    option :extended_logs,
      long: "--extended-logs",
      boolean: true,
      default: false,
      description: "Optional. Provide this option when --connection-protocol is set to 'cloud-api'. It shows chef converge logs in detail."

    option :tcp_endpoints,
      short: "-t PORT_LIST",
      long: "--tcp-endpoints PORT_LIST",
      description: "Comma-separated list of TCP local and public ports to open e.g. '80:80,433:5000'"

    option :thumbprint,
      long: "--thumbprint THUMBPRINT",
      description: "The thumprint of the ssl certificate"
  end
end