84172bfbe0
This adds the ansible playbooks required by kayobe to the manifest by using the data_files option in setuptools. When using pip to install kayobe into a virtualenv, these files will be placed in <venv>/kayobe/share/. In an editable install, e.g using `pip install -e .`, data_files are not installed into the virtualenv. Instead, we must follow the egg-link file to find out the actual location. Story: 2004252 Task: 27787 Change-Id: Ibef040eceb547476007f83c0d5dcdb2bc6986d1e
60 lines
1.6 KiB
Ruby
60 lines
1.6 KiB
Ruby
# -*- mode: ruby -*-
|
|
# vi: set ft=ruby :
|
|
|
|
Vagrant.configure('2') do |config|
|
|
config.vm.hostname = 'controller1'
|
|
|
|
config.vm.network 'private_network', ip: '192.168.33.3', auto_config: false
|
|
|
|
config.vm.box = 'stackhpc/centos-7'
|
|
config.vm.box_version = '0.2.0'
|
|
|
|
config.vm.provider 'virtualbox' do |vb|
|
|
vb.memory = '4096'
|
|
vb.linked_clone = true
|
|
end
|
|
|
|
config.vm.provider 'vmware_fusion' do |vmware|
|
|
vmware.vmx['memsize'] = '4096'
|
|
vmware.vmx['vhv.enable'] = 'TRUE'
|
|
vmware.linked_clone = true
|
|
end
|
|
|
|
config.vm.provision 'shell', inline: <<-SHELL
|
|
echo "cat > /etc/selinux/config << EOF
|
|
SELINUX=disabled
|
|
SELINUXTYPE=targeted
|
|
EOF" | sudo -s
|
|
cat /etc/selinux/config
|
|
SHELL
|
|
|
|
# NOTE: Reboot to apply selinux change, requires the reload plugin:
|
|
# vagrant plugin install vagrant-reload
|
|
config.vm.provision :reload
|
|
|
|
config.vm.provision 'shell', privileged: false, inline: <<-SHELL
|
|
cat << EOF | sudo tee /etc/sysconfig/network-scripts/ifcfg-eth1
|
|
DEVICE=eth1
|
|
USERCTL=no
|
|
BOOTPROTO=none
|
|
IPADDR=192.168.33.3
|
|
NETMASK=255.255.255.0
|
|
ONBOOT=yes
|
|
NM_CONTROLLED=no
|
|
EOF
|
|
sudo ifup eth1
|
|
|
|
/vagrant/dev/install-dev.sh
|
|
|
|
# Configure the legacy development environment. This has been retained
|
|
# while transitioning to the new development environment.
|
|
cat > /vagrant/kayobe-env << EOF
|
|
export KAYOBE_CONFIG_PATH=/vagrant/etc/kayobe
|
|
export KOLLA_CONFIG_PATH=/vagrant/etc/kolla
|
|
EOF
|
|
cp /vagrant/dev/dev-vagrant.yml /vagrant/etc/kayobe/
|
|
cp /vagrant/dev/dev-hosts /vagrant/etc/kayobe/inventory
|
|
cp /vagrant/dev/dev-vagrant-network-allocation.yml /vagrant/etc/kayobe/network-allocation.yml
|
|
SHELL
|
|
end
|