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 ...
随机推荐
- 微信小程序开发(四)页面跳转
承接上篇博客. 通过点击按钮跳转到新的页面. 先创建新页面home: 代码如下: // home.js Page({}) // 注册页面 // home.json {} // home.wxml &l ...
- wlan相关查询命令
1.查看当前连接的设备 hostapd_cli all_sta
- USC-- compute shader ps vs
http://cdn.imgtec.com/sdk-documentation/PowerVR%20Compute%20Development%20Recommendations.pdf powerV ...
- java双指针的简单理解
一.什么是双指针 双指针我所理解地是在遍历对象时,不是使用单个指针进行访问,而是使用两个相同方向或者相反方向的指针进行遍历,从而达到相应的目的. 在JAVA中并没有像C/C++指针地概念,所以这里所说 ...
- [MySQL优化] -- 如何定位效率较低的SQL
一般通过以下两种方式定位执行效率较低的 SQL 语句. 通过慢查询日志定位那些执行效率较低的 SQL 语句,用 --log-slow-queries[=file_name] 选项启动时, mysqld ...
- 粗暴,干就完了----徐晓冬似的C语言自学笔记---字符数组相关技术
字符串拼接函数 strcat() 字符串----作为很多编程语言的鼻祖C语言,没有字符串类型,取而代之的字符数组,很多数组在声明的时候会给定数组长度,然而我们却可以这样写 char mywords[] ...
- Codeforces Round #591 (Div. 2, based on Technocup 2020 Elimination Round 1) B. Strings Equalization
链接: https://codeforces.com/contest/1241/problem/B 题意: You are given two strings of equal length s an ...
- Could not load file or assembly "\win32_x86\dotnet1\crdb_adoplus.dll' or one of its dependencies.
Could not load file or assembly 'file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Repor ...
- Codevs 1105 过河 2005年NOIP全国联赛提高组
1105 过河 2005年NOIP全国联赛提高组 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 钻石 Diamond 题目描述 Description 在河上有一座独木桥,一只青蛙 ...
- Pycharm下将py文件打包成exe文件
1. 在PyCharm下安装PyInstaller 1. 首先,打开自己要发布的工程 2. 点击底部的[Terminal]打开终端,中输入命令pip install pyinstaller后回车, ...