progetti:cloud-areapd:ced-c:install_and_configure_network_nodes
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| progetti:cloud-areapd:ced-c:install_and_configure_network_nodes [2015/04/01 18:10] – [Configure Open vSwitch network bridging (both nodes)] sella@infn.it | progetti:cloud-areapd:ced-c:install_and_configure_network_nodes [2016/03/02 10:48] (current) – [Configure system's networking properties (both nodes)] mengumat@infn.it | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | |||
| + | ======= Configure Network nodes ======= | ||
| + | |||
| + | Authors: | ||
| + | * Paolo E. Mazzon (DEI) | ||
| + | * Matteo Menguzzato (INFN Padova) | ||
| + | * Gianpietro Sella (DISC) | ||
| + | |||
| + | ===== Naming conventions and networking assumptions ===== | ||
| + | In our setup both controller nodes also act as network nodes so we assume that they have a second network interface em2 for data network: | ||
| + | |||
| + | * **Data network** : '' | ||
| + | |||
| + | and 2 NIC connected with external network: | ||
| + | |||
| + | * **em3** : 2 vlan tagged with 401 and 402 | ||
| + | * **em4** : 1 vlan tagged with 303 | ||
| + | ==== Further pre-requisite on data network interface ==== | ||
| + | In the net-interface configuration script for data network (something like ''/ | ||
| + | <code bash> | ||
| + | MTU=" | ||
| + | </ | ||
| + | ===== Considerations for High Availability ===== | ||
| + | To make the Neutron agents highly available, just repeat this procedure on another network node, changing the value for the only relevant parameter '' | ||
| + | ===== Install OpenStack software (both nodes) ===== | ||
| + | We assume RDO yum repository is already installed, so: | ||
| + | <code bash> | ||
| + | yum -y install openstack-neutron-ml2 | ||
| + | </ | ||
| + | ===== Configure system' | ||
| + | <code bash> | ||
| + | sed -i ' | ||
| + | sed -i ' | ||
| + | sed -i ' | ||
| + | cat << EOF >> / | ||
| + | net.ipv4.ip_forward=1 | ||
| + | net.ipv4.conf.all.rp_filter=0 | ||
| + | net.ipv4.conf.default.rp_filter=0 | ||
| + | net.bridge.bridge-nf-call-arptables=1 | ||
| + | net.bridge.bridge-nf-call-iptables=1 | ||
| + | net.bridge.bridge-nf-call-ip6tables=1 | ||
| + | EOF | ||
| + | sysctl -p | ||
| + | service network restart | ||
| + | firewall-cmd --direct --add-rule ipv4 filter INPUT 0 -p gre -j ACCEPT | ||
| + | firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p gre -j ACCEPT | ||
| + | </ | ||
| + | ===== Configure Neutron agent services (both nodes) ===== | ||
| + | In this section we customize several configuration files related to Neutron' | ||
| + | |||
| + | **api-paste.ini** | ||
| + | <code bash> | ||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | done << EOF | ||
| + | filter: | ||
| + | filter: | ||
| + | EOF | ||
| + | </ | ||
| + | **l3-agent.ini** | ||
| + | <code bash> | ||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | </ | ||
| + | **dhcp_agent.ini** | ||
| + | <code bash> | ||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | </ | ||
| + | **metadata_agent.ini** | ||
| + | <code bash> | ||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | done << EOF | ||
| + | DEFAULT auth_url http:// | ||
| + | DEFAULT auth_region regionOne | ||
| + | DEFAULT admin_tenant_name services | ||
| + | DEFAULT admin_user neutron | ||
| + | DEFAULT admin_password NEUTRON_PASS | ||
| + | DEFAULT nova_metadata_ip 192.168.60.180 | ||
| + | DEFAULT metadata_proxy_shared_secret METADATA_PASS | ||
| + | EOF | ||
| + | </ | ||
| + | **ml2_conf.ini** | ||
| + | <code bash> | ||
| + | while read i | ||
| + | do | ||
| + | | ||
| + | done << EOF | ||
| + | ml2_type_vlan network_vlan_ranges physnet1: | ||
| + | ovs tenant_network_type gre | ||
| + | ovs tunnel_id_ranges 1:1000 | ||
| + | ovs local_ip 192.168.61.152 | ||
| + | ovs enable_tunneling True | ||
| + | ovs integration_bridge br-int | ||
| + | ovs tunnel_bridge br-tun | ||
| + | ovs bridge_mappings physnet1: | ||
| + | ovs network_vlan_ranges physnet1: | ||
| + | EOF | ||
| + | |||
| + | ln -s / | ||
| + | </ | ||
| + | === Optional === | ||
| + | When using GRE the virtual instances can experience low network performances measured by iperf. This is because the ethernet packet is greatly used for GRE overhead information. To solve this problem you can increase to 9000 (this is a good value we've experienced) the MTU of the data network' | ||
| + | <code bash> | ||
| + | openstack-config --set / | ||
| + | </ | ||
| + | Create the dnsmasq' | ||
| + | <code bash> | ||
| + | cat << EOF >> / | ||
| + | dhcp-option-force=26, | ||
| + | EOF | ||
| + | </ | ||
| + | ===== Configure Open vSwitch network bridging (both nodes) ===== | ||
| + | Turn the '' | ||
| + | <code bash> | ||
| + | systemctl start openvswitch | ||
| + | systemctl enable openvswitch | ||
| + | </ | ||
| + | Create the bridges: | ||
| + | <code bash> | ||
| + | ovs-vsctl add-br br-int | ||
| + | ovs-vsctl add-br br-ex | ||
| + | ovs-vsctl add-br br-ex2 | ||
| + | ovs-vsctl add-port br-ex em3 | ||
| + | ovs-vsctl add-port br-ex2 em4 | ||
| + | </ | ||
| + | Let's assume '' | ||
| + | <code bash> | ||
| + | cd / | ||
| + | mv ifcfg-em3 em3.orig | ||
| + | cat << EOF >> ifcfg-em3 | ||
| + | TYPE=Ethernet | ||
| + | BOOTPROTO=none | ||
| + | DEVICE=em3 | ||
| + | ONBOOT=yes | ||
| + | PROMISC=yes | ||
| + | EOF | ||
| + | |||
| + | mv ifcfg-em4 em4.orig | ||
| + | cat << EOF >> ifcfg-em4 | ||
| + | TYPE=Ethernet | ||
| + | BOOTPROTO=none | ||
| + | DEVICE=em4 | ||
| + | ONBOOT=yes | ||
| + | PROMISC=yes | ||
| + | EOF | ||
| + | |||
| + | systemctl restart network | ||
| + | cd - | ||
| + | </ | ||
| + | |||
| + | Start and enable the Neutron agents: | ||
| + | <code bash> | ||
| + | sed -i ' | ||
| + | systemctl start neutron-dhcp-agent | ||
| + | systemctl start neutron-l3-agent | ||
| + | systemctl start neutron-metadata-agent | ||
| + | systemctl start neutron-openvswitch-agent | ||
| + | |||
| + | systemctl enable neutron-dhcp-agent | ||
| + | systemctl enable neutron-l3-agent | ||
| + | systemctl enable neutron-metadata-agent | ||
| + | systemctl enable neutron-openvswitch-agent | ||
| + | </ | ||
| + | |||
| + | ===== Check agents' | ||
| + | When you've done, you should be able to see all the agents running on all network nodes where you've applied this procedure. Execute the following command while logged into the controller node, or wherever you've installed the Openstack CLI and copied the '' | ||
| + | <code bash> | ||
| + | [root@cld-blu-03 ~]# neutron agent-list | ||
| + | +--------------------------------------+--------------------+-----------------------------+-------+----------------+ | ||
| + | | id | agent_type | ||
| + | +--------------------------------------+--------------------+-----------------------------+-------+----------------+ | ||
| + | | 188fe879-be8a-4390-b766-04e188e35c3c | L3 agent | network-02.cloud.pd.infn.it | :-) | True | | ||
| + | | 42647a60-dbd0-4a85-942d-8fdbb0e2ae24 | Open vSwitch agent | network-01.cloud.pd.infn.it | :-) | True | | ||
| + | | cf6f7ec2-8700-498b-b62d-49d8b5616682 | DHCP agent | network-02.cloud.pd.infn.it | :-) | True | | ||
| + | | dc249956-e81d-465c-b51f-cff0e1e04f05 | DHCP agent | network-01.cloud.pd.infn.it | :-) | True | | ||
| + | | e196a6a2-8a3a-4bfe-b048-b50bee14761c | Open vSwitch agent | network-02.cloud.pd.infn.it | :-) | True | | ||
| + | | eb902101-8a16-43b5-87f8-b058530407f6 | L3 agent | network-01.cloud.pd.infn.it | :-) | True | | ||
| + | +--------------------------------------+--------------------+-----------------------------+-------+----------------+ | ||
| + | </ | ||
| + | |||
| + | ===== Optional: Configure Neutron' | ||
| + | Configure files to use '' | ||
| + | <code bash> | ||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | |||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | |||
| + | openstack-config --set / | ||
| + | openstack-config --set / | ||
| + | </ | ||
| + | Restart Neutron' | ||
| + | <code bash> | ||
| + | systemctl restart neutron-dhcp-agent | ||
| + | systemctl restart neutron-l3-agent | ||
| + | systemctl restart neutron-metadata-agent | ||
| + | systemctl restart neutron-openvswitch-agent | ||
| + | </ | ||
