openstack部署-neutron服务安装

版权声明:转发请带出处 联系qq:1113997619 邮箱:[email protected] https://blog.csdn.net/hutiewei2008/article/details/88845789

neutron 安装

       mysql -u root -p 进入数据库

CREATE DATABASE neutron; 创建数据库

设置权限

GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' \

  IDENTIFIED BY '123456';

GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' \

  IDENTIFIED BY '123456';

 

openstack user create --domain default --password-prompt neutron创建用户

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://controller:9696 创建API

openstack endpoint create --region RegionOne \

  network internal http://controller:9696

openstack endpoint create --region RegionOne \

  network admin http://controller:9696

编辑/etc/neutron/neutron.conf文件

 

[database]

connection = mysql+pymysql://neutron:123456@controller/neutron

[DEFAULT]

# ...

core_plugin = ml2

service_plugins =

transport_url = rabbit://openstack:123456@controller

 

[DEFAULT]

# ...

auth_strategy = keystone

 

[keystone_authtoken]

# ...

auth_uri = http://controller:5000

auth_url = http://controller:35357

memcached_servers = controller:11211

auth_type = password

project_domain_name = default

user_domain_name = default

project_name = service

username = neutron

password = 123456

 

[DEFAULT]

# ...

notify_nova_on_port_status_changes = true

notify_nova_on_port_data_changes = true

 

[nova]

# ...

auth_url = http://controller:35357

auth_type = password

project_domain_name = default

user_domain_name = default

region_name = RegionOne

project_name = service

username = nova

password = 123456

 

[oslo_concurrency]

# ...

lock_path = /var/lib/neutron/tmp

 

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

type_drivers = flat,vlan

tenant_network_types =

mechanism_drivers = linuxbridge

extension_drivers = port_security

flat_networks = provider

enable_ipset = true

 

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

physical_interface_mappings = provider:ens33

enable_vxlan = false

(下两个未找到)

enable_security_group = true

firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

 

编辑/etc/neutron/dhcp_agent.ini

interface_driver = linuxbridge

dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq

enable_isolated_metadata = true

 

编辑/etc/neutron/metadata_agent.ini

nova_metadata_host = controller

metadata_proxy_shared_secret = METADATA_SECRET

 

编辑/etc/nova/nova.conf

[neutron]

# ...

url = http://controller:9696

auth_url = http://controller:35357

auth_type = password

project_domain_name = default

user_domain_name = default

region_name = RegionOne

project_name = service

username = neutron

password = 123456

service_metadata_proxy = true

metadata_proxy_shared_secret = METADATA_SECRET

 

ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini创建连接

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 enable neutron-server.service \

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

  neutron-metadata-agent.service

 systemctl start neutron-server.service \

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

  neutron-metadata-agent.service

systemctl status neutron-server.service \

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

  neutron-metadata-agent.service

 

# systemctl enable neutron-l3-agent.service

# systemctl start neutron-l3-agent.service

systemctl status neutron-l3-agent

 

计算节点安装

yum install openstack-neutron-linuxbridge ebtables ipset 安装

编辑/etc/neutron/neutron.conf

[DEFAULT]

# ...

transport_url = rabbit://openstack:123456@controller 

[DEFAULT]

# ...

auth_strategy = keystone

 

[keystone_authtoken]

# ...

auth_uri = http://controller:5000

auth_url = http://controller:35357

memcached_servers = controller:11211

auth_type = password

project_domain_name = default

user_domain_name = default

project_name = service

username = neutron

password = 123456

 

[oslo_concurrency]

# ...

lock_path = /var/lib/neutron/tmp

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

[linux_bridge]

physical_interface_mappings = provider:ens33

[vxlan]

enable_vxlan = false

(下边两项无)

[securitygroup]

# ...

enable_security_group = true

firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

net.bridge.bridge-nf-call-iptables

net.bridge.bridge-nf-call-ip6tables

 

编辑 /etc/nova/nova.conf 

[neutron]

# ...

url = http://controller:9696

auth_url = http://controller:35357

auth_type = password

project_domain_name = default

user_domain_name = default

region_name = RegionOne

project_name = service

username = neutron

password = 123456

 

systemctl restart openstack-nova-compute.service

# systemctl enable neutron-linuxbridge-agent.service

# systemctl start neutron-linuxbridge-agent.service

systemctl status neutron-linuxbridge-agent.service

openstack network agent list 查看网络启动

日志位置/var/log/neutron/

猜你喜欢

转载自blog.csdn.net/hutiewei2008/article/details/88845789