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
auth_strategy = keystone
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = True
notify_nova_on_port_status_changes = True
notify_nova_on_port_data_changes = True
nova_url = http://controller:8774/v2

[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = neutron
password = neutron

[database]
connection = mysql://neutron:[email protected]/neutron

[nova]
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
region_name = RegionOne
project_name = service
username = nova
password = nova

[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = openstack

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

[ml2]
type_drivers = flat,vlan,gre,vxlan
tenant_network_types = flat
mechanism_drivers = linuxbridge
[ml2_type_flat]
flat_networks = external
[securitygroup]
enable_security_group = True
enable_ipset = True
[linux_bridge]
physical_interface_mappings = external:eth1

nova需要添加配置,/etc/nova/nova.conf:

#添加配置
[DEFAULT]
security_group_api = neutron
linuxnet_interface_driver = nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver
[neutron]?
url = http://controller:9696
auth_strategy = keystone
admin_auth_url = http://controller:35357/v2.0
admin_tenant_name = service
admin_username = neutron
admin_password = neutron

初始化数据库:

[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

重启服务:

[email protected]:~# service nova-api restart

[email protected]:~#? service neutron-server restart

安装neutron-network

network节点环境配置:

[email protected]:~# vi /etc/sysctl.conf
net.ipv4.ip_forward=1?
net.ipv4.conf.all.rp_filter=0?
net.ipv4.conf.default.rp_filter=0

#如果有报错
[email protected]:~# vi /etc/modules
br_netfilter #添加

[email protected]:~# modprobe br_netfilter

[email protected]:~# sysctl -p

安装neutron

[email protected]:~# apt-get install neutron-plugin-ml2 neutron-plugin-linuxbridge-agent neutron-dhcp-agent neutron-metadata-agent -y

配置neutron-network

/etc/neutron/neutron.conf:

#在 [database] 部分,注释掉connection选项,网络不直接访问数据库
[DEFAULT]
router_distributed = False
rpc_backend = rabbit
auth_strategy = keystone
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = True
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = neutron
password = neutron
[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_password = openstack
rabbit_userid = openstack

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

[ml2]
type_drivers = flat,vlan,gre,vxlan
tenant_network_types = flat
mechanism_drivers = linuxbridge
[ml2_type_flat]
flat_networks = external
[securitygroup]
enable_security_group = True
enable_ipset = True
[linux_bridge]
physical_interface_mappings = external:eth1

/etc/neutron/dhcp_agent.ini:

[DEFAULT]
interface_driver = neutron.agent.linux.interface.BridgeInterfaceDriver
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
use_namespaces = True
dhcp_delete_namespaces = True
debug = True
dnsmasq_config_file = /etc/neutron/dnsmasq-neutron.conf
enable_isolated_metadata = True
enable_metadata_network = True

/etc/neutron/metadata_agent.ini:

[DEFAULT]
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_region = RegionOne
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = neutron
password = neutron?
nova_metadata_ip = controller
metadata_proxy_shared_secret = METADATA_SECRET

controller节点的/etc/nova/nova.conf追加配置,并重启nova-api服务:

[neutron]?
service_metadata_proxy = True
metadata_proxy_shared_secret = METADATA_SECRET

重启network节点相关服务:

[email protected]:~# /etc/init.d/neutron-neutron-dhcp-agent restart

[email protected]:~# /etc/init.d/neutron-metadata-agent restart

[email protected]:~# /etc/init.d/neutron-plugin-linuxbridge-agent restart

安装neutron-compute

compute节点环境配置:

[email protected]compute1:~# vi /etc/sysctl.conf
net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.default.rp_filter=0
net.bridge.bridge-nf-call-iptables=1
net.bridge.bridge-nf-call-ip6tables=1

#如果有报错
[email protected]:~# vi /etc/modules
br_netfilter #添加

[email protected]:~# modprobe br_netfilter

[email protected]:~# sysctl -p

安装neutron:

[email protected]:~# apt-get install neutron-plugin-ml2 neutron-plugin-linuxbridge-agent

配置neutron-compute

/etc/neutron/neutron.conf:

[DEFAULT]
rpc_backend = rabbit
auth_strategy = keystone
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = True
core_plugin = ml2
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = neutron
password = neutron
[oslo_messaging_rabbit]
rabbit_host = controller
rabbit_userid = openstack
rabbit_password = openstack

?/etc/neutron/plugins/ml2/ml2_conf.ini:

[ml2]
type_drivers = flat,vlan,gre,vxlan
tenant_network_types = flat
mechanism_drivers = linuxbridge
[ml2_type_flat]
flat_networks = external
[securitygroup]
enable_security_group = True
enable_ipset = True
[linux_bridge]
physical_interface_mappings = external:eth1

重启服务:

[email protected]:~# service nova-compute restart

[email protected]:~# /etc/init.d/neutron-plugin-linuxbridge-agent restart??

验证

在controller节点验证:

[email protected]:~# neutron agent-list?
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+
| id? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| agent_type? ? ? ? ?| host? ? ?| alive | admin_state_up | binary? ? ? ? ? ? ? ? ? ? |
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+
| 2127166d-8618-42ee-9735-0e62a9f43b21 | Linux bridge agent | network? | :-)? ?| True? ? ? ? ? ?| neutron-linuxbridge-agent |
| 28fd5729-3c7b-4674-9f99-9c679ad94a83 | Linux bridge agent | compute1 | :-)? ?| True? ? ? ? ? ?| neutron-linuxbridge-agent |
| a38e7e96-787c-49b5-a4e2-28c84051d084 | Metadata agent? ? ?| network? | :-)? ?| True? ? ? ? ? ?| neutron-metadata-agent? ? |
| b24fbd40-66d4-4266-af26-5a969ec40068 | DHCP agent? ? ? ? ?| network? | :-)? ?| True? ? ? ? ? ?| neutron-dhcp-agent? ? ? ? |
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+

原文地址:https://www.cnblogs.com/wshenjin/p/11365937.html

时间: 2024-08-01 16:18:12

OpenStack kilo版 Neutron部署的相关文章

OpenStack kilo版 Nova部署

部署在controller和compute节点 配置数据库 MariaDB [(none)]> CREATE DATABASE nova;? Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'nova';? ? ? ? Query OK, 0 rows affected (0.00 sec) MariaDB [(non

OpenStack kilo版 keystone部署

部署在controller节点 配置数据库 MariaDB [(none)]> CREATE DATABASE keystone; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'keystone'; Query OK, 0 rows affected (0.00 sec) MariaDB [(non

OpenStack kilo版 Glance部署

部署在controller节点 配置数据库 MariaDB [(none)]> CREATE DATABASE glance; Query OK, 1 row affected (0.01 sec) MariaDB [(none)]> GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'glance';? ? ? ? Query OK, 0 rows affected (0.00 sec) MariaDB [(none

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 kilo版 部署环境

虚拟机网络规划 管理网络: eth0, nat 192.168.31.0/24 外部网络: eth1, host only 192.168.32.0/24 数据网络: eth2, lan 192.168.33.0/24 节点规划 controller: 管理网络:eth0 192.168.31.10 外部网络:eth1 192.168.32.10 network: 管理网络:eth0 192.168.31.11 外部网络:eth1 192.168.32.11 数据网络:eth2 192.168.

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

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

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版(6) 启动第一台虚拟机

创建网络 提供者为external,类型为fla,网络名称为public,: [email protected]:~# neutron net-create --shared --provider:physical_network external? --provider:network_type flat public Created a new network: +---------------------------+------------------------------------

openstack【Kilo】汇总:包括20英文文档、各个组件新增功能及Kilo版部署

OpenStack Kilo版本发布 20英文文档OpenStack Kilo版本文档汇总:各个操作系统安装部署.配置文档.用户指南等文档 Kilo版部署 openstack[Kilo]入门 [准备篇]零:整体介绍 openstack[Kilo]入门 [准备篇]一: Ubuntu14.04远程连接(ssh安装) openstack[Kilo]入门 [准备篇]二:NTP安装 openstack[Kilo]入门 [准备篇]三:mysql(MariaDB)安装[控制节点] openstack[Kilo