Charles Chan | fcfe890 | 2022-02-02 17:06:27 -0800 | [diff] [blame] | 1 | .. SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org> |
| 2 | .. SPDX-License-Identifier: Apache-2.0 |
| 3 | |
Carmelo Cascone | 4398998 | 2021-10-12 00:01:19 -0700 | [diff] [blame] | 4 | ONOS Configuration Loader |
| 5 | ========================= |
| 6 | |
| 7 | Config loader is a Kubernetes pod installed by the SD-Fabric Helm |
| 8 | chart which implements a reconciliation loop to update the ONOS network |
| 9 | configuration and component configuration. |
| 10 | |
| 11 | Config loader will periodically read the running configurations from ONOS and eventually |
| 12 | push updates to ONOS if the running state isn't same as the desired state. |
| 13 | |
| 14 | .. image:: ../images/config-loader.svg |
| 15 | |
| 16 | .. note:: |
| 17 | We recommend using the Helm values below to update the ONOS configuration instead |
| 18 | of manually changing it via ONOS REST APIs or CLI, otherwise, manual changes |
| 19 | will be overridden by config loader. If you need to apply config changes |
| 20 | during debugging or testing we recommend disabling the reconciliation loop |
| 21 | (``reconcile_mode: false``). |
| 22 | |
| 23 | Below is a reference of the available configuration parameters and their default values: |
| 24 | |
| 25 | .. code-block:: |
| 26 | |
| 27 | onos: |
| 28 | config: |
| 29 | reconcile_mode: true |
| 30 | reconcile_interval: 30s |
| 31 | image: |
| 32 | registry: "" |
| 33 | repository: opencord/onos-classic-helm-utils |
| 34 | tag: 0.1.0 |
| 35 | pullPolicy: "IfNotPresent" |
| 36 | service_account_name: onos-config-loader |
| 37 | # NOTE these values won't change the credentials inside ONOS, they |
| 38 | # are only used by config loader for authenticating REST API calls. |
| 39 | username: karaf |
| 40 | password: karaf |
| 41 | netcfg: > |
| 42 | # { |
| 43 | # "devices" : { |
| 44 | # "device:leaf1" : { |
| 45 | # ... |
| 46 | # } |
| 47 | componentConfig: |
| 48 | # "org.onosproject.provider.lldp.impl.LldpLinkProvider": > |
| 49 | # { |
| 50 | # "enabled": "false" |
| 51 | # } |
| 52 | |
| 53 | |
| 54 | * ``reconcile_mode``: If disable, config loader will only update the configuration once. Useful for debugging/testing. |
| 55 | * ``reconcile_interval``: The interval in seconds between reconciliation checks. |
| 56 | * ``image``: to pull the container image of the config loader. |
| 57 | Use the default values unless you have special requirements. |
| 58 | |
| 59 | * ``registry``: If empty, the config loader image will be downloaded from Docker Hub. |
| 60 | * ``repository``: The repository of config push. |
| 61 | * ``tag``: The image tag of config loader. |
| 62 | * ``pullPolicy``: How Kubernetes pulls the image, available options are `Never, Always, IfNotPresent`. |
| 63 | |
| 64 | * ``service_account_name``: Name of the Kubernetes Service Account used by the config loader pods to read |
| 65 | information from Kubernetes. |
| 66 | * ``username``: Username used in ONOS REST API calls. |
| 67 | * ``password``: Password used in ONOS REST API calls. |
| 68 | * ``netcfg``: ONOS network configuration as JSON blob. |
| 69 | * ``componentConfig``: A map of ONOS component IDs and corresponding list of configurations as a JSON map. |