Move dev directory contents and update VagrantFile
This PS moves the dev contents to the tools directory as well as updates the VagrantFile to use the existing scripts for installing kubeadm-aio and deploying helm charts. Change-Id: I6768d1f96abe6b15f66931d543e9adcc0e82829b
This commit is contained in:
parent
07bf94ae82
commit
bf5c643ce1
@ -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
|
@ -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"
|
@ -1 +1 @@
|
||||
.. include:: ../../../../dev/README.rst
|
||||
.. include:: ../../../../tools/vagrant/README.rst
|
||||
|
38
tools/vagrant/README.rst
Normal file
38
tools/vagrant/README.rst
Normal 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
|
38
dev/Vagrantfile → tools/vagrant/Vagrantfile
vendored
38
dev/Vagrantfile → tools/vagrant/Vagrantfile
vendored
@ -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
|
Loading…
Reference in New Issue
Block a user