The create-vm-extension
command will create or update an existing vm extension.
This creates/updates a VM extension
Usage:
om [options] create-vm-extension [<args>]
Flags:
--cloud-properties, -cp string cloud properties in JSON format
--config, -c string path to yml file containing all config fields (see docs/create-vm-extension/README.md for format)
--name, -n string VM extension name
--ops-file, -o string (variadic) YAML operations file
--var, -v string (variadic) load variable from the command line. Format: VAR=VAL
--vars-env, OM_VARS_ENV string (variadic) load variables from environment variables (e.g.: 'MY' to load MY_var=value)
--vars-file, -l string (variadic) load variables from a YAML file
Global Flags:
--ca-cert, OM_CA_CERT string OpsManager CA certificate path or value
--client-id, -c, OM_CLIENT_ID string Client ID for the Ops Manager VM (not required for unauthenticated commands)
--client-secret, -s, OM_CLIENT_SECRET string Client Secret for the Ops Manager VM (not required for unauthenticated commands)
--connect-timeout, -o, OM_CONNECT_TIMEOUT int timeout in seconds to make TCP connections (default: 10)
--decryption-passphrase, -d, OM_DECRYPTION_PASSPHRASE string Passphrase to decrypt the installation if the Ops Manager VM has been rebooted (optional for most commands)
--env, -e string env file with login credentials
--help, -h bool prints this usage information (default: false)
--password, -p, OM_PASSWORD string admin password for the Ops Manager VM (not required for unauthenticated commands)
--request-timeout, -r, OM_REQUEST_TIMEOUT int timeout in seconds for HTTP requests to Ops Manager (default: 1800)
--skip-ssl-validation, -k, OM_SKIP_SSL_VALIDATION bool skip ssl certificate validation during http requests (default: false)
--target, -t, OM_TARGET string location of the Ops Manager VM
--trace, -tr, OM_TRACE bool prints HTTP requests and response payloads
--username, -u, OM_USERNAME string admin username for the Ops Manager VM (not required for unauthenticated commands)
--version, -v bool prints the om release version (default: false)
OM_VARS_ENV string **EXPERIMENTAL** load vars from environment variables by specifying a prefix (e.g.: 'MY' to load MY_var=value)
vm-extension-config:
name: some_vm_extension
cloud_properties:
source_dest_check: false
The create-vm-extension
command now supports variable substitution inside the config template:
# config.yml
vm-extension-config:
name: some_vm_extension
cloud_properties:
source_dest_check: ((enable_source_dest_check))
Values can be provided from a separate variables yaml file (--vars-file
) or from environment variables (--vars-env
).
To load variables from a file use the --vars-file
flag.
# vars.yml
enable_source_dest_check: false
om create-vm-extension \
--config config.yml \
--vars-file vars.yml
To load variables from a set of environment variables, specify the common
environment variable prefix with the --vars-env
flag.
OM_VAR_enable_source_dest_check=false om create-vm-extension \
--config config.yml \
--vars-env OM_VAR
The interpolation support is inspired by similar features in BOSH. You can refer to the BOSH documentation for details on how interpolation is performed.