#Nova控制节点集群

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

##Nova控制节点集群
# controller 安装 #########以下在controller1执行
#创建Nova数据库、用户、认证,前面已设置
source ./admin-openstack.sh || { echo "加载前面设置的admin-openstack.sh环境变量脚本";exit; } # keystone上服务注册 ,创建nova用户、服务、API
# nova用户前面已建
openstack service create --name nova --description "OpenStack Compute" compute
openstack endpoint create --region RegionOne compute public http://controller:8774/v2.1
openstack endpoint create --region RegionOne compute internal http://controller:8774/v2.1
openstack endpoint create --region RegionOne compute admin http://controller:8774/v2.1
#创建placement用户、服务、API
openstack user create --domain default --password=placement placement
openstack role add --project service --user placement admin
openstack service create --name placement --description "Placement API" placement
openstack endpoint create --region RegionOne placement public http://controller:8778
openstack endpoint create --region RegionOne placement internal http://controller:8778
openstack endpoint create --region RegionOne placement admin http://controller:8778
#
#openstack endpoint delete id? ## 安装nova控制节点
yum install -y openstack-nova-api openstack-nova-conductor \
openstack-nova-console openstack-nova-novncproxy \
openstack-nova-scheduler openstack-nova-placement-api
#
cp /etc/nova/nova.conf{,.bak}
# #nova控制节点配置
echo '#
[DEFAULT]
[DEFAULT]
my_ip = controller1
use_neutron = True
osapi_compute_listen = controller1
osapi_compute_listen_port =
metadata_listen = controller1
metadata_listen_port=
firewall_driver = nova.virt.firewall.NoopFirewallDriver
enabled_apis = osapi_compute,metadata
transport_url = rabbit://openstack:openstack@controller:5673 [api_database]
connection = mysql+pymysql://nova:nova@controller/nova_api
[database]
connection = mysql+pymysql://nova:nova@controller/nova [api]
auth_strategy = keystone [keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller1:,controller2:,controller3:
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = nova [vnc]
enabled = true
vncserver_listen = $my_ip
vncserver_proxyclient_address = $my_ip
novncproxy_host=$my_ip
novncproxy_port= [glance]
api_servers = http://controller:9292
[oslo_concurrency]
lock_path = /var/lib/nova/tmp [placement]
os_region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://controller:35357/v3
username = placement
password = placement [scheduler]
discover_hosts_in_cells_interval = [cache]
enabled = true
backend = oslo_cache.memcache_pool
memcache_servers = controller1:,controller2:,controller3:
#'>/etc/nova/nova.conf echo " #Placement API
<Directory /usr/bin>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
">>/etc/httpd/conf.d/00-nova-placement-api.conf
systemctl restart httpd
sleep #同步数据库
su -s /bin/sh -c "nova-manage api_db sync" nova
su -s /bin/sh -c "nova-manage cell_v2 map_cell0" nova
su -s /bin/sh -c "nova-manage cell_v2 create_cell --name=cell1 --verbose" nova
su -s /bin/sh -c "nova-manage db sync" nova #检测数据
nova-manage cell_v2 list_cells
mysql -h controller -u nova -pnova -e "use nova_api;show tables;"
mysql -h controller -u nova -pnova -e "use nova;show tables;"
mysql -h controller -u nova -pnova -e "use nova_cell0;show tables;" #更改默认端口8778给集群VIP使用
sed -i 's/8778/9778/' /etc/httpd/conf.d/-nova-placement-api.conf
systemctl restart httpd #haproxy高可用配置
echo '
##nova_compute
listen nova_compute_api_cluster
bind controller:
balance source
option tcpka
option httpchk
option tcplog
server controller1 controller1: check inter rise fall
server controller2 controller2: check inter rise fall
server controller3 controller3: check inter rise fall
#Nova-api-metadata
listen Nova-api-metadata_cluster
bind controller:
balance source
option tcpka
option httpchk
option tcplog
server controller1 controller1: check inter rise fall
server controller2 controller2: check inter rise fall
server controller3 controller3: check inter rise fall
#nova_placement
listen nova_placement_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 netstat -antp|egrep '8774|8778|6080' #开机自启动
systemctl enable openstack-nova-api.service \
openstack-nova-consoleauth.service openstack-nova-scheduler.service \
openstack-nova-conductor.service openstack-nova-novncproxy.service
#启动服务
systemctl start openstack-nova-api.service \
openstack-nova-consoleauth.service openstack-nova-scheduler.service \
openstack-nova-conductor.service openstack-nova-novncproxy.service #查看节点
#nova service-list
openstack catalog list
nova-status upgrade check
openstack compute service list #########在controller2节点安装配置
# 安装nova控制节点
yum install -y openstack-nova-api openstack-nova-conductor \
openstack-nova-console openstack-nova-novncproxy \
openstack-nova-scheduler openstack-nova-placement-api

#同步controller1配置并修改
rsync -avzP -e 'ssh -p 22' controller1:/etc/nova/* /etc/nova/
rsync -avzP -e 'ssh -p 22' controller1:/etc/httpd/conf.d/00-nova-placement-api.conf /etc/httpd/conf.d/
rsync -avzP -e 'ssh -p 22' controller1:/etc/haproxy/* /etc/haproxy/
sed -i '1,9s/controller1/controller2/' /etc/nova/nova.conf


#开机自启动,启动服务nova服务 ,同上
#重启服务
systemctl restart httpd haproxy


#########controller3节点安装配置
#同controller2一样,只是替换不同 sed -i 's/controller1/controller3/' /etc/nova/nova.conf


#nova-manage cell_v2 delete_cell --cell_uuid b736f4f4-2a67-4e60-952a-14b5a68b0f79
# #发现计算节点,新增计算节点时执行
#su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova

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

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

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

  2. Neutron控制节点集群

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

  3. cinder控制节点集群

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

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

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

  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. 读书笔记之《深入理解Java虚拟机》不完全学习总结

    写在前面: 之所以称作不完全总结,因为我其实没有完完全全地看完此书,但是涵盖了大部分重要章节:同时以下总结是我自己认为很重要知识,细枝末节处难免遗漏,还请详细参考原著. 转载请注明原文出处:http: ...

  2. WPF获得全局窗体句柄,并响应全局键盘事件

    场景 wpf窗体运行后,只能捕获当前Active窗体的按键事件,如果要监听windows全局事件,并对当前窗口事件响应. 第一步:导入Winows API public class Win32 { [ ...

  3. 最新版multer1.3.0上传文件

    完整项目资源下载路径:http://download.csdn.net/detail/qq_28506819/9851744 使用方法: cd到跟目录,然后npm install. 运行项目,npm ...

  4. Appium python自动化测试系列之混合app实战(十一)

    12.1 什么是混合App 12.1.1 混合app定义 什么是混合app,其实这个不言而喻,我们的app正常来说应该都是native的,但是实际工作中却不是,反正种种原因我们的app会有native ...

  5. LNK4098: 默认库“MSVCRT”与其他库的使用冲突

    LNK4098: 默认库"MSVCRT"与其他库的使用冲突 修改的方法:在项目属性中,在连接器-输入选项中,在忽略特定库中添加相应的库,具体添加那些苦请参照下面的表格. 下面的内容 ...

  6. JavaScript基础一(js基础函数与运算符)

    [使用js的三种方式] 1.在HTML标签中,直接内嵌js(并不提倡使用) <button onclick=" alert('点就点')"> 点我啊</butto ...

  7. 正常启动HBase顺序

    先启动hadoop集群start-all.sh 在master节点会启动SecondaryNameNode,NameNode,ResourceManager 在slave节点会启动NodeManage ...

  8. 泛型DAO

    最近正在学习泛型DAO,通过网上查阅资料,汇总并自己整理了一下.提前需要学习的知识java反射.泛型 用到的反射如下: Class<T>类 是java.lang包下,Class类的实例表示 ...

  9. KVM管理平台openebula安装

    1.1opennebula控制台的安装 (如果要添加映像需要给200G以上给/var/lib/one,本文是共享/var/lib/one实现监控,用映像出创建虚拟机原理是从opennebula控制平台 ...

  10. Java 核心内容相关面试题【1】

    1.什么是 transient 变量? transient 变量是指不会被序列化的变量. 2.什么是同步(synchronization)? 在多线程环境中,同步是指控制多个线程访问共享资源的方式.没 ...