summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openstack/usr/share/openstack/openstack-neutron-setup35
1 files changed, 34 insertions, 1 deletions
diff --git a/openstack/usr/share/openstack/openstack-neutron-setup b/openstack/usr/share/openstack/openstack-neutron-setup
index 8e3d097f..99a2706e 100644
--- a/openstack/usr/share/openstack/openstack-neutron-setup
+++ b/openstack/usr/share/openstack/openstack-neutron-setup
@@ -57,9 +57,39 @@ fi
# Setup the neutron database
if [ ! -e /var/lib/neutron/neutron.sqlite ]; then
chown -R neutron:neutron /var/lib/neutron
- sudo -u neutron neutron-manage db sync
+ # Stamp the database with the version of neutron we are using. This is
+ # needed before we can run any neutron services.
+ sudo -u neutron neutron-db-manage --config-file /etc/neutron/neutron.conf \
+ --config-file /etc/neutron/plugins/ml2/ml2_conf.ini \
+ stamp --sql juno
fi
+# Create the openvswitch required folders
+if [ ! -d /usr/local/var/run/openvswitch ]; then
+ mkdir -p /usr/local/etc/openvswitch
+ mkdir -p /usr/local/var/run/openvswitch
+fi
+
+# Define openvswitch files
+openvswitch_database=/usr/local/etc/openvswitch/conf.db
+openvswitch_pidfile=/usr/local/var/run/openvswitch/ovsdb-server.pid
+openvswitch_logfile=/usr/local/var/run/openvswitch/ovsdb-server.log
+
+# Create openvswitch database
+ovsdb-tool create $openvswitch_database /usr/share/openvswitch/vswitch.ovsschema
+
+# Start openvswitch database server
+ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock \
+ --remote=db:Open_vSwitch,Open_vSwitch,manager_options \
+ --private-key=db:Open_vSwitch,SSL,private_key \
+ --certificate=db:Open_vSwitch,SSL,certificate \
+ --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert \
+ --pidfile --detach
+
+ovs-vsctl --no-wait init
+
+ovs-vswitchd --pidfile --detach
+ovs-vsctl show
# Create the bridges to use the External network mapped
# This configuration is for 1 node and it was taken from:
@@ -75,6 +105,9 @@ ovs-vsctl add-br br-eth1
ovs-vsctl add-br br-ex
ovs-vsctl add-port br-eth1 eth1-br-proxy
ovs-vsctl add-port br-ex ex-br-proxy
+ovs-vsctl add-br br-ex
+ovs-vsctl add-port br-eth1 eth1-br-proxy
+ovs-vsctl add-port br-ex ex-br-proxy
ovs-vsctl add-port br-eth0 proxy-br-eth1
ovs-vsctl add-port br-eth0 proxy-br-ex
ip link set eth1-br-proxy up promisc on