Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cicd: host docker changed to netshoot for multi-arch #583

Merged
merged 4 commits into from
Mar 11, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/nat66-sanity-ubuntu-22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- 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: pwd && ls && sudo -E env "PATH=$PATH" make docker-cp-ebpf
- 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
Expand Down
17 changes: 8 additions & 9 deletions cicd/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ dexec="sudo docker exec -i "
hns="sudo ip netns "
hexist="$vrn$hn"
lxdocker="ghcr.io/loxilb-io/loxilb:latest"
hostdocker="ghcr.io/nicolaka/netshoot:latest"
cluster_opts=""
ka_opts=""
var=$(lsb_release -r | cut -f2)
if [[ $var == *"22.04"* ]];then
lxdocker="ghcr.io/loxilb-io/loxilb:latestu22"
fi
#if [[ $var == *"22.04"* ]];then
# lxdocker="ghcr.io/loxilb-io/loxilb:latestu22"
#fi

loxilbs=()

Expand All @@ -32,11 +33,9 @@ pull_dockers() {
## loxilb docker
docker pull $lxdocker
## Host docker
docker pull eyes852/ubuntu-iperf-test:0.5
docker pull docker pull $hostdocker
## BGP host docker
docker pull ewindisch/quagga
## Keepalive docker
docker pull osixia/keepalived:2.0.20
}

## Creates a docker host
Expand Down Expand Up @@ -119,7 +118,7 @@ spawn_docker_host() {
if [[ "$bgp" == "yes" || ! -z "$bpath" ]]; then
docker run -u root --cap-add SYS_ADMIN --restart unless-stopped --privileged -dit $bgp_conf --name $dname ewindisch/quagga
else
docker run -u root --cap-add SYS_ADMIN -dit --name $dname eyes852/ubuntu-iperf-test:0.5
docker run -u root --cap-add SYS_ADMIN -dit --name $dname $hostdocker
fi
elif [[ "$dtype" == "seahost" ]]; then
docker run -u root --cap-add SYS_ADMIN -i -t --rm --detach --entrypoint /bin/bash --name $dname ghcr.io/loxilb-io/seagull:ubuntu1804
Expand Down Expand Up @@ -173,13 +172,13 @@ get_llb_peerIP() {
## Deletes a docker host
## arg1 - hostname
delete_docker_host() {
if docker stop $1 2>&1 >> /dev/null
if docker kill $1 2>&1 >> /dev/null
then
hd="true"
ka=`docker ps -f name=ka_$1| grep -w ka_$1 | cut -d " " -f 1 | grep -iv "CONTAINER"`
loxilbs=( "${loxilbs[@]/$1}" )
if [ "$ka" != "" ]; then
docker stop ka_$1 2>&1 >> /dev/null
docker kill ka_$1 2>&1 >> /dev/null
docker rm ka_$1 2>&1 >> /dev/null
fi
fi
Expand Down
Loading