Skip to content

Commit

Permalink
Temporary workaround for kubernetes/minikube#5751
Browse files Browse the repository at this point in the history
Will be removed when Minikube 1.5.1 is released
  • Loading branch information
maelk committed Oct 29, 2019
1 parent 14a5722 commit e8a2480
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
8 changes: 4 additions & 4 deletions 03_launch_mgmt_cluster.sh
Expand Up @@ -34,7 +34,7 @@ CAPBMREPO="${CAPBMREPO:-https://github.com/metal3-io/cluster-api-provider-bareme

if [ "${V1ALPHA2_SWITCH}" == true ]; then
CAPBMBRANCH="${CAPBMBRANCH:-v1alpha2}"
else
else
CAPBMBRANCH="${CAPBMBRANCH:-master}"
fi

Expand Down Expand Up @@ -137,7 +137,7 @@ function apply_bm_hosts() {
#
function launch_cluster_api_provider_baremetal() {
pushd "${CAPBMPATH}"
if [ "${CAPBM_RUN_LOCAL}" == true ]; then
touch capbm.out.log
touch capbm.err.log
Expand All @@ -151,7 +151,7 @@ function launch_cluster_api_provider_baremetal() {
else
make deploy
fi
popd
popd
}
clone_repos
Expand All @@ -166,7 +166,7 @@ if [ "${V1ALPHA2_SWITCH}" == true ]; then
fi
init_minikube
sudo su -l -c 'minikube start' "${USER}"
sudo su -l -c 'minikube start --docker-opt="default-ulimit=nofile=102400:102400"' "${USER}"
sudo su -l -c 'minikube ssh sudo ip addr add 172.22.0.2/24 dev eth2' "${USER}"
launch_baremetal_operator
apply_bm_hosts
Expand Down
17 changes: 15 additions & 2 deletions lib/common.sh
Expand Up @@ -84,7 +84,20 @@ export CLUSTER_NAME=${CLUSTER_NAME:-"test1"}
export KUBERNETES_VERSION=${KUBERNETES_VERSION:-"v1.16.0"}

# Image url and checksum
export IMAGE_NAME=${2:-CentOS-7-x86_64-GenericCloud-1907.qcow2}
IMAGE_OS=${IMAGE_OS:-Cirros}
if [[ "${IMAGE_OS}" == "Ubuntu" ]]; then
export IMAGE_NAME=${IMAGE_NAME:-bionic-server-cloudimg-amd64.img}
export IMAGE_LOCATION=${IMAGE_LOCATION:-https://cloud-images.ubuntu.com/bionic/current}
export IMAGE_USERNAME=${IMAGE_USERNAME:-ubuntu}
elif [[ "${IMAGE_OS}" == "Centos" ]]; then
export IMAGE_NAME=${IMAGE_NAME:-CentOS-7-x86_64-GenericCloud-1907.qcow2}
export IMAGE_LOCATION=${IMAGE_LOCATION:-http://cloud.centos.org/centos/7/images}
export IMAGE_USERNAME=${IMAGE_USERNAME:-centos}
else
export IMAGE_NAME=${IMAGE_NAME:-cirros-0.4.0-x86_64-disk.img}
export IMAGE_LOCATION=${IMAGE_LOCATION:-http://download.cirros-cloud.net/0.4.0}
export IMAGE_USERNAME=${IMAGE_USERNAME:-cirros}
fi
export IMAGE_URL=http://172.22.0.1/images/${IMAGE_NAME}
export IMAGE_CHECKSUM=http://172.22.0.1/images/${IMAGE_NAME}.md5sum

Expand Down Expand Up @@ -287,7 +300,7 @@ differs(){
function init_minikube() {
#If the vm exists, it has already been initialized
if [[ "$(sudo virsh list --all)" != *"minikube"* ]]; then
sudo su -l -c "minikube start --insecure-registry 192.168.111.1:5000" "$USER"
sudo su -l -c 'minikube start --insecure-registry 192.168.111.1:5000 --docker-opt="default-ulimit=nofile=102400:102400"' "$USER"
# Pre-pull the image to reduce pod initialization time
for IMAGE_VAR in IRONIC_IMAGE IPA_DOWNLOADER_IMAGE IRONIC_INSPECTOR_IMAGE BAREMETAL_OPERATOR_IMAGE; do
IMAGE=${!IMAGE_VAR}
Expand Down

0 comments on commit e8a2480

Please sign in to comment.