sysconfig docs - tutorial

Tutorial: Get started

The sysconfig charm is a subordinate charm, designed to be deployed alongside any primary machine charm where you wish to tweak some system parameters. The parameters are controlled by the charm’s configuration. See configuration for a reference of what is supported.

For this tutorial, let’s consider the contrived case where you have a workload running, let’s say nova-compute:

$ juju status nova-compute
...
App                          Version  Status  Scale  Charm                        Channel       Rev  Exposed  Message
nova-compute                 25.2.1   active      2  nova-compute                 yoga/stable   723  no       Unit is ready
ovn-chassis                  22.03.3  active      2  ovn-chassis                  22.03/stable  222  no       Unit is ready

Unit                              Workload  Agent  Machine  Public address  Ports     Message
nova-compute/0*                   active    idle   8        10.5.0.247                Unit is ready
  ovn-chassis/0*                  active    idle            10.5.0.247                Unit is ready

And you have determined that performance could be improved by changing the cpu governor to performance, however the machines have defaulted to ondemand. Here you can deploy sysconfig, relate it to nova-compute (through the juju-info endpoint), and configure sysconfig to set the cpu governor as desired:

$ juju deploy sysconfig
$ juju relate sysconfig nova-compute
$ juju config sysconfig governor=performance

Now sysconfig has been deployed and is alongside nova-compute:

$ juju status nova-compute
...
App                          Version  Status  Scale  Charm                        Channel       Rev  Exposed  Message
nova-compute                 25.2.1   active      2  nova-compute                 yoga/stable   723  no       Unit is ready
ovn-chassis                  22.03.3  active      2  ovn-chassis                  22.03/stable  222  no       Unit is ready
sysconfig                             active      2  sysconfig                    stable         33  no       ready

Unit                              Workload  Agent  Machine  Public address  Ports     Message
nova-compute/0*                   active    idle   8        10.5.0.247                Unit is ready
  ovn-chassis/0*                  active    idle            10.5.0.247                Unit is ready
  sysconfig/0*                    active    idle            10.5.0.247                ready