OpenStack:安装Neutron与provider network
1. 安装
(1)Install Networking services on a dedicated network node
# apt-get install neutron-server neutron-dhcp-agent neutron-plugin-openvswitch-agent
不需要L3Agent
删除sqlite
rm -f /var/lib/neutron/neutron.sqlite
编辑/etc/sysctl.conf, Enable packet forwarding and disable packet destination filtering
net.ipv4.ip_forward=1
net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.default.rp_filter=0
重新加载
# sysctl -p
# service networking restart
如果不行,则
# /etc/init.d/networking restart
2. 创建db
create database neutron;
grant all privileges on neutron.* to 'neutron'@'%' identified by 'openstack';
grant all privileges on neutron.* to 'neutron'@'localhost' identified by 'openstack';
3. 创建user, role
# keystone user-create --name=neutron --pass=openstack
# keystone user-role-add --user=neutron --tenant=service --role=admin
4. 配置:
(1)配置/etc/neutron/neutron.conf :
[DEFAULT]
core_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2
auth_strategy=keystone
control_exchange = neutron
rabbit_host = controller
rabbit_userid = guest
rabbit_password = openstack
notification_driver = neutron.openstack.common.notifier.rabbit_notifier
[database]
connection = mysql://neutron:openstack@controller/neutron
[keystone_authtoken]
auth_uri = http://controller:35357
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = neutron
admin_password = openstack
(2)配置/etc/neutron/api-paste.ini:
[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
auth_uri = http://controller:35357
auth_host = controller
auth_port = 35357
admin_tenant_name = service
admin_user = neutron
admin_password = openstack
警告:Warning
keystoneclient.middleware.auth_token: You must configure auth_uri to point to the public identity endpoint. Otherwise, clients might not be able to authenticate against an admin endpoint.
(3)配置/etc/neutron/dhcp_agent.ini
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
(4)配置 /etc/nova/nova.conf, 回头关联nova
[DEFAULT]
neutron_metadata_proxy_shared_secret = openstack
service_neutron_metadata_proxy = true
network_api_class=nova.network.neutronv2.api.API
neutron_admin_username=neutron
neutron_admin_password=openstack
neutron_admin_auth_url=http://controller:35357/v2.0/
neutron_auth_strategy=keystone
neutron_admin_tenant_name=service
neutron_url=http://controller:9696/
需要重启:
# service nova-api restart
(5)配置/etc/neutron/metadata_agent.ini
[DEFAULT]
auth_url = http://controller:35357/v2.0
auth_region = regionOne
admin_tenant_name = service
admin_user = neutron
admin_password = openstack
nova_metadata_ip = controller
metadata_proxy_shared_secret = openstack
5. 注册service, endpoint:
# keystone service-create \
--name=neutron --type=network \
--description="OpenStack Networking Service"
# keystone endpoint-create \
--service-id 455075d2fb9540ac864c345109c291cf \
--publicurl http://controller:9696 \
--adminurl http://controller:9696 \
--internalurl http://controller:9696
-------------------------------------------------------------------
>在Network Node安装Neutron
0. 安装OVS
知道3种interface
MGMI_INTERFACE: 管理接口, 使用eth1, 一般要关闭
DATA_INTERFACE: 数据接口, 使用eth1
EXTERNAL_INTERFACE: 外部接口, 使用eth0, 如果有多ISP,都绑定于该interface.
(1) 安装
# apt-get install neutron-plugin-openvswitch-agent
# ovs-vsctl add-br br-int
br-int是OVS连接VM必需的, 至于br-ex根据网络拓扑需要, 在flat网络则不用.
(2) 配置 /etc/neutron/dhcp_agent.ini
[DEFAULT]
enable_isolated_metadata = True
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
use_namespaces = False
其中use_namespaces根据需要设定,如果是flat应该没有必要吧?
需要重启
# service neutron-dhcp-agent restart
(3)配置/etc/neutron/neutron.conf, 设置OVS
core_plugin = neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2
(4)配置/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini, 设置firewall_driver
[securitygroup]
# Firewall driver for realizing neutron security group function.
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
[ovs]
tenant_network_type = none
enable_tunneling = False
network_vlan_ranges = physnet0, physnet1
bridge_mappings = physnet0:br-eth0, physnet1:br-eth1
则需要创建
(5)重启
# service openvswitch-switch restart(只在安装后重启一次即可,不能重启)
# service neutron-plugin-openvswitch-agent restart
-------------------------------------------------------------------
8. 重启neutron服务.
service neutron-server restart
service neutron-dhcp-agent restart
service neutron-metadata-agent restart
service neutron-plugin-openvswitch-agent restart
======================================
配置网络:
(1)执行下述ovs命令
# ovs-vsctl add-br br-eth0
# ovs-vsctl add-port br-eth0 eth0
# ovs-vsctl add-br br-eth1
# ovs-vsctl add-port br-eth1 eth1
(2)配置interfaces
openstack@openstack:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
up ifconfig eth0 0.0.0.0 promisc up
down ifconfig eth0 down
auto br-eth0
iface br-eth0 inet static
address 192.168.2.3
netmask 255.255.255.0
gateway 192.168.2.2
dns-nameservers 192.168.2.2
auto eth1
iface eth1 inet manual
up ifconfig eth1 0.0.0.0 promisc up
down ifconfig eth1 down
auto br-eth1
iface br-eth1 inet static
address 10.0.0.3
netmastk 255.255.255.0
一旦声明 bridge_ports eth0,就不能再声明iface eth0, 否则Linux启动会报网络错误.
-----------------------------------------------
关闭gro
ethtool -k eth0
ethtool -K eth0 gro off
ethtool -k eth1
ethtool -K eth1 gro off
------------------------------------------------
OpenStack:安装Neutron与provider network的更多相关文章
- openstack 安装neutron网络服务安装 报错:Unknown operation 'enabled'
注:这个脚本文件有一个地方是错误的,最后一行需要修改一下 # vim /usr/local/bin/iass-install-neutron-controller-gre.sh # 改systemc ...
- OpenStack 安装:neutron服务
在上一篇中介绍了Nova的安装配置,这一篇介绍neutron 首先,创建neutron用户并设置密码为neutron [root@linux-node1 ~]# openstack user crea ...
- CentOS7安装OpenStack(Rocky版)-06.安装Neutron网络服务(控制节点)
上一章介绍了独立的nova计算节点的安装方法,本章分享openstack的网络服务neutron的安装配制方法 ------------------- 完美的分割线 ----------------- ...
- OpenStack Train版-10.安装neutron网络服务(网络节点:可选)
可选:安装neutron网络服务节点(neutron01网络节点192.168.0.30)网络配置按照官网文档的租户自助网络 配置系统参数 echo 'net.ipv4.ip_forward = 1' ...
- OpenStack Train版-9.安装neutron网络服务(计算节点)
在计算节点安装neutron网络服务(computel01计算节点192.168.0.20)安装组件 yum install openstack-neutron-linuxbridge ebtable ...
- OpenStack Train版-8.安装neutron网络服务(控制节点)
安装neutron网络服务(controller控制节点192.168.0.10) 创建neutron数据库 mysql -uroot CREATE DATABASE neutron; GRANT A ...
- openstack里面的Provider network 和 Tenant network 的区别
openstack里面的Provider network 和 Tenant network 的区别 openstack里面的网络相对复杂.经常有人对几个网络概念搞混淆,这里基本说明下 Openstac ...
- openstack安装newton版本neutron服务部署(四)
一.管理节点部署服务: 1.安装neutron: [root@linux-node1 ~]# yum install openstack-neutron openstack-neutron-ml2 o ...
- openstack安装文档
#########################################openstack m版本部署安装################################## 控制节点.网络 ...
随机推荐
- 使用PetaPoco ORM 框架分页查询
通过在派生的Repository中调用GetPagingEntities方法来获取分页数据,并返回由PagingDataSet<T>封装分页集合,例如: Public PagingData ...
- 洛谷P2736 “破锣摇滚”乐队 Raucous Rockers
P2736 "破锣摇滚"乐队 Raucous Rockers 21通过 52提交 题目提供者该用户不存在 标签USACO 难度普及+/提高 提交 讨论 题解 最新讨论 暂时没有 ...
- 洛谷P1613 跑路
P1613 跑路 176通过 539提交 题目提供者该用户不存在 标签倍增动态规划 难度普及+/提高 提交该题 讨论 题解 记录 最新讨论 这个题的数据.. 题意问题 表意 题目描述 小A的工作不仅繁 ...
- Linux下搭建Lotus Domino集群
Linux下搭建Lotus Domino 集群 本文内容是Linux平台下Lotus Domino服务器部署案例(http://chenguang.blog.51cto.com/350944/1334 ...
- vba 快速定位当前EXCEL最后一栏
工作的需要,有时会对EXCEL数据进行处理,比如格式化,有数据的单元格画横线. 最初,傻傻的,直接用个循环从第1行,一直往后找,判断是否为空,真傻. Function FindLastCell() D ...
- PayPal 开发详解(一):注册PayPal帐号
1.注册paypal帐号 https://www.paypal.com 2.使用刚才注册的paypal帐号登录3.进入开发者中心 4.登录开发者中心 5.登录 查看我们paypal Sandbox测试 ...
- 七、Action动作类
七.Action动作类(一般用**Action结尾) 1.编写动作类的三种方式 动作类不实现.也不继承任何的接口和类.即动作类是一个非常普通的JavaBean. public class HelloA ...
- 在Qt中使用AnyCAD三维建模控件
AnyCAD C++ SDK专为Qt框架增加了AnyPlatformQt.lib模块,在Qt中使用AnyCAD三维建模控件变得十分简单. 下载 Qt高速下载:http://pan.baidu.com/ ...
- Objective-C介绍
概述 2007年苹果公司推出了Objective—C 2.0,它是Mac OS X和iOS开发的基础语言.
- Winform主窗体的设置
软件必然涉及到一个主窗体MainForm,下面介绍一下几个简单的属性设置,可能比较有用 (1)icon,当然是咱们软件的图标了,设置上去即可 (2)isMdiContainer,这个比较重要了哦,必须 ...