nova分析(2)—— nova-all
nova-all是一个用来启动所有nova服务的辅助脚本,注意只是启动所有服务,不包括停止和重启等功能。
nova-all的入口在 nova.cmd.all:main ,脚本也比较简单,这儿就贴下代码了
def main():
# 命令行参数解析,实际上命令行参数并没有使用
config.parse_args(sys.argv)
logging.setup("nova")
LOG = logging.getLogger('nova.all')
utils.monkey_patch()
objects.register_all()
launcher = service.process_launcher() # 启动API以提供Rest服务,也就是nova-api(以WSGIService方式启动)
for api in CONF.enabled_apis:
try:
should_use_ssl = api in CONF.enabled_ssl_apis
server = service.WSGIService(api, use_ssl=should_use_ssl)
launcher.launch_service(server, workers=server.workers or 1)
except (Exception, SystemExit):
LOG.exception(_('Failed to load %s') % '%s-api' % api) # 启动s3server(基于本地文件实现S3式的存储服务)
# 启动xvp_proxy(VNC代理,支持基于java的vnc客户端)
# 这两个服务都是以wsgi.Server方式启动
for mod in [s3server, xvp_proxy]:
try:
launcher.launch_service(mod.get_wsgi_server())
except (Exception, SystemExit):
LOG.exception(_('Failed to load %s') % mod.__name__) # 其他的服务以Service方式启动
for binary in ['nova-compute', 'nova-network', 'nova-scheduler',
'nova-cert', 'nova-conductor']: # FIXME(sirp): Most service configs are defined in nova/service.py, but
# conductor has set a new precedent of storing these configs
# nova/<service>/api.py.
#
# We should update the existing services to use this new approach so we
# don't have to treat conductor differently here.
if binary == 'nova-conductor':
topic = CONF.conductor.topic
manager = CONF.conductor.manager
else:
topic = None
manager = None try:
launcher.launch_service(service.Service.create(binary=binary,
topic=topic,
manager=manager))
except (Exception, SystemExit):
LOG.exception(_('Failed to load %s'), binary)
launcher.wait()
nova分析(2)—— nova-all的更多相关文章
- nova分析(10)—— nova-rootwrap
一.nova-rootwrap的作用 部署玩过openstack的都应该知道,它会生成一个nova用户来管理所有服务.nova身份在linux中属于普通用户级别,避免了一些需要root身份运行的操作, ...
- 在Openstack H版部署Nova Cell 时 ,终端输入nova service-list 和 nova host-list 命令将报错
关于Cell的基本介绍,可以参考贤哥的一篇文章: [OpenStack]G版中关于Nova的Cell http://blog.csdn.net/lynn_kong/article/details/8 ...
- KVM 介绍(8):使用 libvirt 迁移 QEMU/KVM 虚机和 Nova 虚机 [Nova Libvirt QEMU/KVM Live Migration]
学习 KVM 的系列文章: (1)介绍和安装 (2)CPU 和 内存虚拟化 (3)I/O QEMU 全虚拟化和准虚拟化(Para-virtulizaiton) (4)I/O PCI/PCIe设备直接分 ...
- openstack私有云布署实践【11.3 计算nova - compute节点-nova用户免密登录(用于云主机冷迁移+扩展云主机大小)】
云主机迁移+扩展云主机大小 ,官方说它依赖nova用户之间的免密登录.确保每个resion区域的compute节点服务器他们可以相互SSH免密 compute1-7 他们相互SSH免密 k ...
- nova分析(7)—— nova-scheduler
Nova-Scheduler主要完成虚拟机实例的调度分配任务,创建虚拟机时,虚拟机该调度到哪台物理机上,迁移时若没有指定主机,也需要经过scheduler.资源调度是云平台中的一个很关键问题,如何做到 ...
- nova分析(5)—— nova-conductor
nova-conductor是nova-compute之上的一个服务,这个服务比较简单,主要封装了DB访问和动态迁移相关的代码.转来一篇文章看看它是如何工作的. 更新记录:1. 2013.4.19 ...
- nova分析(6)—— nova service启动过程
Nova project下面具有多个service,api,compute,sceduler等等,他们的启动过程都几乎类似,这一篇博客就详细记录nova-sceduler的启动过程.文章中贴出的源码都 ...
- nova分析(3)—— nova-api
nova-api是nova对外提供Restful API的服务,Horizon.novaclient等均通过该api与nova进行通信. nova其实对外提供了多个api服务,包括下面这些服务: no ...
- nova分析(8)—— nova-compute
nova-compute是管理和配置虚拟机的入口,在所有compute机器上都需要该服务来创建和管理虚拟机. nova-compute服务的入口在 nova.cmd.compute:main ,其启动 ...
- nova分析(9)—— nova-novncproxy
nova提供了novncproxy代理支持用户通过vnc来访问虚拟机,用户可以通过websocket.java客户端或者spicehtml5来访问.通过websket访问虚拟机的功能已经集成到hori ...
随机推荐
- 常见的XMLHttpRequest.status状态码
XMLHttpRequest.status状态码 1xx-信息提示 这些状态代码表示临时的响应.客户端在收到常规响应之前,应准备接收一个或多个1xx响应. 100-继续. 101-切换协议. 2xx- ...
- HTTP 简介
HTTP 简介 HTTP协议是Hyper Text Transfer Protocol(超文本传输协议)的缩写,是用于从万维网(WWW:World Wide Web )服务器传输超文本到本地浏览器的传 ...
- 完美解决IE6不支持position:fixed的bug
示例代码: <!DOCTYPE html><html><head><meta http-equiv="Content-Type" cont ...
- Ubuntu下adb的安装
1.adb简述: adb全称Android Debug Bridge,安卓调试桥接器.它是Android sdk里的一个工具,用这个工具可以直接操作管理android模拟器或者真实的andriod设备 ...
- java如何获取当前机器ip和容器port
获取当前机器ip: private static String getIpAddress() throws UnknownHostException { InetAddress address = I ...
- 新浪代码部署手册 git管理工具
目前新浪云上的应用支持通过Git和SVN来部署代码. Git仓库地址 https://git.sinacloud.com/YOUR_APP_NAME SVN仓库地址 https://svn.sinac ...
- jquery绑定回车键发送(登录)
$(function(){ $(document).keydown(function(e){ if(e.keyCode==13){ $ ...
- JAVA常用运算符
Java 语言中常用的运算符可分为如下几种: 1.算术运算符 int i = 5; int j = i++; // i = 6 j = 5 int j = ++i; // i = 6 j = 6 PS ...
- jQuery判断元素是否在可视区
假设此元素为 #item,先说几个关键的属性: $('#item').offset().top#item 的绝对偏移量,指#item的实际尺寸(即不包括外边框margin)的上边界到页面顶端的距离.这 ...
- 一些实用的JS
1.str.split(/\s+/) 这句是表示以和/\s+/匹配的字符串作为分界,分割字符串str 比如一个空格或者多个或者空格以及回车等 其中+表示一个或者多个 var a = "b- ...