cike0415 发表于 2017-6-26 22:32:53

openstack 部署笔记--neutron控制节点

控制节点
  配置neutron用户及服务



$ . admin-openrc
$ 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

$ openstack endpoint create --region RegionOne \
network internal http://controller:9696

$ openstack endpoint create --region RegionOne \
network admin http://controller:9696

  配私有网络(还有一种网络是公用网络)



# yum install openstack-neutron openstack-neutron-ml2 \
openstack-neutron-linuxbridge ebtables

  neutron配置文件



# vim /etc/neutron/neutron.conf

# ...
connection = mysql+pymysql://neutron:root@controller/neutron

# ...
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = true
transport_url = rabbit://openstack:root@controller
auth_strategy = keystone
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true

# ...
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 = root

# ...
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 = root

# ...
lock_path = /var/lib/neutron/tmp

  ml2配置文件



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

# ...
type_drivers = flat,vlan,vxlan
tenant_network_types = vxlan
mechanism_drivers = linuxbridge,l2population
extension_drivers = port_security

# ...
flat_networks = provider

# ...
vni_ranges = 1:1000

# ...
enable_ipset = true

  linuxbridge_agent配置文件



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

physical_interface_mappings = provider:eth0

enable_vxlan = true
local_ip = 192.168.15.243
l2_population = true

# ...
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

# vim /etc/neutron/l3_agent.ini

# ...
interface_driver = linuxbridge

# vim /etc/neutron/dhcp_agent.ini

# ...
interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true

  继续配置



# vim /etc/neutron/metadata_agent.ini

# ...
nova_metadata_ip = controller
metadata_proxy_shared_secret = gcYwUkQj



# vim /etc/nova/nova.conf

# ...
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 = root
service_metadata_proxy = true
metadata_proxy_shared_secret = gcYwUkQj



# 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 enable neutron-l3-agent.service
# systemctl start neutron-l3-agent.service
页: [1]
查看完整版本: openstack 部署笔记--neutron控制节点