diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index ae6f8082..fba4aaf5 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -12,7 +12,7 @@ jobs: e2e: name: E2E - runs-on: hugepage-runner + runs-on: ubuntu-latest steps: - name: Harden Runner uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 @@ -24,6 +24,13 @@ jobs: with: go-version: 1.22.3 - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + - name: set hugapages + run: sudo echo 5000 | sudo tee /proc/sys/vm/nr_hugepages + + - name: check hugepages + run: sudo grep -i Huge /proc/meminfo + - name: install_go_kubectl_kind run: source ./ci/ci.sh && install_go_kubectl_kind - name: create_kind_cluster diff --git a/ci/ci.sh b/ci/ci.sh index 16406b17..33912805 100755 --- a/ci/ci.sh +++ b/ci/ci.sh @@ -1,6 +1,8 @@ #!/bin/bash set -e -USERSPACEDIR="/runner/_work/userspace-cni-network-plugin/userspace-cni-network-plugin/" + +#USERSPACEDIR="/runner/_work/userspace-cni-network-plugin/userspace-cni-network-plugin/" +USERSPACEDIR="/home/runner/work/userspace-cni-network-plugin/userspace-cni-network-plugin" CI_DIR="$USERSPACEDIR/ci/" vpp_ligato_latest_container() @@ -28,10 +30,12 @@ export PATH="${PATH}:${HOME}/go/bin" echo "export PATH=\"${PATH}:${HOME}/go/bin/:${HOME}.local/bin/\"" >>~/.bashrc go install sigs.k8s.io/kind@v0.20.0 -echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.27/deb/ /" | sudo tee /etc/apt/sources.list.d/kubernetes.list -curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.27/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg +sudo bash -c 'echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.27/deb/ /" >> /etc/apt/sources.list.d/kubernetes.list' +sudo bash -c 'curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.27/deb/Release.key | gpg --dearmor >> /etc/apt/keyrings/kubernetes-apt-keyring.gpg' +#curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.27/deb/Release.key -o release.key +#sudo bash -c 'gpg --no-tty -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg --dearmor ./release.key' sudo apt-get update -sudo apt-get install -y kubectl=1.27.3-1.1 +#sudo apt-get install -y kubectl=1.27.3-1.1 } create_kind_cluster(){ @@ -84,6 +88,10 @@ echo "Setting up vpp pods" sleep 20 kubectl get all -A +kubectl get nodes + +kubectl describe pod -n vpp vpp-app1-kind-control-plane + kubectl exec -n vpp vpp-app1-kind-control-plane -- ./vpp_pod_setup_memif.sh kubectl exec -n vpp vpp-app2-kind-control-plane -- ./vpp_pod_setup_memif.sh kubectl exec -n vpp vpp-app1-kind-control-plane -- vppctl "sh int address" diff --git a/ci/vpp_test_setup/vpp_host.sh b/ci/vpp_test_setup/vpp_host.sh index 245b9afd..4f7bc8df 100755 --- a/ci/vpp_test_setup/vpp_host.sh +++ b/ci/vpp_test_setup/vpp_host.sh @@ -1,7 +1,8 @@ #!/bin/bash # Set USERSPACEDIR if not defined in parent script -USERSPACEDIR="${USERSPACEDIR:=/runner/_work/userspace-cni-network-plugin/userspace-cni-network-plugin/}" +USERSPACEDIR="${USERSPACEDIR:=/home/runner/work/userspace-cni-network-plugin/userspace-cni-network-plugin/}" +#USERSPACEDIR="${USERSPACEDIR:=/runner/_work/userspace-cni-network-plugin/userspace-cni-network-plugin/}" kubectl delete ns vpp kubectl create ns vpp diff --git a/ci/vpp_test_setup/vpp_pod.sh b/ci/vpp_test_setup/vpp_pod.sh index fc2fa79b..a74375f7 100755 --- a/ci/vpp_test_setup/vpp_pod.sh +++ b/ci/vpp_test_setup/vpp_pod.sh @@ -1,7 +1,9 @@ #!/bin/bash # set CI_DIR if not defined in parent script -CI_DIR="${CI_DIR:=/runner/_work/userspace-cni-network-plugin/userspace-cni-network-plugin/ci/}" + +CI_DIR="${CI_DIR:=/home/runner/work/userspace-cni-network-plugin/userspace-cni-network-plugin/ci/}" +#CI_DIR="${CI_DIR:=/runner/_work/userspace-cni-network-plugin/userspace-cni-network-plugin/ci/}" kubectl apply -f "$CI_DIR/vpp_test_setup/network_attachment_definition.yaml" kubectl create -n vpp configmap vpp-app-startup-config --from-file="$CI_DIR/vpp_test_setup/startup.conf" worker="kind-control-plane"