labs: reorder setup_neutron_compute.sh

Reorder setup_neutron_compute.sh to match install-guide.

Change-Id: I57812e40605563ffe6187b3054f604669a56d4e4
This commit is contained in:
Roger Luethi 2014-11-29 08:23:54 +01:00
parent 0fe8770b11
commit 4198498385

@ -11,10 +11,12 @@ indicate_current_auto
#------------------------------------------------------------------------------
# Set up OpenStack Networking (neutron) for compute node.
# http://docs.openstack.org/icehouse/install-guide/install/apt/content/neutron-ml2-compute-node.html
#------------------------------------------------------------------------------
echo "Disabling Reverse Path Forwarding filter (RFC 3704)."
echo "Editing /etc/sysctl.conf: disable Reverse Path Forwarding filter."
cat << SYSCTL | sudo tee -a /etc/sysctl.conf
# Disable Reverse Path Forwarding filter (RFC 3704)
net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.default.rp_filter=0
SYSCTL
@ -22,7 +24,7 @@ SYSCTL
# Reload changed file
sudo sysctl -p
echo "Installing neutron for compute node."
echo "Installing networking components for compute node."
sudo apt-get install -y neutron-common neutron-plugin-ml2 \
neutron-plugin-openvswitch-agent
@ -31,13 +33,20 @@ echo "Configuring neutron for compute 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."
# Configuring [DEFAULT] section
iniset_sudo $conf DEFAULT auth_strategy keystone
iniset_sudo $conf DEFAULT verbose True
# Configuring [keystone_authtoken] section
iniset_sudo $conf keystone_authtoken auth_uri "http://controller-mgmt:5000"
iniset_sudo $conf keystone_authtoken auth_host controller-mgmt
iniset_sudo $conf keystone_authtoken auth_protocol http
iniset_sudo $conf keystone_authtoken auth_port 35357
iniset_sudo $conf keystone_authtoken admin_tenant_name "$SERVICE_TENANT_NAME"
iniset_sudo $conf keystone_authtoken admin_user "$neutron_admin_user"
iniset_sudo $conf keystone_authtoken admin_password "$neutron_admin_password"
# Configure AMQP parameters
iniset_sudo $conf DEFAULT rpc_backend neutron.openstack.common.rpc.impl_kombu
@ -49,14 +58,7 @@ iniset_sudo $conf DEFAULT core_plugin ml2
iniset_sudo $conf DEFAULT service_plugins router
iniset_sudo $conf DEFAULT allow_overlapping_ips True
# Configuring [keystone_authtoken] section
iniset_sudo $conf keystone_authtoken auth_uri "http://controller-mgmt:5000"
iniset_sudo $conf keystone_authtoken auth_host controller-mgmt
iniset_sudo $conf keystone_authtoken auth_port 35357
iniset_sudo $conf keystone_authtoken auth_protocol http
iniset_sudo $conf keystone_authtoken admin_tenant_name "$SERVICE_TENANT_NAME"
iniset_sudo $conf keystone_authtoken admin_user "$neutron_admin_user"
iniset_sudo $conf keystone_authtoken admin_password "$neutron_admin_password"
iniset_sudo $conf DEFAULT verbose True
echo "Configuring the OVS plug-in to use GRE tunneling."
conf=/etc/neutron/plugins/ml2/ml2_conf.ini
@ -69,15 +71,15 @@ iniset_sudo $conf ml2 mechanism_drivers openvswitch
# Under the ml2_type_gre section
iniset_sudo $conf ml2_type_gre tunnel_id_ranges 1:1000
# Under the securitygroup section
iniset_sudo $conf securitygroup firewall_driver neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
iniset_sudo $conf securitygroup enable_security_group True
# Under the ovs section
iniset_sudo $conf ovs local_ip "$(hostname_to_ip compute-data)"
iniset_sudo $conf ovs tunnel_type gre
iniset_sudo $conf ovs enable_tunneling True
# Under the securitygroup section
iniset_sudo $conf securitygroup firewall_driver neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
iniset_sudo $conf securitygroup enable_security_group True
echo "Restarting the Open vSwitch (OVS) service."
sudo service openvswitch-switch restart