Loading .dockerignore 0 → 100644 +16 −0 Original line number Diff line number Diff line # Avoid including these folders when building the components .git/ .gitlab/ .vscode/ coverage/ data/ deploy/ ecoc22/ hackfest/ manifests/ nfvsdn22/ oeccpsc22/ ofc22/ ofc23/ scripts/ tmp/ .gitignore +3 −0 Original line number Diff line number Diff line Loading @@ -168,5 +168,8 @@ delete_local_deployment.sh local_docker_deployment.sh local_k8s_deployment.sh # asdf configuration .tool-versions # Other logs **/logs/*.log.* .gitlab-ci.yml +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ include: - local: '/src/dbscanserving/.gitlab-ci.yml' - local: '/src/opticalattackmitigator/.gitlab-ci.yml' - local: '/src/opticalattackdetector/.gitlab-ci.yml' - local: '/src/opticalattackmanager/.gitlab-ci.yml' # - local: '/src/opticalattackmanager/.gitlab-ci.yml' - local: '/src/automation/.gitlab-ci.yml' - local: '/src/policy/.gitlab-ci.yml' #- local: '/src/webui/.gitlab-ci.yml' Loading hackfest/commands.txt +80 −13 Original line number Diff line number Diff line Loading @@ -115,6 +115,9 @@ python3 client_connection.py cd ~/tfs-ctrl/hackfest/tapi/server pip install -r requirements.txt cd ~/tfs-ctrl/hackfest/tapi/tapi_app ./requirements.sh # (done) Build & Implement methods for the TAPI v2.1.3 server: cd ~/tfs-ctrl/hackfest/tapi wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.35/swagger-codegen-cli-3.0.35.jar Loading @@ -134,7 +137,7 @@ cd ~/tfs-ctrl/hackfest/tapi/server python3 -m tapi_server 8080 database/mini-ols-context.json # Run TAPI client using cURL (In a new window): $ cd ~/tfs-ctrl/hackfest/tapi/client cd ~/tfs-ctrl/hackfest/tapi/client # Interrogate Context and SIPs: curl -X GET -H "Content-Type: application/json" http://127.0.0.1:8080/restconf/data/tapi-common:context/ Loading Loading @@ -163,6 +166,7 @@ curl -X DELETE -H "Content-Type: application/json" http://127.0.0.1:8080/restcon ## EXERCISE # Exercise: retrieve and draw the topology # solution in folder tapi_app Loading @@ -175,24 +179,32 @@ python3 tapi_app.py # Deploy TeraFlowSDN ################################################################################ # Check status of Kubernetes ## GUIDED # Check status of MicroK8s microk8s.status --wait-ready # If not running, start MicroK8s microk8s.start # Periodically inspect status of MicroK8s until all addons are enabled watch -n 1 microk8s.status --wait-ready # Check all resources in Kubernetes microk8s.kubectl get all --all-namespaces watch -n 1 kubectl get all --all-namespaces # Deploy TeraFlowSDN cd ~/tfs-ctrl source my_deploy.sh ./deploy.sh ./deploy/all.sh # Show status of your deployment (if new terminal) cd ~/tfs-ctrl && source my_deploy.sh ./show_deploy.sh ./deploy/show.sh # Show logs of a specific component (if new terminal) cd ~/tfs-ctrl && source my_deploy.sh scripts/show_logs_device.sh ./scripts/show_logs_device.sh Loading @@ -202,6 +214,8 @@ scripts/show_logs_device.sh # (done) Build a Netconf server supporting basic OpenConfig data model ## GUIDED # Start the Netconf/OpenConfig server cd ~/tfs-ctrl/hackfest/netconf-oc python3 server_openconfig.py 8300 Loading @@ -212,7 +226,8 @@ python3 server_openconfig.py 8300 # Service requests ################################################################################ ## L3VPN service from JSON descriptors ## EXERCISE # Exercise: L3VPN service from JSON descriptors # (in a new terminal) Start OLS TAPI server: cd ~/tfs-ctrl/hackfest/tapi/server Loading @@ -236,9 +251,8 @@ python3 server_openconfig.py 8304 ############ # Mock OSM ############ ## EXERCISE # Exercise: L2VPN slice from Mock OSM $ cd ~/tfs-ctrl/hackfest/ $ python -m mock_osm Loading @@ -262,16 +276,69 @@ Service b8c99e2c-39d8-424d-9833-554634269555 deleted (mock-osm) exit Bye! ############ # gRPC ############ ## GUIDED # Generate connection messages from .proto cd ~/tfs-ctrl/hackfest/grpc python -m grpc_tools.protoc -I=. --python_out=connection/ connection.proto # Create a connection message and save to a file cd ~/tfs-ctrl/hackfest/grpc/connection python3 create.py connection.txt # List a connection from a file cd ~/tfs-ctrl/hackfest/grpc/connection python3 list.py connection.txt # Build ConnectionService from .proto cd ~/tfs-ctrl/hackfest/grpc python -m grpc_tools.protoc -I=. --python_out=connectionService/ --grpc_python_out=connectionService/ connectionService.proto # Start ConnectionService server cd ~/tfs-ctrl/hackfest/grpc/connectionService python3 connectionService_server.py # Start ConnectionService client (in another terminal) cd ~/tfs-ctrl/hackfest/grpc/connectionService python3 connectionService_client.py ## EXERCISE # Exercise: add streams # Build ConnectionServiceWithNotif from .proto cd ~/tfs-ctrl/hackfest/grpc python -m grpc_tools.protoc -I=. --python_out=connectionServiceWithNotif/ --grpc_python_out=connectionServiceWithNotif/ connectionServiceWithNotif.proto ## Solution: # Run ConnectionServiceWithNotif server cd ~/tfs-ctrl/hackfest/grpc/connectionServiceWithNotif python3 connectionServiceWithNotif_server.py # Run ConnectionServiceWithNotif client (in another terminal) $ cd ~/tfs-ctrl/hackfest/grpc/connectionServiceWithNotif $ python3 connectionServiceWithNotif_client.py ############ # gNMI ############ ## GUIDED ## Download and install the latest release $ sudo bash -c "$(curl -sL https://get.containerlab.dev)“ $ sudo bash -c "$(curl -sL https://get.containerlab.dev)" ## Deploy proposed two SR node scenario $ cd tfs-ctrl/hackfest/gnmi $ sudo containerlab deploy -t srlinux.clab.yml $ cd ~/tfs-ctrl/hackfest/gnmi $ sudo containerlab deploy --topo srlinux.clab.yml ## Access SR Bash $ docker exec -it clab-srlinux-srl1 bash Loading hackfest/containerlab/.gitignore 0 → 100644 +2 −0 Original line number Diff line number Diff line clab-tfs-scenario .tfs-scenario.clab.yml.bak Loading
.dockerignore 0 → 100644 +16 −0 Original line number Diff line number Diff line # Avoid including these folders when building the components .git/ .gitlab/ .vscode/ coverage/ data/ deploy/ ecoc22/ hackfest/ manifests/ nfvsdn22/ oeccpsc22/ ofc22/ ofc23/ scripts/ tmp/
.gitignore +3 −0 Original line number Diff line number Diff line Loading @@ -168,5 +168,8 @@ delete_local_deployment.sh local_docker_deployment.sh local_k8s_deployment.sh # asdf configuration .tool-versions # Other logs **/logs/*.log.*
.gitlab-ci.yml +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ include: - local: '/src/dbscanserving/.gitlab-ci.yml' - local: '/src/opticalattackmitigator/.gitlab-ci.yml' - local: '/src/opticalattackdetector/.gitlab-ci.yml' - local: '/src/opticalattackmanager/.gitlab-ci.yml' # - local: '/src/opticalattackmanager/.gitlab-ci.yml' - local: '/src/automation/.gitlab-ci.yml' - local: '/src/policy/.gitlab-ci.yml' #- local: '/src/webui/.gitlab-ci.yml' Loading
hackfest/commands.txt +80 −13 Original line number Diff line number Diff line Loading @@ -115,6 +115,9 @@ python3 client_connection.py cd ~/tfs-ctrl/hackfest/tapi/server pip install -r requirements.txt cd ~/tfs-ctrl/hackfest/tapi/tapi_app ./requirements.sh # (done) Build & Implement methods for the TAPI v2.1.3 server: cd ~/tfs-ctrl/hackfest/tapi wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.35/swagger-codegen-cli-3.0.35.jar Loading @@ -134,7 +137,7 @@ cd ~/tfs-ctrl/hackfest/tapi/server python3 -m tapi_server 8080 database/mini-ols-context.json # Run TAPI client using cURL (In a new window): $ cd ~/tfs-ctrl/hackfest/tapi/client cd ~/tfs-ctrl/hackfest/tapi/client # Interrogate Context and SIPs: curl -X GET -H "Content-Type: application/json" http://127.0.0.1:8080/restconf/data/tapi-common:context/ Loading Loading @@ -163,6 +166,7 @@ curl -X DELETE -H "Content-Type: application/json" http://127.0.0.1:8080/restcon ## EXERCISE # Exercise: retrieve and draw the topology # solution in folder tapi_app Loading @@ -175,24 +179,32 @@ python3 tapi_app.py # Deploy TeraFlowSDN ################################################################################ # Check status of Kubernetes ## GUIDED # Check status of MicroK8s microk8s.status --wait-ready # If not running, start MicroK8s microk8s.start # Periodically inspect status of MicroK8s until all addons are enabled watch -n 1 microk8s.status --wait-ready # Check all resources in Kubernetes microk8s.kubectl get all --all-namespaces watch -n 1 kubectl get all --all-namespaces # Deploy TeraFlowSDN cd ~/tfs-ctrl source my_deploy.sh ./deploy.sh ./deploy/all.sh # Show status of your deployment (if new terminal) cd ~/tfs-ctrl && source my_deploy.sh ./show_deploy.sh ./deploy/show.sh # Show logs of a specific component (if new terminal) cd ~/tfs-ctrl && source my_deploy.sh scripts/show_logs_device.sh ./scripts/show_logs_device.sh Loading @@ -202,6 +214,8 @@ scripts/show_logs_device.sh # (done) Build a Netconf server supporting basic OpenConfig data model ## GUIDED # Start the Netconf/OpenConfig server cd ~/tfs-ctrl/hackfest/netconf-oc python3 server_openconfig.py 8300 Loading @@ -212,7 +226,8 @@ python3 server_openconfig.py 8300 # Service requests ################################################################################ ## L3VPN service from JSON descriptors ## EXERCISE # Exercise: L3VPN service from JSON descriptors # (in a new terminal) Start OLS TAPI server: cd ~/tfs-ctrl/hackfest/tapi/server Loading @@ -236,9 +251,8 @@ python3 server_openconfig.py 8304 ############ # Mock OSM ############ ## EXERCISE # Exercise: L2VPN slice from Mock OSM $ cd ~/tfs-ctrl/hackfest/ $ python -m mock_osm Loading @@ -262,16 +276,69 @@ Service b8c99e2c-39d8-424d-9833-554634269555 deleted (mock-osm) exit Bye! ############ # gRPC ############ ## GUIDED # Generate connection messages from .proto cd ~/tfs-ctrl/hackfest/grpc python -m grpc_tools.protoc -I=. --python_out=connection/ connection.proto # Create a connection message and save to a file cd ~/tfs-ctrl/hackfest/grpc/connection python3 create.py connection.txt # List a connection from a file cd ~/tfs-ctrl/hackfest/grpc/connection python3 list.py connection.txt # Build ConnectionService from .proto cd ~/tfs-ctrl/hackfest/grpc python -m grpc_tools.protoc -I=. --python_out=connectionService/ --grpc_python_out=connectionService/ connectionService.proto # Start ConnectionService server cd ~/tfs-ctrl/hackfest/grpc/connectionService python3 connectionService_server.py # Start ConnectionService client (in another terminal) cd ~/tfs-ctrl/hackfest/grpc/connectionService python3 connectionService_client.py ## EXERCISE # Exercise: add streams # Build ConnectionServiceWithNotif from .proto cd ~/tfs-ctrl/hackfest/grpc python -m grpc_tools.protoc -I=. --python_out=connectionServiceWithNotif/ --grpc_python_out=connectionServiceWithNotif/ connectionServiceWithNotif.proto ## Solution: # Run ConnectionServiceWithNotif server cd ~/tfs-ctrl/hackfest/grpc/connectionServiceWithNotif python3 connectionServiceWithNotif_server.py # Run ConnectionServiceWithNotif client (in another terminal) $ cd ~/tfs-ctrl/hackfest/grpc/connectionServiceWithNotif $ python3 connectionServiceWithNotif_client.py ############ # gNMI ############ ## GUIDED ## Download and install the latest release $ sudo bash -c "$(curl -sL https://get.containerlab.dev)“ $ sudo bash -c "$(curl -sL https://get.containerlab.dev)" ## Deploy proposed two SR node scenario $ cd tfs-ctrl/hackfest/gnmi $ sudo containerlab deploy -t srlinux.clab.yml $ cd ~/tfs-ctrl/hackfest/gnmi $ sudo containerlab deploy --topo srlinux.clab.yml ## Access SR Bash $ docker exec -it clab-srlinux-srl1 bash Loading
hackfest/containerlab/.gitignore 0 → 100644 +2 −0 Original line number Diff line number Diff line clab-tfs-scenario .tfs-scenario.clab.yml.bak