Merge "Move dev directory contents and update VagrantFile"

This commit is contained in:
Jenkins 2017-06-02 19:49:10 +00:00 committed by Gerrit Code Review
commit c1e008643d
6 changed files with 49 additions and 101 deletions

View File

@ -1,55 +0,0 @@
==================
Vagrant Deployment
==================
Requirements
------------
* Hardware:
* 16GB RAM
* 32GB HDD Space
* Software
* Vagrant >= 1.8.0
* VirtualBox >= 5.1.0
* Kubectl
* Helm
* Git
Deploy
------
Make sure you are in the directory containing the Vagrantfile before
running the following commands.
Create VM
---------
.. code:: bash
vagrant up --provider virtualbox
Deploy NFS Provisioner for development PVCs
-------------------------------------------
.. code:: bash
vagrant ssh --command "sudo docker exec kubeadm-aio kubectl create -R -f /opt/nfs-provisioner/"
Setup Clients and deploy Helm's tiller
--------------------------------------
.. code:: bash
./setup-dev-host.sh
Label VM node(s) for OpenStack-Helm Deployment
----------------------------------------------
.. code:: bash
kubectl label nodes openstack-control-plane=enabled --all --namespace=openstack
kubectl label nodes openvswitch=enabled --all --namespace=openstack
kubectl label nodes openstack-compute-node=enabled --all --namespace=openstack

View File

@ -1,17 +0,0 @@
#!/usr/bin/env bash
set -e
# Setting up kubectl creds
mkdir -p ${HOME}/.kube
if [ -f ${HOME}/.kube/config ]; then
echo "Previous kube config found, backing it up"
mv -v ${HOME}/.kube/config ${HOME}/.kube/config.$(date "+%F-%T")
fi
echo "Getting kubeconfig from kube1"
vagrant ssh default -c "sudo cat /etc/kubernetes/admin.conf" > ${HOME}/.kube/config
# Setting up helm client if present
if which helm 2>/dev/null; then
helm init
fi
echo "clients should now be ready to access the Kubernetes cluster"

View File

@ -1 +1 @@
.. include:: ../../../../dev/README.rst
.. include:: ../../../../tools/vagrant/README.rst

38
tools/vagrant/README.rst Normal file
View File

@ -0,0 +1,38 @@
==================
Vagrant Deployment
==================
Requirements
------------
* Hardware:
* 16GB RAM
* 32GB HDD Space
* Software
* Vagrant >= 1.8.0
* VirtualBox >= 5.1.0
* Git
Deploy
------
Make sure you are in the directory containing the Vagrantfile before
running the following commands.
Create VM
---------
.. code:: bash
vagrant up --provider virtualbox
Validate helm charts are successfully deployed
----------------------------------------------
.. code:: bash
vagrant ssh
helm list

View File

@ -79,34 +79,16 @@ Vagrant.configure("2") do |config|
# Mount Storage
mount -a
# Install requirements
apt-get update
apt-get install -y \
docker.io \
nfs-common
apt-get install -y git
SHELL
config.vm.provision "shell", privileged: false, inline: <<-SHELL
#Cloning repo
git clone https://git.openstack.org/openstack/openstack-helm
# Setup kubelet lib as shared mount
mkdir -p /var/lib/kublet
mount --bind /var/lib/kublet /var/lib/kublet
mount --make-shared /var/lib/kublet
# Run AIO container
docker run \
-dt \
--name=kubeadm-aio \
--net=host \
--security-opt=seccomp:unconfined \
--cap-add=SYS_ADMIN \
--tmpfs=/run \
--tmpfs=/run/lock \
--volume=/etc/machine-id:/etc/machine-id:ro \
--volume=/home:/home:rw \
--volume=/etc/kubernetes:/etc/kubernetes:rw \
--volume=/sys/fs/cgroup:/sys/fs/cgroup:ro \
--volume=/var/run/docker.sock:/run/docker.sock \
--env KUBE_BIND_DEV=enp0s8 \
--env KUBELET_CONTAINER=quay.io/attcomdev/kubeadm-aio:v1.5.6 \
quay.io/attcomdev/kubeadm-aio:v1.5.6
SHELL
cd openstack-helm
export INTEGRATION='aio'
export INTEGRATION_TYPE='basic'
./tools/gate/setup_gate.sh
SHELL
end