openstack-helm/tools/kubeadm-aio
Pete Birley 960613e5c6 Boot VM's and basic functional test in Zuul Checks
This PS adds basic vm booting and functional testing to the single node
Zuul gates. Multinode testing will be once we have ceph running in zuul.

Change-Id: Ifcbdcaa4a30dee4088e369d4410dd737ef6f12cd
2017-06-22 14:23:26 -05:00
..
assets KubeADM-AIO: Make init more stable and support multiple PVC backends 2017-06-14 20:30:51 -05:00
Dockerfile Fixing outdated versions and broken links in docs 2017-06-21 13:39:41 -05:00
kubeadm-aio-launcher.sh Boot VM's and basic functional test in Zuul Checks 2017-06-22 14:23:26 -05:00
README.rst Fixing outdated versions and broken links in docs 2017-06-21 13:39:41 -05:00

Kubeadm AIO Container

This container builds a small AIO Kubeadm based Kubernetes deployment for Development and Gating use.

Instructions

OS Specific Host setup:

Ubuntu:

From a freshly provisioned Ubuntu 16.04 LTS host run:

sudo apt-get update -y
sudo apt-get install -y \
        docker.io \
        nfs-common \
        git \
        make

OS Independent Host setup:

You should install the kubectl and helm binaries:

KUBE_VERSION=v1.6.5
HELM_VERSION=v2.3.1

TMP_DIR=$(mktemp -d)
curl -sSL https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION}/bin/linux/amd64/kubectl -o ${TMP_DIR}/kubectl
chmod +x ${TMP_DIR}/kubectl
sudo mv ${TMP_DIR}/kubectl /usr/local/bin/kubectl
curl -sSL https://storage.googleapis.com/kubernetes-helm/helm-${HELM_VERSION}-linux-amd64.tar.gz | tar -zxv --strip-components=1 -C ${TMP_DIR}
sudo mv ${TMP_DIR}/helm /usr/local/bin/helm
rm -rf ${TMP_DIR}

And clone the OpenStack-Helm repo:

git clone https://git.openstack.org/openstack/openstack-helm

Build the AIO environment (optional)

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:

export KUBEADM_IMAGE=openstackhelm/kubeadm-aio:v1.6.4
sudo docker build --pull -t ${KUBEADM_IMAGE} tools/kubeadm-aio

Deploy the AIO environment

To launch the environment then run:

export KUBEADM_IMAGE=openstackhelm/kubeadm-aio:v1.6.5
export KUBE_VERSION=v1.6.5
./tools/kubeadm-aio/kubeadm-aio-launcher.sh
export KUBECONFIG=${HOME}/.kubeadm-aio/admin.conf

One this has run, you should hopefully have a Kubernetes single node environment running, with Helm, Calico, a NFS PVC provisioner and appropriate RBAC rules and node labels to get developing.

If you wish to use this environment at the primary Kubernetes environment on your host you may run the following, but note that this will wipe any previous client configuration you may have.

mkdir -p  ${HOME}/.kube
cat ${HOME}/.kubeadm-aio/admin.conf > ${HOME}/.kube/config

If you wish to create dummy network devices for Neutron to manage there is a helper script that can set them up for you:

sudo docker exec kubelet /usr/bin/openstack-helm-aio-network-prep

Logs

You can get the logs from your kubeadm-aio container by running:

sudo docker logs -f kubeadm-aio