neutron组件安装分为控制节点和计算节点,还是先从控制节点安装

1、前提条件,数据库为nova创建库和账户密码来连接数据库

# mysql -u root -p
MariaDB [(none)]> CREATE DATABASE neutron;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'neutron';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'neutron';

2、向keystone验明身份

# source admin-openrc

3、创建neutron用户:

# openstack user create --domain default --password-prompt neutron
设定密码:neutron

将admin角色添加到neutron用户上:
# openstack role add --project service --user neutron admin
创建neutron服务实体:
# openstack service create --name neutron --description "OpenStack Networking" network

创建网络服务API endpoints:
# openstack endpoint create --region RegionOne network public http://192.168.101.10:9696
# openstack endpoint create --region RegionOne network internal http://192.168.101.10:9696
# openstack endpoint create --region RegionOne network admin http://192.168.101.10:9696
配置网络选项:
  有两种网络选项:
  1、provider (external) networks(供应商网络)
  2、self-service networks(私有自助网络)
这里以provider networks作为示例演示,以后会推出第二种网络模式
开始进行安装网络组件:
# yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables
然后进行配置数据库、认证、消息队列等信息:编辑配置文件/etc/neutron/neutron.conf
[database]
connection = mysql+pymysql://neutron:neutron@192.168.101.10/neutron [DEFAULT]
core_plugin = ml2
service_plugins =
transport_url = rabbit://openstack:openstack@192.168.101.10
auth_strategy = keystone
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true
启用ml2插件并disable additional plug-ins [keystone_authtoken]
auth_uri = http://192.168.101.10:5000
auth_url = http://192.168.101.10:35357
memcached_servers = 192.168.101.10:
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron [nova]
auth_url = http://192.168.101.10:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = nova
password = nova [oslo_concurrency]
lock_path = /var/lib/neutron/tmp
配置模块layer2 插件信息:修改配置文件/etc/neutron/plugins/ml2/ml2_conf.ini
[ml2]
type_drivers = flat,vlan
tenant_network_types = 取消self-service networks
mechanism_drivers = linuxbridge 启用Linux bridge mechanism
extension_drivers = port_security 启用the port security extension driver [ml2_type_flat]
flat_networks = provider [securitygroup]
enable_ipset = true
配置Linux桥接agent:修改/etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = provider:PROVIDER_INTERFACE_NAME
Replace PROVIDER_INTERFACE_NAME with the name of the underlying provider physical network interface(底层提供商物理网络接口的名称也就是ens33)
node1的底层物理网卡设备为ens33,所以这里设置为这个 [vxlan]
enable_vxlan = false [securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
配置dhcp agent:修改/etc/neutron/dhcp_agent.ini
[DEFAULT]
interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true
上面总共修改了下面四种配置文件:
# vim /etc/neutron/neutron.conf
# vim /etc/neutron/plugins/ml2/ml2_conf.ini
# vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini
# vim /etc/neutron/dhcp_agent.ini
配置完了网络服务后,然后开启配置metadata agent:
修改配置文件:/etc/neutron/metadata_agent.ini
[DEFAULT]
nova_metadata_ip = 192.168.101.10
metadata_proxy_shared_secret = METADATA_SECRET
(使用neutron或者matadata或者其他都可以,保持和下面一直,这是自定义的密钥),这里采用neutron,Replace METADATA_SECRET with a suitable secret for the metadata proxy.
配置计算服务能够使用网络服务:修改/etc/nova/nova.conf
[neutron]
url = http://192.168.101.10:9696
auth_url = http://192.168.101.10:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron
service_metadata_proxy = true
metadata_proxy_shared_secret = METADATA_SECRET(使用neutron或者matadata都可以,保持和上面一直),由于上面设置的neutron,这里也是neutron
进行链接:
# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
向数据库填充数据:
# 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

Restart the Compute API service:
# systemctl restart openstack-nova-api.service
开启网络服务:
# 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
 
2、在计算节点上安装网络服务:
1、安装组件:
# yum install openstack-neutron-linuxbridge ebtables ipset
2、配置通用组件:修改/etc/neutron/neutron.conf
[DEFAULT]
transport_url = rabbit://openstack:openstack@192.168.101.10
auth_strategy = keystone [keystone_authtoken]
auth_uri = http://192.168.101.10:5000
auth_url = http://192.168.101.10:35357
memcached_servers = 192.168.101.10:
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron [oslo_concurrency]
lock_path = /var/lib/neutron/tmp
和控制节点一样,配置网络服务(两种网络服务选择其中一个,以provider networks为例)
3、配置provider networks
配置桥接agent:修改文件/etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = provider:PROVIDER_INTERFACE_NAME
Replace PROVIDER_INTERFACE_NAME with the name of the underlying provider physical network interface.(底层提供商物理网络接口的名称也就是ens33)node2的底层物理网卡设备为ens33,所以这里设置为这个
在[vxlan]配置如下:
[vxlan]
enable_vxlan = false [securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
4、配置计算服务去使用网络服务:/etc/nova/nova.conf
[neutron]
url = http://192.168.101.10:9696
auth_url = http://192.168.101.10:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron
然后重启计算服务:
# systemctl restart openstack-nova-compute.service
开启bridge agent:
# systemctl enable neutron-linuxbridge-agent.service
# systemctl start neutron-linuxbridge-agent.service
以上操作完成后,网络服务neutron就安装完成了
 
校验neutron的安装:在控制节点上执行
# source admin-openrc
List loaded extensions to verify successful launch of the neutron-server process: # openstack extension list --network
针对网络:provider networks的校验:
  List agents to verify successful launch of the neutron agents:
# openstack network agent list

至此neutron基于provider networks这样的网络服务就搭建成功了
 
安装neutron修改了哪些配置文件:
控制节点:
/etc/neutron/neutron.conf
/etc/neutron/plugins/ml2/ml2_conf.ini
/etc/neutron/plugins/ml2/linuxbridge_agent.ini
/etc/neutron/dhcp_agent.ini
/etc/neutron/metadata_agent.ini
/etc/nova/nova.conf
计算节点:
/etc/neutron/neutron.conf
/etc/neutron/plugins/ml2/linuxbridge_agent.ini
/etc/nova/nova.conf

照着官网来安装openstack pike之neutron安装的更多相关文章

  1. 照着官网来安装openstack pike之nova安装

    nova组件安装分为控制节点和计算节点,还是先从控制节点安装 1.前提条件,数据库为nova创建库和账户密码来连接数据库 # mysql -u root -p MariaDB [(none)]> ...

  2. 照着官网来安装openstack pike之keystone安装

    openstack基础环境安装完成后,现在开启安装keystone服务(在控制节点上执行下面所有操作) 1.为keystone创建数据库 mysql -u root -p MariaDB [(none ...

  3. 照着官网来安装openstack pike之glance安装

    镜像服务image service(glance)的安装还是在控制节点上进行: 1.前提条件,数据库为glance创建库和账户密码来连接数据库 # mysql -u root -p MariaDB [ ...

  4. 照着官网来安装openstack pike之创建并启动instance

    有了之前组件(keystone.glance.nova.neutron)的安装后,那么就可以在命令行创建并启动instance了 照着官网来安装openstack pike之environment设置 ...

  5. openstack pike 单机 一键安装 shell

    #openstack pike 单机  centos 一键安装 shell #openstack pike 集群高可用  安装部署 汇总 http://www.cnblogs.com/elvi/p/7 ...

  6. 照着官网来安装openstack pike之environment设置

    安装openstack前的准备环境: 两个centos7系统的环境:192.168.101.10 node1,192.168.101.11 node2 控制节点node1,计算节点node2 1.统一 ...

  7. 照着官网来安装openstack pike之安装dashboard

    上文提到了利用命令行下使用openstack的命令来创建虚拟机,这里选择安装dashboard来安装基于web界面的openstack平台 利用dashboard界面来创建虚拟机 dashboard这 ...

  8. Devstack 安装OpenStack Pike版本(单机环境)

    问题背景 最近在研究OpenStack的时候,需要对其源代码进行调试,公司服务器上部署的OpenStack环境又不能随意的进行折腾,为了研究的持续性和方便性,就决定再自己的虚拟机上面使用Devstac ...

  9. CentOS7安装OpenStack(Rocky版)-06.安装Neutron网络服务(控制节点)

    上一章介绍了独立的nova计算节点的安装方法,本章分享openstack的网络服务neutron的安装配制方法 ------------------- 完美的分割线 ----------------- ...

随机推荐

  1. ORA-01078错误解决办法

    ORA-01078: failure in processing system parameters & LRM-00109: could not open parameter file 安装 ...

  2. 【BZOJ3416】Poi2013 Take-out 栈

    [BZOJ3416]Poi2013 Take-out Description 小F喜欢玩一个消除游戏——take-out 保证k+1|n,保证输入数据有解这是一个单人游戏 游戏者的目标是消除初始时给定 ...

  3. 如何激励用户为你的app评分?

    如何激励用户为你的app评分? 2014-04-10 16:21 编辑: suiling 分类:营销推广 来源:CocoaChina  0 7247 应用设计应用评分 招聘信息: IOS兼职 深圳创业 ...

  4. ios iphone、ipad启动画面尺寸

    以下是iphone.ipad启动画面的尺寸 iphone4(纵):320 x 480 iphone4 Retina(纵):640 x 960   iphone5(纵):320 x 568 iphone ...

  5. js 函数递归优化,arguments.callee 优化

    函数递归是个经典的问题,平常用的时候,小练习可以通过函数名来反复调用,比如: function factorial(num) { if (num <= 1) { return 1; } else ...

  6. 160229-01、web页面常用功能js实现

    web页面常用功能js实现   1.网页未加载时弹出新窗口 <body onunload="window.open('http://www.a68.cn');">< ...

  7. HDU 2157 How many ways??(简单线性DP | | 矩阵快速幂)

    题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=2157 这道题目很多人的题解都是矩阵快速幂写的,矩阵快速幂倒是麻烦了许多了.先给DP的方法 dp[i][ ...

  8. NGINX优化参数

    (1)nginx运行工作进程个数,一般设置cpu的核心或者核心数x2 如果不了解cpu的核数,可以top命令之后按1看出来,也可以查看/proc/cpuinfo文件 grep ^processor / ...

  9. Zipline入门教程

    Zipline Beginner Tutorial Basics 基础 Zipline is an open-source algorithmic trading simulator written ...

  10. python - 2 8 16进制/颜色/字符编码

    1.二进制 八进制 十六进制 二进制: bin() 0b10010八进制: oct() 0o10十进制: 1-100十六进制: hex() 0X53 BH 十进制转2, 8,16进制: >> ...