progetti:cloud-areapd:keystone-glance_high_availability:openstack_ha:temporary
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
progetti:cloud-areapd:keystone-glance_high_availability:openstack_ha:temporary [2014/09/29 07:55] – [Naming conventions and networking assumptions] dorigoa@infn.it | progetti:cloud-areapd:keystone-glance_high_availability:openstack_ha:temporary [2015/03/27 08:31] (current) – [Install OpenStack software (both nodes)] dorigoa@infn.it | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
+ | ======= Installation and Configuration of OpenStack Network Node ======= | ||
+ | |||
+ | Author: | ||
+ | * Alvise Dorigo (INFN Padova) | ||
+ | |||
+ | ===== Prerequisites ===== | ||
+ | * [[http:// | ||
+ | |||
+ | Two nodes with: | ||
+ | * Updated SL6/CentOS6 (6.4 or 6.5) | ||
+ | * Make sure that yum autoupdate is disabled | ||
+ | <code bash> | ||
+ | root@controller-01 ~]# grep ENA / | ||
+ | # ENABLED | ||
+ | ENABLED=" | ||
+ | </ | ||
+ | * At least 20GB HD for operating system and OpenStack software and related log files | ||
+ | * SELinux configured as " | ||
+ | * EPEL 6-8 | ||
+ | * A MySQL (possibly a HA cluster) endpoint each OpenStack service can connect to (in this guide we use our MySQL Percona cluster' | ||
+ | * A HAProxy/ | ||
+ | * Installed CA INFN certificate on both nodes | ||
+ | <code bash> | ||
+ | [root@network-01 ~]# ll / | ||
+ | -rw-r--r-- 1 root root 1257 Jun 5 19:05 / | ||
+ | </ | ||
+ | |||
+ | ===== Naming conventions and networking assumptions ===== | ||
+ | We assume that the network nodes have the following network setup: | ||
+ | * They have 3 network interfaces connected to three different networks: **management network**, **public network**, **data network** | ||
+ | * **Management network** is: '' | ||
+ | * **Public network** (also called " | ||
+ | * **Data network** is: '' | ||
+ | * First node is named: '' | ||
+ | * Second node is named: '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | ==== 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) ===== | ||
+ | First install the YUM repo from RDO: | ||
+ | <code bash> | ||
+ | yum install -y http:// | ||
+ | </ | ||
+ | When the support to Havana is decomissioned, | ||
+ | <code bash> | ||
+ | yum -y install https:// | ||
+ | sed -i ' | ||
+ | </ | ||
+ | Then install Openstack software and update '' | ||
+ | <code bash> | ||
+ | yum -y install openstack-neutron openvswitch openstack-neutron-openvswitch | ||
+ | yum -y update iproute | ||
+ | </ | ||
+ | ===== 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 | ||
+ | EOF | ||
+ | sysctl -p | ||
+ | service network restart | ||
+ | </ | ||
+ | ===== Configure Neutron agent services (both nodes) ===== | ||
+ | In this section we customize several configuration files related to Neutron' | ||
+ | |||
+ | **neutron.conf** | ||
+ | <code bash> | ||
+ | # Let's choose the kind of authentication | ||
+ | openstack-config --set / | ||
+ | # Let's define the IP address and TCP port of the keystone service (which is running on the controller node) | ||
+ | # We'll use the Controller node's Virtual IP to exploit the HA configuration | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | # Let's define the credentials used by the Neutron agents to authenticate to the Keystone service | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | # Let's use the RabbitMQ AMQP in HA mode | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | # Let's define the MySQL endpoint and authentication credentials | ||
+ | openstack-config --set / | ||
+ | # Let's define the L2 plugin type (Open vSwitch or LinuxBridge; | ||
+ | openstack-config --set / | ||
+ | # The following parameter must contain the number of available dhcp agents, which is the number of network nodes. 2 in our case. | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | </ | ||
+ | **api-paste.ini** | ||
+ | <code bash> | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | </ | ||
+ | **l3-agent.ini** | ||
+ | <code bash> | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | </ | ||
+ | **dhcp_agent.ini** | ||
+ | <code bash> | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | </ | ||
+ | **metadata_agent.ini** | ||
+ | <code bash> | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | </ | ||
+ | **ovs_neutron_plugin.ini** | ||
+ | <code bash> | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | # In the following line set local_ip to the IP address of the NIC connected to the DATA NETWORK | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | openstack-config --set / | ||
+ | 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> | ||
+ | service openvswitch start | ||
+ | chkconfig openvswitch on | ||
+ | </ | ||
+ | Create the bridges: | ||
+ | <code bash> | ||
+ | ovs-vsctl add-br br-int | ||
+ | ovs-vsctl add-br br-ex | ||
+ | </ | ||
+ | Let's assume the '' | ||
+ | <code bash> | ||
+ | cd / | ||
+ | mv ifcfg-eth0 eth0.orig | ||
+ | cat << EOF >> ifcfg-eth0 | ||
+ | DEVICE=eth0 | ||
+ | TYPE=OVSPort | ||
+ | DEVICETYPE=ovs | ||
+ | OVS_BRIDGE=br-ex | ||
+ | ONBOOT=yes | ||
+ | BOOTPROTO=none | ||
+ | PROMISC=yes | ||
+ | EOF | ||
+ | |||
+ | cat << EOF >> ifcfg-br-ex | ||
+ | DEVICE=br-ex | ||
+ | DEVICETYPE=ovs | ||
+ | TYPE=OVSBridge | ||
+ | BOOTPROTO=static | ||
+ | # change with your actual public IP address | ||
+ | IPADDR=90.147.77.42 | ||
+ | NETMASK=255.255.255.0 | ||
+ | ONBOOT=yes | ||
+ | EOF | ||
+ | |||
+ | service network restart | ||
+ | cd - | ||
+ | </ | ||
+ | |||
+ | Turn the Neutron agents ON: | ||
+ | <code bash> | ||
+ | service neutron-dhcp-agent start | ||
+ | service neutron-l3-agent start | ||
+ | service neutron-metadata-agent start | ||
+ | service neutron-openvswitch-agent start | ||
+ | </ | ||
+ | Enable the Neutron agents: | ||
+ | <code bash> | ||
+ | chkconfig neutron-dhcp-agent on | ||
+ | chkconfig neutron-l3-agent on | ||
+ | chkconfig neutron-metadata-agent on | ||
+ | chkconfig neutron-openvswitch-agent on | ||
+ | </ | ||
+ | |||
+ | ===== 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@controller-01 ~]# 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> | ||
+ | service neutron-dhcp-agent restart | ||
+ | service neutron-l3-agent restart | ||
+ | service neutron-metadata-agent restart | ||
+ | service neutron-openvswitch-agent restart | ||
+ | </ | ||
+ | === Fix metadata agent === | ||
+ | To address this [[https:// | ||
+ | <code bash> | ||
+ | curl -o agent.py https:// | ||
+ | mv / | ||
+ | cp agent.py / | ||
+ | |||
+ | service neutron-metadata-agent restart | ||
+ | </ | ||