diff options
author | Francisco Redondo Marchena <francisco.marchena@codethink.co.uk> | 2014-12-04 16:51:37 +0000 |
---|---|---|
committer | Francisco Redondo Marchena <francisco.marchena@codethink.co.uk> | 2015-01-22 12:46:27 +0000 |
commit | e0eb953c41afe5d3b09d6dd560031f2deda51f2a (patch) | |
tree | ea49ea55dedff6558501a2948afd6e418b62b3c3 | |
parent | 65e6a8a450844e1202f19841f2277532aaffb16b (diff) | |
download | definitions-e0eb953c41afe5d3b09d6dd560031f2deda51f2a.tar.gz |
WIP: Add configuration to run neutron in one node
Configuration gotten from:
https://fosskb.wordpress.com/2014/10/18/openstack-juno-on-ubuntu-14-10/
https://fosskb.wordpress.com/2014/06/10/managing-openstack-internaldataexternal-network-in-one-interface/
-rw-r--r-- | openstack/etc/neutron/plugins/ml2/ml2_conf.ini | 11 | ||||
-rw-r--r-- | openstack/usr/share/openstack/openstack-neutron-setup | 22 |
2 files changed, 32 insertions, 1 deletions
diff --git a/openstack/etc/neutron/plugins/ml2/ml2_conf.ini b/openstack/etc/neutron/plugins/ml2/ml2_conf.ini index 4fb1a4a3..8c4df301 100644 --- a/openstack/etc/neutron/plugins/ml2/ml2_conf.ini +++ b/openstack/etc/neutron/plugins/ml2/ml2_conf.ini @@ -4,6 +4,7 @@ # # type_drivers = local,flat,vlan,gre,vxlan # Example: type_drivers = flat,vlan,gre,vxlan +type_drivers = flat,vlan # (ListOpt) Ordered list of network_types to allocate as tenant # networks. The default value 'local' is useful for single-box testing @@ -11,6 +12,7 @@ # # tenant_network_types = local # Example: tenant_network_types = vlan,gre,vxlan +tenant_network_types = vlan,flat # (ListOpt) Ordered list of networking mechanism driver entrypoints # to be loaded from the neutron.ml2.mechanism_drivers namespace. @@ -20,6 +22,7 @@ # Example: mechanism_drivers = cisco,logger # Example: mechanism_drivers = openvswitch,brocade # Example: mechanism_drivers = linuxbridge,brocade +mechanism_drivers = openvswitch # (ListOpt) Ordered list of extension driver entrypoints # to be loaded from the neutron.ml2.extension_drivers namespace. @@ -34,6 +37,7 @@ # flat_networks = # Example:flat_networks = physnet1,physnet2 # Example:flat_networks = * +flat_networks = External [ml2_type_vlan] # (ListOpt) List of <physical_network>[:<vlan_min>:<vlan_max>] tuples @@ -43,6 +47,7 @@ # # network_vlan_ranges = # Example: network_vlan_ranges = physnet1:1000:2999,physnet2 +network_vlan_ranges = Physnet1:100:200 [ml2_type_gre] # (ListOpt) Comma-separated list of <tun_min>:<tun_max> tuples enumerating ranges of GRE tunnel IDs that are available for tenant network allocation @@ -62,10 +67,14 @@ # Example: vxlan_group = 239.1.1.1 [securitygroup] +firewall_driver=neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver # Controls if neutron security group is enabled or not. # It should be false when you use nova security group. -# enable_security_group = True +enable_security_group = True # Use ipset to speed-up the iptables security groups. Enabling ipset support # requires that ipset is installed on L2 agent node. # enable_ipset = True + +[ovs] +bridge_mappings=External:br-ex,Intnet1:br-eth1 diff --git a/openstack/usr/share/openstack/openstack-neutron-setup b/openstack/usr/share/openstack/openstack-neutron-setup index dca6d17a..8e3d097f 100644 --- a/openstack/usr/share/openstack/openstack-neutron-setup +++ b/openstack/usr/share/openstack/openstack-neutron-setup @@ -60,6 +60,28 @@ if [ ! -e /var/lib/neutron/neutron.sqlite ]; then sudo -u neutron neutron-manage db sync fi + +# Create the bridges to use the External network mapped +# This configuration is for 1 node and it was taken from: +# https://fosskb.wordpress.com/2014/10/18/openstack-juno-on-ubuntu-14-10/ +# and https://fosskb.wordpress.com/2014/06/10/managing-openstack-internaldataexternal-network-in-one-interface/ +ovs-vsctl add-br br-eth0 +ovs-vsctl add-port br-eth0 ens3 +ifconfig br-eth0 $(hostname -i | awk '{ print $1 }') up +ip link set br-eth0 promisc on +ip link add proxy-br-eth1 type veth peer name eth1-br-proxy +ip link add proxy-br-ex type veth peer name ex-br-proxy +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-port br-eth0 proxy-br-eth1 +ovs-vsctl add-port br-eth0 proxy-br-ex +ip link set eth1-br-proxy up promisc on +ip link set ex-br-proxy up promisc on +ip link set proxy-br-eth1 up promisc on +ip link set proxy-br-ex up promisc on + # Remove the one-shot setup service rm /etc/systemd/system/multi-user.target.wants/openstack-neutron-setup.service |