packstack总体流程分析

packstack总体流程分析(1)

时间  2016-05-16

原文   http://blog.csdn.net/xiangpingli/article/details/51429163

 

packstack总体流程分(1)

 

(1)plugins中的每个文件对应一种服务:

比如cinder_xxx.py对应cinder服务的部署

Nova_xxx.py对应nova服务的部署

 

(2)Puppet/templates中每几个文件对应一个服务,比如cinder.pp,cinder_backup.pp,cinder_lvm.pp,

其中每个文件对应某种服务的某项配置

 

(3)Plugins/xxx.py中的文件会有create_manifest和creat_xxx_manitest,其中create_manifest是必有的,creat_xxx_manitest可能没有,也可能有多个

 

这些create_manitest、create_xxx_manitest,有三个语句,分别给manifestfile、manifestdata赋值,然后将manifestfile、manifestdata生成manitestFile:

比如:cinder_250.py中的create_keystone_manifest:

manifestfile = "%s_keystone.pp"% config['CONFIG_CONTROLLER_HOST']
manifestdata = getManifestTemplate("keystone_cinder")
appendManifestFile(manifestfile, manifestdata)

 

cinder_250.py中的create_manifest:

manifestdata =getManifestTemplate(get_mq(config, "cinder"))

manifestdata += getManifestTemplate("cinder")

manifestdata += getManifestTemplate('cinder_ceilometer')

manifestfile = "%s_cinder.pp" % config['CONFIG_STORAGE_HOST']

appendManifestFile(manifestfile,manifestdata)

这里manifestdata是从配置中(answer-file)中获取配置

getManifestTemplate和appendManifestFile在ospluginutils.py中定义

getManifestTemplate从puppet/templates/xxx.pp中获取某一服务的某项配置

调用appendManifestFile之后,在/var/tmp/packstack/xxx/manifests/下生成puppet文件,比如:

/var/tmp/packstack/34c930543a234464b7f73665dc2c44fc/manifests/192.168.129.130_nova.pp

 

接下来主要分析:

(1)这些create_xxx_manifest是由哪里来调用的?

(2)/var/tmp/packstack/xxx/xxx.pp是如何被执行的?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值