@@ -17,15 +17,15 @@ operational.
1717Each charm will have its own set of options and possible values. You can
1818discover these in several ways:
1919
20- - By running the ` juju get <service> ` command.
21- - By viewing the charm in the [ charm store. ] ( https://jujucharms.com )
20+ - By running the ` juju get-config ` command.
21+ - By viewing the charm in the [ charm store] ( https://jujucharms.com ) .
2222 - By examining the ** config.yaml** file in the charm itself.
2323
2424
2525## Configuring a service at deployment
2626
2727It is possible to set configuration values when deploying a service by
28- providing a yaml-formatted file containing configuration values.
28+ providing a [ yaml-formatted] [ yaml ] file containing configuration values.
2929
3030For example, upon investigation we discover that the Mediawiki charm allows us
3131to set values for the name of the wiki and the 'skin' to use. We can put these
@@ -44,7 +44,7 @@ We can then use this configuration when we deploy the service:
4444juju deploy --config myconfig.yaml mediawiki
4545```
4646
47- ** Caution: ** If the yaml configuration file cannot be read or contains some
47+ !!! WARNING: If the yaml configuration file cannot be read or contains some
4848syntax errors or invalid options, you will receive an error message to this
4949effect. However, ** the service will still be deployed ** .
5050
@@ -55,10 +55,10 @@ It is possible to set or change configuration of a service which is already
5555deployed.
5656
5757Before you set any of these options, you may want to check what current options
58- are already set, using the ` juju get <service> ` command. For example:
58+ are already set, using the ` juju get-config <service> ` command. For example:
5959
6060``` bash
61- juju get mediawiki
61+ juju get-config mediawiki
6262```
6363
6464Should return something like this:
@@ -92,18 +92,34 @@ settings:
9292 description: skin for the Wiki
9393 type: string
9494 value: vector
95+ use_suffix:
96+ description: If we should put '/mediawiki' suffix on the url
97+ type: boolean
98+ value: false
9599```
96100
97- You can set the options using the ` juju set <service> ` , specifying
98- multiple key=value pairs if necessary:
101+ You can set the options using the ` juju set-config <service> ` , specifying
102+ multiple space-separated key=value pairs if necessary:
99103
100104``` bash
101- juju set mediawiki skin=monoblock name=' Juju Wiki'
105+ juju set-config mediawiki skin=monoblock name=' Juju Wiki'
106+ ```
107+ It is also possible to set the configuration options from a YAML file after
108+ the service has been deployed:
109+
110+ ``` bash
111+ juju set-config --config=m.yaml mediawiki
102112```
103113
104- Setting an option back to its default value is done using the ` unset ` command
105- followed by the service and the respective options:
114+
115+ Setting an option back to its default value is achieved by using the
116+ ` set-config ` command, but with the ` --to-default ` switch, followed by the
117+ service and a space separated list of the values to return to the default
118+ setting:
106119
107120``` bash
108- juju unset mediawiki admins name
121+ juju set-config --to-default mediawiki admins name
109122```
123+
124+
125+ [ yaml ] : http://yaml.org/spec/1.1/current.html " YAML spec page "
0 commit comments