From c4ae09781466bd279a8c59278ddef3ff1e5b5831 Mon Sep 17 00:00:00 2001
From: gifrerenom <lluis.gifre@cttc.es>
Date: Mon, 11 Nov 2024 14:09:33 +0000
Subject: [PATCH] Hackfest 5:

- Updated redeploy-tfs script
- Updated CLab descriptor
- Updated commands in README
---
 hackfest5/README.md          | 20 ++++++++++++++++++
 hackfest5/hackfest5.clab.yml |  2 ++
 hackfest5/r1-startup.cfg     | 39 ++++++++++++++++++++++++++++++++++++
 hackfest5/r2-startup.cfg     | 39 ++++++++++++++++++++++++++++++++++++
 hackfest5/redeploy-tfs.sh    |  2 +-
 5 files changed, 101 insertions(+), 1 deletion(-)
 create mode 100644 hackfest5/r1-startup.cfg
 create mode 100644 hackfest5/r2-startup.cfg

diff --git a/hackfest5/README.md b/hackfest5/README.md
index c64105389..1906a5005 100644
--- a/hackfest5/README.md
+++ b/hackfest5/README.md
@@ -69,6 +69,26 @@ docker import ~/tfs-ctrl/hackfest5/images/arista/cEOS64-lab-4.32.2F.tar ceos:4.3
 
 ## TeraFlowSDN Commands
 
+### Check status of MicroK8s
+```bash
+microk8s.status --wait-ready
+```
+
+### Start MicroK8s
+```bash
+microk8s.start
+```
+
+### Periodically report status of MicroK8s every second
+```bash
+watch -n 1 microk8s.status --wait-ready
+```
+
+### Periodically report status of workload in MicroK8s every second
+```bash
+watch -n 1 kubectl get all --all-namespaces
+```
+
 ### Re-Deploy TeraFlowSDN
 ```bash
 ~/tfs-ctrl/hackfest5/redeploy-tfs.sh
diff --git a/hackfest5/hackfest5.clab.yml b/hackfest5/hackfest5.clab.yml
index 2fb703df0..acc58e9d0 100644
--- a/hackfest5/hackfest5.clab.yml
+++ b/hackfest5/hackfest5.clab.yml
@@ -38,10 +38,12 @@ topology:
     r1:
       kind: arista_ceos
       mgmt-ipv4: 172.20.20.101
+      startup-config: r1-startup.cfg
 
     r2:
       kind: arista_ceos
       mgmt-ipv4: 172.20.20.102
+      startup-config: r2-startup.cfg
 
     dc1:
       kind: linux
diff --git a/hackfest5/r1-startup.cfg b/hackfest5/r1-startup.cfg
new file mode 100644
index 000000000..2d1964f5f
--- /dev/null
+++ b/hackfest5/r1-startup.cfg
@@ -0,0 +1,39 @@
+! device: r1 (cEOSLab, EOS-4.31.2F-35442176.4312F (engineering build))
+!
+no aaa root
+!
+username admin privilege 15 role network-admin secret sha512 $6$tUMBMqI5iPca5XcJ$5QU/R83S.zjpHQyeB3H63BGWOgxewjqZ1NsxdaWPo3gLwRXVTrgYvMmwwZlzjYoqrD7yp7e9YD073/.FKLYEY1
+!
+transceiver qsfp default-mode 4x10G
+!
+service routing protocols model multi-agent
+!
+hostname r1
+!
+spanning-tree mode mstp
+!
+system l1
+   unsupported speed action error
+   unsupported error-correction action error
+!
+management api http-commands
+   no shutdown
+!
+management api gnmi
+   transport grpc default
+!
+management api netconf
+   transport ssh default
+!
+interface Ethernet2
+!
+interface Ethernet10
+!
+interface Management0
+   ip address 172.20.20.101/24
+!
+ip routing
+!
+ip route 0.0.0.0/0 172.20.20.1
+!
+end
diff --git a/hackfest5/r2-startup.cfg b/hackfest5/r2-startup.cfg
new file mode 100644
index 000000000..7acd56bf6
--- /dev/null
+++ b/hackfest5/r2-startup.cfg
@@ -0,0 +1,39 @@
+! device: r2 (cEOSLab, EOS-4.31.2F-35442176.4312F (engineering build))
+!
+no aaa root
+!
+username admin privilege 15 role network-admin secret sha512 $6$Z/om4jI3S5BmwxfB$igaSOaJnh3m36TbSMHKCusA77m07CU8JJxalupXIUFuy7HaGt6k.C1kfSJsPqjn1AhLaL.LvLkt/hcqTFgpjG.
+!
+transceiver qsfp default-mode 4x10G
+!
+service routing protocols model multi-agent
+!
+hostname r2
+!
+spanning-tree mode mstp
+!
+system l1
+   unsupported speed action error
+   unsupported error-correction action error
+!
+management api http-commands
+   no shutdown
+!
+management api gnmi
+   transport grpc default
+!
+management api netconf
+   transport ssh default
+!
+interface Ethernet1
+!
+interface Ethernet10
+!
+interface Management0
+   ip address 172.20.20.102/24
+!
+ip routing
+!
+ip route 0.0.0.0/0 172.20.20.1
+!
+end
diff --git a/hackfest5/redeploy-tfs.sh b/hackfest5/redeploy-tfs.sh
index 8369b2b61..688d8ef39 100755
--- a/hackfest5/redeploy-tfs.sh
+++ b/hackfest5/redeploy-tfs.sh
@@ -18,7 +18,7 @@ source ~/tfs-ctrl/hackfest5/deploy_specs.sh
 echo "Cleaning-up old NATS and Kafka deployments..."
 helm3 uninstall --namespace ${NATS_NAMESPACE} ${NATS_NAMESPACE}
 kubectl delete namespace ${NATS_NAMESPACE} --ignore-not-found
-kubectl delete namespace ${KFK_NAMESPACE} --ignore-not-found
+kubectl delete namespace kafka --ignore-not-found
 printf "\n"
 
 echo "Deployting TeraFlowSDN..."
-- 
GitLab