1. 程式人生 > >openstack 部署筆記--neutron控制節點

openstack 部署筆記--neutron控制節點

keystone vim -m user token tab install -name fig

控制節點

配置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://neutron.downtown8.cn:9696
  
$ openstack endpoint create --region RegionOne   network internal http://neutron.downtown8.cn:9696
  
$ openstack endpoint create --region RegionOne   network admin http://neutron.downtown8.cn:9696

配私有網絡(還有一種網絡是公用網絡)

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

neutron配置文件

# vim /etc/neutron/neutron.conf
[database]
# ...
connection = mysql+pymysql://neutron:[email protected]/neutron
[DEFAULT]
# ...
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = true
transport_url = rabbit://openstack:[email protected]
/* */ auth_strategy = keystone notify_nova_on_port_status_changes = true notify_nova_on_port_data_changes = true [keystone_authtoken] # ... auth_uri = http://keystone.downtown8.cn:5000 auth_url = http://keystone.downtown8.cn:35357 memcached_servers = cache.downtown8.cn:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = neutron password = root [nova] # ... auth_url = http://nova.downtown8.cn:35357 auth_type = password project_domain_name = default user_domain_name = default region_name = RegionOne project_name = service username = nova password = root [oslo_concurrency] # ... lock_path = /var/lib/neutron/tmp

ml2配置文件

# vim /etc/neutron/plugins/ml2/ml2_conf.ini
[ml2]
# ...
type_drivers = flat,vlan,vxlan
tenant_network_types = vxlan
mechanism_drivers = linuxbridge,l2population
extension_drivers = port_security
[ml2_type_flat]
# ...
flat_networks = provider
[ml2_type_vxlan]
# ...
vni_ranges = 1:1000
[securitygroup]
# ...
enable_ipset = true

linuxbridge_agent配置文件

# vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = provider:eth0
[vxlan]
enable_vxlan = true
local_ip = 192.168.15.243
l2_population = true
[securitygroup]
# ...
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver


# vim /etc/neutron/l3_agent.ini
[DEFAULT]
# ...
interface_driver = linuxbridge


# vim /etc/neutron/dhcp_agent.ini
[DEFAULT]
# ...
interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true

繼續配置

# vim /etc/neutron/metadata_agent.ini
[DEFAULT]
# ...
nova_metadata_ip = nova.downtown8.cn
metadata_proxy_shared_secret = gcYwUkQj
# vim /etc/nova/nova.conf
[neutron]
# ...
url = http://neutron。downtown8.cn: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

  

  

  

openstack 部署筆記--neutron控制節點