Skip to content

Commit

Permalink
corrections for docs and configure.sh for templated labs (#2275)
Browse files Browse the repository at this point in the history
* updates for configure.sh used in templated labs

* fix gnmic url

* Update templated02.md

---------

Co-authored-by: Roman Dodin <[email protected]>
  • Loading branch information
hyposcaler-bot and hellt authored Nov 3, 2024
1 parent fc171e1 commit 508c25f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions docs/lab-examples/templated02.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ Run `configure.sh` script to configure the lab
bash configure.sh
```

The `configure.sh` script relies on [gomplate](https://docs.gomplate.ca) and [gnmic](https://gnmic.openconfig.net).

- [gomplate](https://docs.gomplate.ca) is used to generate the necessary configuration variables based on the number of spines and leaves, their type and prefix.
- [gnmic](https://gnmic.openconfig.net) is used to generate configuration payloads per node and push it using a gNMI Set RPC.

[srl]: https://www.nokia.com/networks/products/service-router-linux-NOS/
[topofile]: https://github.com/srl-labs/containerlab/tree/main/lab-examples/templated01/templated01.clab.gotmpl
[topovarfile]: https://github.com/srl-labs/containerlab/tree/main/lab-examples/templated01/templated01.clab_vars.yaml
Expand Down
2 changes: 1 addition & 1 deletion lab-examples/templated01/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ curl --help >/dev/null
gomplate -f topology_config.gotmpl -d templated01.clab_vars.yaml >vars.yaml

# build targets string
targets=$(docker ps -f label=clab-node-kind=srl -f label=containerlab=templated01 --format {{.Names}} | paste -s -d, -)
targets=$(docker ps -f label=clab-node-kind=nokia_srlinux -f label=containerlab=templated01 --format {{.Names}} | paste -s -d, -)
# base gnmic command
gnmic_cmd="gnmic --log -a ${targets} --skip-verify -u admin -p NokiaSrl1!"

Expand Down
4 changes: 2 additions & 2 deletions lab-examples/templated02/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ curl --help >/dev/null
gomplate -f topology_config.gotmpl -d templated02.clab_vars.yaml >vars.yaml

# build targets string
targets=$(docker ps -f label=clab-node-kind=srl -f label=containerlab=templated02 --format {{.Names}} | paste -s -d, -)
targets=$(docker ps -f label=clab-node-kind=nokia_srlinux -f label=containerlab=templated02 --format {{.Names}} | paste -s -d, -)
# base gnmic command
gnmic_cmd="gnmic --log -a ${targets} --skip-verify -u admin -p admin"
gnmic_cmd="gnmic --log -a ${targets} --skip-verify -u admin -p NokiaSrl1!"

curl -sLO https://raw.githubusercontent.com/karimra/gnmic/main/examples/set-request-templates/Nokia/SRL/1.interfaces/interfaces_template.gotmpl
curl -sLO https://raw.githubusercontent.com/karimra/gnmic/main/examples/set-request-templates/Nokia/SRL/1.interfaces/subinterfaces_template.gotmpl
Expand Down

0 comments on commit 508c25f

Please sign in to comment.