Merge "Move dev directory contents and update VagrantFile"
This commit is contained in:
commit
c1e008643d
@ -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 Storage
|
||||||
mount -a
|
mount -a
|
||||||
|
|
||||||
# Install requirements
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y \
|
apt-get install -y git
|
||||||
docker.io \
|
SHELL
|
||||||
nfs-common
|
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
|
cd openstack-helm
|
||||||
mkdir -p /var/lib/kublet
|
export INTEGRATION='aio'
|
||||||
mount --bind /var/lib/kublet /var/lib/kublet
|
export INTEGRATION_TYPE='basic'
|
||||||
mount --make-shared /var/lib/kublet
|
./tools/gate/setup_gate.sh
|
||||||
|
SHELL
|
||||||
# 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
|
|
||||||
end
|
end
|
Loading…
x
Reference in New Issue
Block a user