Difference between revisions of "Juju bootstrap --help"

From wikieduonline
Jump to navigation Jump to search
(Created page with "<pre> juju bootstrap --help Usage: juju bootstrap [options] [<cloud name>[/region] [<controller name>]] Summary: Initializes a cloud environment. Global Options: --debug (...")
 
 
Line 1: Line 1:
 +
{{lowercase}}
 +
[[juju bootstrap]] --help
 
<pre>
 
<pre>
juju bootstrap --help
 
 
Usage: juju bootstrap [options] [<cloud name>[/region] [<controller name>]]
 
Usage: juju bootstrap [options] [<cloud name>[/region] [<controller name>]]
  

Latest revision as of 16:38, 28 September 2021

juju bootstrap --help
Usage: juju bootstrap [options] [<cloud name>[/region] [<controller name>]]

Summary:
Initializes a cloud environment.

Global Options:
--debug  (= false)
    equivalent to --show-log --logging-config=<root>=DEBUG
-h, --help  (= false)
    Show help on a command or other topic.
--logging-config (= "")
    specify log levels for modules
--quiet  (= false)
    show no informational output
--show-log  (= false)
    if set, write the log file to stderr
--verbose  (= false)
    show more verbose output

Command Options:
-B, --no-browser-login  (= false)
    Do not use web browser for authentication
--agent-version (= "")
    Version of agent binaries to use for Juju agents
--auto-upgrade  (= false)
    After bootstrap, upgrade to the latest patch release
--bootstrap-constraints (= "")
    Specify bootstrap machine constraints
--bootstrap-image (= "")
    Specify the image of the bootstrap machine
--bootstrap-series (= "")
    Specify the series of the bootstrap machine
--build-agent  (= false)
    Build local version of agent binary before bootstrapping
--clouds  (= false)
    Print the available clouds which can be used to bootstrap a Juju environment
--config  (= )
    Specify a controller configuration file, or one or more configuration
    options
    (--config config.yaml [--config key=value ...])
--constraints (= "")
    Set model constraints
--credential (= "")
    Credentials to use when bootstrapping
-d, --default-model (= "default")
    Name of the default hosted model for the controller
--force  (= false)
    Allow the bypassing of checks such as supported series
--keep-broken  (= false)
    Do not destroy the model if bootstrap fails
--metadata-source (= "")
    Local path to use as agent and/or image metadata source
--model-default  (= )
    Specify a configuration file, or one or more configuration
    options to be set for all models, unless otherwise specified
    (--model-default config.yaml [--model-default key=value ...])
--no-default-model  (= false)
    Do not create a default model
--no-gui  (= false)
    Do not install the Juju GUI in the controller when bootstrapping
--no-switch  (= false)
    Do not switch to the newly created controller
--regions (= "")
    Print the available regions for the specified cloud
--to (= "")
    Placement directive indicating an instance to bootstrap

Details:
Used without arguments, bootstrap will step you through the process of
initializing a Juju cloud environment. Initialization consists of creating
a 'controller' model and provisioning a machine to act as controller.

We recommend you call your controller ‘username-region’ e.g. ‘fred-us-east-1’
See --clouds for a list of clouds and credentials.
See --regions <cloud> for a list of available regions for a given cloud.

Credentials are set beforehand and are distinct from any other
configuration (see `juju add-credential`).
The 'controller' model typically does not run workloads. It should remain
pristine to run and manage Juju's own infrastructure for the corresponding
cloud. Additional (hosted) models should be created with `juju create-
model` for workload purposes.
Note that a 'default' model is also created and becomes the current model
of the environment once the command completes. It can be discarded if
other models are created.

If '--bootstrap-constraints' is used, its values will also apply to any
future controllers provisioned for high availability (HA).

If '--constraints' is used, its values will be set as the default
constraints for all future workload machines in the model, exactly as if
the constraints were set with `juju set-model-constraints`.

It is possible to override constraints and the automatic machine selection
algorithm by assigning a "placement directive" via the '--to' option. This
dictates what machine to use for the controller. This would typically be
used with the MAAS provider ('--to <host>.maas').

You can change the default timeout and retry delays used during the
bootstrap by changing the following settings in your configuration
(all values represent number of seconds):
    # How long to wait for a connection to the controller
    bootstrap-timeout: 600 # default: 10 minutes
    # How long to wait between connection attempts to a controller
address.
    bootstrap-retry-delay: 5 # default: 5 seconds
    # How often to refresh controller addresses from the API server.
    bootstrap-addresses-delay: 10 # default: 10 seconds

It is possible to override the series Juju attempts to bootstrap on to, by
supplying a series argument to '--bootstrap-series'.

An error is emitted if the determined series is not supported. Using the
'--force' option to override this check:

	juju bootstrap --bootstrap-series=focal --force

Private clouds may need to specify their own custom image metadata and
tools/agent. Use '--metadata-source' whose value is a local directory.

By default, the Juju version of the agent binary that is downloaded and
installed on all models for the new controller will be the same as that
of the Juju client used to perform the bootstrap.
However, a user can specify a different agent version via '--agent-version'
option to bootstrap command. Juju will use this version for models' agents
as long as the client's version is from the same Juju release series.
In other words, a 2.2.1 client can bootstrap any 2.2.x agents but cannot
bootstrap any 2.0.x or 2.1.x agents.
The agent version can be specified a simple numeric version, e.g. 2.2.4.

For example, at the time when 2.3.0, 2.3.1 and 2.3.2 are released and your
agent stream is 'released' (default), then a 2.3.1 client can bootstrap:
    * 2.3.0 controller by running '... bootstrap --agent-version=2.3.0 ...';
    * 2.3.1 controller by running '... bootstrap ...';
    * 2.3.2 controller by running 'bootstrap --auto-upgrade'.
However, if this client has a copy of codebase, then a local copy of Juju
will be built and bootstrapped - 2.3.1.1.

Bootstrapping to a k8s cluster requires that the service set up to handle
requests to the controller be accessible outside the cluster. Typically this
means a service type of LoadBalancer is needed, and Juju does create such a
service if it knows it is supported by the cluster. This is performed by
interrogating the cluster for a well known managed deployment such as microk8s,
GKE or EKS.

When bootstrapping to a k8s cluster Juju does not recognise, there's no
guarantee a load balancer is available, so Juju defaults to a controller
service type of ClusterIP. This may not be suitable, so there's 3 bootstrap
options available to tell Juju how to set up the controller service. Part of
the solution may require a load balancer for the cluster to be set up manually
first, or perhaps an external k8s service via a FQDN will be used
(this is a cluster specific implementation decision which Juju needs to be
informed about so it can set things up correctly). The 3 relevant bootstrap
options are (see list of bootstrap config items below for a full explanation):

- controller-service-type
- controller-external-name
- controller-external-ips


Available keys for use with --config are:

admin-secret:
  type: string
  description: Sets the Juju administrator password
agent-metadata-url:
  type: string
  description: URL of private stream
agent-ratelimit-max:
  type: int
  description: The maximum size of the token bucket used to ratelimit agent connections
agent-ratelimit-rate:
  type: string
  description: The time taken to add a new token to the ratelimit bucket
agent-stream:
  type: string
  description: Version of Juju to use for deploy/upgrades.
api-port-open-delay:
  type: string
  description: "The duration that the controller will wait \nbetween when the controller
    has been deemed to be ready to open \nthe api-port and when the api-port is actually
    opened \n(only used when a controller-api-port value is set)."
apt-ftp-proxy:
  type: string
  description: The APT FTP proxy for the model
apt-http-proxy:
  type: string
  description: The APT HTTP proxy for the model
apt-https-proxy:
  type: string
  description: The APT HTTPS proxy for the model
apt-mirror:
  type: string
  description: The APT mirror for the model
apt-no-proxy:
  type: string
  description: List of domain addresses not to be proxied for APT (comma-separated)
audit-log-capture-args:
  type: bool
  description: Determines if the audit log contains the arguments passed to API methods
audit-log-exclude-methods:
  type: list of strings
  description: The list of Facade.Method names that aren't interesting for audit logging
    purposes.
auditing-enabled:
  type: bool
  description: Determines if the controller records auditing information
authorized-keys:
  type: string
  description: Any authorized SSH public keys for the model, as found in a ~/.ssh/authorized_keys
    file
automatically-retry-hooks:
  type: bool
  description: Determines whether the uniter should automatically retry failed hooks
backup-dir:
  type: string
  description: Directory used to store the backup working directory
bootstrap-addresses-delay:
  type: int
  description: Controls the amount of time in seconds in between refreshing the bootstrap
    machine addresses
bootstrap-retry-delay:
  type: int
  description: Controls the amount of time in seconds between attempts to connect
    to a bootstrap machine address
bootstrap-timeout:
  type: int
  description: Controls how long Juju will wait for a bootstrap to complete before
    considering it failed in seconds
ca-cert:
  type: string
  description: Sets the bootstrapped controllers CA cert to use and issue certificates
    from, used in conjunction with ca-private-key
ca-private-key:
  type: string
  description: Sets the bootstrapped controllers CA cert private key to sign certificates
    with, used in conjunction with ca-cert
caas-image-repo:
  type: string
  description: The docker repo to use for the jujud operator and mongo images
caas-operator-image-path:
  type: string
  description: |-
    (deprected) The url of the docker image used for the application operator.
    Use "caas-image-repo" instead.
cloudinit-userdata:
  type: string
  description: Cloud-init user-data (in yaml format) to be added to userdata for new
    machines created in this model
container-image-metadata-url:
  type: string
  description: The URL at which the metadata used to locate container OS image ids
    is located
container-image-stream:
  type: string
  description: The simplestreams stream used to identify which image ids to search
    when starting a container.
container-inherit-properties:
  type: string
  description: List of properties to be copied from the host machine to new containers
    created in this model (comma-separated)
container-networking-method:
  type: string
  description: Method of container networking setup - one of fan, provider, local
controller-api-port:
  type: int
  description: |-
    An optional port that may be set for controllers
    that have a very heavy load. If this port is set, this port is used by
    the controllers to talk to each other - used for the local API connection
    as well as the pubsub forwarders, and the raft workers. If this value is
    set, the api-port isn't opened until the controllers have started properly.
controller-external-ips:
  type: string
  description: Specifies a comma separated list of external IPs for a k8s controller
    of type external
controller-external-name:
  type: string
  description: Sets the external name for a k8s controller of type external
controller-service-type:
  type: string
  description: Controls the kubernetes service type for Juju controllers, see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#servicespec-v1-core
    valid values are one of cluster, loadbalancer, external
default-series:
  type: string
  description: The default series of Ubuntu to use for deploying charms
default-space:
  type: string
  description: The default network space used for application endpoints in this model
development:
  type: bool
  description: Whether the model is in development mode
disable-network-management:
  type: bool
  description: Whether the provider should control networks (on MAAS models, set to
    true for MAAS to control networks
egress-subnets:
  type: string
  description: Source address(es) for traffic originating from this model
enable-os-refresh-update:
  type: bool
  description: Whether newly provisioned instances should run their respective OS's
    update capability.
enable-os-upgrade:
  type: bool
  description: Whether newly provisioned instances should run their respective OS's
    upgrade capability.
extra-info:
  type: string
  description: Arbitrary user specified string data that is stored against the model.
fan-config:
  type: string
  description: Configuration for fan networking for this model
features:
  type: list of strings
  description: A list of runtime changeable features to be updated
firewall-mode:
  type: string
  description: |-
    The mode to use for network firewalling.

    'instance' requests the use of an individual firewall per instance.

    'global' uses a single firewall for all instances (access
    for a network port is enabled to one instance if any instance requires
    that port).

    'none' requests that no firewalling should be performed
    inside the model. It's useful for clouds without support for either
    global or per instance security groups.
ftp-proxy:
  type: string
  description: The FTP proxy value to configure on instances, in the FTP_PROXY environment
    variable
gui-stream:
  type: string
  description: The simplestreams stream used to identify which gui ids to search when
    downloading a gui tarball.
http-proxy:
  type: string
  description: The HTTP proxy value to configure on instances, in the HTTP_PROXY environment
    variable
https-proxy:
  type: string
  description: The HTTPS proxy value to configure on instances, in the HTTPS_PROXY
    environment variable
ignore-machine-addresses:
  type: bool
  description: Whether the machine worker should discover machine addresses on startup
image-metadata-url:
  type: string
  description: The URL at which the metadata used to locate OS image ids is located
image-stream:
  type: string
  description: The simplestreams stream used to identify which image ids to search
    when starting an instance.
juju-ftp-proxy:
  type: string
  description: The FTP proxy value to pass to charms in the JUJU_CHARM_FTP_PROXY environment
    variable
juju-ha-space:
  type: string
  description: The network space within which the MongoDB replica-set should communicate
juju-http-proxy:
  type: string
  description: The HTTP proxy value to pass to charms in the JUJU_CHARM_HTTP_PROXY
    environment variable
juju-https-proxy:
  type: string
  description: The HTTPS proxy value to pass to charms in the JUJU_CHARM_HTTPS_PROXY
    environment variable
juju-mgmt-space:
  type: string
  description: The network space that agents should use to communicate with controllers
juju-no-proxy:
  type: string
  description: List of domain addresses not to be proxied (comma-separated), may contain
    CIDRs. Passed to charms in the JUJU_CHARM_NO_PROXY environment variable
logforward-enabled:
  type: bool
  description: Whether syslog forwarding is enabled.
logging-config:
  type: string
  description: The configuration string to use when configuring Juju agent logging
    (see http://godoc.org/github.com/juju/loggo#ParseConfigurationString for details)
lxd-snap-channel:
  type: string
  description: The channel to use when installing LXD from a snap (cosmic and later)
max-action-results-age:
  type: string
  description: The maximum age for action entries before they are pruned, in human-readable
    time format
max-action-results-size:
  type: string
  description: The maximum size for the action collection, in human-readable memory
    format
max-agent-state-size:
  type: int
  description: The maximum size (in bytes) of internal state data that agents can
    store to the controller
max-charm-state-size:
  type: int
  description: The maximum size (in bytes) of charm-specific state that units can
    store to the controller
max-debug-log-duration:
  type: string
  description: The maximum duration that a debug-log session is allowed to run
max-prune-txn-batch-size:
  type: int
  description: (deprecated) The maximum number of transactions evaluated in one go
    when pruning
max-prune-txn-passes:
  type: int
  description: (deprecated) The maximum number of batches processed when pruning
max-status-history-age:
  type: string
  description: The maximum age for status history entries before they are pruned,
    in human-readable time format
max-status-history-size:
  type: string
  description: The maximum size for the status history collection, in human-readable
    memory format
migration-agent-wait-time:
  type: string
  description: The maximum during model migrations that the migration worker will
    wait for agents to report on phases of the migration
model-logfile-max-backups:
  type: int
  description: The number of old model log files to keep (compressed)
model-logfile-max-size:
  type: string
  description: The maximum size of the log file written out by the controller on behalf
    of workers running for a model
model-logs-size:
  type: string
  description: The size of the capped collections used to hold the logs for the models
mongo-memory-profile:
  type: string
  description: Sets mongo memory profile
net-bond-reconfigure-delay:
  type: int
  description: The amount of time in seconds to sleep between ifdown and ifup when
    bridging
no-proxy:
  type: string
  description: List of domain addresses not to be proxied (comma-separated)
non-synced-writes-to-raft-log:
  type: bool
  description: Do not perform fsync calls after appending entries to the raft log.
    Disabling sync improves performance at the cost of reliability
provisioner-harvest-mode:
  type: string
  description: What to do with unknown machines. See https://jujucharms.com/stable/config-general#juju-lifecycle-and-harvesting
    (default destroyed)
proxy-ssh:
  type: bool
  description: Whether SSH commands should be proxied through the API server
prune-txn-query-count:
  type: int
  description: The number of transactions to read in a single query
prune-txn-sleep-time:
  type: string
  description: The amount of time to sleep between processing each batch query
resource-tags:
  type: attrs
  description: resource tags
snap-http-proxy:
  type: string
  description: The HTTP proxy value to for installing snaps
snap-https-proxy:
  type: string
  description: The HTTPS proxy value to for installing snaps
snap-store-assertions:
  type: string
  description: The assertions for the defined snap store proxy
snap-store-proxy:
  type: string
  description: The snap store proxy for installing snaps
snap-store-proxy-url:
  type: string
  description: The URL for the defined snap store proxy
ssl-hostname-verification:
  type: bool
  description: Whether SSL hostname verification is enabled (default true)
storage-default-block-source:
  type: string
  description: The default block storage source for the model
storage-default-filesystem-source:
  type: string
  description: The default filesystem storage source for the model
syslog-ca-cert:
  type: string
  description: The certificate of the CA that signed the syslog server certificate,
    in PEM format.
syslog-client-cert:
  type: string
  description: The syslog client certificate in PEM format.
syslog-client-key:
  type: string
  description: The syslog client key in PEM format.
syslog-host:
  type: string
  description: The hostname:port of the syslog server.
test-mode:
  type: bool
  description: |-
    Whether the model is intended for testing.
    If true, accessing the charm store does not affect statistical
    data of the store. (default false)
transmit-vendor-metrics:
  type: bool
  description: Determines whether metrics declared by charms deployed into this model
    are sent for anonymized aggregate analytics
update-status-hook-interval:
  type: string
  description: How often to run the charm update-status hook, in human-readable time
    format (default 5m, range 1-60m)

Examples:
    juju bootstrap
    juju bootstrap --clouds
    juju bootstrap --regions aws
    juju bootstrap aws
    juju bootstrap aws/us-east-1
    juju bootstrap google joe-us-east1
    juju bootstrap --config=~/config-rs.yaml rackspace joe-syd
    juju bootstrap --agent-version=2.2.4 aws joe-us-east-1
    juju bootstrap --config bootstrap-timeout=1200 azure joe-eastus

    # For a bootstrap on k8s, setting the service type of the Juju controller service to LoadBalancer
    juju bootstrap --config controller-service-type=loadbalancer

	# For a bootstrap on k8s, setting the service type of the Juju controller service to External
    juju bootstrap --config controller-service-type=external --config controller-service-name=controller.juju.is

See also:
    add-credentials
    add-model
    controller-config
    model-config
    set-constraints
    show-cloud

See also[edit]

Advertising: