openstack on centos 7.1(networking)
2016-06-23 09:25
453 查看
1.Install and configure controller node
Prerequisites
mysql -u root -p CREATE DATABASE neutron; GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'NEUTRON_DBPASS'; GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'NEUTRON_DBPASS'; exit;
. 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[/code]———————————————-
Networking Option 1: Provider networks
Networking Option 2: Self-service networks
Install the components
yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtablesConfigure the server component
/etc/neutron/neutron.conf[DEFAULT] ... core_plugin = ml2 service_plugins = router allow_overlapping_ips = True rpc_backend = rabbit auth_strategy = keystone notify_nova_on_port_status_changes = True notify_nova_on_port_data_changes = True [oslo_messaging_rabbit] ... rabbit_host = controller rabbit_userid = openstack rabbit_password = RABBIT_PASS #Replace RABBIT_PASS with the password you chose for the openstack account in RabbitMQ [database] ... connection = mysql+pymysql://neutron:NEUTRON_DBPASS@controller/neutron #Replace NEUTRON_DBPASS with the password you chose for the database [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_PASS #Replace NEUTRON_PASS with the password you chose for the neutron user in the Identity service [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 = NOVA_PASS #Replace NOVA_PASS with the password you chose for the nova user in the Identity service [oslo_concurrency] ... lock_path = /var/lib/neutron/tmpConfigure the Modular Layer 2 (ML2) plug-in
/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 = TrueConfigure the Linux bridge agent
/etc/neutron/plugins/ml2/linuxbridge_agent.ini[linux_bridge] physical_interface_mappings = provider:PROVIDER_INTERFACE_NAME #物理公共网络接口名字(controller) [vxlan] enable_vxlan = True local_ip = OVERLAY_INTERFACE_IP_ADDRESS #物理公共网络接口地址(controller) l2_population = True [securitygroup] ... enable_security_group = True firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriverConfigure the layer-3 agent
/etc/neutron/l3_agent.ini[DEFAULT] ... interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver external_network_bridge =Configure the DHCP agent
/etc/neutron/dhcp_agent.ini[DEFAULT] ... interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq enable_isolated_metadata = True———————————————-
Configure the metadata agent
/etc/neutron/metadata_agent.ini[DEFAULT] ... nova_metadata_ip = controller metadata_proxy_shared_secret = METADATA_SECRET #Replace METADATA_SECRET with a suitable secret for the metadata proxy
/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 = NEUTRON_PASS #Replace NEUTRON_PASS with the password you chose for the neutron user in the Identity service service_metadata_proxy = True metadata_proxy_shared_secret = METADATA_SECRET #Replace METADATA_SECRET with the secret you chose for the metadata proxyFinalize installation
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.service2.Install and configure compute node
Install the components
yum install openstack-neutron-linuxbridge ebtables ipsetConfigure the common component
/etc/neutron/neutron.conf[DEFAULT] ... rpc_backend = rabbit auth_strategy = keystone [oslo_messaging_rabbit] ... rabbit_host = controller rabbit_userid = openstack rabbit_password = RABBIT_PASS #Replace RABBIT_PASS with the password you chose for the openstack account in RabbitMQ [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_PASS #Replace NEUTRON_PASS with the password you chose for the neutron user in the Identity service [oslo_concurrency] ... lock_path = /var/lib/neutron/tmp———————————————-
Networking Option 1: Provider networks
Networking Option 2: Self-service networks
Configure the Linux bridge agent
/etc/neutron/plugins/ml2/linuxbridge_agent.ini[linux_bridge] physical_interface_mappings = provider:PROVIDER_INTERFACE_NAME #物理公共网络接口名字(compute) [vxlan] enable_vxlan = True local_ip = OVERLAY_INTERFACE_IP_ADDRESS #物理公共网络接口地址(compute) l2_population = True [securitygroup] ... enable_security_group = True firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDrive———————————————-
Configure Compute to use Networking
/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 = NEUTRON_PASSFinalize installation
systemctl restart openstack-nova-compute.service systemctl enable neutron-linuxbridge-agent.service systemctl start neutron-linuxbridge-agent.service3.Verify operation
. admin-openrc neutron ext-list #必须显示一个列表,否侧前面步骤可能有问题,需要看日志解决———————————————-
Networking Option 1: Provider networks
Networking Option 2: Self-service networks
neutron agent-list———————————————-
相关文章推荐
- CentOS7 运行.sh脚本文件提示mirrors访问失败(Errno12)
- linux 下两台电脑之间ssh无密码连接
- 关于linux SCSI 子系统
- linux如何查看磁盘剩余空间
- CentOS6.X安装QQ2012
- linux分配文件文件夹所属用户及组
- centos 记录
- Centos6.7下 搭建 java 开发 环境
- 每天一个Linux命令(56)yum命令
- vim 编辑器的使用
- linux进程的5个段
- df、du、fdisk:Linux磁盘管理
- linux 程序包管理3 yum
- linux中的 tar命令的 -C 参数,以及其它一些参数
- linux数组
- mysql root设置密码 linux
- linux 6种随机数产生
- linux数组
- Linux命令常用
- eclipse安装web插件、安装centos版本的idea