Adding Pyleus configs to Storm plugin
In order to use Pyleus we need to have it installed on image during image generation process and have some configurations done. This patch configures pylues on the master node. Change-Id: Id45c4878e3a115284192a8a83196df74cc05dbe7
This commit is contained in:
parent
9789e6c596
commit
024694539f
|
@ -73,6 +73,14 @@ def generate_storm_config(master_hostname, zk_hostnames, version):
|
|||
return cfg
|
||||
|
||||
|
||||
def generate_pyleus_config():
|
||||
separator = "\n"
|
||||
conf = ("[storm]",
|
||||
"storm_cmd_path: /usr/local/storm/bin/storm")
|
||||
|
||||
return separator.join(conf)
|
||||
|
||||
|
||||
def generate_slave_supervisor_conf():
|
||||
separator = "\n"
|
||||
conf = ("[program:storm-supervisor]",
|
||||
|
|
|
@ -160,13 +160,15 @@ class StormProvider(p.ProvisioningPluginBase):
|
|||
supervisor_conf = c_helper.generate_slave_supervisor_conf()
|
||||
nimbus_ui_conf = c_helper.generate_master_supervisor_conf()
|
||||
zk_conf = c_helper.generate_zookeeper_conf()
|
||||
pyleus_conf = c_helper.generate_pyleus_config()
|
||||
|
||||
for ng in cluster.node_groups:
|
||||
extra[ng.id] = {
|
||||
'st_instances': config,
|
||||
'slave_sv_conf': supervisor_conf,
|
||||
'master_sv_conf': nimbus_ui_conf,
|
||||
'zk_conf': zk_conf
|
||||
'zk_conf': zk_conf,
|
||||
'pyleus_conf': pyleus_conf
|
||||
}
|
||||
|
||||
return extra
|
||||
|
@ -265,6 +267,9 @@ class StormProvider(p.ProvisioningPluginBase):
|
|||
files_supervisor_master = {
|
||||
'/etc/supervisor/supervisord.conf': ng_extra['master_sv_conf']
|
||||
}
|
||||
file_pyleus_conf = {
|
||||
'/home/ubuntu/.pyleus.conf': ng_extra['pyleus_conf']
|
||||
}
|
||||
|
||||
with remote.get_remote(instance) as r:
|
||||
node_processes = instance.node_group.node_processes
|
||||
|
@ -273,6 +278,7 @@ class StormProvider(p.ProvisioningPluginBase):
|
|||
self._push_zk_configs(r, files_zk)
|
||||
if 'nimbus' in node_processes:
|
||||
self._push_supervisor_configs(r, files_supervisor_master)
|
||||
self._push_supervisor_configs(r, file_pyleus_conf)
|
||||
if 'supervisor' in node_processes:
|
||||
self._push_supervisor_configs(r, files_supervisor)
|
||||
|
||||
|
|
Loading…
Reference in New Issue