一、base节点设置

mysql -u root -proot

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';

二、 ctrl节点设置

#运行环境变量

. admin-openrc

#创建neutron用户并添加角色

openstack user create --domain default --password NEUTRON_PASS neutron

openstack role add --project service --user neutron admin

#创建neutron服务并设置endpoint

openstack service create --name neutron --description "OpenStack Networking" network

openstack endpoint create --region RegionOne network public http://ctrl.test.com:9696

openstack endpoint create --region RegionOne network internal http://ctrl.test.com:9696

openstack endpoint create --region RegionOne network admin http://ctrl.test.com:9696

#安装neutron软件

yum install \

openstack-neutron \

openstack-neutron-ml2 \

openstack-neutron-linuxbridge \

ebtables -y

#编辑neutron配置文件

vim /etc/neutron/neutron.conf

[database]
connection = mysql+pymysql://neutron:NEUTRON_DBPASS@base.test.com/neutron [DEFAULT]
core_plugin = ml2
service_plugins =
#service_plugins = router
#allow_overlapping_ips = true
transport_url = rabbit://openstack:RABBIT_PASS@base.test.com
auth_strategy = keystone
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true [keystone_authtoken]
auth_uri = http://ctrl.test.com:5000
auth_url = http://ctrl.test.com:35357
memcached_servers = base.test.com:
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = NEUTRON_PASS [nova]
auth_url = http://ctrl.test.com:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = nova
password = NOVA_PASS [oslo_concurrency]
lock_path = /var/lib/neutron/tmp

#编辑ml2配置文件

vim /etc/neutron/plugins/ml2/ml2_conf.ini

[ml2]
type_drivers = flat,vlan,gre,vxlan,geneve
#type_drivers = flat,vlan,vxlan
tenant_network_types = flat,vlan,gre,vxlan,geneve
#tenant_network_types = vxlan
mechanism_drivers = linuxbridge
#mechanism_drivers = linuxbridge,l2population
extension_drivers = port_security [ml2_type_flat]
flat_networks = provider [securitygroup]
enable_ipset = true #[ml2_type_vxlan]
#vni_ranges = :

#编辑linuxbridge_agent配置文件

vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini

[linux_bridge]
physical_interface_mappings = provider:eth1 [vxlan]
enable_vxlan = false
#enable_vxlan = true
#local_ip = 172.16.2.52
#l2_population = true [securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

#编辑l3配置文件

#vim /etc/neutron/l3_agent.ini

[DEFAULT]
#interface_driver = linuxbridge

#编辑dhcp配置文件

vim /etc/neutron/dhcp_agent.ini

[DEFAULT]
interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true

#编辑metadata配置文件

vim /etc/neutron/metadata_agent.ini

[DEFAULT]
nova_metadata_host =ctrl.test.com
metadata_proxy_shared_secret = METADATA_SECRET

#编辑Nova配置文件

vim /etc/nova/nova.conf

[neutron]
url = http://ctrl.test.com:9696
auth_url = http://ctrl.test.com: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

#创建软连接

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

#启动服务

systemctl restart openstack-nova-api.service

systemctl restart neutron-server.service \

neutron-linuxbridge-agent.service \

neutron-dhcp-agent.service \

neutron-metadata-agent.service

systemctl enable neutron-server.service \

neutron-linuxbridge-agent.service \

neutron-dhcp-agent.service \

neutron-metadata-agent.service

#systemctl restart neutron-l3-agent.service

#systemctl enable neutron-l3-agent.service

#验证(计算节点配置完成再验证)

. admin-openrc

openstack extension list --network

openstack network agent list

三、 com计算节点配置

#安装软件

yum install openstack-neutron-linuxbridge ebtables ipset -y

#编辑neutron配置文件

vim /etc/neutron/neutron.conf

[DEFAULT]
transport_url = rabbit://openstack:RABBIT_PASS@base.test.com
auth_strategy = keystone [keystone_authtoken]
auth_uri = http://ctrl.test.com:5000
auth_url = http://ctrl.test.com:35357
memcached_servers = base.test.com:
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = NEUTRON_PASS [oslo_concurrency]
lock_path = /var/lib/neutron/tmp

#编辑桥接配置文件

vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini

[linux_bridge]
physical_interface_mappings = provider:eth0 [vxlan]
enable_vxlan = false
#enable_vxlan = true
#local_ip = 172.16.2.53
#l2_population = true [securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

#编辑Nova配置文件

vim /etc/nova/nova.conf

[neutron]
url = http://ctrl.test.com:9696
auth_url = http://ctrl.test.com:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = NEUTRON_PASS

#开启服务

systemctl restart openstack-nova-compute.service

systemctl restart neutron-linuxbridge-agent.service

systemctl enable neutron-linuxbridge-agent.service

注:配置文件中注释部分配置文件为创建L3路由网络使用的配置信息。未注释的配置信息为交换机网络。后续创建网络根据需要进行开启。注意,相同项保留一项即可。

openstack搭建之-neutron配置(11)的更多相关文章

  1. openstack搭建之-cinder配置(12)

    一. base节点配置 mysql -u root -proot CREATE DATABASE cinder; GRANT ALL PRIVILEGES ON cinder.* TO 'cinder ...

  2. openstack搭建之-nova配置(10)

    一. base节点设置数据库 mysql -u root -proot CREATE DATABASE nova_api; CREATE DATABASE nova; CREATE DATABASE ...

  3. openstack搭建之-glance配置(9)

    一. base节点配置 #设置数据库,创建glance数据库,并设置权限 mysql -u root -proot CREATE DATABASE glance; GRANT ALL PRIVILEG ...

  4. openstack搭建之-keystone配置(8)

    一. Base Node配置 mysql -uroot -proot CREATE DATABASE keystone GRANT ALL PRIVILEGES ON keystone.* to 'k ...

  5. openstack搭建之-horizon配置(14)

    一.ctrl控制节点安装horizon #安装软件yum install openstack-dashboard -y vim /etc/openstack-dashboard/local_setti ...

  6. OpenStack-Ocata版+CentOS7.6 云平台环境搭建 —7.网络服务Neutron配置

    网络服务Neutron本章节结束如何安装并配置网络服务(neutron)采用:ref:`provider networks <network1>`或:ref:`self-service n ...

  7. openstack网络(neutron)模式之GRE的基本原理

    neutron网络目的是为OpenStack云更灵活的划分网络,在多租户的环境下提供给每个租户独立的网络环境. neutron混合实施了第二层的VLAN和第三层的路由服务,它可为支持的网络提供防火墙, ...

  8. Openstack搭建(流水账)

    Openstack管理三大资源:1.网络资源2.计算资源3.存储资源 Keystone 做服务注册 Glance 提供镜像服务 Nova 提供计算服务 Nova scheduler决策虚拟主机创建在哪 ...

  9. OpenStack 安装:neutron服务

    在上一篇中介绍了Nova的安装配置,这一篇介绍neutron 首先,创建neutron用户并设置密码为neutron [root@linux-node1 ~]# openstack user crea ...

随机推荐

  1. [Linux] awk与posix字符集

    awk posix字符集[:alnum:] 文字数字字符[:alpha:] 文字字符[:digit:] 数字字符[:graph:] 非空字符(非空格.控制字符)[:lower:] 小写字符[:cntr ...

  2. C# 批量删除Word超链接

    对于Word文档中包含较多的超链接,如果一个个来删除很花费时间和精力,本篇文章将提供一种可用于批量删除Word中的超链接的方法.这里的超链接可以是页眉页脚处的超链接.正文中的超链接.表格中的超链接.文 ...

  3. Guava Cache 本地缓存组件浅析

    cache组件中核心的类和接口列举如下: 接口: Cache 本地缓存的顶级接口,提供一些对缓存进行get,put的方法,以及获取缓存统计数据的方法等. LoadingCache 继承了Cache接口 ...

  4. SDOI 2018划水记

    Day0 最后一天啦,此时不颓更待何时? 上午10:15坐车从gryz出发,在一路颓废中到了农大 不得不说,农大的宾馆真的好高档啊,壁橱里面居然有保险柜!电视柜厨子里居然有冰箱!!冰箱里居然有饮料!! ...

  5. Xamarin 学习笔记 - Page(页面)

    本文翻译自CodeProject文章:https://www.codeproject.com/Articles/1226447/Xamarin-Notes-Xamarin-Forms-Pages 转载 ...

  6. python闭包和装饰器

    本文目录: 1. 闭包的解析和用法 2. 函数式装饰器 3. 类装饰器 一.闭包 闭包是一种函数,从形式上来说是函数内部定义(嵌套)函数,实现函数的扩展.在开发过程中,考虑到兼容性和耦合度问题,如果想 ...

  7. MySQL 基础知识梳理学习(一)----系统数据库

    information_schema 此数据库是MySQL数据库自带的,主要存储数据库的元数据,保存了关于MySQL服务器维护的所有其他数据库的信息,如数据库名.数据库表.表列的数据类型及访问权限等. ...

  8. SQLServer之创建分区视图

    分区视图定义 分区视图是通过对成员表使用 UNION ALL 所定义的视图,这些成员表的结构相同,但作为多个表分别存储在同一个 SQL Server实例中,或存储在称为联合数据库服务器的自主 SQL ...

  9. mysql8.0版本修改密码

    登录之后使用如下命令: ALTER USER 'root'@'localhost' IDENTIFIED BY "你的新密码"; 还有不知是不是因为mysql版本问题,一开始设置的 ...

  10. Python爬虫实战之Requests+正则表达式爬取猫眼电影Top100

    import requests from requests.exceptions import RequestException import re import json # from multip ...