Merge "Allow rpm-based machines"
This commit is contained in:
commit
8667743f9a
@ -37,6 +37,11 @@ You can set the following environment variables before running `vagrant up` to m
|
|||||||
the definition of the Virtual Machine spawned:
|
the definition of the Virtual Machine spawned:
|
||||||
|
|
||||||
* **VAGRANT\_KURYR\_VM\_BOX**: To change the Vagrant Box used. Should be available in
|
* **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\_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
|
* **VAGRANT\_KURYR\_VM\_CPU**: To modify the cpus of the VM. Defaulted to: 2
|
||||||
|
3
contrib/vagrant/Vagrantfile
vendored
3
contrib/vagrant/Vagrantfile
vendored
@ -30,6 +30,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
end
|
end
|
||||||
|
|
||||||
config.vm.synced_folder '../../devstack/', '/devstack'
|
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'
|
config.vm.provision :shell, :path => 'vagrant.sh'
|
||||||
|
|
||||||
if Vagrant.has_plugin?('vagrant-cachier')
|
if Vagrant.has_plugin?('vagrant-cachier')
|
||||||
|
@ -1,19 +1,38 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
BASHPATH=$(dirname "$0"\")
|
BASHPATH=$(dirname "$0"\")
|
||||||
echo "run script from $BASHPATH"
|
echo "Run script from $BASHPATH"
|
||||||
|
|
||||||
# update system
|
# Copied shamelessly from Devstack
|
||||||
export DEBIAN_FRONTEND noninteractive
|
function GetOSVersion {
|
||||||
sudo apt-get update
|
if [[ -x $(which lsb_release 2>/dev/null) ]]; then
|
||||||
sudo apt-get install -qqy git
|
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
|
# determine checkout folder
|
||||||
PWD=$(su "$OS_USER" -c "cd && pwd")
|
PWD=$(su "$OS_USER" -c "cd && pwd")
|
||||||
DEVSTACK=$PWD/devstack
|
DEVSTACK=$PWD/devstack
|
||||||
|
|
||||||
# check if devstack is already there
|
# check if devstack is already there
|
||||||
if [ ! -d "$DEVSTACK" ]
|
if [[ ! -d "$DEVSTACK" ]]
|
||||||
then
|
then
|
||||||
echo "Download devstack into $DEVSTACK"
|
echo "Download devstack into $DEVSTACK"
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ export OS_USER=vagrant
|
|||||||
export OS_HOST_IP=172.68.5.10
|
export OS_HOST_IP=172.68.5.10
|
||||||
|
|
||||||
# run script
|
# run script
|
||||||
sh /vagrant/devstack.sh
|
bash /vagrant/devstack.sh
|
||||||
|
|
||||||
#set environment variables for kuryr
|
#set environment variables for kuryr
|
||||||
su "$OS_USER" -c "echo 'source /vagrant/config/kuryr_rc' >> ~/.bashrc"
|
su "$OS_USER" -c "echo 'source /vagrant/config/kuryr_rc' >> ~/.bashrc"
|
||||||
|
Loading…
Reference in New Issue
Block a user