diff options
| author | Mark Asselstine <mark.asselstine@windriver.com> | 2018-01-17 10:12:28 -0500 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2018-01-18 10:47:31 -0500 |
| commit | 992463503e844fe40f3bb2a56df5db0cb715942e (patch) | |
| tree | 725e632d5155ac9a79a25cae4781eb9742176b4a /meta-openstack/recipes-devtools/python/python-neutron/neutron-init | |
| parent | a49d21ce53618b12ae0b03806fd56f1a8949f243 (diff) | |
| download | meta-cloud-services-992463503e844fe40f3bb2a56df5db0cb715942e.tar.gz | |
python-neutron: uprev to latest stable/pike
Following along with other recent openstack component uprevs the
configuration has been changed to match the installation/setup
configuration documented by the openstack community. We have also made
the switch to using systemd.
The initial configuration file (neutron.conf) was generated by getting
things mostly updated and running, then copying/cloning the source
repo on the target and running the setup scripts (see
./tools/generate_config_file_samples.sh)
With these updates neutron is running and available but is yet to be
fully tested, this must be done once we have a running compute node
and guests.
Required updates/uprevs/introduction to:
python-ryu, python-neutron-lib, python-os-xenapi, python-oslo.privsep,
python-ovs, python-weakrefmethod, and more
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-neutron/neutron-init')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-neutron/neutron-init | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-neutron/neutron-init b/meta-openstack/recipes-devtools/python/python-neutron/neutron-init new file mode 100644 index 0000000..fe98dcb --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-neutron/neutron-init | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # | ||
| 3 | # Basic neutron setup based on: | ||
| 4 | # https://docs.openstack.org/neutron/pike/install/controller-install-ubuntu.html | ||
| 5 | # | ||
| 6 | # Prerequisites: keystone must be available and bootstrapped | ||
| 7 | # | ||
| 8 | |||
| 9 | # Substitutions setup at do_intall() | ||
| 10 | DB_USER=%DB_USER% | ||
| 11 | NEUTRON_USER=%NEUTRON_USER% | ||
| 12 | NEUTRON_GROUP=%NEUTRON_GROUP% | ||
| 13 | CONTROLLER_IP=%CONTROLLER_IP% | ||
| 14 | ADMIN_USER=%ADMIN_USER% | ||
| 15 | ADMIN_PASSWORD=%ADMIN_PASSWORD% | ||
| 16 | ADMIN_ROLE=%ADMIN_ROLE% | ||
| 17 | SYSCONFDIR=%SYSCONFDIR% | ||
| 18 | ROOT_HOME=%ROOT_HOME% | ||
| 19 | |||
| 20 | # Create the neutron DB and grant the necessary permissions | ||
| 21 | sudo -u postgres psql -c "CREATE DATABASE neutron" 2> /dev/null | ||
| 22 | sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE neutron TO ${DB_USER}" 2> /dev/null | ||
| 23 | |||
| 24 | source ${SYSCONFDIR}/keystone/admin-openrc | ||
| 25 | |||
| 26 | openstack user create --domain default --password ${ADMIN_PASSWORD} ${NEUTRON_USER} | ||
| 27 | |||
| 28 | # Ensure the 'service' project exists | ||
| 29 | openstack project show service > /dev/null 2>&1 | ||
| 30 | if [ $? -ne 0 ]; then | ||
| 31 | openstack project create service --domain default | ||
| 32 | fi | ||
| 33 | openstack role add --project service --user ${NEUTRON_USER} ${ADMIN_ROLE} | ||
| 34 | |||
| 35 | openstack service create --name neutron --description "OpenStack Networking" network | ||
| 36 | openstack endpoint create --region RegionOne network public http://${CONTROLLER_IP}:9696 | ||
| 37 | openstack endpoint create --region RegionOne network internal http://${CONTROLLER_IP}:9696 | ||
| 38 | openstack endpoint create --region RegionOne network admin http://${CONTROLLER_IP}:9696 | ||
| 39 | |||
| 40 | sudo -u ${NEUTRON_USER} neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head | ||
| 41 | |||
| 42 | # Possibly move to rabbitmq-setup, for now we are the only service | ||
| 43 | # that needs this so do it here. | ||
| 44 | HOME=${ROOT_HOME} rabbitmqctl add_user openstack ${ADMIN_PASSWORD} | ||
| 45 | HOME=${ROOT_HOME} rabbitmqctl set_permissions openstack ".*" ".*" ".*" | ||
| 46 | |||
| 47 | #systemctl restart nova-api | ||
| 48 | systemctl restart neutron-server | ||
| 49 | systemctl restart neutron-linuxbridge-agent | ||
| 50 | systemctl restart neutron-dhcp-agent | ||
| 51 | systemctl restart neutron-metadata-agent | ||
