Skip to content

Commit

Permalink
Bug #1366210
Browse files Browse the repository at this point in the history
Installs storage webui pkgs in all nodes defined in webui role

Change-Id: I118019eab5117cb297b44407c52d233af1717d11
  • Loading branch information
surakula committed Sep 22, 2014
1 parent cdf146d commit 36109e3
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion fabfile/tasks/storage/install.py
Expand Up @@ -47,12 +47,35 @@ def install_storage_master_node(*args):
"""Installs storage pkgs in one or list of nodes. USAGE:fab install_openstack_storage_node:user@1.1.1.1,user@2.2.2.2"""
for host_string in args:
with settings(host_string=host_string):
pkg = ['contrail-storage','contrail-web-storage']
pkg = ['contrail-storage']
if detect_ostype() == 'Ubuntu':
apt_install(pkg)
else:
yum_install(pkg)

@task
@EXECUTE_TASK
@roles('webui')
def install_storage_webui():
"""Installs storage webui pkgs in all nodes defined in webui role."""
if env.roledefs['webui']:
execute("install_storage_webui_node", env.host_string)


@task
def install_storage_webui_node(*args):
"""Installs storage pkgs in one or list of nodes. USAGE:fab install_storage_webui:user@1.1.1.1,user@2.2.2.2"""
for host_string in args:
with settings(host_string=host_string):
pkg = ['contrail-web-storage']
if detect_ostype() == 'Ubuntu':
apt_install(pkg)
else:
yum_install(pkg)




@task
@EXECUTE_TASK
@roles('storage-compute')
Expand Down Expand Up @@ -91,3 +114,4 @@ def install_storage():
execute(create_storage_repo)
execute(install_storage_master)
execute(install_storage_compute)
execute(install_storage_webui)

0 comments on commit 36109e3

Please sign in to comment.