CentOS7.1 Liberty云平台之Networking篇(6)
2016-03-22 13:54
441 查看
选择Provider networks
控制节点:
控制节点:
一、安装配置Networking服务
1.创建数据库及管理用户
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';
2.生效admin变量
source admin-openrc.sh
3.创建neutron用户
openstack user create --domain default --password-prompt neutron添加admin角色到neutron用户及service项目
openstack role add --project service --user neutron admin创建neutron服务实体
openstack service create --name neutron --description "OpenStack Networking" network
4.创建服务API端点
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]5.安装neutron相关包
yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge python-neutronclient ebtables ipset6.配置/etc/neutron/neutron.conf
[DEFAULT] core_plugin = ml2 service_plugins = rpc_backend = rabbit auth_strategy = keystone notify_nova_on_port_status_changes = True notify_nova_on_port_data_changes = True nova_url = http://controller:8774/v2 verbose = True ...... [keystone_authtoken] auth_uri = http://controller:5000 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default project_name = service username = neutron password = 111111 ...... [database] connection = mysql://neutron:NEUTRON_DBPASS@controller/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 = 111111 ...... [oslo_concurrency] lock_path = /var/lib/neutron/tmp ...... [oslo_messaging_rabbit] rabbit_host = controller rabbit_userid = openstack rabbit_password = RABBIT_PASS ......7.配置/etc/neutron/plugins/ml2/ml2_conf.ini
[ml2] type_drivers = flat,vlan tenant_network_types = mechanism_drivers = linuxbridge extension_drivers = port_security ...... [ml2_type_flat] flat_networks = public ...... [securitygroup] enable_ipset = True ......8.配置/etc/neutron/plugins/ml2/linuxbridge_agent.ini
[vxlan] enable_vxlan = False [agent] prevent_arp_spoofing = True [securitygroup] enable_security_group = True firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver9.配置/etc/neutron/dhcp_agent.ini
[DEFAULT] interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq enable_isolated_metadata = True verbose = True10.配置/etc/neutron/metadata_agent.ini
[DEFAULT] auth_uri = http://controller:5000 auth_url = http://controller:35357 auth_region = RegionOne auth_plugin = password project_domain_id = default user_domain_id = default project_name = service username = neutron password = 111111 nova_metadata_ip = controller metadata_proxy_shared_secret = METADATA_SECRET verbose = True11.配置/etc/nova/nova.conf
[neutron] url = http://controller:9696 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default region_name = RegionOne project_name = service username = neutron password = 111111 service_metadata_proxy = True metadata_proxy_shared_secret = METADATA_SECRET12.创建软链接
ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini13.填充数据库
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" neutron14.重启Compute API服务
systemctl restart openstack-nova-api.service15.启动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
计算节点:二、安装配置控制节点
1.安装neutron相关包
yum install openstack-neutron openstack-neutron-linuxbridge ebtables ipset -y2.配置/etc/neutron/neutron.conf
[DEFAULT] rpc_backend = rabbit auth_strategy = keystone verbose = True ...... [keystone_authtoken] auth_uri = http://controller:5000 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default project_name = service username = neutron password = 111111 ...... [oslo_concurrency] lock_path = /var/lib/neutron/tmp ...... [oslo_messaging_rabbit] rabbit_host = controller rabbit_userid = openstack rabbit_password = RABBIT_PASS ......3.配置/etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge] physical_interface_mappings = public:ens34 [vxlan] enable_vxlan = False [agent] prevent_arp_spoofing = True [securitygroup] nable_security_group = True firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver4.配置/etc/nova/nova.conf
[neutron] url = http://controller:9696 auth_url = http://controller:35357 auth_plugin = password project_domain_id = default user_domain_id = default region_name = RegionOne project_name = service username = neutron password = 1111115.重启Compute服务
systemctl restart openstack-nova-compute.service6.启动Linux bridge agent服务并设置开机自启
systemctl enable neutron-linuxbridge-agent.service systemctl start neutron-linuxbridge-agent.service
控制节点:三、验证
1.生效admin脚本变量
source admin-openrc.sh2.查看成功运行的neutron服务进程
neutron ext-list3.查看neutron服务代理
neutron agent-list
相关文章推荐
- Linux内核同步机制之(三):memory barrier【转】
- Linux network setting.
- Linux常见命令总结
- Linux中的makefile文件
- Linux 系统命令及其使用详解(大全)
- 嵌入式Linux系统Bootloader启动调试技术(回想)
- 解决vs2013下创建的python文件,到其他平台(如linux)下中文乱码(或运行时报SyntaxError: (unicode error) 'utf-8' codec can't decode byte...)
- QEMU调试Linux系统的USB协议栈
- Centos修改语言为英文
- Linux用到的一些指令
- CentOS Linux搭建独立SVN Server全套流程
- Linux搭建SVN Server
- Linux搭建SVN Server
- Linux Ubuntu安装MySql 遇到的问题及解决方案
- Linux 一次杀死多进程
- linux下的find文件查找命令与grep文件内容查找命令
- Linux-进程间通信(N): 各种IPC的使用场景
- Linux命令之tar
- Linux命令详解:[25]find常见用法示例
- linux命令:ls命令