github.com/cilium/cilium@v1.16.2/test/provision/runtime_install.sh (about) 1 #!/usr/bin/env bash 2 set -e 3 4 if ! [[ -z $DOCKER_LOGIN && -z $DOCKER_PASSWORD ]]; then 5 echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_LOGIN}" --password-stdin 6 fi 7 8 HOST=$(hostname) 9 PROVISIONSRC="/tmp/provision" 10 11 DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) 12 13 source "${PROVISIONSRC}/helpers.bash" 14 15 sudo bash -c "echo MaxSessions 200 >> /etc/ssh/sshd_config" 16 sudo systemctl restart ssh 17 18 "${PROVISIONSRC}"/dns.sh 19 20 sudo systemctl status systemd-resolved.service || true 21 # Remove symlinked resolv.conf to systemd-resolved 22 rm /etc/resolv.conf 23 # Remove systemd-resolvd resolv.conf to avoid being read by docker 24 rm /run/systemd/resolve/stub-resolv.conf || true 25 # Explicitly set nameserver 1.1.1.1 for runtime tests 26 # to avoid chases with Cilium DNS 27 echo "nameserver 1.1.1.1" > /etc/resolv.conf 28 cat /etc/resolv.conf 29 30 # Restarting docker to use correct nameserver 31 service docker restart 32 33 if [[ "${PROVISION_EXTERNAL_WORKLOAD}" == "false" ]]; then 34 "${PROVISIONSRC}"/compile.sh 35 "${PROVISIONSRC}"/wait-cilium-in-docker.sh 36 else 37 "${PROVISIONSRC}"/externalworkload_install.sh 38 fi