diff options
author | Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> | 2021-03-17 10:40:23 +0100 |
---|---|---|
committer | Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> | 2021-03-23 12:23:43 +0100 |
commit | 3b73097920be148bc82ce4a1c719cc42da8fc721 (patch) | |
tree | e535ef5119dfe6f9a55824560fe7a676f22f6459 /README.md | |
parent | 29c2b0edfb72940a8617207e3ee2aaeb9ac115ab (diff) |
Create python application for config change subscription.
Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com>
Change-Id: I690a188d155bed70f799ef1c6b947c9ecb1a5f47
Issue-ID: INT-1869
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 40 |
1 files changed, 35 insertions, 5 deletions
@@ -27,9 +27,12 @@ and **TLS, be default exposed on port 6513**. ### custom models new models are loaded on the image start up from catalog `/resources/models`. -Be default this directory contains `pnf-simulator.yang` model. +Be default this directory contains `pnf-simulator.yang` model and +default configuration file for config change subscription `models-configuration.ini`. +This file is required for application to start. +More about that file in ***config change subscription*** section. In order to load custom models on start up, -volume with models, should be mounted to `/resources/models` directory. +volume with models and configuration file, should be mounted to `/resources/models` directory. It can be done in docker-compose, by putting `./path/to/cusom/models:/resources/models` in *volumes* section. @@ -40,7 +43,7 @@ In order to enable TLS, that environment variable need to be set to `true` It can be done in docker-compose, by putting `ENABLE_TLS=true` in *environment* section. -#### Custom certificate +#### custom certificate When TLS is enabled server will use auto generated certificates, be default. That certificates are generated during image build and are located in `/resources/certs` directory. @@ -54,6 +57,25 @@ In this volume following files are required, **named accordingly**: - **server.key** - server private key - **server_pub.key** - server public key +### config change subscription +Netconf server image run python application on the startup. +More on that application in README located in `src/python` directory. +This application allows subscribing on config change for selected models. +Data about witch models change should be subscribed to, are located in config file. +Config file must be located in models directory, on the image that directory is `/resources/models`. +For more data about models go back to ***custom models*** section. +Configuration file should be called `models-configuration.ini`, +although that can be changed, by setting environment variable `MODELS_CONFIGURATION_FILE_NAME`. +Configuration file should be formatted in proper way: +```ini +[SUBSCRIPTION] +models = my-model-1,my-model-2,my-model-3 +``` +Custom modules, to subscribe to, should be separated with comma. + +### logging +Netconf server print all logs on to the console. +Logs from python application are also stored in file `/logs/netconf_saver.log` ## Development guide ### building image @@ -62,9 +84,10 @@ In order to build image mvn command can be run: mvn clean install -p docker ``` -### image building process +### Image building process To build image, Dockerfile is used. -During an image building: + +#### During an image building: - catalog `scripts` is copied to image home directory. That catalog contains all scripts needed for installing initial models and configuring TLS. @@ -75,6 +98,13 @@ During an image building: stored in `/resources/certs` directory. - set-up-netopeer script is set to be run on image start up. +#### During an image startup: + - install all models from `/resources/models` directory + - if flag `ENABLE_TLS` is set to true, configure TLS + - run python netconf server application in detach mode. + More on that application in README located in `src/python` directory. + + ### change log This project contains `Changeloge.md` file. Please update this file when change is made, |