From bae327eddd4dc3faee122a3169a92422d019690d Mon Sep 17 00:00:00 2001 From: Simon Misencik Date: Thu, 27 Jul 2023 11:15:43 +0200 Subject: [PATCH] Update documentation Signed-off-by: Simon Misencik --- README.md | 13 +++++++++++++ devices.csv | 5 +---- docker-compose.yaml | 11 +++++++++++ main.py | 2 +- 4 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 docker-compose.yaml diff --git a/README.md b/README.md index 6d5b961..d32f350 100644 --- a/README.md +++ b/README.md @@ -11,3 +11,16 @@ You can specify requered cli and netconf devices in devices.csv file. - count_of_devices - netconf device specific value. Count of devices - starting_port - netconf device specific value. First port of netconf testool +### Docker compose setup + +``` +docker-compose up -d +``` + +### Kubernetes setup + +``` +helm repo add frinx https://FRINXio.github.io/helm-charts +helm install [RELEASE_NAME] frinx/sample-topology +``` +more info at https://artifacthub.io/packages/helm/frinx-helm-charts/sample-topology diff --git a/devices.csv b/devices.csv index d0d9eae..0fd3cb5 100644 --- a/devices.csv +++ b/devices.csv @@ -15,7 +15,4 @@ cli,leaf4,10012,-,-,- cli,leaf5,10013,-,-,- cli,spine1,10014,-,-,- cli,spine2,10015,-,-,- -netconf,iosxr653_1,17000,cisco-iosxr-653,2,17000 -netconf,iosxr653_2,17001,cisco-iosxr-653,2,17000 -netconf,iosxr663_1,17100,cisco-iosxr-663,1,17100 -netconf,junos_1,17200,junos-16-2021,1,17200 + diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..b1514ac --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,11 @@ +version: "3.7" + +services: + sample-topology: + image: frinx/sample-topology:3.2.0 + volumes: + - ./devices.csv:/sample-topology/devices.csv + ports: + - 17000-17200:17000-17200 + command: + python2.7 main.py diff --git a/main.py b/main.py index 6d36bb4..6b1832d 100644 --- a/main.py +++ b/main.py @@ -62,7 +62,7 @@ def pushConfigToNetconfTesttool(devices): LOG.info("Device {} is ready".format(device["device_name"])) def push_operation_data_to_device(port, operation_data): - m = manager.connect(host=os.getenv('DOCKER_GWBRIDGE_IP'), port=port, username="frinx", + m = manager.connect(host=os.getenv('DOCKER_GWBRIDGE_IP', 'localhost'), port=port, username="frinx", password="frinx", hostkey_verify=False) netconf_operation_data = open(str(operation_data)).read()