一、数据库配置(控制节点)
创建数据库以及用户:
# mysql -uroot -p12345678
MariaDB [(none)]> CREATE DATABASE neutron;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'neutron123';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'neutron123';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit;

二、创建认证信息(控制节点)
先生效一下环境变量,之后创建neutron用户:
# openstack user create --domain default --password=neutron neutron #此处密码我设置了neutorn

将neutron加入到admin组和service项目
# openstack role add --project service --user neutron admin

创建网络项目:
# openstack service create --name neutron --description "OpenStack Networking" network

创建endpoint,将网络服务端口信息注册到认证服务:    
# openstack endpoint create --region RegionOne \
network public http://10.10.11.13:9696
# openstack endpoint create --region RegionOne \
network internal http://10.10.11.13:9696
# openstack endpoint create --region RegionOne \
network admin http://10.10.11.13:9696

三、安装二层简单网络(网络节点)
执行安装包:
# yum install openstack-neutron openstack-neutron-ml2 openstack-neutron-linuxbridge ebtables -y

编辑配置文件:neutron.conf
# vim /etc/neutron/neutron.conf
[database]
connection = mysql+pymysql://neutron:neutron123@10.10.11.11/neutron
[DEFAULT]
core_plugin = ml2
service_plugins = router
transport_url = rabbit://openstack:openstack123@10.10.11.11
auth_strategy = keystone
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true
[keystone_authtoken]
auth_uri = http://10.10.11.11:5000
auth_url = http://10.10.11.11:35357
memcached_servers = 10.10.11.11:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron
[nova]
auth_url = http://10.10.11.11:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = nova
password = nova123
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp

编辑ml2_conf.ini文件配置二层插件
# vim /etc/neutron/plugins/ml2/ml2_conf.ini
[ml2]
type_drivers = flat,vlan,gre,vxlan,geneve
tenant_network_types = vlan,gre,vxlan,geneve
mechanism_drivers = linuxbridge
extension_drivers = port_security
[ml2_type_flat]
flat_networks = phynet1 #随便起个名字
[securitygroup]
enable_ipset = true

编辑linuxbridge_agent.ini文件配置linux bridge插件:
# vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = phynet1:eth1 #第二张网卡网卡名
[vxlan]
enable_vxlan = false
[securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

确认内核支持网桥filters并作如下设置,修改为以下内容:
# vim /usr/lib/sysctl.d/00-system.conf
net.bridge.bridge-nf-call-iptables=1
net.bridge.bridge-nf-call-ip6tables=1
生效sysctl -p

编辑/etc/neutron/dhcp_agent.ini    
# vim /etc/neutron/dhcp_agent.ini
[DEFAULT]
interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true

编辑/etc/neutron/metadata_agent.ini
# vim /etc/neutron/metadata_agent.ini
[default]
nova_metadata_host = 10.10.11.11
metadata_proxy_shared_secret = neutron

四、在控制节点nova配置neutron
控制节点执行:
编辑/etc/nova/nova.conf,添加neutron内容:
# vim /etc/nova/nova.conf
[neutron]
url = http://10.10.11.13:9696
auth_url = http://10.10.11.11: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 = 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

控制节点:
# 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

# systemctl status neutron-server.service \
neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
neutron-metadata-agent.service

五、计算节点安装网络服务
计算节点安装软件包:
# yum install openstack-neutron-linuxbridge ebtables ipset -y
修改配置文件:
# vim /etc/neutron/neutron.conf
[DEFAULT]
transport_url = rabbit://openstack:openstack123@10.10.11.11
auth_strategy = keystone
[keystone_authtoken]
auth_uri = http://10.10.11.11:5000
auth_url = http://10.10.11.11:35357
memcached_servers = 10.10.11.11:11211
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

修改linuxbridge_agent.ini
# vim /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[linux_bridge]
physical_interface_mappings = phynet1:eth1
[vxlan]
enable_vxlan = false
[securitygroup]
enable_security_group = true
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver

配置nova 使用neutron,
# vim /etc/nova/nova.conf
[neutron]
url = http://10.10.11.13:9696
auth_url = http://10.10.11.11:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron

确认内核支持网桥filters并作如下设置
# vim /usr/lib/sysctl.d/00-system.conf
net.bridge.bridge-nf-call-iptables=1
net.bridge.bridge-nf-call-ip6tables=1

生效:
# sysctl -p

重启服务:
# systemctl restart openstack-nova-compute.service
# systemctl status  openstack-nova-compute.service

启动服务:    
# systemctl status  openstack-nova-compute.service
# systemctl start  neutron-linuxbridge-agent.service
# systemctl status neutron-linuxbridge-agent.service

六、控制节点验证
设置admin环境变量
执行命令验证是否成功启动neutron-server
# openstack extension list --network

执行命令列出插件,验证网络插件是否成功启动
# openstack network agent list

S1_搭建分布式OpenStack集群_08 网络服务(neutron)安装部署的更多相关文章

  1. S1_搭建分布式OpenStack集群_07 nova服务配置 (计算节点)

    一.服务安装(计算节点)安装软件:# yum install openstack-nova-compute -y 编辑/etc/nova/nova.conf文件并设置如下内容:# vim /etc/n ...

  2. S1_搭建分布式OpenStack集群_06 nova服务配置 (控制节点)

    一.创建数据库(控制节点)创建数据库以及用户:# mysql -uroot -p12345678MariaDB [(none)]> CREATE DATABASE nova_api;MariaD ...

  3. S1_搭建分布式OpenStack集群_03 Mysql、MQ、Memcached、ETCD安装配置

    一.安装mysql(contorller)controller ~]# yum -y install mariadb mariadb-server python2-PyMySQL 配置my.cnf文件 ...

  4. S1_搭建分布式OpenStack集群_02 虚拟机环境配置

    一.配置主机名及hosts和防火墙(只演示一台,其他机器配置方式一样)vim /etc/hosts  加入    10.10.11.11 controller10.10.11.12 compute11 ...

  5. S1_搭建分布式OpenStack集群_01 准备虚拟机

    Openstack版本:openstack-queen 版本 一.环境准备 网络规划: Management + API Network:10.10.11.0/24 eth1    网桥:br1 VM ...

  6. S1_搭建分布式OpenStack集群_11 虚拟机创建

    一.创建网络环境环境变量生效一下创建一个网络:# openstack network create --share --external \--provider-physical-network ph ...

  7. S1_搭建分布式OpenStack集群_10 cinder 存储节点配置

    一.安装配置lvm2安装LVM包:# yum install -y lvm2 启动LVM元数据服务,并将其配置为在系统启动时启动:# systemctl enable lvm2-lvmetad.ser ...

  8. S1_搭建分布式OpenStack集群_09 cinder 控制节点配置

    一.创建数据库创建数据库以及用户:# mysql -uroot -p12345678MariaDB [(none)]> CREATE DATABASE cinder;MariaDB [(none ...

  9. S1_搭建分布式OpenStack集群_05 glance安装配置

    一.基本简介         镜像服务(glance)使用户能够发现,注册和检索虚拟机镜像. 它提供了一个REST API,使您可以查询虚拟机镜像元数据并检索实际镜像. 您可以将通过镜像服务提供的虚拟 ...

随机推荐

  1. 读文件时出现这个错误 'utf-8' codec can't decode byte 0xba in position 21: invalid start byte

    ''' file2 文件内容: 很任性wheniwasyoung ''' 源代码: f = open("file2",'r',encoding="utf-8") ...

  2. git 学习笔记 --多人协作

    当你从远程仓库克隆时,实际上Git自动把本地的master分支和远程的master分支对应起来了,并且,远程仓库的默认名称是origin. 要查看远程库的信息,用git remote: $ git r ...

  3. Actions require unique method/path combination for Swagger

    原文:Actions require unique method/path combination for Swagger services.AddSwaggerGen (c => { c.Re ...

  4. Visual Studio 2019 安装

    目录 写在前面 官网下载 安装 等待安装 启动 写在前面 目前工作的开发环境还是旧版本的Visual Studio 2013版.个人感觉还是有点跟不上时代更新迭代的节奏了.毕竟,技术在进步.如果我们也 ...

  5. rabbitmq监控之消息确认ack

    rabbitmq springboot ack 监控 一.测试环境 二.启动测试 一直以来,学习rabbitmq都是跟着各种各样的教程.博客.视频和文档,撸起袖子就是干!!!最后,也成功了. 当然,成 ...

  6. P2613 【模板】有理数取余 (数论)

    题目 P2613 [模板]有理数取余 解析 简单的数论题 发现并没有对小数取余这一说,所以我们把原式化一下, \[(c=\frac{a}{b})\equiv a\times b^{-1}(mod\ p ...

  7. 使用cmd命令行登录mysql并查看mysql状态

    直接上代码,打开cmd命令窗口,进入mysql的安装目录(例如:cd  D:/lnmp/bin/mysql/mysql5.7.11/bin)输入: #mysql -u root -p Enter pa ...

  8. 原油petrolaeum石油 Archaic spelling of petroleum

    petrolaeum (uncountable) Archaic spelling of petroleum petroleum See also: Petroleum Contents [hide] ...

  9. Nginx proxy_set_header

    配置示例 server{ server_name aaa.com location /api { proxy_pass http://xxx.com/api; proxy_set_header Hos ...

  10. Gtest:死亡测试

    转自:玩转Google开源C++单元测试框架Google Test系列(gtest)之五 - 死亡测试 一.前言 “死亡测试”名字比较恐怖,这里的“死亡”指的的是程序的崩溃.通常在测试过程中,我们需要 ...