This document will illustrate the steps for testing against a local checkout of the rpc-openstack repository using either a Phobos instance or a Vagrant instance running in VirtualBox.
The presence of VirtualBox and Vagrant on your development system along with a checkout of the rpc-openstack repo are assumed. The installation of this software is left as an exercise for the user.
Using a Phobos instance is recommended. The vm-osa-aio
flavor specified
below delivers 16GB of ram which makes running the testing suite MUCH faster.
If you intend to use a Phobos instance, follow the steps in this section. If you intend to use Vagrant, skip to the next section.
- Connect to Phobos VPN
- Log in to horizon interface at https://172.20.4.10
- Select
Instances
under theCompute
menu - Click the
Launch Instance
button - Enter desired name of instance
- Click
Next >
button - Choose
Image
from theSelect Boot Source
field - Enter
100
in theVolume Size (GB)
field - Click the
+
button to the right of eitherUbuntu 14.04 LTS
orUbuntu 16.04
from the available image list depending on your desired platform - Click
Next >
button - Click the
+
button to the right ofvm-osa-aio
flavor - Click
Next >
button - Click the
+
button to the right ofironic
network - Click the
Launch Instance
button
Copy your working git repo to your Phobos instance
scp -r <path/to/repo> ubuntu@<ip.of.phobos.instance>:.
ssh ubuntu@<ip.of.phobos.instance> sudo ln -s /home/ubuntu/rpc-openstack /opt/rpc-openstack
If you intend to use a Vagrant instance, follow the steps in this section. If you intend to use Phobos, follow the steps in the previous section.
Create a Vagrantfile with the following content. This will pull down the official Ubuntu Trusty vagrant image and copy the contents of the rpc-openstack repo to the provisioned vagrant instance.
cat > Vagrantfile << EOF
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision "file", source: "$HOME/Documents/src/rpc-openstack", destination: "rpc-openstack"
end
EOF
Provision the vagrant instance
vagrant up
Unfortunately, the base image is too small to deploy rpc-openstack on. We need to expand the size of the disk from 40GB to 80GB. This process is a bit involved, but bare with me.
Ref: https://gist.github.com/christopher-hopper/9755310 Ref: https://tvi.al/resize-sda1-disk-of-your-vagrant-virtualbox-vm/ Ref: https://www.virtualbox.org/manual/ch08.html
vagrant halt
Get full name of vm
VMNAME=$(VBoxManage list vms | grep $(basename $(pwd)) | awk '{ print $1 }' | tr -d \")
Verify get path of disk image file. The path is expected to be $HOME/VirtualBox\ VMs/$VMNAME
and the file name is expected to be box-disk1.vmdk
. If the values for your system are different,
please substitute accordingly in the commands that follow this one.
VBoxManage showvminfo $VMNAME | grep vmdk
Clone and resize disk image to 80GB
pushd $HOME/VirtualBox\ VMs/$VMNAME
VBoxManage clonehd "box-disk1.vmdk" "clone-disk1.vdi" --format vdi
VBoxManage modifyhd "clone-disk1.vdi" --resize 81920
Get name of storage controller. This is expected to be SATAController
, please substitute accordingly
in the command that follows this one.
VBoxManage showvminfo $VMNAME | grep "Storage Controller Name"
Attach resized device
VBoxManage storageattach $VMNAME --storagectl "SATAController" --port 0 --device 0 --type hdd --medium clone-disk1.vdi
Restart the vagrant image and confirm that the root storage device is now set to 80GB.
popd
vagrant up
vagrant ssh
df -h | grep /$
ln -s /home/vagrant/rpc-openstack /opt/rpc-openstack
This section includes the steps to test a ceph deploy
If you are running in Vagrant, the generated hostname will cause the lxc container names to exceed the maximum length. You need to change the hostname to a shorter value. This step should not be necessary if you are using a Phobos instance.
hostname vtrusty
Setup environment for running the gating test suites. SSH onto the test instance and perform the following:
sudo su -
apt-get update
apt-get install -y git-core
apt-get install -y screen
cat > .screenrc << EOF
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]'
EOF
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py
screen
Checkout the desired branch and run the test suites
cd /opt/rpc-openstack
git checkout kilo
git submodule init
git submodule update --recursive
export RE_JOB_ACTION=deploy
export RE_JOB_SCENARIO=ceph
gating/post_merge_test/pre
gating/post_merge_test/run
Add other deployment scenarios here.