openstackneutron

Posted leaders543

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了openstackneutron相关的知识,希望对你有一定的参考价值。

控制节点

yum install -y openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables

/etc/neutron/neutron.conf

技术图片
cat > /etc/neutron/neutron.conf << EOF
[DEFAULT]
auth_strategy = keystone
transport_url = rabbit://openstack:openstack@192.168.3.220
core_plugin = ml2
service_plugins =
notify_nova_on_port_status_changes = True
notify_nova_on_port_data_changes = True

[database]
connection = mysql+pymysql://neutron:neutron@192.168.3.220/neutron

[keystone_authtoken]
auth_uri = http://192.168.3.220:5000
auth_url = http://192.168.3.220:35357
memcached_servers = 192.168.3.220:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron

[nova]
auth_url = http://192.168.3.220:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = nova
password = nova

[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
EOF
neutron.conf

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

技术图片
cat > /etc/neutron/plugins/ml2/ml2_conf.ini << EOF
[ml2]
type_drivers = flat,vlan,gre,vxlan,geneve
tenant_network_types = flat,vlan,gre,vxlan,geneve
mechanism_drivers = linuxbridge,openvswitch,l2population
extension_drivers = port_security,qos

[ml2_type_flat]
flat_networks = provider

[securitygroup]
enable_ipset = True
EOF
ml2_conf.ini

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

技术图片
cat > /etc/neutron/plugins/ml2/linuxbridge_agent.ini << EOF
[linux_bridge]
physical_interface_mappings = provider:ens32

[vxlan]
enable_vxlan = False

[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
enable_security_group = True
EOF
linuxbridge_agent.ini

/etc/neutron/dhcp_agent.ini

技术图片
cat > /etc/neutron/dhcp_agent.ini << EOF
[DEFAULT]
nova_metadata_host = 192.168.3.220

metadata_proxy_shared_secret = le
EOF
dhcp_agent.ini

/etc/nova/nova.conf (增加)

技术图片
[neutron]
url = http://192.168.3.220:9696
auth_url = http://192.168.3.220: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 = le
增加部分

建立plugin.ini

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

初始化neutron数据库
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

查看表

mysql -uneutron -pneutron -e "use neutron;show tables;"

重启服务并设置开机启动

systemctl restart openstack-nova-api neutron-server neutron-linuxbridge-agent neutron-dhcp-agent neutron-metadata-agent

systemctl enable neutron-server neutron-linuxbridge-agent neutron-dhcp-agent neutron-metadata-agent 1>&2

创建服务/端点

技术图片
openstack service create --name neutron --description "OpenStack Networking" network
openstack endpoint create --region RegionOne network public http://192.168.3.220:9696
openstack endpoint create --region RegionOne network internal http://192.168.3.220:9696
openstack endpoint create --region RegionOne network admin http://192.168.3.220:9696
服务/端点

查看网络

openstack network agent list

========================================================

计算节点

yum install -y openstack-neutron openstack-neutron-linuxbridge ebtables

/etc/neutron/neutron.conf(删掉控制节数据库)

技术图片
cat > /etc/neutron/neutron.conf << EOF
[DEFAULT]
auth_strategy = keystone
transport_url = rabbit://openstack:openstack@192.168.3.220

[keystone_authtoken]
auth_uri = http://192.168.3.220:5000
auth_url = http://192.168.3.220:35357
memcached_servers = 192.168.3.220:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron

[oslo_concurrency]
lock_path = /var/lib/neutron/tmp

EOF
neutron.conf

/etc/neutron/plugins/ml2/linuxbridge_agent.ini(和控制节点一样)

技术图片
cat > /etc/neutron/plugins/ml2/linuxbridge_agent.ini << EOF
[linux_bridge]
physical_interface_mappings = provider:ens32

[vxlan]
enable_vxlan = False

[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
enable_security_group = True
EOF
linuxbridge_agent.ini

/etc/nova/nova.conf(添加neutron)

技术图片
[neutron]
url = http://192.168.3.220:9696
auth_url = http://192.168.3.220:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron
nova.conf

配置开机启动并启动服务

systemctl restart neutron-linuxbridge-agent openstack-nova-compute

systemctl enable neutron-linuxbridge-agent 1>&2 

========================================================

openstack network agent list

以上是关于openstackneutron的主要内容,如果未能解决你的问题,请参考以下文章

OpenStack Neutron 之 Load Balance

Openstack Neutron - VM 作为同一租户内两个网络之间的路由器

微信小程序代码片段

VSCode自定义代码片段——CSS选择器

谷歌浏览器调试jsp 引入代码片段,如何调试代码片段中的js

片段和活动之间的核心区别是啥?哪些代码可以写成片段?