|
| 1 | +.. _installation_configuration_cli: |
| 2 | + |
| 3 | +============================== |
| 4 | +Open Klant configuration (CLI) |
| 5 | +============================== |
| 6 | + |
| 7 | +After deploying Open Klant, it needs to be configured to be fully functional. |
| 8 | +The django management command ``setup_configuration`` assist with this configuration. |
| 9 | +You can get the full command documentation with: |
| 10 | + |
| 11 | +.. code-block:: bash |
| 12 | +
|
| 13 | + python ./src/manage.py setup_configuration --help |
| 14 | +
|
| 15 | +.. warning:: This command is declarative - if configuration is manually changed after |
| 16 | + running the command and you then run the exact same command again, the manual |
| 17 | + changes will be reverted. |
| 18 | + |
| 19 | +Preparation |
| 20 | +=========== |
| 21 | + |
| 22 | +The command executes the list of pluggable configuration steps, and each step |
| 23 | +requires specific configuration information, that should be prepared. |
| 24 | +Here is the description of all available configuration steps and the configuration |
| 25 | +format, used by each step. |
| 26 | + |
| 27 | +Token configuration |
| 28 | +---------------------- |
| 29 | + |
| 30 | +Create a (single) YAML configuration file with your settings: |
| 31 | + |
| 32 | +.. code-block:: yaml |
| 33 | +
|
| 34 | + openklant_tokens_config_enable: true |
| 35 | + openklant_tokens: |
| 36 | + group: |
| 37 | + - identifier: token-1 |
| 38 | + contact_person: Person 1 |
| 39 | + email: person-1@example.com |
| 40 | + organization: Organization XYZ # optional |
| 41 | + application: Application XYZ # optional |
| 42 | + administration: Administration XYZ # optional |
| 43 | +
|
| 44 | + - identifier: token-2 |
| 45 | + contact_person: Person 2 |
| 46 | + email: person-2@example.com |
| 47 | +
|
| 48 | +Execution |
| 49 | +========= |
| 50 | + |
| 51 | +Open Klant configuration |
| 52 | +------------------------ |
| 53 | + |
| 54 | +With the full command invocation, everything is configured at once. Each configuration step |
| 55 | +is idempotent, so any manual changes made via the admin interface will be updated if the command |
| 56 | +is run afterwards. |
| 57 | + |
| 58 | +.. code-block:: bash |
| 59 | +
|
| 60 | + python ./src/manage.py setup_configuration --yaml-file /path/to/config.yaml |
| 61 | +
|
| 62 | +.. note:: Due to a cache-bug in the underlying framework, you need to restart all |
| 63 | + replicas for part of this change to take effect everywhere. |
0 commit comments