Skip to content
Snippets Groups Projects
Commit 43ab6388 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Hackfest 5:

- Updated redeploy-tfs script
- Updated CLab descriptor
- Updated README
parent 7fae0639
No related branches found
No related tags found
2 merge requests!359Release TeraFlowSDN 5.0,!298Resolve "Merge Hackfest 5 in `develop` and related code fixes"
# Hackfest 5 - Control an Emulated DataPlane through TeraFlowSDN # Hackfest 5 - Control an Emulated DataPlane through TeraFlowSDN
## TeraFlowSDN Deployment
## Prepare your VM
```bash ```bash
cd ~/tfs-ctrl cd ~/tfs-ctrl
source hackfest5/deploy_specs.sh git checkout feat/hackfest5
./deploy/all.sh git pull
``` ```
# ContainerLab - hackfest5 cEOS - Commands
## Download and install ContainerLab
## ContainerLab Commands
### Download and install ContainerLab
```bash ```bash
sudo bash -c "$(curl -sL https://get.containerlab.dev)" -- -v 0.59.0 sudo bash -c "$(curl -sL https://get.containerlab.dev)" -- -v 0.59.0
``` ```
## Download hackfest5 cEOS image and create Docker image ### Check available images in Docker
```bash
docker images | grep -E "ceos|multitool"
```
### Download hackfest5 cEOS image and create Docker image [already done]
- Note: Image to be downloaded for free from [Arista](https://www.arista.com/en/login) website. - Note: Image to be downloaded for free from [Arista](https://www.arista.com/en/login) website.
```bash ```bash
cd ~/tfs-ctrl/hackfest5/images/arista docker import ~/tfs-ctrl/hackfest5/images/arista/cEOS64-lab-4.31.5M.tar ceos:4.31.5M
docker import cEOS64-lab-4.32.2F.tar ceos:4.32.2F docker import ~/tfs-ctrl/hackfest5/images/arista/cEOS64-lab-4.32.2F.tar ceos:4.32.2F
``` ```
## Deploy scenario ### Deploy scenario
```bash ```bash
~/tfs-ctrl/hackfest5/clab-deploy.sh ~/tfs-ctrl/hackfest5/clab-deploy.sh
``` ```
## Inspect scenario ### Inspect scenario
```bash ```bash
~/tfs-ctrl/hackfest5/clab-inspect.sh ~/tfs-ctrl/hackfest5/clab-inspect.sh
``` ```
## Show scenario's topology ### Show scenario's topology
```bash ```bash
~/tfs-ctrl/hackfest5/clab-graph.sh ~/tfs-ctrl/hackfest5/clab-graph.sh
``` ```
## Destroy scenario ### Destroy scenario
```bash ```bash
~/tfs-ctrl/hackfest5/clab-destroy.sh ~/tfs-ctrl/hackfest5/clab-destroy.sh
``` ```
## Access cEOS Bash ### Access cEOS CLI
```bash ```bash
docker exec -it clab-hackfest5-r1 bash ~/tfs-ctrl/hackfest5/clab-cli-r1.sh
``` ```
## Access cEOS CLI ### Access DC CLI
```bash ```bash
docker exec -it clab-hackfest5-r1 Cli ~/tfs-ctrl/hackfest5/clab-cli-dc1.sh
docker exec -it clab-hackfest5-r2 Cli
``` ```
## Configure ContainerLab clients ### Start pinging remote DC
```bash ```bash
docker exec -it clab-hackfest5-client1 bash ~/tfs-ctrl/hackfest5/clab-cli-dc1.sh
ip address add 192.168.1.10/24 dev eth1
ip route add 192.168.2.0/24 via 192.168.1.1
ping 192.168.2.10 ping 192.168.2.10
```
## TeraFlowSDN Commands
docker exec -it clab-hackfest5-client2 bash ### Re-Deploy TeraFlowSDN
ip address add 192.168.2.10/24 dev eth1 ```bash
ip route add 192.168.1.0/24 via 192.168.2.1 ~/tfs-ctrl/hackfest5/redeploy-tfs.sh
ping 192.168.1.10
``` ```
## Install gNMIc ### Show TeraFlowSDN Deployment status
```bash
source ~/tfs-ctrl/hackfest5/deploy_specs.sh
./deploy/show.sh
```
### Show log of a TeraFlowSDN component
```bash
source ~/tfs-ctrl/hackfest5/deploy_specs.sh
~/tfs-ctrl/scripts/show_logs_device.sh
```
## L3VPN Commands
### Create a new IETF L3VPN through TeraFlowSDN NBI
```bash
cd ~/tfs-ctrl/hackfest5/data
curl -X POST \
--header "Content-Type: application/json" \
--data @ietf-l3vpn-service.json \
--user "admin:admin" \
http://127.0.0.1/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services
```
### Get UUID of a IETF L3VPN through TeraFlowSDN NBI
```bash
curl --user "admin:admin" \
http://127.0.0.1/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service=ietf-l3vpn-svc/
```
### Delete a IETF L3VPN through TeraFlowSDN NBI
```bash
curl -X DELETE --user "admin:admin" \
http://127.0.0.1/restconf/data/ietf-l3vpn-svc:l3vpn-svc/vpn-services/vpn-service=ietf-l3vpn-svc/
```
### Start pinging remote DC
```bash
~/tfs-ctrl/hackfest5/clab-cli-dc1.sh
ping 192.168.2.10
```
## gNMIc Commands
### Install gNMIc
```bash ```bash
sudo bash -c "$(curl -sL https://get-gnmic.kmrd.dev)" sudo bash -c "$(curl -sL https://get-gnmic.kmrd.dev)"
``` ```
## gNMI Capabilities request ### gNMI Capabilities request
```bash ```bash
gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure capabilities gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure capabilities
``` ```
## gNMI Get request ### gNMI Get request
```bash ```bash
gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path / > r1.json gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path / > r1.json
gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /interfaces/interface > r1-ifaces.json gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /interfaces/interface > r1-ifaces.json
``` ```
## gNMI Set request ### gNMI Set request
```bash ```bash
gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --update-path /system/config/hostname --update-value "my-r1" gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --update-path /system/config/hostname --update-value "my-r1"
gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /system/config/hostname gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /system/config/hostname
``` ```
## Subscribe request ### Subscribe request
```bash ```bash
gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf subscribe --path /interfaces/interface[name=Management0]/state/ gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf subscribe --path /interfaces/interface[name=Management0]/state/
...@@ -95,13 +153,13 @@ gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin ...@@ -95,13 +153,13 @@ gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin
ssh admin@clab-hackfest5-r1 ssh admin@clab-hackfest5-r1
``` ```
# Check configurations done: ### Check configurations done:
```bash ```bash
gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/network-instances' > r1-nis.json gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/network-instances' > r1-nis.json
gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/interfaces' > r1-ifs.json gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/interfaces' > r1-ifs.json
``` ```
# Delete elements: ### Delete elements:
```bash ```bash
--address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/network-instances/network-instance[name=b19229e8]' --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/network-instances/network-instance[name=b19229e8]'
--address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/1]/subinterfaces/subinterface[index=0]' --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/1]/subinterfaces/subinterface[index=0]'
......
...@@ -26,9 +26,9 @@ topology: ...@@ -26,9 +26,9 @@ topology:
kind: arista_ceos kind: arista_ceos
#image: ceos:4.30.4M #image: ceos:4.30.4M
#image: ceos:4.31.2F #image: ceos:4.31.2F
#image: ceos:4.31.5M image: ceos:4.31.5M
#image: ceos:4.32.0F #image: ceos:4.32.0F
image: ceos:4.32.2F #image: ceos:4.32.2F
#image: ceos:4.32.2.1F #image: ceos:4.32.2.1F
linux: linux:
kind: linux kind: linux
......
...@@ -15,8 +15,20 @@ ...@@ -15,8 +15,20 @@
source ~/tfs-ctrl/hackfest5/deploy_specs.sh source ~/tfs-ctrl/hackfest5/deploy_specs.sh
echo "Cleaning-up old NATS and Kafka deployments..."
helm3 uninstall --namespace ${NATS_NAMESPACE} ${NATS_NAMESPACE} helm3 uninstall --namespace ${NATS_NAMESPACE} ${NATS_NAMESPACE}
kubectl delete namespace ${NATS_NAMESPACE} --ignore-not-found kubectl delete namespace ${NATS_NAMESPACE} --ignore-not-found
kubectl delete namespace ${KFK_NAMESPACE} --ignore-not-found kubectl delete namespace ${KFK_NAMESPACE} --ignore-not-found
printf "\n"
echo "Deployting TeraFlowSDN..."
./deploy/all.sh ./deploy/all.sh
printf "\n"
echo "Waiting for Context to be subscribed to NATS..."
while ! kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server 2>&1 | grep -q 'Subscriber is Ready? True'; do
printf "%c" "."
sleep 1
done
kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/contextservice -c server
printf "\n"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment