Merge "Allow for user specified local.conf changes with Vagrant"

This commit is contained in:
Jenkins 2016-01-05 16:55:10 +00:00 committed by Gerrit Code Review
commit aac4a5e279
3 changed files with 25 additions and 1 deletions

3
.gitignore vendored
View File

@ -55,3 +55,6 @@ contrib/vagrant/.vagrant
# Configuration files
etc/kuryr.conf
etc/kuryr.conf.sample
# Ignore user specific local.conf settings for vagrant
contrib/vagrant/user_local.conf

View File

@ -47,4 +47,21 @@ the definition of the Virtual Machine spawned:
* **VAGRANT\_KURYR\_VM\_CPU**: To modify the cpus of the VM. Defaulted to: 2
* **VAGRANT\_KURYR\_RUN\_DEVSTACK**: Whether `vagrant up` should run devstack to
have an environment ready to use. Set it to 'false' if you want to edit
`local.conf` before run ./stack.sh manually in the VM. Defaulted to: true
`local.conf` before run ./stack.sh manually in the VM. Defaulted to: true.
See below for additional options for editing local.conf.
Additional devstack configuration
---------------------------------
To add additional configuration to local.conf before the VM is provisioned, you can
create a file called "user_local.conf" in the contrib/vagrant directory of
networking-kuryr. This file will be appended to the "local.conf" created during the
Vagrant provisioning.
For example, to use OVN as the Neutron plugin with Kuryr, you can create a
"user_local.conf" with the following configuration:
enable_plugin networking-ovn http://git.openstack.org/openstack/networking-ovn
enable_service ovn-northd
enable_service ovn-controller
disable_service q-agt

View File

@ -44,6 +44,10 @@ then
# copy local.conf.sample settings (source: kuryr/devstack/local.conf.sample)
cp /devstack/local.conf.sample $DEVSTACK/local.conf
# If local settings are present, append them
if [ -f "/vagrant/user_local.conf" ]; then
cat /vagrant/user_local.conf >> $DEVSTACK/local.conf
fi
chown "$OS_USER":"$OS_USER" "$DEVSTACK"/local.conf
fi