openstack-o版-neutron安装

Neutron 为整个 OpenStack 环境提供网络支持,包括二层交换,三层路由,负载均衡,防火墙和
VPN 等。Neutron 提供了一个灵活的框架,通过配置,无论是开源还是商业软件都可以被用来实现
这些功能。下面我们来搭建neutron服务。

创建数据库

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

创建neutron用户

[[email protected] ~]# openstack user create --domain default --password NEUTRON_PASS neutron

将admin角色添加到neutron项目中

[[email protected] ~]# openstack role add --project service --user neutron admin

创建neutron实体

[[email protected] ~]#  openstack service create --name neutron \
>   --description "OpenStack Networking" network

创建neutron的api

[[email protected] ~]# openstack endpoint create --region RegionOne \
>   network public http://wang02:9696

[[email protected] ~]#  openstack endpoint create --region RegionOne \
>   network internal http://wang02:9696

[[email protected] ~]# openstack endpoint create --region RegionOne \
>   network admin http://wang02:9696

下载neutron的安装包

[[email protected] ~]# yum install openstack-neutron openstack-neutron-ml2 \
>   openstack-neutron-linuxbridge ebtables -y

修改配置文件

<1> /etc/neutron/neutron.conf

[[email protected] ~]# sed -i ‘/^\[database\]$/a\
connection = mysql+pymysql://neutron:[email protected]/neutron‘ /etc/neutron/neutron.conf
[[email protected] ~]# sed -i ‘/^\[DEFAULT\]$/a\
core_plugin = ml2 \
service_plugins = \
transport_url = rabbit://openstack:[email protected] \
auth_strategy = keystone \
notify_nova_on_port_status_changes = true \
notify_nova_on_port_data_changes = true‘ /etc/neutron/neutron.conf
[[email protected] ~]# sed -i ‘/^\[keystone_authtoken\]$/a\
auth_uri = http://wang02:5000 \
auth_url = http://wang02:35357 \
memcached_servers = wang01:11211 \
auth_type = password \
project_domain_name = default \
user_domain_name = default \
project_name = service \
username = neutron \
password = neutron_pass‘ /etc/neutron/neutron.conf
[[email protected] ~]# sed -i ‘/^\[nova\]$/a\
auth_url = http://wang02:35357 \
auth_type = password \
project_domain_name = default \
user_domain_name = default \
region_name = RegionOne \
project_name = service \
username = nova \
password = nova_pass‘ /etc/neutron/neutron.conf
[[email protected] ~]# sed -i ‘/^\[oslo_concurrency\]$/a\
lock_path = /var/lib/neutron/tmp‘ /etc/neutron/neutron.conf

<2>/etc/neutron/plugins/ml2/ml2_conf.ini

[[email protected] ~]# cp /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugins/ml2/ml2_conf.ini.bak
[[email protected] ~]# cat /etc/neutron/plugins/ml2/ml2_conf.ini.bak | grep -v ^# | uniq > /etc/neutron/plugins/ml2/ml2_conf.ini

[[email protected] ~]# sed -i ‘/^\[ml2\]$/a\
type_drivers = flat,vlan,gre,vxlan,geneve \
tenant_network_types = flat,vlan,gre,vxlan,geneve \
mechanism_drivers = linuxbridge \
extension_drivers = port_security‘ /etc/neutron/plugins/ml2/ml2_conf.ini
[[email protected] ~]# sed -i ‘/^\[ml2_type_flat\]$/a\
flat_networks = provider‘ /etc/neutron/plugins/ml2/ml2_conf.ini
[[email protected] ~]# sed -i ‘/^\[securitygroup\]$/a\
enable_ipset = true‘ /etc/neutron/plugins/ml2/ml2_conf.ini


<3>/etc/neutron/dhcp_agent.ini

[[email protected] ~]# cp /etc/neutron/dhcp_agent.ini /etc/neutron/dhcp_agent.ini.bak
[[email protected] ~]# cat /etc/neutron/dhcp_agent.ini.bak | grep -v ^# | uniq > /etc/neutron/dhcp_agent.ini

[[email protected] ~]# sed -i ‘/^\[DEFAULT\]$/a\
interface_driver = linuxbridge \
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq \
enable_isolated_metadata = true‘ /etc/neutron/dhcp_agent.ini

<5>/etc/neutron/plugins/ml2/linuxbridge_agent.ini

[[email protected] ~]#cp /etc/neutron/plugins/ml2/linuxbridge_agent.ini /etc/neutron/plugins/ml2/linuxbridge_agent.ini.bak
[[email protected] ~]#cat /etc/neutron/plugins/ml2/linuxbridge_agent.ini.bak | grep -v ^# | uniq > /etc/neutron/plugins/ml2/linuxbridge_agent.ini

[[email protected] ~]#sed -i ‘/^\[linux_bridge\]$/a\
physical_interface_mappings = provider:eth0‘ /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[[email protected] ~]#sed -i ‘/^\[vxlan\]$/a\
enable_vxlan = false‘ /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[[email protected] ~]#sed -i ‘/^\[securitygroup\]$/a\
enable_security_group = true \
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver‘ /etc/neutron/plugins/ml2/linuxbridge_agent.ini

<4>/etc/neutron/metadata_agent.ini

[[email protected] ~]#cp /etc/neutron/metadata_agent.ini /etc/neutron/metadata_agent.ini.bak
[[email protected] ~]#cat /etc/neutron/metadata_agent.ini.bak | grep -v ^# | uniq > /etc/neutron/metadata_agent.ini

[[email protected] ~]#sed -i ‘/^\[DEFAULT\]$/a\
nova_metadata_ip = ctrl.ryb.edu \
metadata_proxy_shared_secret = metadata_secret‘ /etc/neutron/metadata_agent.ini

[[email protected] ~]#sed -i ‘/^\[neutron\]$/a\
url = http://ctrl.ryb.edu:9696 \
auth_url = http://ctrl.ryb.edu: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‘ /etc/nova/nova.conf

[[email protected] ~]#ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini

同步数据库

[[email protected] ~]# 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

重启NOVA服务

[[email protected] ~]# systemctl restart openstack-nova-api.service

启动NEUTRON服务
[[email protected] ~]# systemctl enable neutron-server.service \
neutron-linuxbridge-agent.service \
neutron-dhcp-agent.service \
neutron-metadata-agent.service

[[email protected] ~]# systemctl restart neutron-server.service \
neutron-linuxbridge-agent.service \
neutron-dhcp-agent.service \
neutron-metadata-agent.service

计算节点配置

下载安装包

[r[email protected] ~] yum install openstack-neutron-linuxbridge ebtables ipset

修改配置文件

[[email protected] ~] cp /etc/neutron/plugins/ml2/linuxbridge_agent.ini /etc/neutron/plugins/ml2/linuxbridge_agent.ini.bak
[[email protected] ~] cat /etc/neutron/plugins/ml2/linuxbridge_agent.ini.bak | grep -v ^# | uniq > /etc/neutron/plugins/ml2/linuxbridge_agent.ini

[[email protected] ~] sed -i ‘/^\[linux_bridge\]$/a\
physical_interface_mappings = provider:eth0‘ /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[[email protected] ~] sed -i ‘/^\[vxlan\]$/a\
enable_vxlan = false‘ /etc/neutron/plugins/ml2/linuxbridge_agent.ini
[[email protected] ~] sed -i ‘/^\[securitygroup\]$/a\
enable_security_group = true \
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver‘ /etc/neutron/plugins/ml2/linuxbridge_agent.ini

修改NOVA的配置文件

[[email protected] ~] sed -i ‘/^\[neutron\]$/a\
url = http://wang02:9696 \
auth_url = http://wang02:35357 \
auth_type = password \
project_domain_name = default \
user_domain_name = default \
region_name = RegionOne \
project_name = service \
username = neutron \
password = neutron_pass‘ /etc/nova/nova.conf

重启NOVA服务

[[email protected] ~] systemctl restart openstack-nova-compute.service

启动neutron服务
[[email protected] ~] systemctl enable neutron-linuxbridge-agent.service
[[email protected] ~] systemctl restart neutron-linuxbridge-agent.service

控制节点验证服务

[[email protected] ~]#  openstack network agent list

时间: 2024-09-28 06:19:19

openstack-o版-neutron安装的相关文章

openstack O版 Neutron网络服务

1.创建neutron数据库[[email protected] ~]# mysql -uroot -pdevopsWelcome to the MariaDB monitor. Commands end with ; or \g.Your MariaDB connection id is 94Server version: 10.1.20-MariaDB MariaDB ServerCopyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab

OpenStack kilo版 Neutron部署

在 controller节点.network节点.compute节点部署 安装neutron-server [email protected]:~# apt-get install neutron-server neutron-plugin-ml2 python-neutronclient 配置neutron-server /etc/neutron/neutron.conf: [DEFAULT] router_distributed = False rpc_backend = rabbit au

openstack M 版 neutron网络组件基础入门

在我们openstack学习当中,网络组件neutron无疑是令很多人很难理解的,可以说要深入理解 了neutron组件,你基本完成了openstack 60%的学习,存储方面只要不涉及到分布式,剩下的基本都比较简单了 相信很多人第一次看到这种图的时候都会被吓一跳,没错,这就是openstack  neutron组件里面涉及到的数据流程,里面涉及到的知识点很多很多 Openstack网络模型中的几个概念网络: Management Network: 管理网络,连接所有节点. External N

OpenStack(i版)之Keystone,Glance,Nova,Neutron,Horizon

一.前期准备 1.1.linux-node1端: [[email protected]1 ~]# egrep '(vmx|svm)' /proc/cpuinfo ##有输出就支持虚拟化 [[email protected] ~]# cat /etc/redhat-release CentOS release 6.8 (Final) [[email protected] ~]# uname -r 2.6.32-642.el6.x86_64 [[email protected] ~]# getenf

OpenStack pike版 安装openstack服务(4) 续安装openstack服务(3) &nbsp; &nbsp;

Compute service overview 计算服务概述 OpenStack用于对主机的计算和管理云计算系统.OpenStack的计算是一个基础设施即服务(IaaS)系统的一个重要组成部分.主要模块是用python实现的. OpenStack计算与OpenStack身份验证交互用来完成认证:OpenStack镜像服务用于磁盘和服务器镜像:用户和管理接口为OpenStack Dashboard.镜像访问受到项目和用户的限制,每个项目的配额是有限的(例如,实例的数量).OpenStack计算可

OpenStack pike版 安装openstack服务(5) 续安装openstack服务(4)

网络服务简介 OpenStack网络(neutron)允许您创建和将其他OpenStack服务管理的接口设备附加到网络中.插件可以适应不同的网络设备和软件,为OpenStack的架构和部署提供灵活性. 它包括以下组件: neutron-server:接受并将API请求路由到相应的OpenStack网络插件以进行操作. OpenStack Networking plug-ins and agent:即插即用端口,创建网络或者子网,提供IP地址.这些插件和代理根据特定云使用的供应商和技术而有所不同.

OpenStack Kilo版加CEPH部署手册

OpenStack Kilo版加CEPH部署手册 作者: yz联系方式: QQ: 949587200日期: 2015-7-13版本: Kilo 转载地址: http://mp.weixin.qq.com/s__biz=MzAxOTAzMDEwMA==&mid=209225237&idx=1&sn=357afdabafc03e8fb75eb4e1fb9d4bf9&scene=5&ptlang=2052&ADUIN=724042315&ADSESSION

openstack I版的搭建三--Nova

安装Nova [[email protected] src]# cd ~ [[email protected] ~]# cd /usr/local/src/nova-2014.1 [[email protected] nova-2014.1]# python setup.py install [[email protected] nova]# pwd /usr/local/src/nova-2014.1/etc/nova [ro[email protected] nova]# ll 总用量 48

CentOS7.2非HA分布式部署Openstack Pike版 (实验)

部署环境 一.组网拓扑 二.设备配置 笔记本:联想L440处理器:i3-4000M 2.40GHz内存:12G虚拟机软件:VMware? Workstation 12 Pro(12.5.2 build-4638234) 三.虚拟机配置 Controller节点:系统:CentOS7.2 64位(最小化安装)处理器:4核内存:4G硬盘:100G网卡:3块 Compute节点:系统:CentOS7.2 64位(最小化安装)处理器:4核内存:4G硬盘:100G网卡:3块 Cinder节点:系统:Cen