Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Update e2e.yml #475

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
16 changes: 12 additions & 4 deletions ci/ci.sh
Original file line number Diff line number Diff line change
@@ -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()
Expand Down Expand Up @@ -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/[email protected]

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(){
Expand Down Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion ci/vpp_test_setup/vpp_host.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion ci/vpp_test_setup/vpp_pod.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Loading