From 19f4fe52d895de6de4a2d6b3f2a91ced40e93dce Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Sat, 29 Nov 2014 11:04:26 +0100 Subject: [PATCH] labs: reorder setup_neutron_network.sh Reorder setup_neutron_network.sh to match the install-guide. Also following the install-guide: - Don't install neutron-common which is pulled in as a dependency already. - Add verbose option for metadata agent, too. Change-Id: Ieed36c63562d7367bc2aaceba6349c5c46e6bc8b --- labs/scripts/setup_neutron_network.sh | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/labs/scripts/setup_neutron_network.sh b/labs/scripts/setup_neutron_network.sh index 4c1fa869..eddbc68f 100755 --- a/labs/scripts/setup_neutron_network.sh +++ b/labs/scripts/setup_neutron_network.sh @@ -11,29 +11,30 @@ indicate_current_auto #------------------------------------------------------------------------------ # Set up OpenStack Networking (neutron) for network node. +# http://docs.openstack.org/icehouse/install-guide/install/apt/content/neutron-ml2-network-node.html #------------------------------------------------------------------------------ -echo "Disabling Reverse Path Forwarding filter (RFC 3704)." +echo "Editing /etc/sysctl.conf: enable IP forwarding, disable RPF filter." cat << SYSCTL | sudo tee -a /etc/sysctl.conf +# Enable IP forwarding +net.ipv4.ip_forward=1 +# Disable Reverse Path Forwarding filter (RFC 3704) net.ipv4.conf.all.rp_filter=0 net.ipv4.conf.default.rp_filter=0 -net.ipv4.ip_forward=1 SYSCTL # Reload changed file sudo sysctl -p -echo "Installing neutron for network node." -sudo apt-get install -y neutron-common neutron-plugin-ml2 \ - neutron-plugin-openvswitch-agent neutron-l3-agent \ - neutron-dhcp-agent +echo "Installing networking components for network node." +sudo apt-get install -y neutron-plugin-ml2 neutron-plugin-openvswitch-agent \ + neutron-l3-agent neutron-dhcp-agent echo "Configuring neutron for network node." neutron_admin_user=$(service_to_user_name neutron) neutron_admin_password=$(service_to_user_password neutron) -echo "Configuring neutron to use keystone for authentication." conf=/etc/neutron/neutron.conf echo "Configuring $conf." @@ -74,6 +75,8 @@ iniset_sudo $conf DEFAULT dhcp_driver neutron.agent.linux.dhcp.Dnsmasq iniset_sudo $conf DEFAULT use_namespaces True iniset_sudo $conf DEFAULT verbose True iniset_sudo $conf DEFAULT dnsmasq_config_file /etc/neutron/dnsmasq-neutron.conf + +# Configure a DNS server to be used by VM instances if [ -n "${TENANT_VM_DNS_SERVER:-''}" ]; then iniset_sudo $conf DEFAULT dnsmasq_dns_servers "$TENANT_VM_DNS_SERVER" fi @@ -105,6 +108,11 @@ iniset_sudo $conf DEFAULT admin_user "$neutron_admin_user" iniset_sudo $conf DEFAULT admin_password "$neutron_admin_password" iniset_sudo $conf DEFAULT nova_metadata_ip "$(hostname_to_ip controller-mgmt)" iniset_sudo $conf DEFAULT metadata_proxy_shared_secret "$METADATA_SECRET" +iniset_sudo $conf DEFAULT verbose True + +# The next two steps according to the install-guide (configuring +# service_neutron_metadata_proxy and neutron_metadata_proxy_shared_secret) +# are done in setup_neutron_controller.sh. echo "Configuring the OVS plug-in to use GRE tunneling." conf=/etc/neutron/plugins/ml2/ml2_conf.ini