Skip to content

Commit

Permalink
Adding fabric utils changes for web-ui to have authentication support…
Browse files Browse the repository at this point in the history
… for

redis-server.

Partial-Bug: #1392113
Change-Id: I4e97e5d84d348643202109d3f7adde88eecce256
  • Loading branch information
biswajit-mandal committed Feb 26, 2015
1 parent e62d7c9 commit 22d5bdb
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion fabfile/tasks/provision.py
Expand Up @@ -836,7 +836,7 @@ def setup_collector_node(*args):
sudo("sed -i -e '/^[ ]*bind/s/^/#/' /etc/redis.conf")
#If redis passwd sepcified add that to the conf file
if get_redis_password():
run("sed -i '/^# requirepass/ c\ requirepass "+ get_redis_password()+"' /etc/redis/redis.conf")
run("sed -i '/^# requirepass/ c\ requirepass "+ get_redis_password()+"' /etc/redis.conf")
sudo("chkconfig redis on")
sudo("service redis start")

Expand Down Expand Up @@ -990,12 +990,26 @@ def setup_webui_node(*args):
cassandra_ip_list = [hstr_to_ip(cassandra_host) for cassandra_host in database_host_list]
orch = get_orchestrator()

# If redis password is specified in testbed file, then add that to the
# redis config file
redis_password = get_redis_password()
if redis_password is not None:
if detect_ostype() == 'ubuntu':
redis_conf_path = '/etc/redis/redis.conf'
run("service redis-server stop")
else:
redis_conf_path = '/etc/redis.conf'
run("service redis stop")
run("sed -i '/^# requirepass/ c\ requirepass " +
redis_password + "' " + redis_conf_path)
# Frame the command line to provision webui
cmd = "setup-vnc-webui"
cmd += " --cfgm_ip %s" % cfgm_ip
cmd += " --collector_ip %s" % collector_ip
cmd += " --cassandra_ip_list %s" % ' '.join(cassandra_ip_list)
cmd += " --orchestrator %s" % orch
if redis_password is not None:
cmd += " --redis_password %s" % redis_password
internal_vip = get_openstack_internal_vip()
if internal_vip:
# Highly available setup
Expand Down

0 comments on commit 22d5bdb

Please sign in to comment.