码迷,mamicode.com
首页 > 其他好文 > 详细

##6.1 Neutron控制节点--openstack

时间:2017-09-30 15:19:15      阅读:171      评论:0      收藏:0      [点我收藏+]

标签:ada   认证   ipset   enable   man   dmi   min   tac   openstack   

##6.1 Neutron控制节点

 

##6.1 Neutron控制节点
#6.1.Neutron.controller.sh

#本实例网络配置方式是:公共网络
#官方参考 https://docs.openstack.org/neutron/pike/install/controller-install-rdo.html

#创建Neutron数据库、用户认证,前面已设置

source ./admin-openstack.sh 
# 创建Neutron服务实体,API端点
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 -y openstack-neutron openstack-neutron-ml2  openstack-neutron-linuxbridge python-neutronclient ebtables ipset

#Neutron 备份配置
cp /etc/neutron/neutron.conf{,.bak2}
cp /etc/neutron/plugins/ml2/ml2_conf.ini{,.bak}
ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
cp /etc/neutron/plugins/ml2/linuxbridge_agent.ini{,.bak}
cp /etc/neutron/dhcp_agent.ini{,.bak}
cp /etc/neutron/metadata_agent.ini{,.bak}
cp /etc/neutron/l3_agent.ini{,.bak}

#配置
echo [DEFAULT]
nova_metadata_ip = controller
metadata_proxy_shared_secret = metadata
#>/etc/neutron/metadata_agent.ini
#
echo #
[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 = neutron
service_metadata_proxy = true
metadata_proxy_shared_secret = metadata
#>>/etc/nova/nova.conf
#
echo #
[ml2]
tenant_network_types = 
type_drivers = vlan,flat
mechanism_drivers = linuxbridge
extension_drivers = port_security
[ml2_type_flat]
flat_networks = provider
[securitygroup]
enable_ipset = True
#vlan
# [ml2_type_valn]
# network_vlan_ranges = provider:3001:4000
#>/etc/neutron/plugins/ml2/ml2_conf.ini
# bond0是网卡名
echo #
[linux_bridge]
physical_interface_mappings = provider:bond0
[vxlan]
enable_vxlan = false
#local_ip = 10.2.1.20
#l2_population = true
[agent]
prevent_arp_spoofing = True
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
enable_security_group = True
#>/etc/neutron/plugins/ml2/linuxbridge_agent.ini
#
echo #
[DEFAULT]
interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true
#>/etc/neutron/dhcp_agent.ini
#
echo [DEFAULT]
core_plugin = ml2
service_plugins =
#service_plugins = trunk
#service_plugins = router
allow_overlapping_ips = true
transport_url = rabbit://openstack:openstack@controller
auth_strategy = keystone
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true

[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 = neutron

[nova]
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
region_name = RegionOne
project_name = service
username = nova
password = nova

[database]
connection = mysql://neutron:neutron@controller:3306/neutron

[oslo_concurrency]
lock_path = /var/lib/neutron/tmp 
#>/etc/neutron/neutron.conf
#
echo [DEFAULT]
interface_driver = linuxbridge
#>/etc/neutron/l3_agent.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
#检测数据
mysql -h controller -u neutron -pneutron -e "use neutron;show tables;" 

#重启相关服务
systemctl restart openstack-nova-api.service

#启动neutron
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
echo "查看网络,正常是:控制节点3个ID,计算节点1个ID"
openstack network agent list
#

 

##6.1 Neutron控制节点--openstack

标签:ada   认证   ipset   enable   man   dmi   min   tac   openstack   

原文地址:http://www.cnblogs.com/elvi/p/7614490.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!