Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • tfs/controller
1 result
Show changes
Commits on Source (297)
Showing
with 814 additions and 3 deletions
......@@ -15,6 +15,7 @@
coverage==6.3
grpcio==1.47.*
grpcio-health-checking==1.47.*
grpcio-reflection==1.47.*
grpcio-tools==1.47.*
grpclib==0.4.4
prettytable==3.5.0
......
......@@ -69,8 +69,7 @@ function nats_deploy_single() {
echo ">>> NATS is present; skipping step."
else
echo ">>> Deploy NATS"
helm3 install ${NATS_NAMESPACE} nats/nats --namespace ${NATS_NAMESPACE} --set nats.image=nats:2.9-alpine --set config.cluster.enabled=true --set config.cluster.tls.enabled=true
helm3 install ${NATS_NAMESPACE} nats/nats --namespace ${NATS_NAMESPACE} --set nats.image=nats:2.9-alpine
echo ">>> Waiting NATS statefulset to be created..."
while ! kubectl get --namespace ${NATS_NAMESPACE} statefulset/${NATS_NAMESPACE} &> /dev/null; do
......
......@@ -153,7 +153,7 @@ kubectl create secret generic crdb-data --namespace ${TFS_K8S_NAMESPACE} --type=
--from-literal=CRDB_SSLMODE=require
printf "\n"
echo ">>> Create Secret with Apache Kakfa..."
echo ">>> Create Secret with Apache Kafka..."
KFK_SERVER_PORT=$(kubectl --namespace ${KFK_NAMESPACE} get service kafka-service -o 'jsonpath={.spec.ports[0].port}')
kubectl create secret generic kfk-kpi-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \
--from-literal=KFK_NAMESPACE=${KFK_NAMESPACE} \
......
clab-*/
*.clab.yml.bak
*.tar
*.tar.gz
# Hackfest 5 - Control an Emulated DataPlane through TeraFlowSDN
## Prepare your VM
```bash
cd ~/tfs-ctrl
git checkout feat/hackfest5
git pull
```
## ContainerLab Commands
### Download and install ContainerLab
```bash
sudo bash -c "$(curl -sL https://get.containerlab.dev)" -- -v 0.59.0
```
### 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.
```bash
docker import ~/tfs-ctrl/hackfest5/images/arista/cEOS64-lab-4.31.5M.tar ceos:4.31.5M
docker import ~/tfs-ctrl/hackfest5/images/arista/cEOS64-lab-4.32.2F.tar ceos:4.32.2F
```
### Deploy scenario
```bash
~/tfs-ctrl/hackfest5/clab-deploy.sh
```
### Inspect scenario
```bash
~/tfs-ctrl/hackfest5/clab-inspect.sh
```
### Show scenario's topology
```bash
~/tfs-ctrl/hackfest5/clab-graph.sh
```
### Destroy scenario
```bash
~/tfs-ctrl/hackfest5/clab-destroy.sh
```
### Access cEOS CLI
```bash
~/tfs-ctrl/hackfest5/clab-cli-r1.sh
```
### Access DC CLI
```bash
~/tfs-ctrl/hackfest5/clab-cli-dc1.sh
```
### Start pinging remote DC
```bash
~/tfs-ctrl/hackfest5/clab-cli-dc1.sh
ping 192.168.2.10
```
## 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
```
### 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
sudo bash -c "$(curl -sL https://get-gnmic.kmrd.dev)"
```
### gNMI Capabilities request
```bash
gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure capabilities
```
### gNMI Get request
```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 /interfaces/interface > r1-ifaces.json
```
### gNMI Set request
```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 get --path /system/config/hostname
```
### Subscribe request
```bash
gnmic --address clab-hackfest5-r1 --port 6030 --username admin --password admin --insecure --encoding json_ietf subscribe --path /interfaces/interface[name=Management0]/state/
# In another terminal, you can generate traffic opening SSH connection
ssh admin@clab-hackfest5-r1
```
### Check configurations done:
```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 '/interfaces' > r1-ifs.json
```
### Delete elements:
```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 '/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/2]/subinterfaces/subinterface[index=0]'
```
#!/bin/bash
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
docker exec -it clab-hackfest5-dc1 bash
#!/bin/bash
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
docker exec -it clab-hackfest5-dc2 bash
#!/bin/bash
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
docker exec -it clab-hackfest5-r1 Cli
#!/bin/bash
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
docker exec -it clab-hackfest5-r2 Cli
#!/bin/bash
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
cd ~/tfs-ctrl/hackfest5
sudo containerlab deploy --topo hackfest5.clab.yml
#!/bin/bash
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
cd ~/tfs-ctrl/hackfest5
sudo containerlab destroy --topo hackfest5.clab.yml
sudo rm -rf clab-hackfest5/ .hackfest5.clab.yml.bak
#!/bin/bash
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
cd ~/tfs-ctrl/hackfest5
sudo containerlab graph --topo hackfest5.clab.yml
#!/bin/bash
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
cd ~/tfs-ctrl/hackfest5
sudo containerlab inspect --topo hackfest5.clab.yml
{
"ietf-l3vpn-svc:l3vpn-svc": {
"vpn-services": {"vpn-service": [{"vpn-id": "ietf-l3vpn-svc"}]},
"sites": {
"site": [
{
"site-id": "site_DC1",
"management": {"type": "ietf-l3vpn-svc:provider-managed"},
"locations": {"location": [{"location-id": "DC1"}]},
"devices": {"device": [{"device-id": "dc1", "location": "DC1"}]},
"site-network-accesses": {
"site-network-access": [
{
"site-network-access-id": "eth1",
"site-network-access-type": "ietf-l3vpn-svc:multipoint",
"device-reference": "dc1",
"vpn-attachment": {"vpn-id": "ietf-l3vpn-svc", "site-role": "ietf-l3vpn-svc:spoke-role"},
"ip-connection": {
"ipv4": {
"address-allocation-type": "ietf-l3vpn-svc:static-address",
"addresses": {
"provider-address": "192.168.1.1",
"customer-address": "192.168.1.10",
"prefix-length": 24
}
}
},
"service": {
"svc-mtu": 1500,
"svc-input-bandwidth": 1000000000,
"svc-output-bandwidth": 1000000000,
"qos": {"qos-profile": {"classes": {"class": [{
"class-id": "qos-realtime",
"direction": "ietf-l3vpn-svc:both",
"latency": {"latency-boundary": 10},
"bandwidth": {"guaranteed-bw-percent": 100}
}]}}}
}
}
]
}
},
{
"site-id": "site_DC2",
"management": {"type": "ietf-l3vpn-svc:provider-managed"},
"locations": {"location": [{"location-id": "DC2"}]},
"devices": {"device": [{"device-id": "dc2", "location": "DC2"}]},
"site-network-accesses": {
"site-network-access": [
{
"site-network-access-id": "eth1",
"site-network-access-type": "ietf-l3vpn-svc:multipoint",
"device-reference": "dc2",
"vpn-attachment": {"vpn-id": "ietf-l3vpn-svc", "site-role": "ietf-l3vpn-svc:hub-role"},
"ip-connection": {
"ipv4": {
"address-allocation-type": "ietf-l3vpn-svc:static-address",
"addresses": {
"provider-address": "192.168.2.1",
"customer-address": "192.168.2.10",
"prefix-length": 24
}
}
},
"service": {
"svc-mtu": 1500,
"svc-input-bandwidth": 1000000000,
"svc-output-bandwidth": 1000000000,
"qos": {"qos-profile": {"classes": {"class": [{
"class-id": "qos-realtime",
"direction": "ietf-l3vpn-svc:both",
"latency": {"latency-boundary": 10},
"bandwidth": {"guaranteed-bw-percent": 100}
}]}}}
}
}
]
}
}
]
}
}
}
{
"services": [
{
"service_id": {
"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "tfs-l3vpn-svc"}
},
"service_type": "SERVICETYPE_L3NM",
"service_status": {"service_status": "SERVICESTATUS_PLANNED"},
"service_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "int"}},
{"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "int"}}
],
"service_constraints": [],
"service_config": {"config_rules": [
{"action": "CONFIGACTION_SET", "custom": {
"resource_key": "/device[dc1]/endpoint[eth1]/settings",
"resource_value": {"address_ip": "192.168.1.10", "address_prefix": 24, "index": 0}
}},
{"action": "CONFIGACTION_SET", "custom": {
"resource_key": "/device[dc2]/endpoint[eth1]/settings",
"resource_value": {"address_ip": "192.168.2.10", "address_prefix": 24, "index": 0}
}}
]}
}
]
}
{
"contexts": [
{"context_id": {"context_uuid": {"uuid": "admin"}}}
],
"topologies": [
{"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}
],
"devices": [
{
"device_id": {"device_uuid": {"uuid": "dc1"}}, "device_type": "emu-datacenter",
"device_drivers": ["DEVICEDRIVER_UNDEFINED"],
"device_config": {"config_rules": [
{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}},
{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
{"uuid": "eth1", "type": "copper"}, {"uuid": "int", "type": "copper"}
]}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "dc2"}}, "device_type": "emu-datacenter",
"device_drivers": ["DEVICEDRIVER_UNDEFINED"],
"device_config": {"config_rules": [
{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}},
{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
{"uuid": "eth1", "type": "copper"}, {"uuid": "int", "type": "copper"}
]}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "r1"}}, "device_type": "packet-router",
"device_drivers": ["DEVICEDRIVER_GNMI_OPENCONFIG"],
"device_config": {"config_rules": [
{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.101"}},
{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "6030"}},
{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {
"username": "admin", "password": "admin", "use_tls": false
}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "r2"}}, "device_type": "packet-router",
"device_drivers": ["DEVICEDRIVER_GNMI_OPENCONFIG"],
"device_config": {"config_rules": [
{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.102"}},
{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/port", "resource_value": "6030"}},
{"action": "CONFIGACTION_SET", "custom": {"resource_key": "_connect/settings", "resource_value": {
"username": "admin", "password": "admin", "use_tls": false
}}}
]}
}
],
"links": [
{
"link_id": {"link_uuid": {"uuid": "r1/Ethernet2==r2/Ethernet1"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet2"}},
{"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet1"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "r2/Ethernet1==r1/Ethernet2"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet1"}},
{"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet2"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "r1/Ethernet10==dc1/eth1"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet10"}},
{"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "eth1"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "dc1/eth1==r1/Ethernet10"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "eth1"}},
{"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "r2/Ethernet10==dc2/eth1"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet10"}},
{"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "eth1"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "dc2/eth1==r2/Ethernet10"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "eth1"}},
{"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}
]
}
]
}
#!/bin/bash
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ----- TeraFlowSDN ------------------------------------------------------------
# Set the URL of the internal MicroK8s Docker registry where the images will be uploaded to.
export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/"
# Set the list of components, separated by spaces, you want to build images for, and deploy.
#export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator"
export TFS_COMPONENTS="context device pathcomp service nbi webui"
# Uncomment to activate Monitoring (old)
export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring"
# Uncomment to activate Monitoring Framework (new)
#export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics automation"
# Uncomment to activate QoS Profiles
#export TFS_COMPONENTS="${TFS_COMPONENTS} qos_profile"
# Uncomment to activate BGP-LS Speaker
#export TFS_COMPONENTS="${TFS_COMPONENTS} bgpls_speaker"
# Uncomment to activate Optical Controller
# To manage optical connections, "service" requires "opticalcontroller" to be deployed
# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the
# "opticalcontroller" only if "service" is already in TFS_COMPONENTS, and re-export it.
#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then
# BEFORE="${TFS_COMPONENTS% service*}"
# AFTER="${TFS_COMPONENTS#* service}"
# export TFS_COMPONENTS="${BEFORE} opticalcontroller service ${AFTER}"
#fi
# Uncomment to activate ZTP
#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp"
# Uncomment to activate Policy Manager
#export TFS_COMPONENTS="${TFS_COMPONENTS} policy"
# Uncomment to activate Optical CyberSecurity
#export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager"
# Uncomment to activate L3 CyberSecurity
#export TFS_COMPONENTS="${TFS_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector"
# Uncomment to activate TE
#export TFS_COMPONENTS="${TFS_COMPONENTS} te"
# Uncomment to activate Forecaster
#export TFS_COMPONENTS="${TFS_COMPONENTS} forecaster"
# Uncomment to activate E2E Orchestrator
#export TFS_COMPONENTS="${TFS_COMPONENTS} e2e_orchestrator"
# Uncomment to activate DLT and Interdomain
#export TFS_COMPONENTS="${TFS_COMPONENTS} interdomain dlt"
#if [[ "$TFS_COMPONENTS" == *"dlt"* ]]; then
# export KEY_DIRECTORY_PATH="src/dlt/gateway/keys/priv_sk"
# export CERT_DIRECTORY_PATH="src/dlt/gateway/keys/cert.pem"
# export TLS_CERT_PATH="src/dlt/gateway/keys/ca.crt"
#fi
# Uncomment to activate QKD App
# To manage QKD Apps, "service" requires "qkd_app" to be deployed
# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the
# "qkd_app" only if "service" is already in TFS_COMPONENTS, and re-export it.
#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then
# BEFORE="${TFS_COMPONENTS% service*}"
# AFTER="${TFS_COMPONENTS#* service}"
# export TFS_COMPONENTS="${BEFORE} qkd_app service ${AFTER}"
#fi
# Set the tag you want to use for your images.
export TFS_IMAGE_TAG="dev"
# Set the name of the Kubernetes namespace to deploy TFS to.
export TFS_K8S_NAMESPACE="tfs"
# Set additional manifest files to be applied after the deployment
export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml"
# Uncomment to monitor performance of components
#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml"
# Uncomment when deploying Optical CyberSecurity
#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.yaml"
# Set the new Grafana admin password
export TFS_GRAFANA_PASSWORD="admin123+"
# Disable skip-build flag to rebuild the Docker images.
export TFS_SKIP_BUILD=""
# ----- CockroachDB ------------------------------------------------------------
# Set the namespace where CockroackDB will be deployed.
export CRDB_NAMESPACE="crdb"
# Set the external port CockroackDB Postgre SQL interface will be exposed to.
export CRDB_EXT_PORT_SQL="26257"
# Set the external port CockroackDB HTTP Mgmt GUI interface will be exposed to.
export CRDB_EXT_PORT_HTTP="8081"
# Set the database username to be used by Context.
export CRDB_USERNAME="tfs"
# Set the database user's password to be used by Context.
export CRDB_PASSWORD="tfs123"
# Set CockroachDB installation mode to 'single'. This option is convenient for development and testing.
# See ./deploy/all.sh or ./deploy/crdb.sh for additional details
export CRDB_DEPLOY_MODE="single"
# Disable flag for dropping database, if it exists.
export CRDB_DROP_DATABASE_IF_EXISTS="YES"
# Disable flag for re-deploying CockroachDB from scratch.
export CRDB_REDEPLOY=""
# ----- NATS -------------------------------------------------------------------
# Set the namespace where NATS will be deployed.
export NATS_NAMESPACE="nats"
# Set the external port NATS Client interface will be exposed to.
export NATS_EXT_PORT_CLIENT="4222"
# Set the external port NATS HTTP Mgmt GUI interface will be exposed to.
export NATS_EXT_PORT_HTTP="8222"
# Set NATS installation mode to 'single'. This option is convenient for development and testing.
# See ./deploy/all.sh or ./deploy/nats.sh for additional details
export NATS_DEPLOY_MODE="single"
# Disable flag for re-deploying NATS from scratch.
export NATS_REDEPLOY=""
# ----- QuestDB ----------------------------------------------------------------
# Set the namespace where QuestDB will be deployed.
export QDB_NAMESPACE="qdb"
# Set the external port QuestDB Postgre SQL interface will be exposed to.
export QDB_EXT_PORT_SQL="8812"
# Set the external port QuestDB Influx Line Protocol interface will be exposed to.
export QDB_EXT_PORT_ILP="9009"
# Set the external port QuestDB HTTP Mgmt GUI interface will be exposed to.
export QDB_EXT_PORT_HTTP="9000"
# Set the database username to be used for QuestDB.
export QDB_USERNAME="admin"
# Set the database user's password to be used for QuestDB.
export QDB_PASSWORD="quest"
# Set the table name to be used by Monitoring for KPIs.
export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis"
# Set the table name to be used by Slice for plotting groups.
export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups"
# Disable flag for dropping tables if they exist.
export QDB_DROP_TABLES_IF_EXIST="YES"
# Disable flag for re-deploying QuestDB from scratch.
export QDB_REDEPLOY=""
# ----- K8s Observability ------------------------------------------------------
# Set the external port Prometheus Mgmt HTTP GUI interface will be exposed to.
export PROM_EXT_PORT_HTTP="9090"
# Set the external port Grafana HTTP Dashboards will be exposed to.
export GRAF_EXT_PORT_HTTP="3000"
# ----- Apache Kafka -----------------------------------------------------------
# Set the namespace where Apache Kafka will be deployed.
#export KFK_NAMESPACE="kafka"
# Set the port Apache Kafka server will be exposed to.
#export KFK_SERVER_PORT="9092"
# Set the flag to YES for redeploying of Apache Kafka
#export KFK_REDEPLOY=""
# Copyright 2022-2024 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TFS - Arista devices + Linux clients
name: hackfest5
mgmt:
network: mgmt-net
ipv4-subnet: 172.20.20.0/24
topology:
kinds:
arista_ceos:
kind: arista_ceos
#image: ceos:4.30.4M
#image: ceos:4.31.2F
image: ceos:4.31.5M
#image: ceos:4.32.0F
#image: ceos:4.32.2F
#image: ceos:4.32.2.1F
linux:
kind: linux
image: ghcr.io/hellt/network-multitool:latest
nodes:
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
mgmt-ipv4: 172.20.20.201
exec:
- ip link set address 00:c1:ab:00:01:01 dev eth1
- ip address add 192.168.1.10/24 dev eth1
- ip route add 192.168.2.0/24 via 192.168.1.1
dc2:
kind: linux
mgmt-ipv4: 172.20.20.202
exec:
- ip link set address 00:c1:ab:00:02:01 dev eth1
- ip address add 192.168.2.10/24 dev eth1
- ip route add 192.168.1.0/24 via 192.168.2.1
links:
- endpoints: ["r1:eth2", "r2:eth1"]
- endpoints: ["r1:eth10", "dc1:eth1"]
- endpoints: ["r2:eth10", "dc2:eth1"]
!.gitkeep
*.tar
*.tar.gz