Start section on networking for compute

This starts the section for networking on compute

Note: this has not been tested at all.

If fifieldt is not in IRC, you can do whatever you like to this
 change.

Change-Id: I811d5fb83eb6f3e2b52b905b471101720905ddb9
This commit is contained in:
Tom Fifield 2013-10-14 13:46:17 +11:00
parent 2c70f46b46
commit d49d27d085

View File

@ -5,5 +5,76 @@
xml:id="nova-network"> xml:id="nova-network">
<title>Enabling Networking</title> <title>Enabling Networking</title>
<para>FIXME</para> <para>Configuring Networking can be one of the most bewildering experiences
you will encounter when working with OpenStack. To assist in this we have
chosen the simplest production-ready configuration for this guide: the legacy
networking in OpenStack Compute, with a flat network, that takes care of DHCP
and is made highly available by splitting across multiple hosts.</para>
<note><para>If you require the full software-defined networking stack, see
<link linkend="ch_neutron">Using Neutron Networking</link></para></note>
<procedure>
<step><para>After performing initial configuration of the compute node,
install the appropriate packages for compute networking.</para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install nova-network</userinput></screen>
<screen os="centos;rhel;fedora"><prompt>#</prompt> <userinput>yum install openstack-nova-network</userinput></screen>
<screen os="opensuse"><prompt>#</prompt> <userinput>zypper install openstack-nova-network</userinput></screen>
</step>
<step>
<para>First, set the configuration options needed in <filename>nova.conf</filename> for the chosen networking mode.</para>
<screen os="fedora;rhel;centos;opensuse">
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT network_manager nova.network.manager.FlatDHCPManager</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT firewall_driver nova.virt.libvirt.firewall.IptablesFirewallDriver</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT network_size 254</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT routing_source_ip ADDRESS</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT allow_same_net_traffic False</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT multi_host True</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT send_arp_for_ha True</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT share_dhcp_address True</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT force_dhcp_release True</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT flat_interface eth1</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT flat_network_bridge br100</userinput>
<prompt>#</prompt> <userinput>openstack-config --set /etc/nova/nova.conf DEFAULT public_interface br100</userinput>
</screen>
<para os="ubuntu;debian">Edit <filename>/etc/nova/nova.conf</filename> and add to the <literal>[DEFAULT]</literal> section.</para>
<programlisting os="ubuntu;debian" language="ini">
[DEFAULT]
...
network_manager=nova.network.manager.FlatDHCPManager
firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver
network_size=254
routing_source_ip=my_ip
allow_same_net_traffic=False
multi_host=True
send_arp_for_ha=True
share_dhcp_address=True
force_dhcp_release=True
flat_interface = eth1
flat_network_bridge = br100
public_interface = br100
</programlisting>
</step>
<step>
<para>Now, restart the relevant services:</para>
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>service nova-api restart</userinput>
<prompt>#</prompt> <userinput>service nova-consoleauth restart</userinput>
<prompt>#</prompt> <userinput>service nova-novncproxy restart</userinput>
<prompt>#</prompt> <userinput>service nova-network restart</userinput></screen>
<screen os='centos;rhel;fedora'><prompt>#</prompt> <userinput>service openstack-nova-api restart</userinput>
<prompt>#</prompt> <userinput>service openstack-nova-consoleauth restart</userinput>
<prompt>#</prompt> <userinput>service openstack-nova-novncproxy restart</userinput>
<prompt>#</prompt> <userinput>service openstack-nova-network restart</userinput></screen>
<screen os="opensuse"><prompt>#</prompt> <userinput>systemctl restart openstack-nova-api.service</userinput>
<prompt>#</prompt> <userinput>systemctl restart openstack-nova-consoleauth.service</userinput>
<prompt>#</prompt> <userinput>systemctl restart openstack-nova-novncproxy.service</userinput>
<prompt>#</prompt> <userinput>systemctl restart openstack-nova-network.service</userinput></screen>
</step>
<step>
<para>You must run the command that creates the network that the virtual machines use.
You only need to run this command once, from a place where your admin user credentials are loaded.</para>
<screen><prompt>#</prompt> <userinput>nova network-create vmnet --fixed-range-v4=10.0.0.0/24 --bridge-interface=br100 --multi-host=T</userinput></screen>
</step>
</procedure>
</section> </section>