From 392ac94ffdc239e3811cfe2e96fb4a3aa7a666ab Mon Sep 17 00:00:00 2001 From: biplamal Date: Mon, 1 Jul 2024 07:14:02 +0000 Subject: [PATCH 01/18] ci related changes --- .gitignore | 1 + deployments/ixia-c-config.yaml | 40 ------------------- deployments/ixia-c-licensed-config.yaml | 45 --------------------- do.sh | 53 +++++++++++++++++++++---- versions.yaml | 6 +-- 5 files changed, 50 insertions(+), 95 deletions(-) delete mode 100644 deployments/ixia-c-config.yaml delete mode 100644 deployments/ixia-c-licensed-config.yaml diff --git a/.gitignore b/.gitignore index 2eeb6b8..52b66b4 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ logs/ /deployments/k8s/meshnet-cni /deployments/k8s/mod.yaml /etc +/deployments/.ixia-c-config.yaml diff --git a/deployments/ixia-c-config.yaml b/deployments/ixia-c-config.yaml deleted file mode 100644 index dbb5100..0000000 --- a/deployments/ixia-c-config.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: ixiatg-release-config - namespace: ixiatg-op-system -data: - versions: | - { - "release": "local", - "images": [ - { - "name": "controller", - "path": "ghcr.io/open-traffic-generator/keng-controller", - "tag": "1.6.2-1", - "env": { - "TRACE": "true" - } - }, - { - "name": "gnmi-server", - "path": "ghcr.io/open-traffic-generator/otg-gnmi-server", - "tag": "1.14.4" - }, - { - "name": "traffic-engine", - "path": "ghcr.io/open-traffic-generator/ixia-c-traffic-engine", - "tag": "1.8.0.12" - }, - { - "name": "protocol-engine", - "path": "ghcr.io/open-traffic-generator/ixia-c-protocol-engine", - "tag": "1.00.0.390" - }, - { - "name": "ixhw-server", - "path": "ghcr.io/open-traffic-generator/keng-layer23-hw-server", - "tag": "1.6.2-1" - } - ] - } diff --git a/deployments/ixia-c-licensed-config.yaml b/deployments/ixia-c-licensed-config.yaml deleted file mode 100644 index 8794be9..0000000 --- a/deployments/ixia-c-licensed-config.yaml +++ /dev/null @@ -1,45 +0,0 @@ -apiVersion: v1 -kind: ConfigMap -metadata: - name: ixiatg-release-config - namespace: ixiatg-op-system -data: - versions: | - { - "release": "local", - "images": [ - { - "name": "controller", - "path": "ghcr.io/open-traffic-generator/keng-controller", - "tag": "1.6.2-1", - "env": { - "TRACE": "true" - } - }, - { - "name": "gnmi-server", - "path": "ghcr.io/open-traffic-generator/otg-gnmi-server", - "tag": "1.14.4" - }, - { - "name": "traffic-engine", - "path": "ghcr.io/open-traffic-generator/ixia-c-traffic-engine", - "tag": "1.8.0.12" - }, - { - "name": "protocol-engine", - "path": "ghcr.io/open-traffic-generator/ixia-c-protocol-engine", - "tag": "1.00.0.390" - }, - { - "name": "ixhw-server", - "path": "ghcr.io/open-traffic-generator/keng-layer23-hw-server", - "tag": "1.6.2-1" - }, - { - "name": "license-server", - "path": "ghcr.io/open-traffic-generator/licensed/keng-license-server", - "tag": "latest" - } - ] - } diff --git a/do.sh b/do.sh index 3c5b031..4aeec41 100755 --- a/do.sh +++ b/do.sh @@ -33,12 +33,49 @@ OPENCONFIG_MODELS_COMMIT=5ca6a36 TIMEOUT_SECONDS=300 APT_GET_UPDATE=true - -IXIA_C_CONFIG_MAP="deployments/ixia-c-config.yaml" -if [ "${LICENSING}" = "true" ] -then - IXIA_C_CONFIG_MAP="deployments/ixia-c-licensed-config.yaml" -fi +IXIA_C_CONFIG_MAP_TEMP="deployments/template-ixia-c-config.yaml" +IXIA_C_CONFIG_MAP="deployments/.ixia-c-config.yaml" + +YQ_RELEASE="v4.34.1" +YQ_SOURCE="github.com/mikefarah/yq/v4@${YQ_RELEASE}" +get_yq() { + echo "Getting yq ..." + echo "Installing yq ${YQ_SOURCE} ..." + go install "${YQ_SOURCE}" + echo "Successfully installed yq !" +} + +configq() { + # echo is needed to further evaluate the + # contents extracted from configuration + eval echo $(yq "${@}" versions.yaml) +} + +eval_config_map() { + get_yq \ + && rm -rf ${IXIA_C_CONFIG_MAP} + + # avoid splitting based on whitespace + IFS='' + # mix of cat and echo is used to ensure the input file has + # at least one newline before EOF, otherwise read will not + # provide last line + { cat ${IXIA_C_CONFIG_MAP_TEMP}; echo; } | while read line; do + # replace all double-quotes with single quotes + line=$(echo "${line}" | sed s#\"#\'#g) + # and revert them back to double-quotes post eval; + # this will result in converting all single-quotes + # to double-quotes regardless of whether they were + # originally double-quotes, but hopefully this won't + # be an issue + # this workaround was put in place because eval gets + # rid of double-quotes + eval echo \"$line\" | sed s#\'#\"#g >> ${IXIA_C_CONFIG_MAP} + done + # restore default IFS + unset IFS + cat ${IXIA_C_CONFIG_MAP} +} apt_update() { if [ "${APT_UPDATE}" = "true" ] @@ -1066,6 +1103,7 @@ new_k8s_cluster() { common_install \ && setup_kind_cluster \ && setup_k8s_plugins ${1} ${2} \ + && eval_config_map \ && load_ixia_c_images } @@ -1093,7 +1131,8 @@ create_ixia_c_kne() { echo "Creating KNE ${1} ${2} topology ..." ns=$(kne_namespace ${1} ${2}) topo=$(kne_topo_file ${1} ${2}) - kubectl apply -f $IXIA_C_CONFIG_MAP \ + eval_config_map \ + && kubectl apply -f $IXIA_C_CONFIG_MAP \ && kne create ${topo} \ && wait_for_pods ${ns} \ && kubectl get pods -A \ diff --git a/versions.yaml b/versions.yaml index 2be1e2a..875312e 100644 --- a/versions.yaml +++ b/versions.yaml @@ -3,12 +3,12 @@ images: - name: controller path: ghcr.io/open-traffic-generator/keng-controller tag: 1.6.2-1 + - name: gnmi-server + path: ghcr.io/open-traffic-generator/otg-gnmi-server + tag: 1.14.4 - name: traffic-engine path: ghcr.io/open-traffic-generator/ixia-c-traffic-engine tag: 1.8.0.12 - name: protocol-engine path: ghcr.io/open-traffic-generator/ixia-c-protocol-engine tag: 1.00.0.390 - - name: license-server - path: ghcr.io/open-traffic-generator/licensed/keng-license-server - tag: latest From 46716218c4db8cd1e4709e7e15d2bcb86c1c5b29 Mon Sep 17 00:00:00 2001 From: biplamal Date: Mon, 1 Jul 2024 07:14:15 +0000 Subject: [PATCH 02/18] ci related changes --- deployments/template-ixia-c-config.yaml | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 deployments/template-ixia-c-config.yaml diff --git a/deployments/template-ixia-c-config.yaml b/deployments/template-ixia-c-config.yaml new file mode 100644 index 0000000..fe629b6 --- /dev/null +++ b/deployments/template-ixia-c-config.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: ixiatg-release-config + namespace: ixiatg-op-system +data: + versions: | + { + "release": "local", + "images": [ + { + "name": "controller", + "path": "$(configq .images[0].path)", + "tag": "$(configq .images[0].tag)", + "env": { + "TRACE": "true" + } + }, + { + "name": "gnmi-server", + "path": "$(configq .images[1].path)", + "tag": "$(configq .images[1].tag)", + }, + { + "name": "traffic-engine", + "path": "$(configq .images[2].path)", + "tag": "$(configq .images[2].tag)", + }, + { + "name": "protocol-engine", + "path": "$(configq .images[3].path)", + "tag": "$(configq .images[3].tag)", + } + ] + } \ No newline at end of file From 89d648b22d6a1f14a1cc55d89d6b095c39473a74 Mon Sep 17 00:00:00 2001 From: biplamal Date: Thu, 4 Jul 2024 06:43:30 +0000 Subject: [PATCH 03/18] bug fix --- deployments/k8s/kne-manifests/ixia-c-b2b.yaml | 1 + deployments/template-ixia-c-config.yaml | 18 ++++++++---------- requirements.txt | 4 +++- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/deployments/k8s/kne-manifests/ixia-c-b2b.yaml b/deployments/k8s/kne-manifests/ixia-c-b2b.yaml index 93c1891..dcdff17 100644 --- a/deployments/k8s/kne-manifests/ixia-c-b2b.yaml +++ b/deployments/k8s/kne-manifests/ixia-c-b2b.yaml @@ -18,3 +18,4 @@ links: a_int: eth1 z_node: otg z_int: eth2 + diff --git a/deployments/template-ixia-c-config.yaml b/deployments/template-ixia-c-config.yaml index fe629b6..5027abc 100644 --- a/deployments/template-ixia-c-config.yaml +++ b/deployments/template-ixia-c-config.yaml @@ -6,30 +6,28 @@ metadata: data: versions: | { - "release": "local", - "images": [ + "release": "local", + "images": [ { "name": "controller", "path": "$(configq .images[0].path)", - "tag": "$(configq .images[0].tag)", - "env": { - "TRACE": "true" - } + "tag": "$(configq .images[0].tag)" }, { "name": "gnmi-server", "path": "$(configq .images[1].path)", - "tag": "$(configq .images[1].tag)", + "tag": "$(configq .images[1].tag)" }, { "name": "traffic-engine", "path": "$(configq .images[2].path)", - "tag": "$(configq .images[2].tag)", + "tag": "$(configq .images[2].tag)" }, { "name": "protocol-engine", "path": "$(configq .images[3].path)", - "tag": "$(configq .images[3].tag)", + "tag": "$(configq .images[3].tag)" } ] - } \ No newline at end of file + } + diff --git a/requirements.txt b/requirements.txt index 6f256b4..b542347 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,7 @@ -pytest black; python_version > '3.6' flake8 pypcapfile==0.12.0 snappi==1.6.2 +pytest == 6.2.5 +pytest-html +pytest-metadata == 1.11.0 From 5449ce47e5f7cb22695a4c7aad05b21f3620f70f Mon Sep 17 00:00:00 2001 From: biplamal Date: Thu, 4 Jul 2024 13:59:18 +0000 Subject: [PATCH 04/18] docker deploy updated --- do.sh | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/do.sh b/do.sh index 4aeec41..0e0a0ca 100755 --- a/do.sh +++ b/do.sh @@ -662,13 +662,7 @@ create_ixia_c_b2b_cpdp() { --accept-eula \ --trace \ --disable-app-usage-reporter \ - --license-servers localhost \ - && docker run -d \ - --net=container:keng-controller \ - --name=keng-license-server \ - $(keng_license_server_img) \ - --accept-eula \ - --debug + --license-servers localhost else docker run -d \ --name=keng-controller \ @@ -719,11 +713,6 @@ rm_ixia_c_b2b_cpdp() { echo "Tearing down back-to-back with CP/DP distribution of ixia-c ..." docker stop keng-controller && docker rm keng-controller - if [ "${LICENSING}" = "true" ] - then - docker stop keng-license-server && docker rm keng-license-server - fi - docker stop ixia-c-traffic-engine-${VETH_A} docker stop ixia-c-protocol-engine-${VETH_A} docker rm ixia-c-traffic-engine-${VETH_A} @@ -750,13 +739,7 @@ create_ixia_c_b2b_lag() { --accept-eula \ --trace \ --disable-app-usage-reporter \ - --license-servers localhost \ - && docker run -d \ - --net=container:keng-controller \ - --name=keng-license-server \ - $(keng_license_server_img) \ - --accept-eula \ - --debug + --license-servers localhost else docker run -d \ --name=keng-controller \ From 88a6f2cd7f7867ccc5912fe74c7493141eb892d3 Mon Sep 17 00:00:00 2001 From: biplamal Date: Fri, 5 Jul 2024 03:13:55 +0000 Subject: [PATCH 05/18] updated --- .gitignore | 1 + .../k8s/manifests/ixia-c-b2b-eth0.yaml | 12 +++---- do.sh | 35 +++++++++++++++++-- 3 files changed, 40 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 52b66b4..74092de 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ logs/ /deployments/k8s/mod.yaml /etc /deployments/.ixia-c-config.yaml +/deployments/k8s/manifests/.ixia-c-b2b-eth0.yaml \ No newline at end of file diff --git a/deployments/k8s/manifests/ixia-c-b2b-eth0.yaml b/deployments/k8s/manifests/ixia-c-b2b-eth0.yaml index c01ddc0..ee4d4a8 100644 --- a/deployments/k8s/manifests/ixia-c-b2b-eth0.yaml +++ b/deployments/k8s/manifests/ixia-c-b2b-eth0.yaml @@ -34,7 +34,7 @@ items: - args: - --accept-eula - --debug - image: ghcr.io/open-traffic-generator/keng-controller:local + image: $(configq .images[0].path):$(configq .images[0].tag) imagePullPolicy: IfNotPresent name: keng-controller volumeMounts: @@ -45,7 +45,7 @@ items: - -http-server - https://localhost:8443 - --debug - image: ghcr.io/open-traffic-generator/otg-gnmi-server:local + image: $(configq .images[1].path):$(configq .images[1].tag) imagePullPolicy: IfNotPresent name: otg-gnmi-server ports: @@ -77,7 +77,7 @@ items: value: "5555" - name: ARG_CORE_LIST value: 1 1 1 - image: ghcr.io/open-traffic-generator/ixia-c-traffic-engine:local + image: $(configq .images[2].path):$(configq .images[2].tag) imagePullPolicy: IfNotPresent name: otg-port-eth1-traffic-engine securityContext: @@ -85,7 +85,7 @@ items: - env: - name: INTF_LIST value: eth0 - image: ghcr.io/open-traffic-generator/ixia-c-protocol-engine:local + image: $(configq .images[3].path):$(configq .images[3].tag) imagePullPolicy: IfNotPresent name: otg-port-eth1-protocol-engine securityContext: @@ -110,7 +110,7 @@ items: value: "5555" - name: ARG_CORE_LIST value: 1 1 1 - image: ghcr.io/open-traffic-generator/ixia-c-traffic-engine:local + image: $(configq .images[2].path):$(configq .images[2].tag) imagePullPolicy: IfNotPresent name: otg-port-eth2-traffic-engine securityContext: @@ -118,7 +118,7 @@ items: - env: - name: INTF_LIST value: eth0 - image: ghcr.io/open-traffic-generator/ixia-c-protocol-engine:local + image: $(configq .images[3].path):$(configq .images[3].tag) imagePullPolicy: IfNotPresent name: otg-port-eth2-protocol-engine securityContext: diff --git a/do.sh b/do.sh index 0e0a0ca..64ca3e1 100755 --- a/do.sh +++ b/do.sh @@ -1136,10 +1136,41 @@ k8s_namespace() { grep namespace deployments/k8s/manifests/${1}.yaml -m 1 | cut -d \: -f2 | cut -d \ -f 2 } +eval_config_manifest() { + file={1} + new_file=".{1}" + get_yq \ + && rm -rf ${new_file} + + # avoid splitting based on whitespace + IFS='' + # mix of cat and echo is used to ensure the input file has + # at least one newline before EOF, otherwise read will not + # provide last line + { cat ${file}; echo; } | while read line; do + # replace all double-quotes with single quotes + line=$(echo "${line}" | sed s#\"#\'#g) + # and revert them back to double-quotes post eval; + # this will result in converting all single-quotes + # to double-quotes regardless of whether they were + # originally double-quotes, but hopefully this won't + # be an issue + # this workaround was put in place because eval gets + # rid of double-quotes + eval echo \"$line\" | sed s#\'#\"#g >> ${new_file} + done + # restore default IFS + unset IFS + cat ${new_file} +} + create_ixia_c_k8s() { echo "Creating K8S ${1} topology ..." ns=$(k8s_namespace ${1}) - kubectl apply -f deployments/k8s/manifests/${1}.yaml \ + cd deployments/k8s/manifests \ + && eval_config_manifest {1}.yaml \ + && kubectl apply -f .${1}.yaml \ + && cd ../../.. \ && wait_for_pods ${ns} \ && kubectl get pods -A \ && kubectl get services -A \ @@ -1150,7 +1181,7 @@ create_ixia_c_k8s() { rm_ixia_c_k8s() { echo "Removing K8S ${1} topology ..." ns=$(k8s_namespace ${1}) - kubectl delete -f deployments/k8s/manifests/${1}.yaml \ + kubectl delete -f deployments/k8s/manifests/.${1}.yaml \ && wait_for_no_namespace ${ns} } From a74b28255a65f836c0e645b3343677347ad249b7 Mon Sep 17 00:00:00 2001 From: biplamal Date: Fri, 5 Jul 2024 03:20:31 +0000 Subject: [PATCH 06/18] updated --- do.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/do.sh b/do.sh index 64ca3e1..4c0bd8b 100755 --- a/do.sh +++ b/do.sh @@ -1137,8 +1137,8 @@ k8s_namespace() { } eval_config_manifest() { - file={1} - new_file=".{1}" + file=${1} + new_file=".${file}" get_yq \ && rm -rf ${new_file} @@ -1168,7 +1168,7 @@ create_ixia_c_k8s() { echo "Creating K8S ${1} topology ..." ns=$(k8s_namespace ${1}) cd deployments/k8s/manifests \ - && eval_config_manifest {1}.yaml \ + && eval_config_manifest "{1}.yaml" \ && kubectl apply -f .${1}.yaml \ && cd ../../.. \ && wait_for_pods ${ns} \ From bf7610e1ae9a24e800a893e016a98acc51050ee0 Mon Sep 17 00:00:00 2001 From: biplamal Date: Fri, 5 Jul 2024 03:23:20 +0000 Subject: [PATCH 07/18] updated --- do.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/do.sh b/do.sh index 4c0bd8b..d5dc5d9 100755 --- a/do.sh +++ b/do.sh @@ -1168,7 +1168,7 @@ create_ixia_c_k8s() { echo "Creating K8S ${1} topology ..." ns=$(k8s_namespace ${1}) cd deployments/k8s/manifests \ - && eval_config_manifest "{1}.yaml" \ + && eval_config_manifest "${1}.yaml" \ && kubectl apply -f .${1}.yaml \ && cd ../../.. \ && wait_for_pods ${ns} \ From 6376158833bd66154cd2a6dba09ec54bdb995cd5 Mon Sep 17 00:00:00 2001 From: biplamal Date: Fri, 5 Jul 2024 03:30:41 +0000 Subject: [PATCH 08/18] updated --- do.sh | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/do.sh b/do.sh index d5dc5d9..853330c 100755 --- a/do.sh +++ b/do.sh @@ -1136,18 +1136,17 @@ k8s_namespace() { grep namespace deployments/k8s/manifests/${1}.yaml -m 1 | cut -d \: -f2 | cut -d \ -f 2 } -eval_config_manifest() { - file=${1} - new_file=".${file}" - get_yq \ - && rm -rf ${new_file} +eval_yaml() { + get_yq + new_yaml=$(dirname ${1})/.$(basename ${1}) + rm -rf ${new_yaml} # avoid splitting based on whitespace IFS='' # mix of cat and echo is used to ensure the input file has # at least one newline before EOF, otherwise read will not # provide last line - { cat ${file}; echo; } | while read line; do + { cat ${1}; echo; } | while read line; do # replace all double-quotes with single quotes line=$(echo "${line}" | sed s#\"#\'#g) # and revert them back to double-quotes post eval; @@ -1157,19 +1156,18 @@ eval_config_manifest() { # be an issue # this workaround was put in place because eval gets # rid of double-quotes - eval echo \"$line\" | sed s#\'#\"#g >> ${new_file} + eval echo \"$line\" | sed s#\'#\"#g >> ${new_yaml} done # restore default IFS unset IFS - cat ${new_file} + echo ${new_yaml} } create_ixia_c_k8s() { echo "Creating K8S ${1} topology ..." ns=$(k8s_namespace ${1}) - cd deployments/k8s/manifests \ - && eval_config_manifest "${1}.yaml" \ - && kubectl apply -f .${1}.yaml \ + eval_yaml deployments/k8s/manifests/${1}.yaml \ + && kubectl apply -f deployments/k8s/manifests/.${1}.yaml \ && cd ../../.. \ && wait_for_pods ${ns} \ && kubectl get pods -A \ From 1828ef9ccad6853ddc7e379df92c8ed8eef7095e Mon Sep 17 00:00:00 2001 From: biplamal Date: Fri, 5 Jul 2024 07:32:07 +0000 Subject: [PATCH 09/18] licensed islands are shifted to internal controller CI, so blocked/commented out --- .github/workflows/cicd.yml | 666 ++++++++++++++++++------------------- 1 file changed, 333 insertions(+), 333 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index e2c36b5..a50e63d 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -149,307 +149,307 @@ jobs: run: | ./do.sh topo rm dp - dp_py: - runs-on: ubuntu-22.04 - steps: - - name: Checkout source - uses: actions/checkout@v3 - - name: Setup docker - uses: docker-practice/actions-setup-docker@master - - name: Deploy back-to-back DP-only distribution of ixia-c - run: | - ./do.sh topo new dp - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_VERSION }} - - name: Setup test prerequisites - run: | - ./do.sh prepytest - - name: Run Python DP-only tests - run: | - ./do.sh pytest -m dp ./feature/b2b/ - - name: Get container logs - if: always() - run: | - ./do.sh topo logs - - name: Archive logs - if: always() - uses: actions/upload-artifact@v3 - with: - name: dp_py - path: | - logs - - name: Teardown back-to-back DP-only distribution of ixia-c - run: | - ./do.sh topo rm dp + # dp_py: + # runs-on: ubuntu-22.04 + # steps: + # - name: Checkout source + # uses: actions/checkout@v3 + # - name: Setup docker + # uses: docker-practice/actions-setup-docker@master + # - name: Deploy back-to-back DP-only distribution of ixia-c + # run: | + # ./do.sh topo new dp + # - name: Setup Python + # uses: actions/setup-python@v4 + # with: + # python-version: ${{ env.PYTHON_VERSION }} + # - name: Setup test prerequisites + # run: | + # ./do.sh prepytest + # - name: Run Python DP-only tests + # run: | + # ./do.sh pytest -m dp ./feature/b2b/ + # - name: Get container logs + # if: always() + # run: | + # ./do.sh topo logs + # - name: Archive logs + # if: always() + # uses: actions/upload-artifact@v3 + # with: + # name: dp_py + # path: | + # logs + # - name: Teardown back-to-back DP-only distribution of ixia-c + # run: | + # ./do.sh topo rm dp - dp_go: - runs-on: ubuntu-22.04 - steps: - - name: Checkout source - uses: actions/checkout@v3 - - name: Setup docker - uses: docker-practice/actions-setup-docker@master - - name: Deploy back-to-back DP-only distribution of ixia-c - run: | - ./do.sh topo new dp - - name: Setup Go - uses: actions/setup-go@v3 - with: - go-version: ${{ env.GO_VERSION }} - - uses: actions/cache@v3 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: dp_go_${{ hashFiles('go.sum') }} - restore-keys: | - dp_go_ - - name: Run Go DP-only tests - run: | - ./do.sh gotest -tags="dp" ./feature/b2b/... - - name: Get container logs - if: always() - run: | - ./do.sh topo logs - - name: Archive logs - if: always() - uses: actions/upload-artifact@v3 - with: - name: dp_go - path: | - logs - - name: Teardown back-to-back DP-only distribution of ixia-c - run: | - ./do.sh topo rm dp + # dp_go: + # runs-on: ubuntu-22.04 + # steps: + # - name: Checkout source + # uses: actions/checkout@v3 + # - name: Setup docker + # uses: docker-practice/actions-setup-docker@master + # - name: Deploy back-to-back DP-only distribution of ixia-c + # run: | + # ./do.sh topo new dp + # - name: Setup Go + # uses: actions/setup-go@v3 + # with: + # go-version: ${{ env.GO_VERSION }} + # - uses: actions/cache@v3 + # with: + # path: | + # ~/.cache/go-build + # ~/go/pkg/mod + # key: dp_go_${{ hashFiles('go.sum') }} + # restore-keys: | + # dp_go_ + # - name: Run Go DP-only tests + # run: | + # ./do.sh gotest -tags="dp" ./feature/b2b/... + # - name: Get container logs + # if: always() + # run: | + # ./do.sh topo logs + # - name: Archive logs + # if: always() + # uses: actions/upload-artifact@v3 + # with: + # name: dp_go + # path: | + # logs + # - name: Teardown back-to-back DP-only distribution of ixia-c + # run: | + # ./do.sh topo rm dp - cpdp_py: - runs-on: ubuntu-22.04 - steps: - - name: Checkout source - uses: actions/checkout@v3 - - name: Setup docker - uses: docker-practice/actions-setup-docker@master - - name: Deploy back-to-back CP/DP distribution of ixia-c - run: | - GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh topo new cpdp - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_VERSION }} - - name: Setup test prerequisites - run: | - ./do.sh prepytest - - name: Run Python tests - run: | - ./do.sh pytest ./feature/b2b/ - - name: Get container logs - if: always() - run: | - ./do.sh topo logs cpdp - - name: Archive logs - if: always() - uses: actions/upload-artifact@v3 - with: - name: cpdp_py - path: | - logs - - name: Teardown back-to-back CP/DP distribution of ixia-c - run: | - LICENSING=true ./do.sh topo rm cpdp + # cpdp_py: + # runs-on: ubuntu-22.04 + # steps: + # - name: Checkout source + # uses: actions/checkout@v3 + # - name: Setup docker + # uses: docker-practice/actions-setup-docker@master + # - name: Deploy back-to-back CP/DP distribution of ixia-c + # run: | + # GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh topo new cpdp + # - name: Setup Python + # uses: actions/setup-python@v4 + # with: + # python-version: ${{ env.PYTHON_VERSION }} + # - name: Setup test prerequisites + # run: | + # ./do.sh prepytest + # - name: Run Python tests + # run: | + # ./do.sh pytest ./feature/b2b/ + # - name: Get container logs + # if: always() + # run: | + # ./do.sh topo logs cpdp + # - name: Archive logs + # if: always() + # uses: actions/upload-artifact@v3 + # with: + # name: cpdp_py + # path: | + # logs + # - name: Teardown back-to-back CP/DP distribution of ixia-c + # run: | + # LICENSING=true ./do.sh topo rm cpdp - cpdp_go: - runs-on: ubuntu-22.04 - steps: - - name: Checkout source - uses: actions/checkout@v3 - - name: Setup docker - uses: docker-practice/actions-setup-docker@master - - name: Deploy back-to-back CP/DP distribution of ixia-c - run: | - GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh topo new cpdp - - name: Setup Go - uses: actions/setup-go@v3 - with: - go-version: ${{ env.GO_VERSION }} - - uses: actions/cache@v3 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: cpdp_go_${{ hashFiles('go.sum') }} - restore-keys: | - cpdp_go_ - - name: Run Go tests - run: | - ./do.sh gotest -tags=all ./feature/b2b/... - - name: Get container logs - if: always() - run: | - ./do.sh topo logs cpdp - - name: Archive logs - if: always() - uses: actions/upload-artifact@v3 - with: - name: cpdp_go - path: | - logs - - name: Teardown back-to-back CP/DP distribution of ixia-c - run: | - LICENSING=true ./do.sh topo rm cpdp + # cpdp_go: + # runs-on: ubuntu-22.04 + # steps: + # - name: Checkout source + # uses: actions/checkout@v3 + # - name: Setup docker + # uses: docker-practice/actions-setup-docker@master + # - name: Deploy back-to-back CP/DP distribution of ixia-c + # run: | + # GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh topo new cpdp + # - name: Setup Go + # uses: actions/setup-go@v3 + # with: + # go-version: ${{ env.GO_VERSION }} + # - uses: actions/cache@v3 + # with: + # path: | + # ~/.cache/go-build + # ~/go/pkg/mod + # key: cpdp_go_${{ hashFiles('go.sum') }} + # restore-keys: | + # cpdp_go_ + # - name: Run Go tests + # run: | + # ./do.sh gotest -tags=all ./feature/b2b/... + # - name: Get container logs + # if: always() + # run: | + # ./do.sh topo logs cpdp + # - name: Archive logs + # if: always() + # uses: actions/upload-artifact@v3 + # with: + # name: cpdp_go + # path: | + # logs + # - name: Teardown back-to-back CP/DP distribution of ixia-c + # run: | + # LICENSING=true ./do.sh topo rm cpdp - cpdp_ipv6_py: - runs-on: ubuntu-22.04 - steps: - - name: Checkout source - uses: actions/checkout@v3 - - name: Setup docker - uses: docker-practice/actions-setup-docker@master - - name: Deploy back-to-back CP/DP distribution of ixia-c - run: | - GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh topo new cpdp ipv6 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_VERSION }} - - name: Setup test prerequisites - run: | - ./do.sh prepytest - - name: Run Python tests - run: | - ./do.sh pytest ./feature/b2b/ - - name: Get container logs - if: always() - run: | - ./do.sh topo logs cpdp - - name: Archive logs - if: always() - uses: actions/upload-artifact@v3 - with: - name: cpdp_ipv6_py - path: | - logs - - name: Teardown back-to-back CP/DP distribution of ixia-c - run: | - LICENSING=true ./do.sh topo rm cpdp + # cpdp_ipv6_py: + # runs-on: ubuntu-22.04 + # steps: + # - name: Checkout source + # uses: actions/checkout@v3 + # - name: Setup docker + # uses: docker-practice/actions-setup-docker@master + # - name: Deploy back-to-back CP/DP distribution of ixia-c + # run: | + # GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh topo new cpdp ipv6 + # - name: Setup Python + # uses: actions/setup-python@v4 + # with: + # python-version: ${{ env.PYTHON_VERSION }} + # - name: Setup test prerequisites + # run: | + # ./do.sh prepytest + # - name: Run Python tests + # run: | + # ./do.sh pytest ./feature/b2b/ + # - name: Get container logs + # if: always() + # run: | + # ./do.sh topo logs cpdp + # - name: Archive logs + # if: always() + # uses: actions/upload-artifact@v3 + # with: + # name: cpdp_ipv6_py + # path: | + # logs + # - name: Teardown back-to-back CP/DP distribution of ixia-c + # run: | + # LICENSING=true ./do.sh topo rm cpdp - cpdp_ipv6_go: - runs-on: ubuntu-22.04 - steps: - - name: Checkout source - uses: actions/checkout@v3 - - name: Setup docker - uses: docker-practice/actions-setup-docker@master - - name: Deploy back-to-back CP/DP distribution of ixia-c - run: | - GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh topo new cpdp ipv6 - - name: Setup Go - uses: actions/setup-go@v3 - with: - go-version: ${{ env.GO_VERSION }} - - uses: actions/cache@v3 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: cpdp_ipv6_go_${{ hashFiles('go.sum') }} - restore-keys: | - cpdp_ipv6_go_ - - name: Run Go tests - run: | - ./do.sh gotest -tags=all ./feature/b2b/... - - name: Get container logs - if: always() - run: | - ./do.sh topo logs cpdp - - name: Archive logs - if: always() - uses: actions/upload-artifact@v3 - with: - name: cpdp_ipv6_go - path: | - logs - - name: Teardown back-to-back CP/DP distribution of ixia-c - run: | - LICENSING=true ./do.sh topo rm cpdp + # cpdp_ipv6_go: + # runs-on: ubuntu-22.04 + # steps: + # - name: Checkout source + # uses: actions/checkout@v3 + # - name: Setup docker + # uses: docker-practice/actions-setup-docker@master + # - name: Deploy back-to-back CP/DP distribution of ixia-c + # run: | + # GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh topo new cpdp ipv6 + # - name: Setup Go + # uses: actions/setup-go@v3 + # with: + # go-version: ${{ env.GO_VERSION }} + # - uses: actions/cache@v3 + # with: + # path: | + # ~/.cache/go-build + # ~/go/pkg/mod + # key: cpdp_ipv6_go_${{ hashFiles('go.sum') }} + # restore-keys: | + # cpdp_ipv6_go_ + # - name: Run Go tests + # run: | + # ./do.sh gotest -tags=all ./feature/b2b/... + # - name: Get container logs + # if: always() + # run: | + # ./do.sh topo logs cpdp + # - name: Archive logs + # if: always() + # uses: actions/upload-artifact@v3 + # with: + # name: cpdp_ipv6_go + # path: | + # logs + # - name: Teardown back-to-back CP/DP distribution of ixia-c + # run: | + # LICENSING=true ./do.sh topo rm cpdp - kne_b2b_py: - runs-on: ubuntu-22.04 - steps: - - name: Checkout source - uses: actions/checkout@v3 - - name: Setup docker - uses: docker-practice/actions-setup-docker@master - - name: Setup Go - uses: actions/setup-go@v3 - with: - go-version: ${{ env.GO_VERSION }} - - name: Setup KNE cluster - run: | - GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh new_k8s_cluster kne - - name: Deploy KNE OTG back-to-back topology - run: | - GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh topo new kneb2b - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_VERSION }} - - name: Setup test prerequisites - run: | - ./do.sh prepytest - - name: Run Python tests - run: | - ./do.sh pytest ./feature/b2b/ - - name: Archive logs - if: always() - uses: actions/upload-artifact@v3 - with: - name: kne_b2b_py - path: | - logs - - name: Teardown KNE OTG back-to-back topology - run: | - LICENSING=true ./do.sh topo rm kneb2b + # kne_b2b_py: + # runs-on: ubuntu-22.04 + # steps: + # - name: Checkout source + # uses: actions/checkout@v3 + # - name: Setup docker + # uses: docker-practice/actions-setup-docker@master + # - name: Setup Go + # uses: actions/setup-go@v3 + # with: + # go-version: ${{ env.GO_VERSION }} + # - name: Setup KNE cluster + # run: | + # GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh new_k8s_cluster kne + # - name: Deploy KNE OTG back-to-back topology + # run: | + # GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh topo new kneb2b + # - name: Setup Python + # uses: actions/setup-python@v4 + # with: + # python-version: ${{ env.PYTHON_VERSION }} + # - name: Setup test prerequisites + # run: | + # ./do.sh prepytest + # - name: Run Python tests + # run: | + # ./do.sh pytest ./feature/b2b/ + # - name: Archive logs + # if: always() + # uses: actions/upload-artifact@v3 + # with: + # name: kne_b2b_py + # path: | + # logs + # - name: Teardown KNE OTG back-to-back topology + # run: | + # LICENSING=true ./do.sh topo rm kneb2b - kne_b2b_go: - runs-on: ubuntu-22.04 - steps: - - name: Checkout source - uses: actions/checkout@v3 - - name: Setup docker - uses: docker-practice/actions-setup-docker@master - - name: Setup Go - uses: actions/setup-go@v3 - with: - go-version: ${{ env.GO_VERSION }} - - uses: actions/cache@v3 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: kne_b2b_go_${{ hashFiles('go.sum') }} - restore-keys: | - kne_b2b_go_ - - name: Setup KNE cluster - run: | - GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh new_k8s_cluster kne - - name: Deploy KNE OTG back-to-back topology - run: | - GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh topo new kneb2b - - name: Run Go tests - run: | - ./do.sh gotest -tags=all ./feature/b2b/... - - name: Archive logs - if: always() - uses: actions/upload-artifact@v3 - with: - name: kne_b2b_go - path: | - logs - - name: Teardown KNE OTG back-to-back topology - run: | - LICENSING=true ./do.sh topo rm kneb2b + # kne_b2b_go: + # runs-on: ubuntu-22.04 + # steps: + # - name: Checkout source + # uses: actions/checkout@v3 + # - name: Setup docker + # uses: docker-practice/actions-setup-docker@master + # - name: Setup Go + # uses: actions/setup-go@v3 + # with: + # go-version: ${{ env.GO_VERSION }} + # - uses: actions/cache@v3 + # with: + # path: | + # ~/.cache/go-build + # ~/go/pkg/mod + # key: kne_b2b_go_${{ hashFiles('go.sum') }} + # restore-keys: | + # kne_b2b_go_ + # - name: Setup KNE cluster + # run: | + # GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh new_k8s_cluster kne + # - name: Deploy KNE OTG back-to-back topology + # run: | + # GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh topo new kneb2b + # - name: Run Go tests + # run: | + # ./do.sh gotest -tags=all ./feature/b2b/... + # - name: Archive logs + # if: always() + # uses: actions/upload-artifact@v3 + # with: + # name: kne_b2b_go + # path: | + # logs + # - name: Teardown KNE OTG back-to-back topology + # run: | + # LICENSING=true ./do.sh topo rm kneb2b kne_pdp_arista_go: runs-on: ubuntu-22.04 @@ -529,45 +529,45 @@ jobs: run: | LICENSING=true ./do.sh topo rm k8seth0 - b2blag: - runs-on: ubuntu-22.04 - steps: - - name: Checkout source - uses: actions/checkout@v3 - - name: Setup docker - uses: docker-practice/actions-setup-docker@master - - name: Deploy back-to-back LAG CP/DP distribution of ixia-c - run: | - GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh topo new b2blag - - name: Setup Go - uses: actions/setup-go@v3 - with: - go-version: ${{ env.GO_VERSION }} - - uses: actions/cache@v3 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: b2blag_${{ hashFiles('go.sum') }} - restore-keys: | - b2blag_ - - name: Run Go LAG tests - run: | - ./do.sh gotest -tags="all" ./feature/b2blag/3p3p/... - - name: Get container logs - if: always() - run: | - ./do.sh topo logs cpdp - - name: Archive logs - if: always() - uses: actions/upload-artifact@v3 - with: - name: b2blag - path: | - logs - - name: Teardown back-to-back LAG CP/DP distribution of ixia-c - run: | - LICENSING=true ./do.sh topo rm b2blag + # b2blag: + # runs-on: ubuntu-22.04 + # steps: + # - name: Checkout source + # uses: actions/checkout@v3 + # - name: Setup docker + # uses: docker-practice/actions-setup-docker@master + # - name: Deploy back-to-back LAG CP/DP distribution of ixia-c + # run: | + # GITHUB_USER=${{ secrets.ENV_GITHUB_USER }} GITHUB_PAT=${{ secrets.ENV_GITHUB_PAT }} LICENSING=true ./do.sh topo new b2blag + # - name: Setup Go + # uses: actions/setup-go@v3 + # with: + # go-version: ${{ env.GO_VERSION }} + # - uses: actions/cache@v3 + # with: + # path: | + # ~/.cache/go-build + # ~/go/pkg/mod + # key: b2blag_${{ hashFiles('go.sum') }} + # restore-keys: | + # b2blag_ + # - name: Run Go LAG tests + # run: | + # ./do.sh gotest -tags="all" ./feature/b2blag/3p3p/... + # - name: Get container logs + # if: always() + # run: | + # ./do.sh topo logs cpdp + # - name: Archive logs + # if: always() + # uses: actions/upload-artifact@v3 + # with: + # name: b2blag + # path: | + # logs + # - name: Teardown back-to-back LAG CP/DP distribution of ixia-c + # run: | + # LICENSING=true ./do.sh topo rm b2blag client_perf_py: runs-on: ubuntu-22.04 From b9e76d3ecf936046782aacc6cf7b8cc37b1eb945 Mon Sep 17 00:00:00 2001 From: biplamal Date: Fri, 5 Jul 2024 07:39:32 +0000 Subject: [PATCH 10/18] licensed islands are shifted to internal controller CI, so blocked/commented out --- do.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/do.sh b/do.sh index 853330c..2f4f584 100755 --- a/do.sh +++ b/do.sh @@ -1017,10 +1017,6 @@ load_ixia_c_images() { echo "Loading ixia-c images in cluster ..." login_ghcr names="controller gnmi-server traffic-engine protocol-engine" - if [ "${LICENSING}" = "true" ] - then - names="$names license-server" - fi for name in $names do p=$(ixia_c_image_path ${name}) From 400baf40203a684cfaca57051abb352bde14597a Mon Sep 17 00:00:00 2001 From: biplamal Date: Fri, 5 Jul 2024 09:53:40 +0000 Subject: [PATCH 11/18] bug fix --- do.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/do.sh b/do.sh index 2f4f584..a1b5f83 100755 --- a/do.sh +++ b/do.sh @@ -1083,6 +1083,7 @@ new_k8s_cluster() { && setup_kind_cluster \ && setup_k8s_plugins ${1} ${2} \ && eval_config_map \ + && eval_yaml deployments/k8s/manifests/${1}.yaml \ && load_ixia_c_images } From b640fa3d1c034c4a47b39746dee205e1d099a0bd Mon Sep 17 00:00:00 2001 From: biplamal Date: Fri, 5 Jul 2024 10:01:57 +0000 Subject: [PATCH 12/18] bug fix --- do.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/do.sh b/do.sh index a1b5f83..33d5714 100755 --- a/do.sh +++ b/do.sh @@ -1169,13 +1169,13 @@ create_ixia_c_k8s() { && wait_for_pods ${ns} \ && kubectl get pods -A \ && kubectl get services -A \ - && gen_config_k8s ${1} \ + && gen_config_k8s .${1}.yaml \ && echo "Successfully deployed !" } rm_ixia_c_k8s() { - echo "Removing K8S ${1} topology ..." - ns=$(k8s_namespace ${1}) + echo "Removing K8S .${1}.yaml topology ..." + ns=$(k8s_namespace .${1}.yaml kubectl delete -f deployments/k8s/manifests/.${1}.yaml \ && wait_for_no_namespace ${ns} } From 7627c74a37f350af2ec62484eadfceaf6eb49d79 Mon Sep 17 00:00:00 2001 From: biplamal Date: Fri, 5 Jul 2024 10:05:10 +0000 Subject: [PATCH 13/18] bug fix --- do.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/do.sh b/do.sh index 33d5714..ac34747 100755 --- a/do.sh +++ b/do.sh @@ -1175,7 +1175,7 @@ create_ixia_c_k8s() { rm_ixia_c_k8s() { echo "Removing K8S .${1}.yaml topology ..." - ns=$(k8s_namespace .${1}.yaml + ns=$(k8s_namespace .${1}.yaml) kubectl delete -f deployments/k8s/manifests/.${1}.yaml \ && wait_for_no_namespace ${ns} } From 13662d165493732185611ac22847ff9c293b1581 Mon Sep 17 00:00:00 2001 From: biplamal Date: Fri, 5 Jul 2024 10:09:25 +0000 Subject: [PATCH 14/18] bug fix --- do.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/do.sh b/do.sh index ac34747..dccdbd9 100755 --- a/do.sh +++ b/do.sh @@ -1169,7 +1169,7 @@ create_ixia_c_k8s() { && wait_for_pods ${ns} \ && kubectl get pods -A \ && kubectl get services -A \ - && gen_config_k8s .${1}.yaml \ + && gen_config_k8s .${1} \ && echo "Successfully deployed !" } From f9a37f430ff1b312cac49b753b2bea897967611e Mon Sep 17 00:00:00 2001 From: biplamal Date: Fri, 5 Jul 2024 10:16:31 +0000 Subject: [PATCH 15/18] bug fix --- do.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/do.sh b/do.sh index dccdbd9..6d51220 100755 --- a/do.sh +++ b/do.sh @@ -456,8 +456,8 @@ gen_config_kne() { gen_config_k8s() { ADDR=$(kubectl get service -n ixia-c service-otg-controller -o jsonpath='{.status.loadBalancer.ingress[0].ip}') - ETH1=$(grep "location:" deployments/k8s/manifests/${1}.yaml -m 2 | head -n1 | cut -d\: -f2 | cut -d\ -f2) - ETH2=$(grep "location:" deployments/k8s/manifests/${1}.yaml -m 2 | tail -n1 | cut -d\: -f2 | cut -d\ -f2) + ETH1=$(grep "location:" deployments/k8s/manifests/.${1}.yaml -m 2 | head -n1 | cut -d\: -f2 | cut -d\ -f2) + ETH2=$(grep "location:" deployments/k8s/manifests/.${1}.yaml -m 2 | tail -n1 | cut -d\: -f2 | cut -d\ -f2) yml="otg_host: https://${ADDR}:8443 otg_ports: - ${ETH1} @@ -1169,13 +1169,13 @@ create_ixia_c_k8s() { && wait_for_pods ${ns} \ && kubectl get pods -A \ && kubectl get services -A \ - && gen_config_k8s .${1} \ + && gen_config_k8s ${1} \ && echo "Successfully deployed !" } rm_ixia_c_k8s() { echo "Removing K8S .${1}.yaml topology ..." - ns=$(k8s_namespace .${1}.yaml) + ns=$(k8s_namespace deployments/k8s/manifests/.${1}.yaml) kubectl delete -f deployments/k8s/manifests/.${1}.yaml \ && wait_for_no_namespace ${ns} } From cbcc731109e765e35dcb8f3badbc61d92aca908c Mon Sep 17 00:00:00 2001 From: biplamal Date: Fri, 5 Jul 2024 10:26:54 +0000 Subject: [PATCH 16/18] bug fix --- do.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/do.sh b/do.sh index 6d51220..61a679a 100755 --- a/do.sh +++ b/do.sh @@ -455,6 +455,7 @@ gen_config_kne() { } gen_config_k8s() { + pwd ADDR=$(kubectl get service -n ixia-c service-otg-controller -o jsonpath='{.status.loadBalancer.ingress[0].ip}') ETH1=$(grep "location:" deployments/k8s/manifests/.${1}.yaml -m 2 | head -n1 | cut -d\: -f2 | cut -d\ -f2) ETH2=$(grep "location:" deployments/k8s/manifests/.${1}.yaml -m 2 | tail -n1 | cut -d\: -f2 | cut -d\ -f2) From fc4b5197e632f0bacc5f3f9c2f0b3fa2f7fb2782 Mon Sep 17 00:00:00 2001 From: biplamal Date: Fri, 5 Jul 2024 10:30:50 +0000 Subject: [PATCH 17/18] bug fix --- do.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/do.sh b/do.sh index 61a679a..d516297 100755 --- a/do.sh +++ b/do.sh @@ -1166,7 +1166,6 @@ create_ixia_c_k8s() { ns=$(k8s_namespace ${1}) eval_yaml deployments/k8s/manifests/${1}.yaml \ && kubectl apply -f deployments/k8s/manifests/.${1}.yaml \ - && cd ../../.. \ && wait_for_pods ${ns} \ && kubectl get pods -A \ && kubectl get services -A \ From 9652b6d924238d13e8c1ac764611f6725e422be3 Mon Sep 17 00:00:00 2001 From: biplamal Date: Fri, 5 Jul 2024 15:33:33 +0000 Subject: [PATCH 18/18] bug fix --- helpers/dut/gnmi.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helpers/dut/gnmi.go b/helpers/dut/gnmi.go index 9cfead1..6e2f90a 100644 --- a/helpers/dut/gnmi.go +++ b/helpers/dut/gnmi.go @@ -42,7 +42,7 @@ func NewGnmiClient(d *DutApi) (*GnmiClient, error) { location := fmt.Sprintf("%s:%d", d.dutConfig.Host, d.dutConfig.GnmiPort) d.t.Logf("Creating gNMI client for server %s ...\n", location) - grpcConn, err := grpc.Dial( + grpcConn, err := grpc.NewClient( location, grpc.WithTransportCredentials(credentials.NewTLS(&tls.Config{InsecureSkipVerify: true})), grpc.WithPerRPCCredentials(&grpcPassCred{ @@ -50,6 +50,7 @@ func NewGnmiClient(d *DutApi) (*GnmiClient, error) { password: d.dutConfig.GnmiPassword, }), ) + if err != nil { return nil, fmt.Errorf("failed to dial gRPC for location %s: %v", location, err) }