From 05c811aa5aeaf4c7e630ff0c46be2240478235a0 Mon Sep 17 00:00:00 2001 From: Todd Malsbary Date: Thu, 28 Oct 2021 11:28:46 -0700 Subject: [PATCH] Remove bpa_op_e2e_virtletvm target and deps This is no longer supported. Signed-off-by: Todd Malsbary Change-Id: Id88f4629de03ce3572a69ca3013ff2fc1c42dfee --- Makefile | 16 -- ci/jjb/project.yaml | 1 - cmd/bpa-operator/Makefile | 4 - cmd/bpa-operator/e2etest/bpa_virtletvm_verifier.sh | 217 --------------------- deploy/kud/kud_bm_launch.sh | 5 +- 5 files changed, 1 insertion(+), 242 deletions(-) delete mode 100755 cmd/bpa-operator/e2etest/bpa_virtletvm_verifier.sh diff --git a/Makefile b/Makefile index e32a5ac..b02b771 100644 --- a/Makefile +++ b/Makefile @@ -81,9 +81,6 @@ kud_bm_deploy: kud_bm_deploy_e2e: pushd $(KUD_PATH) && ./kud_bm_launch.sh bm v2 && popd -kud_vm_deploy: - pushd $(KUD_PATH) && ./kud_bm_launch.sh vm v1 && popd - kud_bm_reset: pushd $(KUD_PATH) && ./kud_bm_launch.sh reset v1 && popd @@ -102,18 +99,11 @@ bpa_op_delete: bpa_op_e2e_bmh: pushd $(BPA_OPERATOR) && make e2etest_bmh && popd -bpa_op_e2e_virtletvm: - pushd $(BPA_OPERATOR) && make e2etest_virtletvm && popd - bpa_op_unit: pushd $(BPA_OPERATOR) && make unit_test && popd bpa_op_bmh_verifier: bpa_op_install_e2e bpa_op_e2e_bmh -bpa_op_virtletvm_verifier: bpa_op_install bpa_op_e2e_virtletvm - -bpa_op_all: bm_all bpa_op_install - bpa_rest_api_install: pushd $(BPA_REST_API) && make deploy && popd @@ -146,12 +136,6 @@ bm_verifer: package_prerequisite \ verifier: bm_verifer -verify_nestedk8s: prerequisite \ - kud_vm_deploy \ - bpa_op_virtletvm_verifier \ - kud_bm_reset \ - clean_bm_packages - bm_verify_nestedk8s: prerequisite \ kud_bm_deploy_e2e \ kud_bm_reset \ diff --git a/ci/jjb/project.yaml b/ci/jjb/project.yaml index 3e1a082..e66eed7 100644 --- a/ci/jjb/project.yaml +++ b/ci/jjb/project.yaml @@ -6,7 +6,6 @@ nexus_log_subdir: intel/ICN_CD_logs target: - verifier - - verify_nestedk8s stream: - master: branch: master diff --git a/cmd/bpa-operator/Makefile b/cmd/bpa-operator/Makefile index d9c1321..1f24da4 100644 --- a/cmd/bpa-operator/Makefile +++ b/cmd/bpa-operator/Makefile @@ -62,10 +62,6 @@ e2etest_bmh: ./e2etest/bpa_bmh_verifier.sh provision ./e2etest/bpa_bmh_verifier.sh teardown -.PHONY: e2etest_virtletvm -e2etest_virtletvm: - cd e2etest && ./bpa_virtletvm_verifier.sh - .PHONY: provision provision: ./e2etest/bpa_bmh_verifier.sh provision diff --git a/cmd/bpa-operator/e2etest/bpa_virtletvm_verifier.sh b/cmd/bpa-operator/e2etest/bpa_virtletvm_verifier.sh deleted file mode 100755 index 949aad2..0000000 --- a/cmd/bpa-operator/e2etest/bpa_virtletvm_verifier.sh +++ /dev/null @@ -1,217 +0,0 @@ -#!/usr/bin/env bash -set -eu -o pipefail - -printf "\n\nStart Virtlet VM provisioning E2E test\n\n" - -TUNING_DIR="/tmp/tuning_dir" -CNI_PLUGINS="cni-plugins-linux-amd64-v0.8.2.tgz" -if !(wget https://github.com/containernetworking/plugins/releases/download/v0.8.2/$CNI_PLUGINS -P $TUNING_DIR 2>/dev/null); then - echo "Error downloading cni plugins for Virtlet VM provisioning" - exit 1 -fi - -pushd $TUNING_DIR -if [ -f $CNI_PLUGINS ]; then - tar -xzvf $CNI_PLUGINS > /dev/null - if [ -f "tuning" ]; then - cp "tuning" "/opt/cni/bin/" - echo "Updated the tuning plugin" - else - echo "Error finding the latest tuning plugin" - rm -rf $TUNING_DIR - exit 1 - fi - rm -rf $TUNING_DIR -fi -popd - -# Create network attachment definition -BPA_DIR="/tmp/bpa" -mkdir -p $BPA_DIR -cat < $BPA_DIR/netattachdef-flannel-vm.yaml -apiVersion: "k8s.cni.cncf.io/v1" -kind: NetworkAttachmentDefinition -metadata: - name: flannel-vm -spec: - config: '{ - "cniVersion": "0.3.1", - "name" : "cni0", - "plugins": [ { - "type": "flannel", - "cniVersion": "0.3.1", - "masterplugin": true, - "delegate": { - "isDefaultGateway": true - } - }, - { - "type": "tuning" - }] - }' -EOF - -cat <<'EOF' > $BPA_DIR/virtlet_test_vm.yaml -apiVersion: apps/v1 -kind: Deployment -metadata: - name: virtlet-deployment - labels: - app: virtlet -spec: - replicas: 1 - selector: - matchLabels: - app: virtlet - template: - metadata: - labels: - app: virtlet - annotations: - VirtletLibvirtCPUSetting: | - mode: host-passthrough - # This tells CRI Proxy that this pod belongs to Virtlet runtime - kubernetes.io/target-runtime: virtlet.cloud - VirtletCloudInitUserData: | - ssh_pwauth: True - disable_root: false - chpasswd: {expire: False} - manage_resolv_conf: True - resolv_conf: - nameservers: ['8.8.8.8', '8.8.4.4'] - users: - - name: root - gecos: User - primary-group: root - groups: users - lock_passwd: false - shell: /bin/bash - sudo: ALL=(ALL) NOPASSWD:ALL - ssh_authorized_keys: - $ssh_key - runcmd: - - sed -i -e 's/^#DNS=.*/DNS=8.8.8.8/g' /etc/systemd/resolved.conf - - systemctl daemon-reload - - systemctl restart systemd-resolved - v1.multus-cni.io/default-network: '[ - { "name": "flannel-vm", - "mac": "c2:b4:57:49:47:f1" }]' - VirtletRootVolumeSize: 8Gi - VirtletVCPUCount: "2" - spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: extraRuntime - operator: In - values: - - virtlet - containers: - - name: virtlet-deployment - # This specifies the image to use. - # virtlet.cloud/ prefix is used by CRI proxy, the remaining part - # of the image name is prepended with https:// and used to download the image - image: virtlet.cloud/ubuntu/18.04 - imagePullPolicy: IfNotPresent - # tty and stdin required for "kubectl attach -t" to work - tty: true - stdin: true - resources: - requests: - cpu: 2 - memory: 8Gi - limits: - # This memory limit is applied to the libvirt domain definition - cpu: 2 - memory: 8Gi -EOF - -# Create provisioning CR file for BPA testing -cat < $BPA_DIR/e2e_bpa_test.yaml -apiVersion: bpa.akraino.org/v1alpha1 -kind: Provisioning -metadata: - name: vmcluster110 - labels: - cluster: vmcluster110 - cluster-type: virtlet-vm - owner: c1 -spec: - masters: - - master-1: - mac-address: c2:b4:57:49:47:f1 - PodSubnet: 172.21.64.0/18 -EOF - -pushd $BPA_DIR -# create flannel-vm net-attach-def -kubectl apply -f netattachdef-flannel-vm.yaml -n kube-system - -# generate user ssh key -if [ ! -f "/root/.ssh/id_rsa.pub" ]; then - ssh-keygen -f /root/.ssh/id_rsa -P "" -fi - -# create ssh key secret -kubectl create secret generic ssh-key-secret --from-file=id_rsa=/root/.ssh/id_rsa --from-file=id_rsa.pub=/root/.ssh/id_rsa.pub - -# create virtlet vm -key=$(cat /root/.ssh/id_rsa.pub) -sed -i "s|\$ssh_key|${key}|" virtlet_test_vm.yaml -kubectl create -f virtlet_test_vm.yaml - -status="" -while [[ $status != "Running" ]] -do - stats=$(kubectl get pods |grep -i virtlet-deployment) - status=$(echo $stats | cut -d " " -f 3) - if [[ $status == "Err"* ]]; then - echo "Error creating Virtlet VM, test incomplete" - kubectl delete -f virtlet_test_vm.yaml - exit 1 - fi -done - -sleep 3 -echo "Virtlet VM is ready for provisioning" - -printf "\nkubectl get pods $(kubectl get pods |grep -i virtlet-deployment | awk '{print $1}') -o json\n" -podjson=$(kubectl get pods $(kubectl get pods |grep -i virtlet-deployment | awk '{print $1}') -o json) -printf "\n$podjson\n\n" - -# create provisioning cr -kubectl apply -f e2e_bpa_test.yaml -popd - -sleep 2m - -status="Running" - -while [[ $status == "Running" ]] -do - stats=$(kubectl get pods |grep -i kud-cluster-vm) - status=$(echo $stats | cut -d " " -f 3) - echo "KUD install job still running" - sleep 2m -done - -if [[ $status == "Completed" ]]; then - printf "KUD Install completed successfully\n" -else - printf "KUD Install failed\n" -fi - -printf "\nPrinting kud-cluster-vm job logs....\n\n" -kudjob=$(kubectl get pods | grep -i kud-cluster-vm | awk '{print $1}') -printf "$(kubectl logs $kudjob)\n" - -printf "\n\nBeginning E2E VM Test Teardown\n\n" - -kubectl delete -f e2e_bpa_test.yaml -kubectl delete job kud-vmcluster110 -kubectl delete --ignore-not-found=true configmap vmcluster110-configmap -kubectl delete -f virtlet_test_vm.yaml -rm -rf /opt/kud/multi-cluster/vmcluster110 -rm -rf $BPA_DIR diff --git a/deploy/kud/kud_bm_launch.sh b/deploy/kud/kud_bm_launch.sh index 7fa0c25..d4b72fc 100755 --- a/deploy/kud/kud_bm_launch.sh +++ b/deploy/kud/kud_bm_launch.sh @@ -90,12 +90,9 @@ EOL function kud_install { pushd $DOWNLOAD_PATH/multicloud-k8s/kud/hosting_providers/vagrant/ - if [ "$1" == "all" -o "$1" == "vm" ]; then + if [ "$1" == "all" ]; then sed -i -e 's/testing_enabled=${KUD_ENABLE_TESTS:-false}/testing_enabled=${KUD_ENABLE_TESTS:-true}/g' installer.sh fi - if [ "$1" == "vm" ]; then - sed -i -e 's/^kube_pods_subnet.*/kube_pods_subnet: 172.21.64.0\/18/g' inventory/group_vars/k8s-cluster.yml - fi ./installer.sh | tee kud_deploy.log if [ "$1" == "bm" ]; then -- 2.16.6