The bosh-env
command setup environment variables to target bosh director and/or credhub deployed on bosh director
Usage:
om [OPTIONS] bosh-env [bosh-env-OPTIONS]
This prints environment variables to target the BOSH director and Credhub. You
can invoke it directly to see its output, or use it directly with an
evaluate-type command:
On posix system: eval "$(om bosh-env)"
On powershell: iex $(om bosh-env | Out-String)
Application Options:
--ca-cert= OpsManager CA certificate path or value
[$OM_CA_CERT]
-c, --client-id= Client ID for the Ops Manager VM (not required
for unauthenticated commands) [$OM_CLIENT_ID]
-s, --client-secret= Client Secret for the Ops Manager VM (not
required for unauthenticated commands)
[$OM_CLIENT_SECRET]
-o, --connect-timeout= timeout in seconds to make TCP connections
(default: 10) [$OM_CONNECT_TIMEOUT]
-d, --decryption-passphrase= Passphrase to decrypt the installation if the
Ops Manager VM has been rebooted (optional for
most commands) [$OM_DECRYPTION_PASSPHRASE]
-e, --env= env file with login credentials
-p, --password= admin password for the Ops Manager VM (not
required for unauthenticated commands)
[$OM_PASSWORD]
-r, --request-timeout= timeout in seconds for HTTP requests to Ops
Manager (default: 1800) [$OM_REQUEST_TIMEOUT]
-k, --skip-ssl-validation skip ssl certificate validation during http
requests [$OM_SKIP_SSL_VALIDATION]
-t, --target= location of the Ops Manager VM [$OM_TARGET]
--trace prints HTTP requests and response payloads
[$OM_TRACE]
-u, --username= admin username for the Ops Manager VM (not
required for unauthenticated commands)
[$OM_USERNAME]
--vars-env= load vars from environment variables by
specifying a prefix (e.g.: 'MY' to load
MY_var=value) [$OM_VARS_ENV]
-v, --version prints the om release version
Help Options:
-h, --help Show this help message
[bosh-env command options]
--shell-type= Prints for the given shell (posix|powershell)
-b, --bosh Prints the BOSH director environment variables
-c, --credhub Prints the Credhub environment variables
-u, --unset Prints unset commands for the environment
variables
-i, --ssh-private-key= Location of ssh private key to use to tunnel
through the Ops Manager VM. Only necessary if
bosh director is not reachable without a tunnel.
The ssh-private-key
argument is required
when using a local bosh cli without an ssh tunnel.
Otherwise it is optional.
eval "$(om bosh-env --ssh-private-key=$KEY_FILE)"
In order to un-target the director/credhub, the following environment variables need to be unset:
unset BOSH_CLIENT
unset BOSH_CLIENT_SECRET
unset BOSH_ENVIRONMENT
unset BOSH_CA_CERT
unset BOSH_ALL_PROXY
unset CREDHUB_CLIENT
unset CREDHUB_SECRET
unset CREDHUB_CA_CERT
unset CREDHUB_PROXY