openstack - Any other ways to install heat resource plug-in? -


according directions of openstack official heat/plugins wiki https://wiki.openstack.org/wiki/heat/plugins, need "to install plugin, copy python modules 1 of configured plugin directories. note heat-engine must restarted after in order load new plugins.". hit following error messages after restart heat-engine..

[root@cs14 heat]# heat-engine 2015-05-04 06:02:09.774 20839 warning heat.common.config [-] ht-a65a0df "instance_user" option in heat.conf deprecated , removed in juno release. [05/04/2015 06:02:10 edt]heatcritical : importerror: no module named my_heat_plugin.client traceback (most recent call last):   file "/usr/bin/heat-engine", line 67, in <module>     srv = engine.engineservice(cfg.conf.host, rpc_api.engine_topic)   file "/usr/lib/python2.6/site-packages/heat/engine/service.py", line 288, in __init__     resources.initialise()   file "/usr/lib/python2.6/site-packages/heat/engine/resources/__init__.py", line 44, in initialise     _load_global_environment(global_env)   file "/usr/lib/python2.6/site-packages/heat/engine/resources/__init__.py", line 49, in _load_global_environment     _load_global_resources(env)   file "/usr/lib/python2.6/site-packages/heat/engine/resources/__init__.py", line 54, in _load_global_resources     manager = plugin_manager.pluginmanager(__name__)   file "/usr/lib/python2.6/site-packages/heat/engine/plugin_manager.py", line 58, in __init__     self.modules = list(modules())   file "/usr/lib/python2.6/site-packages/heat/common/plugin_loader.py", line 91, in load_modules     module = _import_module(importer, module_name, package)   file "/usr/lib/python2.6/site-packages/heat/common/plugin_loader.py", line 72, in _import_module     module = loader.load_module(module_name)   file "/usr/lib64/python2.6/pkgutil.py", line 238, in load_module     mod = imp.load_module(fullname, self.file, self.filename, self.etc)   file "/usr/lib/heat/abc_heat_plugin/resources/abc/abc_server.py", line 24, in <module>     abc_heat_plugin.client import constants const importerror: no module named abc_heat_plugin.client 

to solve problem, i've figured out 2 ways workable. method 1. copy abc_heat_plugin /usr/lib/python2.6/site-packages , restart heat-engine method 2. use .pth file. 1) create file /usr/lib/python2.6/site-packages/.pth following 3 lines (no need if exists)

/usr/lib/heat /usr/lib/heat/abc_heat_plugin /usr/lib/heat/abc_heat_plugin/client 

2) copy plugin "my_heat_plugin" /usr/lib/heat

3) restart heat service

but both ways have more official guide, wonder whether missed important. suggestions? thanks. (btw, my_heat_plugin working well.)

i think basic idea drop resource in /usr/lib/heat, modules or packages used resource must installed usual way. sort of did manually moving files site-packages.

take @ of plugins in heat/contrib example. there few have dependencies such clients other openstack services, , in cases assumption made clients installed separately.

so if can, create setup.py client package, , install separately heat plugin.


Comments