Openstack-Neutron網絡服務

640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy


Openstack-Neutron網絡服務


教程大綱

      

1. Neutron的服務組件介紹
2. Neutron的安裝部署




1.neutron 網絡服務部分i

mysql -u root -p -e "create database neutron;"

mysql -u root -p -e "grant all privileges on neutron.* to 'neutron'@'localhost' identified by 'neutron';"

mysql -u root -p -e "grant all privileges on neutron.* to 'neutron'@'%' identified by 'neutron';"


2.安裝neutron網絡組件

yum install openstack-neutron openstack-neutron-ml2 \

  openstack-neutron-linuxbridge ebtables


3.配置neutron 配置文件

【DEFAULT】

auth_strategy = keystone

core_plugin = ml2   核心插件ml2

service_plugins = router 


修改消息通知

notify_nova_on_port_status_changes = true   

notify_nova_on_port_data_changes = true

verbose = True

rpc_backend = rabbit

connection = mysql://neutron:[email protected]:3306/neutron


【neutron】

auth_uri = http://192.168.100.40:5000

auth_url = http://192.168.100.40:35357

auth_type = password

project_domain_name = default

user_domain_name = default

project_name = service

username = neutron

password = neutron


【nova】

auth_url=http://192.168.100.40:35357

auth_type=password

project_domain_name=default

user_domain_name=default

region_name=RegionOne

project_name =service

username =nova

password =nova


lock_path = /var/lib/neutron/tmp


rabbit_host = 192.168.100.40

rabbit_port = 5672

rabbit_userid = openstack

rabbit_password = openstack



4.修改ml2 二層交換的網絡類型的修改

vi    /etc/neutron/plugins/ml2/ml2_conf.ini 

type_drivers = local,flat,vlan,gre,vxlan,geneve  支持的驅動

tenant_network_types = vlan,gre,vxlan,geneve   網絡類型

mechanism_drivers = openvswitch,linuxbridge           網絡底層的驅動

extension_drivers = port_security          端口安全

flat_networks = physnet1     設置單一扁平網絡

enable_ipset = true


5.修改網橋的修改linuxbridge_agent.ini 

prevent_arp_spoofing = true
physical_interface_mappings =physnet1:eth0  網卡映射
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver 
enable_security_group = true
enable_vxlan = false   關閉vxlan


6.dhcp的配置文件修改 

vi   /etc/neutron/dhcp_agent.ini 

interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver 網橋

dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq    默認dnsmasq  dhcp

enable_isolated_metadata = True


7.metadata的修改

vi /neutron/metadata_agent.ini 

【keystone認證的】

auth_uri = http://192.168.100.40:5000

auth_url = http://192.168.100.40:35357

auth_type = password

project_domain_name = default

user_domain_name = default

region_name = RegionOne

project_name = service

username = neutron

password = neutron


nova_metadata_ip = 192.168.100.40   

metadata_proxy_shared_secret =neutron 開啓祕鑰憑證


8.修改Nova的中添加neutron的網絡註冊信息

vi  /etc/nova/nova.conf


【neutron】

url = http://192.168.100.40:9696

auth_url = http://192.168.100.40:35357

auth_type = password

project_domain_name = default

user_domain_name = default

region_name = RegionOne

project_name = service

username = neutron

password = neutron


service_metadata_proxy=True  開啓

metadata_proxy_shared_secret =neutron  共享祕鑰



9.創建超鏈ml2 

ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini


10.創建neutron用戶

. admin-openrc


openstack user create --domain default --password-prompt neutron

neutron添加到admin

openstack role add --project service --user neutron admin



創建一個實例

openstack service create --name neutron \

  --description "OpenStack Networking" network

添加三個節點:

openstack endpoint create --region RegionOne \

network public http://192.168.100.40:9696

           

openstack endpoint create --region RegionOne \

network internal http://192.168.100.40:9696


openstack endpoint create --region RegionOne \

network admin http://192.168.100.40:9696




11.同步數據庫信息


su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \

  --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron



13. 重啓服務Nova-api 和neutron


systemctl restart openstack-nova-api.service


  neutron服務

  systemctl enable neutron-server.service \

  neutron-linuxbridge-agent.service neutron-dhcp-agent.service \

  neutron-metadata-agent.service

  systemctl restart neutron-server.service \

  neutron-linuxbridge-agent.service neutron-dhcp-agent.service \

  neutron-metadata-agent.service



14.計算節點的neutron網絡組件


 安裝 linuxbridge 網橋

yum install openstack-neutron-linuxbridge ebtables ipset




15.計算節點只做neutron和linuxbridge  和ml2_conf.ini的配置文件的修改。



 scp /etc/neutron/neutron.conf 192.168.100.50:/etc/neutron/

scp /etc/neutron/plugins/ml2/linuxbridge_agent.ini 192.168.100.40:/etc/neutron/plugins/ml2/

scp /etc/neutron/plugins/ml2/ml2_conf.ini 192.168.100.40:/etc/neutron/plugins/ml2/




16.修改計算節點上Nova配置 


【neutron】


url = http://192.168.100.40:9696

auth_url = http://192.168.100.40:35357

auth_type = password

project_domain_name = default

user_domain_name = default

region_name = RegionOne

project_name = service

username = neutron

password = neutron




17.做一個軟連接ml2


ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini




16.重啓Nova-api和重啓neutron


systemctl restart openstack-nova-compute.service

systemctl enable neutron-linuxbridge-agent.service

systemctl restart neutron-linuxbridge-agent.service



16.測試查看


neutron agent-list

640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=


640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy

請觀看視屏


視屏會在騰訊課堂和優酷、56視屏網站中上傳。請大家搜索中祥課堂即可觀看


640?wx_fmt=png&tp=webp&wxfrom=5&wx_lazy=

0?wx_fmt=gif&tp=webp&wxfrom=5&wx_lazy=1


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章