diff --git a/build/ci/.containerlab-ci.yml b/build/ci/.containerlab-ci.yml index db038c76a60d1f4f5d396f551dd30df08c95aabf..f63ea19982c1e115c72cbf5b4042899251c79262 100644 --- a/build/ci/.containerlab-ci.yml +++ b/build/ci/.containerlab-ci.yml @@ -42,7 +42,7 @@ variables: containerlab:template:integration: extends: .containerlab_template variables: - CLAB_TEMPLATE: "${CI_PROJECT_DIR}/test/containerlab/int01.clab.tmpl.yml" + CLAB_TEMPLATE: "${CI_PROJECT_DIR}/test/containerlab/complex-1.0.clab.tmpl.yml" rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == 'develop') - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH @@ -53,12 +53,18 @@ containerlab:deploy:integration: extends: .containerlab_deploy needs: ["containerlab:template:integration", "build-docker"] script: + - cat ${CI_PROJECT_DIR}/${CLAB_NAME}.clab.yml - sudo containerlab deploy --topo ${CI_PROJECT_DIR}/${CLAB_NAME}.clab.yml --reconfigure - | echo -e "\ GOSDN_HTTP_PORT=$(docker_host_port 8080 clab-${CLAB_NAME}-gosdn)\n\ GOSDN_GRPC_PORT=$(docker_host_port 55055 clab-${CLAB_NAME}-gosdn)\n\ - CEOS1_PORT=$(docker_host_port 6030 clab-${CLAB_NAME}-ceos1)" \ + CEOS1-1_PORT=$(docker_host_port 6030 clab-${CLAB_NAME}-ceos1-1)\n\ + CEOS1-2_PORT=$(docker_host_port 6030 clab-${CLAB_NAME}-ceos1-2)\n\ + CEOS2-1-1_PORT=$(docker_host_port 6030 clab-${CLAB_NAME}-ceos2-1-1)\n\ + CEOS2-1-2_PORT=$(docker_host_port 6030 clab-${CLAB_NAME}-ceos2-1-2)\n\ + CEOS2-2-1_PORT=$(docker_host_port 6030 clab-${CLAB_NAME}-ceos2-2-1)\n\ + CEOS2-2-2_PORT=$(docker_host_port 6030 clab-${CLAB_NAME}-ceos2-2-2)" \ > ${CI_PROJECT_DIR}/build.env - cat ${CI_PROJECT_DIR}/build.env artifacts: diff --git a/test/containerlab/complex-1.0.clab.tmpl.yml b/test/containerlab/complex-1.0.clab.tmpl.yml new file mode 100644 index 0000000000000000000000000000000000000000..cdec98b888e1aff0bd56b69cd863f10aa928ef21 --- /dev/null +++ b/test/containerlab/complex-1.0.clab.tmpl.yml @@ -0,0 +1,79 @@ +# topology documentation: http://containerlab.srlinux.dev/lab-examples/srl-ceos/ +name: @@CLAB_NAME@@ + +mgmt: + network: @@CLAB_NAME@@ + ipv4_subnet: @@CLAB_MGMT_SUBNET@@ + +topology: + nodes: + gosdn: + kind: linux + image: @@GOSDN_CONTAINER_IMAGE@@ + ports: + - 0:8080 + - 0:55055 + ceos1-1: + kind: ceos + image: @@CEOS_CONTAINER_IMAGE@@ + ports: + - 0:6030 + ceos1-2: + kind: ceos + image: @@CEOS_CONTAINER_IMAGE@@ + ports: + - 0:6030 + ceos2-1-1: + kind: ceos + image: @@CEOS_CONTAINER_IMAGE@@ + ports: + - 0:6030 + ceos2-1-2: + kind: ceos + image: @@CEOS_CONTAINER_IMAGE@@ + ports: + - 0:6030 + ceos2-2-1: + kind: ceos + image: @@CEOS_CONTAINER_IMAGE@@ + ports: + - 0:6030 + ceos2-2-2: + kind: ceos + image: @@CEOS_CONTAINER_IMAGE@@ + ports: + - 0:6030 + server3-1-1: + kind: linux + image: alpine:latest + server3-1-2: + kind: linux + image: alpine:latest + server3-1-3: + kind: linux + image: alpine:latest + server3-2-1: + kind: linux + image: alpine:latest + server3-2-2: + kind: linux + image: alpine:latest + + + links: + - endpoints: ["ceos1-1:eth1", "ceos2-1-1:eth1"] + - endpoints: ["ceos1-1:eth2", "ceos2-1-2:eth1"] + - endpoints: ["ceos1-1:eth3", "ceos2-2-1:eth1"] + - endpoints: ["ceos1-1:eth4", "ceos2-2-2:eth1"] + - endpoints: ["ceos1-2:eth1", "ceos2-1-1:eth2"] + - endpoints: ["ceos1-2:eth2", "ceos2-1-2:eth2"] + - endpoints: ["ceos1-2:eth3", "ceos2-2-1:eth2"] + - endpoints: ["ceos1-2:eth4", "ceos2-2-2:eth2"] + - endpoints: ["ceos2-1-1:eth3", "server3-1-1:eth1"] + - endpoints: ["ceos2-1-1:eth4", "server3-1-2:eth1"] + - endpoints: ["ceos2-1-2:eth3", "server3-1-2:eth2"] + - endpoints: ["ceos2-1-2:eth4", "server3-1-3:eth1"] + - endpoints: ["ceos2-2-1:eth3", "server3-2-1:eth1"] + - endpoints: ["ceos2-2-1:eth4", "server3-2-2:eth1"] + - endpoints: ["ceos2-2-2:eth3d", "server3-2-1:eth2"] + - endpoints: ["ceos2-2-2:eth4", "server3-2-2:eth2"] diff --git a/test/containerlab/complex-1.0.png b/test/containerlab/complex-1.0.png new file mode 100644 index 0000000000000000000000000000000000000000..7e68e19f8fee69e1e78d632339971f4c3f853e7a Binary files /dev/null and b/test/containerlab/complex-1.0.png differ