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 ...
随机推荐
- Tensorflow目录
0.Tensorflow安装 1.创建会话,启动会话 2.变量 3.Fech_feed 4.线性回归 5.非线性回归 6.MNIST数据集简单分类 7.交叉熵 8.Dropout 9.正则化 10.优 ...
- 一图一知-TS之Interface接口
- Java工程师面试题集锦
即将踏上找工作的征途,参考网上面试题库准备一波面试题,希望能找到理想中的工作,愿一切顺利. 一.Java基础 1.String类为什么是final的. 2.HashMap的源码,实现原理,底层结构. ...
- Jmeter - 命令行参数
同步更新至个人博客:https://njlife.top/2019/07/12/Jmeter-%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%8F%82%E6%95%B0/ Jmeter ...
- 扫描局域网ip存活
#!/bin/bash # #******************************************************************** #encoding -*-utf ...
- Error resolving template “pages”, template might not exist or might not be accessible by any of the configured Template Resolver 或者 springboot使用thymeleaf时报html没有结束标签
application.properties配置文件 spring.thymeleaf.prefix=classpath:/templates/ spring.thymeleaf.suffix=.ht ...
- unreal 抓mobile 管线
把renderdoc挂到生成的exe上 用命令行 “路径\xx.uproject” scenename -game -FeatureLevelES31 -windowed -resx=1920 -re ...
- SpringBoot集成Druid实现监控
application.properties文件完整信息 #连接数据库 spring.datasource.driver-class-name=org.mariadb.jdbc.Driver spri ...
- @Valid验证
@Valid注解用于校验,所属包为:javax.validation.Valid. ① 首先需要在实体类的相应字段上添加用于充当校验条件的注解,如:@Min,如下代码(age属于User类中的属性): ...
- 智能指针unique_ptr记录
unique_ptr 对对象独有管理,无法复制,共享,值传递,可以使用move语义来转移控制权. std::default_delete<int> d; std::unique_ptr&l ...