Skip to content

Commit

Permalink
Merge pull request #583 from TrekkieCoder/main
Browse files Browse the repository at this point in the history
cicd: host docker changed to netshoot for multi-arch
  • Loading branch information
UltraInstinct14 authored Mar 11, 2024
2 parents 4f38cbe + a2fb200 commit 37c1214
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
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

0 comments on commit 37c1214

Please sign in to comment.