diff --git a/Dockerfile b/Dockerfile index e191ade52..c4dd020bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,17 +14,17 @@ RUN mkdir -p /opt/loxilb && \ mkdir -p /etc/bash_completion.d/ # Update Ubuntu Software repository -RUN apt update && apt install -y wget +RUN apt-get update && apt-get install -y wget # Env for golang ENV PATH="${PATH}:/usr/local/go/bin" # Install loxilb related packages -RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && echo $arch && if [ "$arch" = "arm64" ] ; then apt install -y gcc-multilib-arm-linux-gnueabihf; else apt update && apt install -y gcc-multilib;fi && \ +RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && echo $arch && if [ "$arch" = "arm64" ] ; then apt-get install -y gcc-multilib-arm-linux-gnueabihf; else apt-get update && apt-get install -y gcc-multilib;fi && \ # Arch specific packages - GoLang wget https://go.dev/dl/go1.18.linux-${arch}.tar.gz && tar -xzf go1.18.linux-${arch}.tar.gz --directory /usr/local/ && rm go1.18.linux-${arch}.tar.gz && \ # Dev and util packages - apt install -y clang llvm libelf-dev libpcap-dev vim net-tools \ + apt-get install -y clang llvm libelf-dev libpcap-dev vim net-tools \ elfutils dwarves git libbsd-dev bridge-utils wget unzip build-essential \ bison flex sudo iproute2 pkg-config tcpdump iputils-ping keepalived curl bash-completion && \ # Install loxilb's custom ntc tool @@ -61,7 +61,7 @@ RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && echo $arch && i elfutils dwarves git bison flex wget unzip && apt-get -y autoremove && \ apt-get install -y libllvm10 && \ # cleanup unnecessary packages - if [ "$arch" = "arm64" ] ; then apt purge -y gcc-multilib-arm-linux-gnueabihf; else apt update && apt purge -y gcc-multilib;fi && \ + if [ "$arch" = "arm64" ] ; then apt purge -y gcc-multilib-arm-linux-gnueabihf; else apt-get update && apt purge -y gcc-multilib;fi && \ rm -rf /var/lib/apt/lists/* && apt clean && \ echo "if [ -f /etc/bash_completion ] && ! shopt -oq posix; then" >> /root/.bashrc && \ echo " . /etc/bash_completion" >> /root/.bashrc && \ diff --git a/cicd/docker-k3s-lb/loxilb.sh b/cicd/docker-k3s-lb/loxilb.sh index f0a02a235..955f29315 100644 --- a/cicd/docker-k3s-lb/loxilb.sh +++ b/cicd/docker-k3s-lb/loxilb.sh @@ -13,7 +13,7 @@ add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu apt-get install -y docker-ce sudo docker run -u root --cap-add SYS_ADMIN --restart unless-stopped --privileged --entrypoint /root/loxilb-io/loxilb/loxilb -dit -v /dev/log:/dev/log --name loxilb ghcr.io/loxilb-io/loxilb:latest -#docker exec -i loxilb apt update +#docker exec -i loxilb apt-get update #docker exec -i loxilb apt-get -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 ethtool # Create mac-vlan on top of underlying eth1 interface @@ -24,7 +24,7 @@ docker network connect llbnet loxilb --ip=192.168.163.247 # Start a docker to simulate e2 sctp endpoint docker run -u root --cap-add SYS_ADMIN -dit --privileged --name e2 eyes852/ubuntu-iperf-test:0.5 -docker exec -i e2 apt update +docker exec -i e2 apt-get update docker exec -i e2 apt-get -y install lksctp-tools # Turn tx checksum offload "off" in the end-point pod for LB to work properly diff --git a/cicd/ipsec2/config.sh b/cicd/ipsec2/config.sh index 386db7471..f46b87a45 100755 --- a/cicd/ipsec2/config.sh +++ b/cicd/ipsec2/config.sh @@ -57,15 +57,15 @@ $dexec llb2 ip route add 31.31.31.0/24 via 77.77.77.2 dev vti100 $dexec llb2 ip route add 32.32.32.0/24 via 77.77.77.2 dev vti100 $dexec llb2 loxicmd create lb 20.20.20.1 --tcp=2020:8080 --endpoints=25.25.25.1:1,26.26.26.1:1 -$dexec llb1 apt update -$dexec llb1 apt install -y strongswan strongswan-swanctl systemctl +$dexec llb1 apt-get update +$dexec llb1 apt-get install -y strongswan strongswan-swanctl systemctl docker cp llb1_ipsec_config/ipsec.conf llb1:/etc/ docker cp llb1_ipsec_config/ipsec.secrets llb1:/etc/ docker cp llb1_ipsec_config/charon.conf llb1:/etc/strongswan.d/ $dexec llb1 systemctl restart strongswan-starter -$dexec llb2 apt update -$dexec llb2 apt install -y strongswan strongswan-swanctl systemctl +$dexec llb2 apt-get update +$dexec llb2 apt-get install -y strongswan strongswan-swanctl systemctl docker cp llb2_ipsec_config/ipsec.conf llb2:/etc/ docker cp llb2_ipsec_config/ipsec.secrets llb2:/etc/ docker cp llb2_ipsec_config/charon.conf llb2:/etc/strongswan.d/ diff --git a/cicd/k0s-weave/config.sh b/cicd/k0s-weave/config.sh index f261cc690..4d31303e0 100755 --- a/cicd/k0s-weave/config.sh +++ b/cicd/k0s-weave/config.sh @@ -196,7 +196,7 @@ else fi # Install Bird to work with k0s -sudo apt install bird2 --yes +sudo apt-get install bird2 --yes sleep 5 diff --git a/cicd/k3s-calico-dual-stack/config.sh b/cicd/k3s-calico-dual-stack/config.sh index a2a711ff0..bee5dd555 100755 --- a/cicd/k3s-calico-dual-stack/config.sh +++ b/cicd/k3s-calico-dual-stack/config.sh @@ -212,7 +212,7 @@ else fi # Install Bird to work with k3s -sudo apt install bird2 --yes +sudo apt-get install bird2 --yes sleep 5 diff --git a/cicd/k3s-calico/config.sh b/cicd/k3s-calico/config.sh index 765d151ea..c076daf54 100755 --- a/cicd/k3s-calico/config.sh +++ b/cicd/k3s-calico/config.sh @@ -143,7 +143,7 @@ else fi # Install Bird to work with k3s -sudo apt install bird2 --yes +sudo apt-get install bird2 --yes sleep 5 diff --git a/cicd/k3s-cilium/config.sh b/cicd/k3s-cilium/config.sh index 564e650ce..d805a508d 100755 --- a/cicd/k3s-cilium/config.sh +++ b/cicd/k3s-cilium/config.sh @@ -159,7 +159,7 @@ else fi # Install Bird to work with k3s -sudo apt install bird2 --yes +sudo apt-get install bird2 --yes sleep 5 diff --git a/cicd/k3s-flannel-incluster-l2/host.sh b/cicd/k3s-flannel-incluster-l2/host.sh index 32cc4275a..254bc4e5e 100755 --- a/cicd/k3s-flannel-incluster-l2/host.sh +++ b/cicd/k3s-flannel-incluster-l2/host.sh @@ -1,3 +1,3 @@ -sudo apt install lksctp-tools +sudo apt-get install lksctp-tools sudo ip route add 123.123.123.0/24 via 192.168.90.10 echo "Host is up" diff --git a/cicd/k3s-flannel-incluster/host.sh b/cicd/k3s-flannel-incluster/host.sh index bdb9b7356..75f32929d 100755 --- a/cicd/k3s-flannel-incluster/host.sh +++ b/cicd/k3s-flannel-incluster/host.sh @@ -4,7 +4,7 @@ chmod 777 sctp_socat_client chmod 777 udp_client echo "123.123.123.1 k8s-svc" >> /etc/hosts -sudo apt install -y bird2 socat lksctp-tools +sudo apt-get install -y bird2 socat lksctp-tools sleep 5 diff --git a/cicd/k3s-flannel/config.sh b/cicd/k3s-flannel/config.sh index 31dcfea6f..3bacb65d8 100755 --- a/cicd/k3s-flannel/config.sh +++ b/cicd/k3s-flannel/config.sh @@ -138,7 +138,7 @@ else fi # Install Bird to work with k3s -sudo apt install bird2 --yes +sudo apt-get install bird2 --yes sleep 5 diff --git a/cicd/k3s-sctpmh-2/Dockerfile b/cicd/k3s-sctpmh-2/Dockerfile index ea6a82ddd..e8be91cc2 100644 --- a/cicd/k3s-sctpmh-2/Dockerfile +++ b/cicd/k3s-sctpmh-2/Dockerfile @@ -4,7 +4,7 @@ FROM ubuntu:20.04 WORKDIR / # Install any needed packages specified in requirements.txt -RUN apt update +RUN apt-get update RUN apt-get -y install lksctp-tools # Make port 9999 available to the world outside this container diff --git a/cicd/k3s-sctpmh-2/config.sh b/cicd/k3s-sctpmh-2/config.sh index 78ebc59c6..767dd891d 100755 --- a/cicd/k3s-sctpmh-2/config.sh +++ b/cicd/k3s-sctpmh-2/config.sh @@ -170,7 +170,7 @@ else fi # Install Bird to work with k3s -sudo apt install bird2 --yes +sudo apt-get install bird2 --yes sleep 5 diff --git a/cicd/k3s-sctpmh/Dockerfile b/cicd/k3s-sctpmh/Dockerfile index ea6a82ddd..e8be91cc2 100644 --- a/cicd/k3s-sctpmh/Dockerfile +++ b/cicd/k3s-sctpmh/Dockerfile @@ -4,7 +4,7 @@ FROM ubuntu:20.04 WORKDIR / # Install any needed packages specified in requirements.txt -RUN apt update +RUN apt-get update RUN apt-get -y install lksctp-tools # Make port 9999 available to the world outside this container diff --git a/cicd/k3s-sctpmh/config.sh b/cicd/k3s-sctpmh/config.sh index 3141616d9..45bb94a16 100755 --- a/cicd/k3s-sctpmh/config.sh +++ b/cicd/k3s-sctpmh/config.sh @@ -149,7 +149,7 @@ else fi # Install Bird to work with k3s -sudo apt install bird2 --yes +sudo apt-get install bird2 --yes sleep 5 diff --git a/cicd/k8s-nat64/Vagrantfile b/cicd/k8s-nat64/Vagrantfile index 172fef416..d046b2612 100644 --- a/cicd/k8s-nat64/Vagrantfile +++ b/cicd/k8s-nat64/Vagrantfile @@ -116,7 +116,7 @@ Vagrant.configure("2") do |config| # Disable swap for each vm config.vm.provision "0", type: "shell", inline: "swapoff -a" config.vm.provision "shell", inline: <<-SHELL - apt update + apt-get update mkdir -p $HOME/.kube hostnamectl set-hostname node"#{i}" SHELL @@ -125,7 +125,7 @@ Vagrant.configure("2") do |config| if config.vm.hostname == "node1" || config.vm.hostname == "k8slx-01" config.vm.provision "shell", privileged: false, inline: <<-SHELL git clone https://github.com/kubernetes-sigs/kubespray.git - sudo apt update; sudo apt install -y python3-pip sshpass; sudo pip install -r kubespray/requirements.txt + sudo apt-get update; sudo apt-get install -y python3-pip sshpass; sudo pip install -r kubespray/requirements.txt cp -rfp kubespray/inventory/sample kubespray/inventory/mycluster CONFIG_FILE=kubespray/inventory/mycluster/hosts.yml python3 kubespray/contrib/inventory_builder/inventory.py 192.168.59.211 192.168.59.212 192.168.59.213 192.168.59.214 ssh-keygen -b 2048 -t rsa -f /home/vagrant/.ssh/id_rsa -q -N "" diff --git a/cicd/k8s/Vagrantfile b/cicd/k8s/Vagrantfile index 172fef416..d046b2612 100644 --- a/cicd/k8s/Vagrantfile +++ b/cicd/k8s/Vagrantfile @@ -116,7 +116,7 @@ Vagrant.configure("2") do |config| # Disable swap for each vm config.vm.provision "0", type: "shell", inline: "swapoff -a" config.vm.provision "shell", inline: <<-SHELL - apt update + apt-get update mkdir -p $HOME/.kube hostnamectl set-hostname node"#{i}" SHELL @@ -125,7 +125,7 @@ Vagrant.configure("2") do |config| if config.vm.hostname == "node1" || config.vm.hostname == "k8slx-01" config.vm.provision "shell", privileged: false, inline: <<-SHELL git clone https://github.com/kubernetes-sigs/kubespray.git - sudo apt update; sudo apt install -y python3-pip sshpass; sudo pip install -r kubespray/requirements.txt + sudo apt-get update; sudo apt-get install -y python3-pip sshpass; sudo pip install -r kubespray/requirements.txt cp -rfp kubespray/inventory/sample kubespray/inventory/mycluster CONFIG_FILE=kubespray/inventory/mycluster/hosts.yml python3 kubespray/contrib/inventory_builder/inventory.py 192.168.59.211 192.168.59.212 192.168.59.213 192.168.59.214 ssh-keygen -b 2048 -t rsa -f /home/vagrant/.ssh/id_rsa -q -N "" diff --git a/cicd/sync/loxilb.sh b/cicd/sync/loxilb.sh index 558ab8b79..a005380a7 100644 --- a/cicd/sync/loxilb.sh +++ b/cicd/sync/loxilb.sh @@ -7,7 +7,7 @@ add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu apt-get install -y docker-ce docker run -u root --cap-add SYS_ADMIN --restart unless-stopped --privileged --entrypoint /bin/bash -dit -v /dev/log:/dev/log --net=host --name loxilb ghcr.io/loxilb-io/loxilb:latest -docker exec -it loxilb apt update +docker exec -it loxilb apt-get update docker exec -it loxilb apt-get -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 ethtool docker exec -it loxilb git clone https://github.com/loxilb-io/loxilb.git --recurse-submodules