Merge "Allow rpm-based machines"

This commit is contained in:
Jenkins 2015-12-16 10:11:45 +00:00 committed by Gerrit Code Review
commit 8667743f9a
4 changed files with 36 additions and 9 deletions

View File

@ -37,6 +37,11 @@ You can set the following environment variables before running `vagrant up` to m
the definition of the Virtual Machine spawned:
* **VAGRANT\_KURYR\_VM\_BOX**: To change the Vagrant Box used. Should be available in
[atlas](atlas.hashicorp.com)
[atlas](atlas.hashicorp.com).
export VAGRANT_KURYR_VM_BOX=centos/7
Could be an example of a rpm-based option.
* **VAGRANT\_KURYR\_VM\_MEMORY**: To modify the RAM of the VM. Defaulted to: 4096
* **VAGRANT\_KURYR\_VM\_CPU**: To modify the cpus of the VM. Defaulted to: 2

View File

@ -30,6 +30,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
end
config.vm.synced_folder '../../devstack/', '/devstack'
# For CentOS machines it needs to be specified
config.vm.synced_folder '.', '/vagrant'
config.vm.provision :shell, :path => 'vagrant.sh'
if Vagrant.has_plugin?('vagrant-cachier')

View File

@ -1,19 +1,38 @@
#!/bin/sh
#!/bin/bash
set -e
BASHPATH=$(dirname "$0"\")
echo "run script from $BASHPATH"
echo "Run script from $BASHPATH"
# update system
export DEBIAN_FRONTEND noninteractive
sudo apt-get update
sudo apt-get install -qqy git
# Copied shamelessly from Devstack
function GetOSVersion {
if [[ -x $(which lsb_release 2>/dev/null) ]]; then
os_FAMILY='Debian'
elif [[ -r /etc/redhat-release ]]; then
os_FAMILY='RedHat'
else
echo "Unsupported distribution!"
exit 1;
fi
}
GetOSVersion
if [[ "$os_FAMILY" == "Debian" ]]; then
export DEBIAN_FRONTEND noninteractive
sudo apt-get update
sudo apt-get install -qqy git
elif [[ "$os_FAMILY" == "RedHat" ]]; then
sudo yum install -y -d 0 -e 0 git
fi
# determine checkout folder
PWD=$(su "$OS_USER" -c "cd && pwd")
DEVSTACK=$PWD/devstack
# check if devstack is already there
if [ ! -d "$DEVSTACK" ]
if [[ ! -d "$DEVSTACK" ]]
then
echo "Download devstack into $DEVSTACK"

View File

@ -4,7 +4,7 @@ export OS_USER=vagrant
export OS_HOST_IP=172.68.5.10
# run script
sh /vagrant/devstack.sh
bash /vagrant/devstack.sh
#set environment variables for kuryr
su "$OS_USER" -c "echo 'source /vagrant/config/kuryr_rc' >> ~/.bashrc"