これは、Ubuntu 14.04でのneutron(ネットワーキング)の構成の2番目の部分です。コントローラーノードにネットワークコンポーネントをインストールして構成した、Neutron#1の構成に関する以前の記事を参照できます。
ここで、このチュートリアルでは、ネットワークノードをインストールして構成します。
前提条件:
ComputeNodeでOpenStackKiloリポジトリーが有効になっていることを確認するか、以下の手順に従って有効にしてください。
UbuntuCloudアーカイブキーリングとリポジトリをインストールします。
# apt-get install ubuntu-cloud-keyring # echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu" "trusty-updates/kilo main" > /etc/apt/sources.list.d/cloudarchive-kilo.list
システムをアップグレードします。
# apt-get update
ネットワークノードでカーネルパラメータを設定し、/ etc/sysctl.confファイルを編集します。
# nano /etc/sysctl.conf
次のパラメータをファイルに追加します。
net.ipv4.ip_forward=1 net.ipv4.conf.all.rp_filter=0 net.ipv4.conf.default.rp_filter=0
変更を適用します。
# sysctl -p
ネットワークコンポーネントのインストールと構成:
次のパッケージをネットワークノードにインストールします。
# apt-get install neutron-plugin-ml2 neutron-plugin-openvswitch-agent neutron-l3-agent neutron-dhcp-agent neutron-metadata-agent
/etc/neutron/neutron.confを編集します。
# nano /etc/neutron/neutron.conf
以下の設定を変更し、適切なセクションにエントリを配置してください。データベースセクションの場合、ネットワークノードはデータベースに直接アクセスしないため、接続オプションをコメントアウトします
[DEFAULT] ... rpc_backend = rabbit core_plugin = ml2 service_plugins = router allow_overlapping_ips = True auth_strategy = keystone verbose = True [oslo_messaging_rabbit] ... rabbit_host = controller rabbit_userid = openstack rabbit_password = password ## Replace "password" with the password you chose for the openstack account in RabbitMQ [database] ... #connection = sqlite:////var/lib/neutron/neutron.sqlite ##Comment out the above line. [keystone_authtoken] ... auth_uri = http://controller:5000 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default project_name = service username = neutron password = password ## Replace "password" with the password you chose for neutron user in the identity service
モジュラーレイヤー2(ML2)プラグインの構成:
/etc/neutron/plugins/ml2/ml2_conf.iniファイルを編集します。
# nano /etc/neutron/plugins/ml2/ml2_conf.ini
以下のセクションを変更してください。
[ml2] ... type_drivers = flat,vlan,gre,vxlan tenant_network_types = gre mechanism_drivers = openvswitch [ml2_type_flat] ... flat_networks = external [ml2_type_gre] ... tunnel_id_ranges = 1:1000 [securitygroup] ... enable_security_group = True enable_ipset = True firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver [ovs] local_ip = 192.168.11.22 ## Tunnel network interface on your Network Node. bridge_mappings = external:br-ex [agent] tunnel_types = gre
注:[ovs]および[agent]スタンザは、ファイルの下部に追加する必要があります。
レイヤー3(L3)エージェントの構成:
仮想ネットワークのルーティングサービスを提供します。/etc/neutron/l3_agent.iniファイルを編集します。
# nano /etc/neutron/l3_agent.ini
[DEFAULT]セクションを変更します。
[DEFAULT] ... interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver external_network_bridge = router_delete_namespaces = True verbose = True
DHCPエージェントを構成します:
/etc/neutron/dhcp_agent.iniファイルを編集します。
# nano /etc/neutron/dhcp_agent.ini
次のスタンザを変更します。
[DEFAULT] ... interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq dhcp_delete_namespaces = True verbose = True
メタデータエージェントを構成します:
/etc/neutron/metadata_agent.iniファイルを編集します
# nano /etc/neutron/metadata_agent.ini
次のセクションを変更します。既存のエントリをコメントアウトする必要がある場合があります。
[DEFAULT] ... verbose = True auth_uri = http://controller:5000 auth_url = http://controller:35357 auth_region = RegionOne auth_plugin = password project_domain_id = default user_domain_id = default project_name = service username = neutron password = password ## Replace "password" with the password you chose for neutron user in the identity service. nova_metadata_ip = controller metadata_proxy_shared_secret = 26f008fb8c504b393df3 ## Replace "26f008fb8c504b393df3" with a suitable secret for the metadata proxy
コントローラーノード 、/ etc / nova/nova.confファイルを編集します。
# nano /etc/nova/nova.conf
[neutron]セクションを変更します。
[neutron] ... service_metadata_proxy = True metadata_proxy_shared_secret = 26f008fb8c504b393df3 ## Replace "26f008fb8c504b393df3" with the secret you chose for the metadata proxy.
コントローラノードでコンピューティングAPIサービスを再起動します。
# service nova-api restart
Open vSwitch(OVS)サービスを構成します:
ネットワークノードでOVSサービスを再起動します。
# service openvswitch-switch restart
外部ブリッジを追加します。
# ovs-vsctl add-br br-ex
物理的な外部ネットワークインターフェイスに接続する外部ブリッジにポートを追加します。私の場合は、eth2がインターフェイス名です。
# ovs-vsctl add-port br-ex eth2
ネットワークサービスを再起動します。
# service neutron-plugin-openvswitch-agent restart # service neutron-l3-agent restart # service neutron-dhcp-agent restart # service neutron-metadata-agent restart
操作の確認:
コントローラノードに管理者クレデンシャルをロードします。
# source admin-openrc.sh
エージェントを一覧表示します。
# neutron agent-list +--------------------------------------+--------------------+---------+-------+----------------+---------------------------+ | id | agent_type | host | alive | admin_state_up | binary | +--------------------------------------+--------------------+---------+-------+----------------+---------------------------+ | 23da3f95-b81b-4426-9d7a-d5cbfc5241c0 | Metadata agent | network | :-) | True | neutron-metadata-agent | | 4217b0c0-fbd4-47d9-bc22-5187f09d958a | DHCP agent | network | :-) | True | neutron-dhcp-agent | | b4cf95cd-2eba-4c69-baa6-ae8832384e40 | Open vSwitch agent | network | :-) | True | neutron-openvswitch-agent | | d9e174be-e719-4f05-ad05-bc444eb97df5 | L3 agent | network | :-) | True | neutron-l3-agent | +--------------------------------------+--------------------+---------+-------+----------------+---------------------------+
以上です!!!これで、ネットワークノードが正常に構成されました。