Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

corrections for docs and configure.sh for templated labs #2275

Merged
merged 3 commits into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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