日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

openstack搭建之-neutron配置(11)

發(fā)布時間:2025/7/14 编程问答 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 openstack搭建之-neutron配置(11) 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

?

一、base節(jié)點設置

mysql -u root -proot

CREATE DATABASE neutron;

GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'NEUTRON_DBPASS';

GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'NEUTRON_DBPASS';

?

二、 ctrl節(jié)點設置

#運行環(huán)境變量

. admin-openrc

?

#創(chuàng)建neutron用戶并添加角色

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

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

?

#創(chuàng)建neutron服務并設置endpoint

openstack service create --name neutron --description "OpenStack Networking" network

openstack endpoint create --region RegionOne network public http://ctrl.test.com:9696

openstack endpoint create --region RegionOne network internal http://ctrl.test.com:9696

openstack endpoint create --region RegionOne network admin http://ctrl.test.com:9696

?

#安裝neutron軟件

yum install \

openstack-neutron \

openstack-neutron-ml2 \

openstack-neutron-linuxbridge \

ebtables -y

?

#編輯neutron配置文件

vim /etc/neutron/neutron.conf

[database] connection = mysql+pymysql://neutron:NEUTRON_DBPASS@base.test.com/neutron[DEFAULT] core_plugin = ml2 service_plugins = #service_plugins = router #allow_overlapping_ips = true transport_url = rabbit://openstack:RABBIT_PASS@base.test.com auth_strategy = keystone notify_nova_on_port_status_changes = true notify_nova_on_port_data_changes = true[keystone_authtoken] auth_uri = http://ctrl.test.com:5000 auth_url = http://ctrl.test.com:35357 memcached_servers = base.test.com:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = neutron password = NEUTRON_PASS[nova] auth_url = http://ctrl.test.com:35357 auth_type = password project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = nova password = NOVA_PASS[oslo_concurrency] lock_path = /var/lib/neutron/tmp

?

#編輯ml2配置文件

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

[ml2] type_drivers = flat,vlan,gre,vxlan,geneve #type_drivers = flat,vlan,vxlan tenant_network_types = flat,vlan,gre,vxlan,geneve #tenant_network_types = vxlan mechanism_drivers = linuxbridge #mechanism_drivers = linuxbridge,l2population extension_drivers = port_security[ml2_type_flat] flat_networks = provider[securitygroup] enable_ipset = true#[ml2_type_vxlan] #vni_ranges = 1:1000

?

#編輯linuxbridge_agent配置文件

vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini

[linux_bridge] physical_interface_mappings = provider:eth1[vxlan] enable_vxlan = false #enable_vxlan = true #local_ip = 172.16.2.52 #l2_population = true[securitygroup] enable_security_group = true firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

?

#編輯l3配置文件

#vim /etc/neutron/l3_agent.ini

[DEFAULT] #interface_driver = linuxbridge

?

#編輯dhcp配置文件

vim /etc/neutron/dhcp_agent.ini

[DEFAULT] interface_driver = linuxbridge dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq enable_isolated_metadata = true

?

#編輯metadata配置文件

vim /etc/neutron/metadata_agent.ini

[DEFAULT] nova_metadata_host =ctrl.test.com metadata_proxy_shared_secret = METADATA_SECRET

?

#編輯Nova配置文件

vim /etc/nova/nova.conf

[neutron] url = http://ctrl.test.com:9696 auth_url = http://ctrl.test.com:35357 auth_type = password project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = neutron password = NEUTRON_PASS service_metadata_proxy = true metadata_proxy_shared_secret = METADATA_SECRET

?

#創(chuàng)建軟連接

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

#初始化數(shù)據(jù)庫

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

?

#啟動服務

systemctl restart openstack-nova-api.service

?

systemctl restart neutron-server.service \

neutron-linuxbridge-agent.service \

neutron-dhcp-agent.service \

neutron-metadata-agent.service

?

systemctl enable neutron-server.service \

neutron-linuxbridge-agent.service \

neutron-dhcp-agent.service \

neutron-metadata-agent.service

?

#systemctl restart neutron-l3-agent.service

#systemctl enable neutron-l3-agent.service

?

#驗證(計算節(jié)點配置完成再驗證)

. admin-openrc

openstack extension list --network

openstack network agent list

?

三、 com計算節(jié)點配置

#安裝軟件

yum install openstack-neutron-linuxbridge ebtables ipset -y

?

#編輯neutron配置文件

vim /etc/neutron/neutron.conf

[DEFAULT] transport_url = rabbit://openstack:RABBIT_PASS@base.test.com auth_strategy = keystone[keystone_authtoken] auth_uri = http://ctrl.test.com:5000 auth_url = http://ctrl.test.com:35357 memcached_servers = base.test.com:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = neutron password = NEUTRON_PASS[oslo_concurrency] lock_path = /var/lib/neutron/tmp

?

#編輯橋接配置文件

vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini

[linux_bridge] physical_interface_mappings = provider:eth0[vxlan] enable_vxlan = false #enable_vxlan = true #local_ip = 172.16.2.53 #l2_population = true[securitygroup] enable_security_group = true firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

?

#編輯Nova配置文件

vim /etc/nova/nova.conf

[neutron] url = http://ctrl.test.com:9696 auth_url = http://ctrl.test.com:35357 auth_type = password project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = neutron password = NEUTRON_PASS

?

#開啟服務

systemctl restart openstack-nova-compute.service

?

systemctl restart neutron-linuxbridge-agent.service

systemctl enable neutron-linuxbridge-agent.service

?

注:配置文件中注釋部分配置文件為創(chuàng)建L3路由網(wǎng)絡使用的配置信息。未注釋的配置信息為交換機網(wǎng)絡。后續(xù)創(chuàng)建網(wǎng)絡根據(jù)需要進行開啟。注意,相同項保留一項即可。

?

轉(zhuǎn)載于:https://www.cnblogs.com/chenli90/p/10351529.html

總結(jié)

以上是生活随笔為你收集整理的openstack搭建之-neutron配置(11)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。