How to configure a controller

See also: Configuration, List of controller configuration keys

This document demonstrates how to get and set controller configuration values.

Contents:

Get values

See also: juju controller-config

To get a controller’s current configuration, run:

juju controller-config

This will output a list of configuration keys and their values. This will include those that were set during controller creation (see below), inherited as a default value (see table), or dynamically set by Juju.

Set values

A key can be assigned a value during controller-creation time or post-creation time. The vast majority of keys are set in the former way.

During controller creation

See also: juju bootstrap --config, How to create a controller

To set a controller’s configuration at controller-creation time, use the bootstrap command with the --config followed by the relevant <key>=<value> pair(s). For example, the code below creates a controller localhost on a cloud lxd and at the same time configures the controller such that the bootstrap-timeout key is 700 seconds:

juju bootstrap --config bootstrap-timeout=700 localhost lxd

After controller creation

See also: juju controller-config

To set a controller’s configuration once it’s already been created, use the controller-config command followed by the relevant <key>=<value> pair(s). For example, the code below configures an existing controller named aws so as to record auditing information, with the number of old audit log files to keep being set at 5.

juju controller-config -c aws auditing-enabled=true audit-log-max-backups=5