openstack部署neutron
controller
1.创建数据库并设置权限
mysql -u root -p0330
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.创建openstack用户
source openrc
openstack user create --domain default --password=neutron neutron
3.给neutron设置成admin角色
openstack role add --project service --user neutron admin
4.创建服务
openstack service create --name neutron \ --description "OpenStack Networking" network
5.创建服务端点
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
6.安装服务
yum install openstack-neutron openstack-neutron-ml2 openvswitch openstack-neutron-openvswitch ebtables -y
/etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugins/ml2/ml2_conf.ini.bakcp
/etc/neutron/l3_agent.ini /etc/neutron/l3_agent.ini.bakcp
/etc/neutron/dhcp_agent.ini /etc/neutron/dhcp_agent.ini.bak/etc/neutron/metadata_agent.ini /etc/neutron/metadata_agent.ini.bak
[DEFAULT]
state_path = /var/lib/neutron #neutron扩展库目录
auth_strategy = keystone #认证方式
core_plugin = ml2 #核心插件
service_plugins = router #服务插件:路由
dhcp_agent_notification = true #开启dhcp自动分配IP
allow_overlapping_ips = True
notify_nova_on_port_status_changes = true #允许更改端口
notify_nova_on_port_data_changes = true #更改端口的元数据
transport_url = rabbit://openstack:admin@controller [agent] [cors] [cors.subdomain] [database]
connection = mysql+pymysql://neutron:NEUTRON_DBPASS@controller/neutron [keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron [matchmaker_redis] [nova]
region_name = RegionOne
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
project_name = service
user_domain_name = default
username = nova
password = nova [oslo_concurrency]
lock_path = $state_path/lock #临时文件目录 [oslo_messaging_amqp] [oslo_messaging_kafka] [oslo_messaging_notifications] [oslo_messaging_rabbit] [oslo_messaging_zmq] [oslo_middleware] [oslo_policy] [qos] [quotas] [ssl]
vim /etc/neutron/neutron.conf
[DEFAULT] [ml2]
type_drivers = flat,vxlan #类型驱动
tenant_network_types = vxlan #租户网络类型
mechanism_drivers = openvswitch,l2population
extension_drivers = port_security [ml2_type_flat] [ml2_type_geneve] [ml2_type_gre] [ml2_type_vlan] [ml2_type_vxlan]
vni_ranges = : #vlan的id号码的取值范围 [securitygroup]
enable_ipset = true #开启安全组策略
vim /etc/neutron/plugins/ml2/ml2_conf.bak
[DEFAULT] [agent]
tunnel_types = vxlan #隧道类型
l2_population = True [ovs]
tunnel_bridge = br-tun #隧道网桥
local_ip = 192.168.42.147 #租户网的ip地址
bridge_mappings = [securitygroup]
firewall_driver = iptables_hybrid
enable_security_group = true [xenapi]
vim /etc/neutron/plugins/ml2/openvswitch_agent.ini
[DEFAULT]
interface_driver = openvswitch 1路由由openswitch做出来的
external_network_bridge = br-ex #外网的网桥 [agent] [ovs]
vim /etc/neutron/l3_agent.ini
[DEFAULT]
interface_driver = openvswitch
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true #开启元数据 [agent] [ovs]
vim /etc/neutron/dhcp_agent.ini
[DEFAULT]
nova_metadata_ip = controller
metadata_proxy_shared_secret = METADATA_SECRET #元数据证书的密码 [agent] [cache]
vim /etc/neutron/metadata_agent.ini
8.编辑nova的配置文件
[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
service_metadata_proxy = true
metadata_proxy_shared_secret = METADATA_SECRET
vim /etc/nova/nova.conf
9.创建软链接
ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
10.同步数据库
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
11.重启服务
systemctl restart openstack-nova-api.service、
systemctl enable neutron-server.service neutron-dhcp-agent.service openvswitch neutron-openvswitch-agent neutron-metadata-agent.service
systemctl start neutron-server.service neutron-dhcp-agent.service openvswitch neutron-openvswitch-agent neutron-metadata-agent.service
12.创建网桥
ovs-vsctl add-br br-ex
/etc/neutron/neutron.conf /etc/neutron/neutron.conf.bak/etc/neutron/plugins/ml2/openswitch_agent.ini /etc/neutron/plugins/ml2/openswitch_agent.ini.bak
[DEFAULT]
#state_path = /var/lib/neutron
auth_strategy = keystone
#core_plugin = ml2
#service_plugins = router
#dhcp_agent_notification = true
#allow_overlapping_ips = True
#notify_nova_on_port_status_changes = true
#notify_nova_on_port_data_changes = true
transport_url = rabbit://openstack:admin@controller [agent] [cors] [cors.subdomain] [database]
#connection = mysql+pymysql://neutron:NEUTRON_DBPASS@controller/neutron [keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron [matchmaker_redis] [nova]
region_name = RegionOne
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
project_name = service
user_domain_name = default
username = nova
password = nova [oslo_concurrency]
lock_path = /var/lib/neutron/tmp [oslo_messaging_amqp] [oslo_messaging_kafka] [oslo_messaging_notifications] [oslo_messaging_rabbit] [oslo_messaging_zmq] [oslo_middleware] [oslo_policy] [qos] [quotas] [ssl]
vim /etc/neutron/neutron.conf
[DEFAULT] [agent]
tunnel_types = vxlan
l2_population = True [ovs]
tunnel_bridge = br-tun
local_ip = 192.168.42.151
bridge_mappings = [securitygroup]
firewall_driver = iptables_hybrid
enable_security_group = true [xenapi]
vim /etc/neutron/plugins/ml2/openswitch_agent.ini
3.编辑nova配置文件
[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
vim /etc/nova/nova.conf
4.重启服务
systemctl restart openstack-nova-compute.service
systemctl enable openvswitch neutron-openvswitch-agent
openstack部署neutron的更多相关文章
- openstack (5)-- 部署 Neutron 网络服务
Neutron 概念: 传统的网络管理方式很大程度上依赖于管理员手工配置和维护各种网络硬件设备:而云环境下的网络已经变得非常复杂,特别是在多租户场景里,用户随时都可能需要创建.修改和删除网络,网络的连 ...
- openstack之neutron
Neutron neutron主要就是用于网络虚拟化,之前将nova的时候说过,网络部分没有写,因为openstack中的网络属于一个大部分,所以今天咱们就来看看neutron到底是怎么样实现网络虚拟 ...
- OpenStack部署的简单模型
记录下看到的openstack部署的简单模型,方便自己以后定位问题 规划网络部署节点为一个controller节点(包含网络节点),两个compute节点.controller节点有3个网卡,分别为e ...
- 网易OpenStack部署运维实战
OpenStack自2010年项目成立以来,已经有超过200个公司加入了 OpenStack 项目,目前参与 OpenStack 项目的开发人员有 17,000+,而且这些数字还在增加,作为一个开源的 ...
- openstack部署工具简介
个人使用方面DevStack无疑,在可预见的未来时间内,DevStack仍将是众多开发者们的首选安装方式或工具.该方式主要是通过配置参数,执行shell脚本来安装一个OpenStack的开发环境.Gi ...
- OpenStack核心组件-neutron网络服务
1. neutron 介绍 1.1 Neutron 概述 传统的网络管理方式很大程度上依赖于管理员手工配置和维护各种网络硬件设备:而云环境下的网络已经变得非常复杂,特别是在多租户场景里,用户随时都可能 ...
- openstack核心组件--neutron网络服务(4)
一.neutron 介绍: Neutron 概述 传统的网络管理方式很大程度上依赖于管理员手工配置和维护各种网络硬件设备:而云环境下的网络已经变得非常复杂,特别是在多租户场景里,用户随时都可能需要 ...
- OpenStack组件——Neutron网络服务(1)
1.neutron 介绍: 1)Neutron 概述 传统的网络管理方式很大程度上依赖于管理员手工配置和维护各种网络硬件设备:而云环境下的网络已经变得非常复杂,特别是在多租户场景里,用户随时都可能需要 ...
- Kolla 让 OpenStack 部署更贴心
目录 目录 Kolla 简介 Kolla & Kolla-ansible 部署 OpenStack 准备操作系统基础环境 准备 Python 基础环境 准备 Docker 基础环境 安装 ko ...
随机推荐
- Swagger保姆级教学
Swagger保姆级教学 Swagger 简介 Swagger 是一个规范和完整的框架,用于生成.描述.调用和可视化 RESTful 风格的 Web 服务.总体目标是使客户端和文件系统作为服务器以同样 ...
- redis——redis的一些核心把握
redis单线程,为什么比较快 单线程指的是网络请求模块使用了一个线程(所以不需考虑并发安全性),即一个线程处理所有网络请求,其他模块仍用了多个线程.redis能够快速执行的原因有三点: (1) 绝大 ...
- Physical Education Lessons CodeForces - 915E (动态开点线段树)
Physical Education Lessons CodeForces - 915E This year Alex has finished school, and now he is a fir ...
- Python3+Appium学习笔记01-环境配置(上)
公司可能也有关于对app自动化的一些想法,让我去研究下.当然以移动互联网的热度.对于app自动化测试技术听闻已久.也一直想要去学习.正好.这次可以在工作时间中学习.emmm.希望自己能坚持把这个系列更 ...
- C# 运算符和类型强制转换(6) 持续更新
C#支持的运算符 https://msdn.microsoft.com/zh-cn/library/6a71f45d(v=vs.140).aspx checked 和 unchecked ; b++; ...
- [MySQL优化] -- 如何定位效率较低的SQL
一般通过以下两种方式定位执行效率较低的 SQL 语句. 通过慢查询日志定位那些执行效率较低的 SQL 语句,用 --log-slow-queries[=file_name] 选项启动时, mysqld ...
- 给你自己的博客加个 Markdown
今天给大家推荐一个简单易用的开源 Markdown 组件, Markdown 组件仓库地址是: https://github.com/pandao/editor.md Markdown 是什么 Mar ...
- python中模块、包、库的区别和使用
模块:就是.py文件,里面定义了一些函数和变量,需要的时候就可以导入这些模块. 包:在模块之上的概念,为了方便管理而将文件进行打包.包目录下第一个文件便是 __init__.py,然后是一些模块文件和 ...
- ttf-mscorefonts-installer 无法安装,解决办法
ttf-mscorefonts-installer 无法安装,解决办法 原 lieefu 发布于 2017/01/11 08:11 字数 163 阅读 1007 收藏 0 点赞 0 评论 0 面试:你 ...
- js上传整个文件夹
文件夹上传:从前端到后端 文件上传是 Web 开发肯定会碰到的问题,而文件夹上传则更加难缠.网上关于文件夹上传的资料多集中在前端,缺少对于后端的关注,然后讲某个后端框架文件上传的文章又不会涉及文件夹. ...