These variables are available on the juju client in order to change its default behavior.
Juju has three ways it will check, in descending order, to determine the current environment:
Check to see if
$JUJU_HOME/current-environment, which is set by
juju switch $environment
$JUJU_HOME/environments.yamland use the default environment.
The path to Juju's configuration files.
This allows you to set the repository that Juju looks for charms in. This can also be done by passing
For example, if you are running juju in a Vagrant virtual machine, you could set
JUJU_REPOSITORYto your shared folder:
export JUJU_REPOSITORY=/vagrant juju deploy local:series/charm
This setting takes effect on an environment only at bootstrap time. In stable Juju releases, agents are started with logging set to WARNING, and units are set to INFO. Development releases are set to DEBUG globally. Post bootstrap, on a running environment you can change the logging options to be more or less verbose. For example:
juju set-environment logging-config "juju=DEBUG; unit=WARNING"
These variables are available to charms during hook execution.
A space-separated list of API servers.
The socket that the Unit Agent uses to communicate with individual Units.
Used by juju to communicate to ask a running agent to execute a command on juju's behalf.
The temporary directory where
juju debug-hooksis spawned from.
The human-friendly name of the current environment.
The unique identifier of the juju environment.
The name of the hook being executed.
The relation name being executed.
The ID of the relation being executed.
The name of the current related unit.
The name of the local unit being executed.