This app is used to create a dashboard to monitor CPU and Memory Pools before and after adding configuration elements and combinations to NOkia SROS router
- Tested with: 21.10.R6 / 7250 IXR-x
Create a pythin enviroment inside python folder
cd python
python3 -m venv .venv
source .venv/bin/activeInstall required modules
pip3 install -r requirements.txt Check monitoring/docker-compose.yaml file to see if it fits with what you want and avoid port conflicts with other apps.
monitoring
├── dashboards
│ └── grafana-dashboard.json
├── docker-compose.yml
├── gnmic
│ └── gnmic.yaml ## Modify to use with your router
├── prometheus
│ └── prometheus.yaml
└── provisioning
├── dashboards
│ └── dashboards.yaml
└── datasources
└── datasource.yamlAlso, consider to check gnmic/gnmic.yaml for router connection info.
cd monitoring
docker compose up -dYou should see, using docker ps | grep tracker three docker containers like this:
468ead4b70c6 ghcr.io/openconfig/gnmic:latest "/app/gnmic subscrib…" 7 hours ago Up 7 hours 0.0.0.0:9273->9273/tcp, :::9273->9273/tcp tracker-gnmic
31059d9d9a60 grafana/grafana:11.1.0 "/run.sh" 7 hours ago Up 7 hours 0.0.0.0:3001->3000/tcp, [::]:3001->3000/tcp tracker-grafana
aa9781ba38b0 prom/prometheus:latest "/bin/prometheus --c…" 7 hours ago Up 7 hours 0.0.0.0:9099->9090/tcp, [::]:9099->9090/tcp tracker-prometheusUse docker logs to see if there are errors for the connectivity.
File/Folder structure:
python
├── config_templates.json
├── conftester.py
├── connection_profile.json ## Modify to use with your router
├── deployment_plan.json
├── func
│ ├── conf_generator.py
│ ├── gnmi_func.py
│ ├── json_func.py
└── requirements.txt ## required python modulesAfter python env and modules are installed (check sections above), then you need to change connection profile to your router in connection_profile.json
config_templates.json provides information of simple settings for the configuration elements used on the tests.
Use deployment_plan.json to set the order and time intervals for the settings:
deployment_orderdefines the order for the configurations. For example, you can't have VPLS customer defintions without the actual customers already defined in advance.update_interval_secondstime interval between every configurationconfigurationsare the actual configurations including the range of IDs to use for service's or custmomer's IDs and compositions for names and descriptions. Check also the notes for dependencies. Provides also info for GNMI, like paths and keys.
Important to avoid to use overlapping IDs for services like VPLS and VRPNs.
to start the deployment use:
python3 conftester.py deployTo delete configurations use:
python3 conftester.py undeployIn case you prefer to use intents, you can optionlly work with SDCIO
cd kubenet
mkdir tools
cd tools
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.30.0/kind-linux-amd64
chmod +x kindCreate cluster:
./kind create cluster --name kubenet --config <(cat <<EOF
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
ipFamily: dual
EOF
)Check health using kubectl get pods -A
cd manifests/sdcio
kubectl apply -f cert-manager.yaml
kubectl wait -n cert-manager --for=condition=Available=True --timeout=300s deployments.apps cert-manager-webhook
kubectl apply -f colocated.yamlApply SROS schema note: check access to git repo in advanced inside the manifest
cd ../schemas
kubectl apply -f sros-21.10.6.yaml use all manifest related to gnmi at cd manifests/targets
use manifest related to gnmi at cd manifests/config