From 4ce70dafea4fd0754e2ebe0e7b0b8ae91f394f25 Mon Sep 17 00:00:00 2001 From: gifrerenom <lluis.gifre@cttc.es> Date: Tue, 23 Apr 2024 08:29:00 +0000 Subject: [PATCH] DataPlane-in-a-box: - Simplified scenario to 2 devices - Disabled monitoring and service monitors in TFS deploy specs --- dataplane-in-a-box/arista.clab.yml | 12 ++---- dataplane-in-a-box/clab-cli-wan3.sh | 3 -- dataplane-in-a-box/deploy_specs.sh | 4 +- dataplane-in-a-box/example_config/wan1.conf | 37 +++++++++++++++++++ dataplane-in-a-box/example_config/wan2.conf | 37 +++++++++++++++++++ dataplane-in-a-box/tfs-01-topo-nodes.json | 10 ----- dataplane-in-a-box/tfs-02-topo-links.json | 41 +++++---------------- 7 files changed, 89 insertions(+), 55 deletions(-) delete mode 100755 dataplane-in-a-box/clab-cli-wan3.sh create mode 100644 dataplane-in-a-box/example_config/wan1.conf create mode 100644 dataplane-in-a-box/example_config/wan2.conf diff --git a/dataplane-in-a-box/arista.clab.yml b/dataplane-in-a-box/arista.clab.yml index 2865100bd..fa4957f19 100644 --- a/dataplane-in-a-box/arista.clab.yml +++ b/dataplane-in-a-box/arista.clab.yml @@ -41,11 +41,6 @@ topology: mgmt-ipv4: 172.20.20.102 ports: [6002:6030] - wan3: - kind: arista_ceos - mgmt-ipv4: 172.20.20.103 - ports: [6003:6030] - dc1: kind: linux mgmt-ipv4: 172.20.20.201 @@ -65,7 +60,8 @@ topology: - ip route add 192.168.1.0/24 via 192.168.2.1 links: - - endpoints: ["wan1:eth2", "wan2:eth1"] - - endpoints: ["wan2:eth3", "wan3:eth2"] + - endpoints: ["wan1:eth1", "wan2:eth1"] + - endpoints: ["wan1:eth2", "wan2:eth2"] + - endpoints: ["wan1:eth3", "wan2:eth3"] - endpoints: ["wan1:eth10", "dc1:eth1"] - - endpoints: ["wan3:eth10", "dc2:eth1"] + - endpoints: ["wan2:eth10", "dc2:eth1"] diff --git a/dataplane-in-a-box/clab-cli-wan3.sh b/dataplane-in-a-box/clab-cli-wan3.sh deleted file mode 100755 index c931ac940..000000000 --- a/dataplane-in-a-box/clab-cli-wan3.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -docker exec -it clab-arista-wan2 Cli diff --git a/dataplane-in-a-box/deploy_specs.sh b/dataplane-in-a-box/deploy_specs.sh index 1a978e3a9..93d5b2b82 100755 --- a/dataplane-in-a-box/deploy_specs.sh +++ b/dataplane-in-a-box/deploy_specs.sh @@ -24,7 +24,7 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" export TFS_COMPONENTS="context device pathcomp service slice nbi webui" # Uncomment to activate Monitoring -export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" +#export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" # Uncomment to activate ZTP #export TFS_COMPONENTS="${TFS_COMPONENTS} ztp" @@ -54,7 +54,7 @@ export TFS_K8S_NAMESPACE="tfs" 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" +#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" diff --git a/dataplane-in-a-box/example_config/wan1.conf b/dataplane-in-a-box/example_config/wan1.conf new file mode 100644 index 000000000..fccb7b43f --- /dev/null +++ b/dataplane-in-a-box/example_config/wan1.conf @@ -0,0 +1,37 @@ +# Copyright 2022-2024 ETSI OSG/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. + +enable +configure +ip routing + +interface Ethernet1 + no switchport + ip address 10.1.2.1/30 +exit + +interface Loopback0 + ip address 10.0.0.1/32 +exit + +interface Ethernet10 + no switchport + ip address 192.168.1.1/24 +exit + +router bgp 65001 + router-id 10.0.0.1 + neighbor 10.1.2.2 remote-as 65001 + network 192.168.1.0/24 +exit diff --git a/dataplane-in-a-box/example_config/wan2.conf b/dataplane-in-a-box/example_config/wan2.conf new file mode 100644 index 000000000..6edc0c405 --- /dev/null +++ b/dataplane-in-a-box/example_config/wan2.conf @@ -0,0 +1,37 @@ +# Copyright 2022-2024 ETSI OSG/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. + +enable +configure +ip routing + +interface Ethernet1 + no switchport + ip address 10.1.2.2/30 +exit + +interface Loopback0 + ip address 10.0.0.2/32 +exit + +interface Ethernet10 + no switchport + ip address 192.168.2.1/24 +exit + +router bgp 65001 + router-id 10.0.0.2 + neighbor 10.1.2.1 remote-as 65001 + network 192.168.2.0/24 +exit diff --git a/dataplane-in-a-box/tfs-01-topo-nodes.json b/dataplane-in-a-box/tfs-01-topo-nodes.json index 3b5e42b99..d0fafbfe8 100644 --- a/dataplane-in-a-box/tfs-01-topo-nodes.json +++ b/dataplane-in-a-box/tfs-01-topo-nodes.json @@ -45,16 +45,6 @@ "username": "admin", "password": "admin", "use_tls": false }}} ]} - }, - { - "device_id": {"device_uuid": {"uuid": "wan3"}}, "device_type": "packet-router", "device_drivers": [8], - "device_config": {"config_rules": [ - {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.103"}}, - {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6030"}}, - {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { - "username": "admin", "password": "admin", "use_tls": false - }}} - ]} } ] } diff --git a/dataplane-in-a-box/tfs-02-topo-links.json b/dataplane-in-a-box/tfs-02-topo-links.json index b9070dd9d..78765a7d5 100644 --- a/dataplane-in-a-box/tfs-02-topo-links.json +++ b/dataplane-in-a-box/tfs-02-topo-links.json @@ -1,31 +1,23 @@ { "links": [ { - "link_id": {"link_uuid": {"uuid": "wan1/ethernet-1/2==wan2/ethernet-1/1"}}, + "link_id": {"link_uuid": {"uuid": "wan1/ethernet-1/1==wan2/ethernet-1/1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "wan1"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}}, + {"device_id": {"device_uuid": {"uuid": "wan1"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}}, {"device_id": {"device_uuid": {"uuid": "wan2"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}} ] }, { - "link_id": {"link_uuid": {"uuid": "wan2/ethernet-1/1==wan1/ethernet-1/2"}}, - "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "wan2"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}}, - {"device_id": {"device_uuid": {"uuid": "wan1"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}} - ] - }, - - { - "link_id": {"link_uuid": {"uuid": "wan2/ethernet-1/3==wan3/ethernet-1/2"}}, + "link_id": {"link_uuid": {"uuid": "wan1/ethernet-1/2==wan2/ethernet-1/2"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "wan2"}}, "endpoint_uuid": {"uuid": "ethernet-1/3"}}, - {"device_id": {"device_uuid": {"uuid": "wan3"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}} + {"device_id": {"device_uuid": {"uuid": "wan1"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}}, + {"device_id": {"device_uuid": {"uuid": "wan2"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}} ] }, { - "link_id": {"link_uuid": {"uuid": "wan3/ethernet-1/2==wan2/ethernet-1/3"}}, + "link_id": {"link_uuid": {"uuid": "wan1/ethernet-1/3==wan2/ethernet-1/3"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "wan3"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}}, + {"device_id": {"device_uuid": {"uuid": "wan1"}}, "endpoint_uuid": {"uuid": "ethernet-1/3"}}, {"device_id": {"device_uuid": {"uuid": "wan2"}}, "endpoint_uuid": {"uuid": "ethernet-1/3"}} ] }, @@ -38,25 +30,10 @@ ] }, { - "link_id": {"link_uuid": {"uuid": "wan1/ethernet-1/10==dc1/eth1"}}, - "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "wan1"}}, "endpoint_uuid": {"uuid": "ethernet-1/10"}}, - {"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "eth1"}} - ] - }, - - { - "link_id": {"link_uuid": {"uuid": "dc2/eth1==wan3/ethernet-1/10"}}, + "link_id": {"link_uuid": {"uuid": "dc2/eth1==wan2/ethernet-1/10"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "eth1"}}, - {"device_id": {"device_uuid": {"uuid": "wan3"}}, "endpoint_uuid": {"uuid": "ethernet-1/10"}} - ] - }, - { - "link_id": {"link_uuid": {"uuid": "wan3/ethernet-1/10==dc2/eth1"}}, - "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "wan3"}}, "endpoint_uuid": {"uuid": "ethernet-1/10"}}, - {"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "eth1"}} + {"device_id": {"device_uuid": {"uuid": "wan2"}}, "endpoint_uuid": {"uuid": "ethernet-1/10"}} ] } ] -- GitLab