Skip to content

Using swssconfig to apply configuration

Joe LeVeque edited this page Feb 23, 2017 · 3 revisions

To apply configuration to various components of SONiC we can use swssconfig tool, located at https://github.com/Azure/sonic-swss/tree/master/swssconfig. The tool has a 'sample' directory for reference.

swssconfig accepts as input a JSON file containing desired settings. For list of supported settings and their syntax refer to the schema file: https://github.com/Azure/sonic-swss/blob/master/doc/swss-schema.md

swssconfig will read the JSON file and apply its content to the REDIS DB. Corresponding orchagent component (an Orch derived class) will receive notification and start reading the data from DB and applying it to the ASIC.

swssconfig should be run from inside the 'orchagent' docker:

  • Copy your my.file.json file into 'orchagent' docker, then run:
$ docker exec -it orchagent bash
$ swssconfig my.file.json

You can also run tail -f /var/log/syslog to see the traces produced by orchagent while applying the settings to the ASIC.

Clone this wiki locally