KubeADM-AIO: Stability changes

This PS makes the versioning of kubeadm and kubelet a bit easier to
control. It also directs users and the gate to use a published image
providing a consistent known good state to start from.

Change-Id: I052c1784c8549f6f1cb6137bd01e40cec6476249
This commit is contained in:
Pete Birley 2017-05-15 15:37:08 -05:00
parent fb22abdb63
commit ad1a8fbdf3
4 changed files with 19 additions and 10 deletions

View File

@ -16,5 +16,5 @@ set -ex
source ${WORK_DIR}/tools/gate/funcs/kube.sh source ${WORK_DIR}/tools/gate/funcs/kube.sh
kubeadm_aio_reqs_install kubeadm_aio_reqs_install
kubeadm_aio_build #kubeadm_aio_build
kubeadm_aio_launch kubeadm_aio_launch

View File

@ -16,7 +16,7 @@ set -ex
export HELM_VERSION=${2:-v2.3.0} export HELM_VERSION=${2:-v2.3.0}
export KUBE_VERSION=${3:-v1.6.0} export KUBE_VERSION=${3:-v1.6.0}
export KUBECONFIG=${HOME}/.kubeadm-aio/admin.conf export KUBECONFIG=${HOME}/.kubeadm-aio/admin.conf
export KUBEADM_IMAGE=openstack-helm/kubeadm-aio:v1.6 export KUBEADM_IMAGE=openstackhelm/kubeadm-aio:v1.6
export WORK_DIR=$(pwd) export WORK_DIR=$(pwd)
source ${WORK_DIR}/tools/gate/funcs/helm.sh source ${WORK_DIR}/tools/gate/funcs/helm.sh

View File

@ -2,6 +2,7 @@ FROM ubuntu:16.04
MAINTAINER pete.birley@att.com MAINTAINER pete.birley@att.com
ARG HELM_VERSION=v2.3.0 ARG HELM_VERSION=v2.3.0
ARG KUBE_VERSION=v1.6.2
ENV container="docker" \ ENV container="docker" \
DEBIAN_FRONTEND="noninteractive" DEBIAN_FRONTEND="noninteractive"
@ -30,10 +31,14 @@ RUN set -x \
&& dpkg --configure kubeadm \ && dpkg --configure kubeadm \
&& apt-get install -yf kubeadm \ && apt-get install -yf kubeadm \
&& mkdir -p /etc/kubernetes/manifests \ && mkdir -p /etc/kubernetes/manifests \
# Install kubelet binary # Install kubelet & kubeadm binaries:
&& curl -sSL https://dl.k8s.io/v1.6.2/kubernetes-server-linux-amd64.tar.gz | tar -zxv --strip-components=1 \ # (portdirect) We do things in this weird way to let us use the deps and systemd
# units from the packages in the .deb repo.
&& curl -sSL https://dl.k8s.io/${KUBE_VERSION}/kubernetes-server-linux-amd64.tar.gz | tar -zxv --strip-components=1 \
&& mv /tmp/server/bin/kubelet /usr/bin/kubelet \ && mv /tmp/server/bin/kubelet /usr/bin/kubelet \
&& chmod +x /usr/bin/kubelet \ && chmod +x /usr/bin/kubelet \
&& mv /tmp/server/bin/kubeadm /usr/bin/kubeadm \
&& chmod +x /usr/bin/kubeadm \
# Move kubelet binary as we will run containerised # Move kubelet binary as we will run containerised
&& mv /usr/bin/kubelet /usr/bin/kubelet-real \ && mv /usr/bin/kubelet /usr/bin/kubelet-real \
# Install helm binary # Install helm binary

View File

@ -41,20 +41,24 @@ And clone the OpenStack-Helm repo:
git clone https://git.openstack.org/openstack/openstack-helm git clone https://git.openstack.org/openstack/openstack-helm
``` ```
### Build and deploy the AIO environment ### Build the AIO environment (Optional)
From the root directory of the OpenStack-Helm repo run: A known good image is published to dockerhub on a fairly regular basis, but if
you wish to build your own image, from the root directory of the OpenStack-Helm
repo run:
``` bash ``` bash
export KUBEADM_IMAGE=openstack-helm/kubeadm-aio:v1.6 export KUBEADM_IMAGE=openstackhelm/kubeadm-aio:v1.6
sudo docker build --pull -t ${KUBEADM_IMAGE} tools/kubeadm-aio sudo docker build --pull -t ${KUBEADM_IMAGE} tools/kubeadm-aio
``` ```
To launch the environment then run: ### Deploy the AIO environment
To launch the environment run:
``` bash ``` bash
export KUBEADM_IMAGE=openstack-helm/kubeadm-aio:v1.6 export KUBEADM_IMAGE=openstackhelm/kubeadm-aio:v1.6
export KUBE_VERSION=v1.6.0 export KUBE_VERSION=v1.6.2
./tools/kubeadm-aio/kubeadm-aio-launcher.sh ./tools/kubeadm-aio/kubeadm-aio-launcher.sh
export KUBECONFIG=${HOME}/.kubeadm-aio/admin.conf export KUBECONFIG=${HOME}/.kubeadm-aio/admin.conf
``` ```