diff options
author | Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> | 2021-03-09 08:09:45 +0100 |
---|---|---|
committer | Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> | 2021-03-10 14:01:29 +0100 |
commit | 642053077c36de0c8a259da058061c6a0ed1e12c (patch) | |
tree | b505ee07be13fefad0696b6c1d44b60cf2b3b74d /README.md | |
parent | 4bfae30fa8a764542bbd1951b065c12ecfc32691 (diff) |
Create base netconf-server image.
Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com>
Change-Id: Ie19dd81608f56a4bc7f3b732cda8eed87136bd26
Issue-ID: INT-1869
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..23aac6c --- /dev/null +++ b/README.md @@ -0,0 +1,81 @@ +# Netconf Server +This server uses sysrepo to simulate network configuration. +It is base od sysrepo-netopeer2 image. + +## User guide +### starting server +In order to start server use docker-compose located in root catalog: +```shell + docker-compose up -d +``` +or run image using docker: +```shell + docker run -it -p 830:830 -p 6513:6513 onap/org.onap.integration.simulators.netconf-server:latest +``` + +### using server +Server allows: + - installing custom configuration models on start up. + - changing configuration of that modules on runtime. + +Config can be changed with use of **SSH, be default expose on port 830** +and **TLS, be default exposed on port 6513**. +- SSH works "out of the box" with a username and password *netconf*. +- **TLS is disabled be default**, + in order to enable it, set environment variable `ENABLE_TLS=true`. + More about TLS in ***TLS*** section. + +### custom models +new models are loaded on the image start up from catalog `/resources/models`. +Be default this directory contains `pnf-simulator.yang` model. +In order to load custom models on start up, +volume with models, 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. + +### TLS +TLS in disabled be default with environment variable `ENABLE_TLS` set to false. +In order to enable TLS, that environment variable need to be set to `true` +**on container start up**. +It can be done in docker-compose, +by putting `ENABLE_TLS=true` in *environment* section. + +#### 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. +Certificates are loaded during image start up. +**In order to use custom certs** +volume with certificates needs to be mounted to `/resources/certs` directory. +In this volume following files are required, **named accordingly**: +- **ca.crt** - CA/Root certificate +- **client.crt** - client certificate +- **server.crt** - server certificate +- **server.key** - server private key +- **server_pub.key** - server public key + + +## Development guide +### building image +In order to build image mvn command can be run: +```shell + mvn clean install -p docker +``` + +### image building process +To build image, Dockerfile is used. +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. + - catalog `models` is copied to image directory `/resources/models`. + That catalog contains default models + that will be installed on image start up. + - default certificates and keys for TLS are generated and + stored in `/resources/certs` directory. + - set-up-netopeer script is set to be run on image start up. + +### change log +This project contains `Changeloge.md` file. +Please update this file when change is made, +according to the guidelines. |