Skip to content

Commit

Permalink
Merge pull request #319 from nik-netlox/main
Browse files Browse the repository at this point in the history
PR - CICD test cases updated - #87
  • Loading branch information
UltraInstinct14 authored Jun 14, 2023
2 parents d58e49a + 892e7ac commit 0edba81
Show file tree
Hide file tree
Showing 48 changed files with 967 additions and 86 deletions.
97 changes: 97 additions & 0 deletions .github/workflows/advanced-lb-sanity-ubuntu-22.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Adv-LB-Sanity-CI-Ubuntu-22

on:
#push:
# branches:
# - main
#pull_request:
# branches: [ "main" ]
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'Advanced LB Sanity ubuntu 22'

jobs:
build:
name: advanced-lb-sanity-ubuntu-22
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-python@v2
- uses: actions/setup-go@v3
with:
go-version: '>=1.18.0'
- run: sudo apt-get update
- run: sudo apt -y install clang-13 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat ethtool lksctp-tools
- run: |
git clone https://github.com/loxilb-io/iproute2 iproute2-main
cd iproute2-main/libbpf/src/
sudo make install
mkdir build
DESTDIR=build make install
cd -
cd iproute2-main/
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd -
- run: loxilb-ebpf/utils/mkllb_bpffs.sh
- run: sudo -E env "PATH=$PATH" make
- run: sudo -E env "PATH=$PATH" make test
- run: docker pull ghcr.io/loxilb-io/loxilb:latest
- run: docker run -u root --cap-add SYS_ADMIN --restart unless-stopped --privileged -dit -v /dev/log:/dev/log --name loxilb ghcr.io/loxilb-io/loxilb:latest
- run: pwd && ls && sudo -E env "PATH=$PATH" make docker-cp
- run: docker exec -dit loxilb mkllb_bpffs
- run: id=`docker ps -f name=loxilb | cut -d " " -f 1 | grep -iv "CONTAINER"` && docker commit $id ghcr.io/loxilb-io/loxilb:latest
- run: docker stop loxilb && docker rm loxilb
- run: |
cd cicd/k8slbsim/
./config.sh
./validation.sh
./rmconfig.sh
cd -
- run: |
cd cicd/onearml2/
./config.sh
./validation.sh
./rmconfig.sh
cd -
- run: |
cd cicd/ulcltcplb/
./config.sh
./validation.sh
./rmconfig.sh
cd -
- run: |
cd cicd/ulclsctplb/
./config.sh
./validation.sh
./rmconfig.sh
cd -
- run: |
cd cicd/tcptunlb/
./config.sh
./validation.sh
./rmconfig.sh
cd -
- run: |
cd cicd/sctptunlb/
./config.sh
./validation.sh
./rmconfig.sh
cd -
- run: |
cd cicd/wrrtcplb1/
./config.sh
./validation.sh
./rmconfig.sh
cd -
- run: |
cd cicd/wrrtcplb2/
./config.sh
./validation.sh
./rmconfig.sh
cd -
60 changes: 60 additions & 0 deletions .github/workflows/cluster-sanity-ubuntu-22.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Cluster-Sanity-CI-Ubuntu-22

on:
workflow_dispatch:
inputs:
userInput:
description: 'Enter string to print at end'
required: true
default: 'Finished'
tags:
description: 'Cluster Sanity Ubuntu 22'

jobs:
build:
name: cluster-sanity-ubuntu-22
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-python@v2
- uses: actions/setup-go@v3
with:
go-version: '>=1.18.0'
- run: sudo apt-get update
- run: sudo apt -y install clang-13 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat lksctp-tools
- run: |
git clone https://github.com/loxilb-io/iproute2 iproute2-main
cd iproute2-main/libbpf/src/
sudo make install
mkdir build
DESTDIR=build make install
cd -
cd iproute2-main/
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd -
- run: loxilb-ebpf/utils/mkllb_bpffs.sh
- run: sudo -E env "PATH=$PATH" make
- run: sudo -E env "PATH=$PATH" make test
- run: docker pull ghcr.io/loxilb-io/loxilb:latest
- run: docker run -u root --cap-add SYS_ADMIN --restart unless-stopped --privileged -dit -v /dev/log:/dev/log --name loxilb ghcr.io/loxilb-io/loxilb:latest
- run: pwd && ls && sudo -E env "PATH=$PATH" make docker-cp
- run: id=`docker ps -f name=loxilb | cut -d " " -f 1 | grep -iv "CONTAINER"` && docker commit $id ghcr.io/loxilb-io/loxilb:latest
- run: docker stop loxilb && docker rm loxilb
- run: |
cd cicd/cluster1/
./config.sh
./validation.sh
./rmconfig.sh
cd -
cd cicd/cluster2/
./config.sh
./validation.sh
./rmconfig.sh
cd -
cd cicd/cluster3/
./config.sh
./validation.sh
./rmconfig.sh
cd -
- run: echo ${{ github.event.inputs.userInput }}
35 changes: 22 additions & 13 deletions .github/workflows/data-store-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,30 @@ on:
workflow_dispatch:
inputs:
testName:
description: 'Test Scenario Name for data store validation'
required: true
default: 'sconnect'
type: choice
options:
- sconnect
- tcplb
- sctplb
- cluster1
- cluster2
- cluster3
description: 'Test Scenario Name for data store validation'
required: true
default: 'sconnect'
type: choice
options:
- sconnect
- tcplb
- sctplb
- cluster1
- cluster2
- cluster3
runsOn:
description: 'Machine type'
required: true
default: 'ubuntu-20.04'
type: choice
options:
- ubuntu-20.04
- ubuntu-22.04

jobs:
build:
name: data-store
runs-on: ubuntu-20.04
runs-on: ${{ github.event.inputs.runsOn }}
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -29,7 +37,8 @@ jobs:
with:
go-version: '>=1.18.0'
- run: sudo apt-get update
- run: sudo apt -y install clang-10 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat
- run: if [[ ${{ github.event.inputs.runsOn }} == 'ubuntu-22.04' ]]; then sudo apt -y install clang-13 lksctp-tools; else sudo apt -y install clang-10; fi
- run: sudo apt -y install llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat
- run: |
git clone https://github.com/loxilb-io/iproute2 iproute2-main
cd iproute2-main/libbpf/src/
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/ipsec-sanity-ubuntu-22.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: IPsec-Sanity-CI-Ubuntu-22

on:
push:
branches:
- main
pull_request:
branches: [ "main" ]
workflow_dispatch:
inputs:
userInput:
description: 'Enter string to print at end'
required: true
default: 'Finished'
tags:
description: 'IPSec Sanity Ubuntu 22'

jobs:
build:
name: ipsec-sanity-ubuntu-22
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-python@v2
- uses: actions/setup-go@v3
with:
go-version: '>=1.18.0'
- run: sudo apt-get update
- run: sudo apt -y install clang-13 llvm libelf-dev gcc-multilib libpcap-dev linux-tools-$(uname -r) elfutils dwarves git libbsd-dev bridge-utils unzip build-essential bison flex iperf iproute2 nodejs socat
- run: |
git clone https://github.com/loxilb-io/iproute2 iproute2-main
cd iproute2-main/libbpf/src/
sudo make install
mkdir build
DESTDIR=build make install
cd -
cd iproute2-main/
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:`pwd`/libbpf/src/ && LIBBPF_FORCE=on LIBBPF_DIR=`pwd`/libbpf/src/build ./configure && make && sudo cp -f tc/tc /usr/local/sbin/ntc && cd -
- run: loxilb-ebpf/utils/mkllb_bpffs.sh
- run: sudo -E env "PATH=$PATH" make
- run: sudo -E env "PATH=$PATH" make test
- run: docker pull ghcr.io/loxilb-io/loxilb:latest
- run: docker run -u root --cap-add SYS_ADMIN --restart unless-stopped --privileged -dit -v /dev/log:/dev/log --name loxilb ghcr.io/loxilb-io/loxilb:latest
- run: pwd && ls && sudo -E env "PATH=$PATH" make docker-cp
- run: docker exec -dit loxilb mkllb_bpffs
- run: id=`docker ps -f name=loxilb | cut -d " " -f 1 | grep -iv "CONTAINER"` && docker commit $id ghcr.io/loxilb-io/loxilb:latest
- run: docker stop loxilb && docker rm loxilb
- run: |
cd cicd/ipsec1/
./config.sh
./validation.sh
./rmconfig.sh
cd -
- run: |
cd cicd/ipsec2/
./config.sh
./validation.sh
./rmconfig.sh
cd -
- run: echo ${{ github.event.inputs.userInput }}
38 changes: 38 additions & 0 deletions .github/workflows/k3s-flannel-ubuntu-22.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: K3s-Flannel-Sanity-CI-Ubuntu-22
on:
schedule:
# Runs "At 11:00 UTC every day-of-week"
- cron: '0 11 * * *'
workflow_dispatch:
inputs:
testName:
description: 'Test Run-Name'
required: true
default: 'k3s-flannel-ubuntu-22'
jobs:
build:
name: k3s-flannel-sanity-ubuntu-22
runs-on: ubuntu-22.04
steps:
- run: |
echo "KUBECONFIG=--kubeconfig=/etc/rancher/k3s/k3s.yaml" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
submodules: recursive
- run: curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --disable traefik --disable servicelb --disable-cloud-controller --kubelet-arg cloud-provider=external" K3S_KUBECONFIG_MODE="644" sh -
- run: |
sleep 10
kubectl "${{ env.KUBECONFIG }}" taint nodes --all node.cloudprovider.kubernetes.io/uninitialized=false:NoSchedule-
sleep 60
kubectl "${{ env.KUBECONFIG }}" get nodes
kubectl "${{ env.KUBECONFIG }}" get pods -A
wget https://github.com/loxilb-io/loxi-ccm/raw/master/manifests/loxi-ccm-k3s.yaml
kubectl "${{ env.KUBECONFIG }}" apply -f ./loxi-ccm-k3s.yaml
sleep 60
kubectl "${{ env.KUBECONFIG }}" get pods -A
- run: |
cd cicd/k3s-flannel/
./config.sh "${{ env.KUBECONFIG }}"
./validation.sh "${{ env.KUBECONFIG }}"
./rmconfig.sh "${{ env.KUBECONFIG }}"
cd -
44 changes: 44 additions & 0 deletions .github/workflows/k3s-sctpmh-ubuntu-22.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: K3s-SCTPMH-Sanity-CI-Ubuntu-22
on:
schedule:
# Runs "At 11:00 UTC every day-of-week"
- cron: '0 11 * * *'
workflow_dispatch:
inputs:
testName:
description: 'Test Run-Name'
required: true
default: 'k3s-sctpmh-ubuntu-22'
jobs:
build:
name: k3s-sctpmh-sanity-ubuntu-22
runs-on: ubuntu-22.04
steps:
- run: |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce
- run: sudo apt -y install bridge-utils iproute2 lksctp-tools iputils-ping
- run: |
echo "KUBECONFIG=--kubeconfig=/etc/rancher/k3s/k3s.yaml" >> $GITHUB_ENV
- uses: actions/checkout@v2
with:
submodules: recursive
- run: curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="server --disable traefik --disable servicelb --disable-cloud-controller --kubelet-arg cloud-provider=external" K3S_KUBECONFIG_MODE="644" sh -
- run: |
sleep 10
kubectl "${{ env.KUBECONFIG }}" taint nodes --all node.cloudprovider.kubernetes.io/uninitialized=false:NoSchedule-
sleep 60
kubectl "${{ env.KUBECONFIG }}" get nodes
kubectl "${{ env.KUBECONFIG }}" get pods -A
wget https://github.com/loxilb-io/loxi-ccm/raw/master/manifests/loxi-ccm-k3s.yaml
kubectl "${{ env.KUBECONFIG }}" apply -f ./loxi-ccm-k3s.yaml
sleep 60
kubectl "${{ env.KUBECONFIG }}" get pods -A
- run: |
cd cicd/k3s-sctpmh/
./config.sh "${{ env.KUBECONFIG }}"
./validation.sh "${{ env.KUBECONFIG }}"
./rmconfig.sh "${{ env.KUBECONFIG }}"
cd -
4 changes: 2 additions & 2 deletions .github/workflows/k8s-calico.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: K8s-Calico-Cluster-Sanity-CI
on:
#schedule:
schedule:
# Runs "At 13:00 UTC every day-of-week"
#- cron: '0 13 * * *'
- cron: '0 13 * * *'
workflow_dispatch:
inputs:
testName:
Expand Down
Loading

0 comments on commit 0edba81

Please sign in to comment.