diff --git a/tools/kubeadm-aio/assets/kubeadm-aio b/tools/kubeadm-aio/assets/kubeadm-aio index 304caa24fa..7a695b558d 100755 --- a/tools/kubeadm-aio/assets/kubeadm-aio +++ b/tools/kubeadm-aio/assets/kubeadm-aio @@ -15,23 +15,23 @@ # under the License. set -xe -echo "Checking cgroups" +echo 'Checking cgroups' if ls -dZ /sys/fs/cgroup | grep -q :svirt_sandbox_file_t: ; then - echo "Invocation error: use -v /sys/fs/cgroup:/sys/fs/cgroup:ro parameter to docker run." + echo 'Invocation error: use -v /sys/fs/cgroup:/sys/fs/cgroup:ro parameter to docker run.' exit 1 fi -echo "Setting up K8s version to deploy" +echo 'Setting up K8s version to deploy' : ${KUBE_VERSION:="default"} sed -i "s|KUBE_VERSION=.*|KUBE_VERSION=${KUBE_VERSION}|g" /etc/kube-version -echo "Setting up device image to use for kube-api" +echo 'Setting up device image to use for kube-api' : ${KUBE_BIND_DEV:="autodetect"} sed -i "s|KUBE_BIND_DEV=.*|KUBE_BIND_DEV=${KUBE_BIND_DEV}|g" /etc/kubeapi-device -echo "Setting up container image to use for kubelet" +echo 'Setting up container image to use for kubelet' : ${KUBELET_CONTAINER:="this_one"} sed -i "s|KUBELET_CONTAINER=.*|KUBELET_CONTAINER=${KUBELET_CONTAINER}|g" /etc/kubelet-container -echo "Starting Systemd" +echo 'Starting Systemd' exec /bin/systemd --system diff --git a/tools/kubeadm-aio/assets/usr/bin/kubeadm-aio b/tools/kubeadm-aio/assets/usr/bin/kubeadm-aio index 58d0f6eda6..b7497bd840 100755 --- a/tools/kubeadm-aio/assets/usr/bin/kubeadm-aio +++ b/tools/kubeadm-aio/assets/usr/bin/kubeadm-aio @@ -24,25 +24,25 @@ else echo "We will use K8s ${KUBE_VERSION}" fi -echo "Setting up K8s" +echo 'Setting up K8s' source /etc/kubeapi-device if [[ "$KUBE_BIND_DEV" != "autodetect" ]]; then KUBE_BIND_IP=$(ip addr list ${KUBE_BIND_DEV} |grep "inet " |cut -d' ' -f6|cut -d/ -f1) - echo "We are going to bind the K8s API to: ${KUBE_BIND_IP}" + echo 'We are going to bind the K8s API to: ${KUBE_BIND_IP}' kubeadm init --skip-preflight-checks ${KUBE_VERSION_FLAG} --api-advertise-addresses ${KUBE_BIND_IP} else kubeadm init --skip-preflight-checks ${KUBE_VERSION_FLAG} fi -echo "Setting up K8s client" +echo 'Setting up K8s client' cp /etc/kubernetes/admin.conf /root/ export KUBECONFIG=/root/admin.conf -echo "Marking master node as sceduleable" +echo 'Marking master node as schedulable' kubectl taint nodes --all node-role.kubernetes.io/master- -echo "Installing Calico CNI" +echo 'Installing Calico CNI' kubectl create -f http://docs.projectcalico.org/v2.1/getting-started/kubernetes/installation/hosted/kubeadm/1.6/calico.yaml -echo "Setting Up Cluser for OpenStack-Helm dev use" +echo 'Setting Up Cluser for OpenStack-Helm dev use' /usr/bin/openstack-helm-dev-prep diff --git a/tools/kubeadm-aio/assets/usr/bin/openstack-helm-aio-network-prep b/tools/kubeadm-aio/assets/usr/bin/openstack-helm-aio-network-prep index e6d1c290ba..d4b0662b76 100755 --- a/tools/kubeadm-aio/assets/usr/bin/openstack-helm-aio-network-prep +++ b/tools/kubeadm-aio/assets/usr/bin/openstack-helm-aio-network-prep @@ -15,7 +15,7 @@ # under the License. set -xe -echo "Setting up virtual network devices" +echo 'Setting up virtual network devices' ip link add neutron-ext type dummy || true ip link set neutron-ext up ip link add neutron-phys type dummy || true diff --git a/tools/kubeadm-aio/assets/usr/bin/openstack-helm-demo-prep b/tools/kubeadm-aio/assets/usr/bin/openstack-helm-demo-prep index e18fb62aeb..7279ea8384 100755 --- a/tools/kubeadm-aio/assets/usr/bin/openstack-helm-demo-prep +++ b/tools/kubeadm-aio/assets/usr/bin/openstack-helm-demo-prep @@ -15,20 +15,20 @@ # under the License. set -xe -echo "Setting Kubecfg Location" +echo 'Setting Kubecfg Location' export KUBECONFIG=/root/admin.conf -echo "Cloning OpenStack-Helm" +echo 'Cloning OpenStack-Helm' git clone --depth 1 https://github.com/openstack/openstack-helm.git /opt/openstack-helm -echo "Starting helm local repo" +echo 'Starting helm local repo' helm serve & until curl -sSL --connect-timeout 1 http://localhost:8879 > /dev/null; do - echo "Waiting for helm serve to start" + echo 'Waiting for helm serve to start' sleep 2 done helm repo add local http://localhost:8879/charts -echo "Building OpenStack-Helm" +echo 'Building OpenStack-Helm' cd /opt/openstack-helm make diff --git a/tools/kubeadm-aio/assets/usr/bin/openstack-helm-dev-prep b/tools/kubeadm-aio/assets/usr/bin/openstack-helm-dev-prep index 5c935a5774..f81d2fc39e 100755 --- a/tools/kubeadm-aio/assets/usr/bin/openstack-helm-dev-prep +++ b/tools/kubeadm-aio/assets/usr/bin/openstack-helm-dev-prep @@ -15,14 +15,13 @@ # under the License. set -xe -echo "Setting Kubecfg Location" +echo 'Setting Kubecfg Location' export KUBECONFIG=/root/admin.conf -echo "Labeling the nodes for Openstack-Helm deployment" +echo 'Labeling the nodes for Openstack-Helm deployment' kubectl label nodes openstack-control-plane=enabled --all --namespace=openstack --overwrite kubectl label nodes openvswitch=enabled --all --namespace=openstack --overwrite kubectl label nodes openstack-compute-node=enabled --all --namespace=openstack --overwrite - -echo "RBAC: applying development rules (totally open!)" +echo 'RBAC: applying development rules (totally open!)' kubectl update -f /opt/rbac/dev.yaml diff --git a/tools/kubeadm-aio/assets/usr/bin/openstack-helm-nfs-prep b/tools/kubeadm-aio/assets/usr/bin/openstack-helm-nfs-prep index a888a88c2e..8cf3540bee 100755 --- a/tools/kubeadm-aio/assets/usr/bin/openstack-helm-nfs-prep +++ b/tools/kubeadm-aio/assets/usr/bin/openstack-helm-nfs-prep @@ -15,8 +15,8 @@ # under the License. set -xe -echo "Setting Kubecfg Location" +echo 'Setting Kubecfg Location' export KUBECONFIG=/root/admin.conf -echo "Deploying NFS Provisioner" +echo 'Deploying NFS Provisioner' kubectl create -R -f /opt/nfs-provisioner/