Repository for OpenStack Helm infrastructure-related code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.1 KiB

# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
set -xe
export DEBIAN_FRONTEND=noninteractive
echo "DefaultLimitMEMLOCK=16384" | sudo tee -a /etc/systemd/system.conf
sudo systemctl daemon-reexec
# Install required packages for K8s on host
wget -q -O- '' | sudo apt-key add -
RELEASE_NAME=$(grep 'CODENAME' /etc/lsb-release | awk -F= '{print $2}')
sudo add-apt-repository "deb
sudo -E apt-get update
sudo -E apt-get install -y \
# Starting to pull early in parallel
sudo -E docker pull -q ${MINIKUBE_AIO} &
sudo -E apt-get install -y \
socat \
jq \
util-linux \
ceph-common \
rbd-nbd \
nfs-common \
bridge-utils \
conntrack \
sudo -E tee /etc/modprobe.d/rbd.conf << EOF
install rbd /bin/true
set +x;
# give 2 minutes to pull the image (usually takes less than 30-60s) and proceed. If something bad
# happens we'll see it on 'docker create'
echo "Waiting for ${MINIKUBE_AIO} image is pulled"
while [ "$i" -le "60" ]; do
(( ++i ))
sudo docker inspect ${MINIKUBE_AIO} && break || sleep 2;
done &> /dev/null; set -x
TMP_DIR=$(mktemp -d)
sudo docker create --name minikube-aio ${MINIKUBE_AIO} bash
sudo docker export minikube-aio | tar x -C ${TMP_DIR}
sudo docker rm minikube-aio
sudo docker rmi ${MINIKUBE_AIO}
rm ${TMP_DIR} -rf