#Neutron控制节点集群

openstack pike 部署 目录汇总 http://www.cnblogs.com/elvi/p/7613861.html

#.Neutron控制节点集群

#本实例网络配置方式是:公共网络(flat)
#官方参考 https://docs.openstack.org/neutron/pike/install/controller-install-rdo.html #创建Neutron数据库、用户认证,前面已设置
############以下全部在controller1执行 source ./admin-openstack.sh
# 创建Neutron服务实体,API端点
openstack service create --name neutron --description "OpenStack Networking" network
openstack endpoint create --region RegionOne network public http://controller:9696
openstack endpoint create --region RegionOne network internal http://controller:9696
openstack endpoint create --region RegionOne network admin http://controller:9696 #安装
yum install -y openstack-neutron openstack-neutron-ml2 \
openstack-neutron-linuxbridge python-neutronclient ebtables ipset #Neutron 备份配置
cp /etc/neutron/neutron.conf{,.bak2}
cp /etc/neutron/plugins/ml2/ml2_conf.ini{,.bak}
ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
cp /etc/neutron/plugins/ml2/linuxbridge_agent.ini{,.bak}
cp /etc/neutron/dhcp_agent.ini{,.bak}
cp /etc/neutron/metadata_agent.ini{,.bak}
cp /etc/neutron/l3_agent.ini{,.bak} Netname=ens37 #网卡名称
#配置
echo '
#
[neutron]
url = http://controller:9696
auth_url = http://controller: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
#'>>/etc/nova/nova.conf
#
echo '
[DEFAULT]
nova_metadata_ip = controller
metadata_proxy_shared_secret = metadata
#'>/etc/neutron/metadata_agent.ini
#
echo '#
[ml2]
tenant_network_types =
type_drivers = vlan,flat
mechanism_drivers = linuxbridge
extension_drivers = port_security
[ml2_type_flat]
flat_networks = provider
[securitygroup]
enable_ipset = True
#vlan
# [ml2_type_valn]
# network_vlan_ranges = provider::
#'>/etc/neutron/plugins/ml2/ml2_conf.ini
# provider:网卡名
echo '#
[linux_bridge]
physical_interface_mappings = provider:'$Netname'
[vxlan]
enable_vxlan = false
#local_ip = 10.2.1.20
#l2_population = true
[agent]
prevent_arp_spoofing = True
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
enable_security_group = True
#'>/etc/neutron/plugins/ml2/linuxbridge_agent.ini
#
echo '#
[DEFAULT]
interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true
#'>/etc/neutron/dhcp_agent.ini
#
echo '
[DEFAULT]
bind_port =
bind_host = controller1
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = true
transport_url = rabbit://openstack:openstack@controller
auth_strategy = keystone
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true [keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller1:
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron [nova]
auth_url = http://controller:35357
auth_type = password
project_domain_id = default
user_domain_id = default
region_name = RegionOne
project_name = service
username = nova
password = nova [database]
connection = mysql://neutron:neutron@controller:3306/neutron [oslo_concurrency]
lock_path = /var/lib/neutron/tmp
#'>/etc/neutron/neutron.conf
#
echo '
[DEFAULT]
interface_driver = linuxbridge
#'>/etc/neutron/l3_agent.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 #检测数据
mysql -h controller -u neutron -pneutron -e "use neutron;show tables;" #haproxy高可用配置
echo '
#Neutron_API
listen Neutron_API_cluster
bind controller:
balance source
option tcpka
option tcplog
server controller1 controller1: check inter rise fall
server controller2 controller2: check inter rise fall
server controller3 controller3: check inter rise fall
'>>/etc/haproxy/haproxy.cfg
systemctl restart haproxy.service
netstat -antp|grep haproxy #重启相关服务
systemctl restart openstack-nova-api.service #启动neutron
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
#
# echo "查看网络节点,正常是:控制节点3个ID,计算节点1个ID"
# openstack network agent list
# ############在controller2安装配置############
#安装
yum install -y openstack-neutron openstack-neutron-ml2 \
openstack-neutron-linuxbridge python-neutronclient ebtables ipset

#同步controller1配置并修改
Node=controller2
rsync -avzP -e 'ssh -p 22' controller1:/etc/nova/* /etc/nova/
rsync -avzP -e 'ssh -p 22' controller1:/etc/neutron/* /etc/neutron/
#sed -i 's/controller1/'$Node'/' /etc/nova/nova.conf
sed -i 's/controller1/'$Node'/' /etc/neutron/neutron.conf
rsync -avzP -e 'ssh -p 22' controller1:/etc/haproxy/* /etc/haproxy/


#重启相关服务
systemctl restart haproxy openstack-nova-api.service
#启动neutron
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


########controller3安装配置,同上

Neutron控制节点集群的更多相关文章

  1. 高可用OpenStack(Queen版)集群-9.Cinder控制节点集群

    参考文档: Install-guide:https://docs.openstack.org/install-guide/ OpenStack High Availability Guide:http ...

  2. 高可用OpenStack(Queen版)集群-6.Nova控制节点集群

    参考文档: Install-guide:https://docs.openstack.org/install-guide/ OpenStack High Availability Guide:http ...

  3. Nova控制节点集群

    #Nova控制节点集群 openstack pike 部署 目录汇总 http://www.cnblogs.com/elvi/p/7613861.html ##Nova控制节点集群 # control ...

  4. cinder控制节点集群

    #cinder控制节点集群 openstack pike 部署 目录汇总 http://www.cnblogs.com/elvi/p/7613861.html #cinder块存储控制节点.txt.s ...

  5. 高可用OpenStack(Queen版)集群-7.Neutron控制/网络节点集群

    参考文档: Install-guide:https://docs.openstack.org/install-guide/ OpenStack High Availability Guide:http ...

  6. kubernetes系列:(一)、kubeadm搭建kubernetes(v1.13.1)单节点集群

    kubeadm是Kubernetes官方提供的用于快速部署Kubernetes集群的工具,本篇文章使用kubeadm搭建一个单master节点的k8s集群. 节点部署信息 节点主机名 节点IP 节点角 ...

  7. CentOS7搭建hadoop2.6.4双节点集群

    环境: CentOS7+SunJDK1.8@VMware12. NameNode虚拟机节点主机名:master,IP规划:192.168.23.101,职责:Name node,Secondary n ...

  8. Hadoop学习笔记(两)设置单节点集群

    本文描写叙述怎样设置一个单一节点的 Hadoop 安装.以便您能够高速运行简单的操作,使用 Hadoop MapReduce 和 Hadoop 分布式文件系统 (HDFS). 參考官方文档:Hadoo ...

  9. Ambari安装之部署单节点集群

    前期博客 大数据领域两大最主流集群管理工具Ambari和Cloudera Manger Ambari架构原理 Ambari安装之Ambari安装前准备(CentOS6.5)(一) Ambari安装之部 ...

随机推荐

  1. Windows NT 之父 - David Cutler

    David Cutler,大卫·卡特勒,一位传奇程序员,1988年去微软前号称硅谷最牛的内核开发人员,是VMS和Windows NT的首席设计师,被人们成为“操作系统天神”.他曾供职于杜邦.DEC等公 ...

  2. js中的undefined 和null

    undefined是基本数据类型 表示未定义 缺少的意思 null是引用数据类型  是对象 表示空对象 undefined是从null派生出来的  所以undefined==null  true Ja ...

  3. java设计模式-工厂模式(springweb为例子)

    一般而言,工厂模式分为3种,简单工厂模式,工厂方法模式,抽象工厂模式.这三种工厂模式逐层深入吧. 一,从springWeb.jar包使用抽象工厂模式的一个例子聊起 之前对spring各种痴迷,所以在需 ...

  4. LeetCode 122. Best Time to Buy and Sell Stock II (买卖股票的最好时机之二)

    Say you have an array for which the ith element is the price of a given stock on day i. Design an al ...

  5. 如何用Android Studio同时使用SVN和Git管理项目

    这篇来讲讲如何在 Android Studio 上同时用 SVN 和 Git 来管理项目.我知道,你肯定会说我吃饱了撑着,没事找事做,为啥要同时用 SVN 和 Git 来管理项目.问题是,我也不想啊, ...

  6. VS2012 C#生成DLL并调用

    1.创建一个C#工程生成DLL 新建->项目->Visual C#->类库->MyMethods 项目建好后,为了理解,将项目中的Class1.cs 文件 重命名为 MySwa ...

  7. JavaNIO缓冲区

    package com.nio.test; import java.nio.ByteBuffer; import org.junit.Test; /** * * @author fliay * * 一 ...

  8. 用户需求与NABCD分析

    用户需求与NABCD分析 目录 项目简介 用户需求分析 调研途径 问卷情况说明 问卷反馈与分析 NABCD分析 Need 需求 Approach 途径 Benefit 好处 Competitors 竞 ...

  9. 一次触摸,Android到底干了啥

    WeTest 导读 当我们在写带有UI的程序的时候,如果想获取输入事件,仅仅是写一个回调函数,比如(onKeyEvent,onTouchEvent-.),输入事件有可能来自按键的,来自触摸的,也有来自 ...

  10. Linux系列教程(二十)——Linux的shell概述以及如何执行脚本

    从这篇博客开始,我们将进入Linux的shell脚本的学习,这对于Linux学习爱好者而言是特别重要的一节,也是特别有意思的一节,shell 脚本就像我们知道的Java,php类似的编程语言一样,通过 ...