diff options
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, |