#!/bin/bash set -ex : "${HELM_VERSION:="v3.4.2"}" : "${KUBE_VERSION:="v1.19.6"}" : "${MINIKUBE_VERSION:="v1.16.0"}" : "${CALICO_VERSION:="v3.17"}" : "${YQ_VERSION:="v4.6.0"}" : "${HTTP_PROXY:=""}" : "${HTTPS_PROXY:=""}" : "${NO_PROXY:=""}" : "${LOOPBACK_DOMAIN_TO_HOST:="jarvis.local"}" export DEBCONF_NONINTERACTIVE_SEEN=true export DEBIAN_FRONTEND=noninteractive sudo swapoff -a # Note: Including fix from https://review.opendev.org/c/openstack/openstack-helm-infra/+/763619/ echo "DefaultLimitMEMLOCK=16384" | sudo tee -a /etc/systemd/system.conf sudo systemctl daemon-reexec # Function to help generate a resolv.conf formatted file. # Arguments are positional: # 1st is location of file to be generated # 2nd is a custom nameserver that should be used exclusively if avalible. function generate_resolvconf() { local target target="${1}" local priority_nameserver priority_nameserver="${2}" if [[ ${priority_nameserver} ]]; then sudo -E tee "${target}" <