diff --git a/dev/README.rst b/dev/README.rst deleted file mode 100644 index 6f68082e4b..0000000000 --- a/dev/README.rst +++ /dev/null @@ -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 diff --git a/dev/setup-dev-host.sh b/dev/setup-dev-host.sh deleted file mode 100755 index 29f9ec90d9..0000000000 --- a/dev/setup-dev-host.sh +++ /dev/null @@ -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" diff --git a/doc/source/install/developer/vagrant.rst b/doc/source/install/developer/vagrant.rst index 4975e73dc6..a422b6ede6 100644 --- a/doc/source/install/developer/vagrant.rst +++ b/doc/source/install/developer/vagrant.rst @@ -1 +1 @@ -.. include:: ../../../../dev/README.rst +.. include:: ../../../../tools/vagrant/README.rst diff --git a/tools/vagrant/README.rst b/tools/vagrant/README.rst new file mode 100644 index 0000000000..a92e6a6901 --- /dev/null +++ b/tools/vagrant/README.rst @@ -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 diff --git a/dev/Vagrantfile b/tools/vagrant/Vagrantfile similarity index 79% rename from dev/Vagrantfile rename to tools/vagrant/Vagrantfile index 6a3d091a20..9bd225fcae 100644 --- a/dev/Vagrantfile +++ b/tools/vagrant/Vagrantfile @@ -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 diff --git a/dev/config.rb b/tools/vagrant/config.rb similarity index 100% rename from dev/config.rb rename to tools/vagrant/config.rb