Beispiel #1
0
def deploy_hbase(user, host):

    regionservers = ''
    for ip in config.hbase_ips:
        regionservers += ip + '\n'

    # setting hbase in distributed mode
    hbase_sites = "<property>\n  <name>hbase.cluster.distributed</name>\n  <value>true</value>\n</property>"

    hbase_sites += '\n'

    # adding all zookeepers
    hbase_sites += "<property>\n  <name>hbase.zookeeper.quorum</name>\n  <value>"

    zookeeper_ips = ''
    for ip in config.hbase_ips:
        zookeeper_ips += ip + ','
    zookeeper_ips = zookeeper_ips[:-1]

    hbase_sites += zookeeper_ips
    hbase_sites += "</value>\n</property>"

    # adding zookeeper data dir
    hbase_sites += "<property>\n  <name>hbase.zookeeper.property.dataDir</name>\n" \
                   "  <value>/usr/local/zookeeper</value>\n</property>"

    d = {
            "templ_hostname": const.hbase_hostname,
            "templ_ip_address": host,
            "templ_regionservers": regionservers,
            "templ_hbase_sites": hbase_sites,
            "templ_home_folder": "/home/" + user
        }
    dn.deploy('hbase', user, host, d)
Beispiel #2
0
def deploy_riak(user, host):

    d = {
            "templ_bind_ip": host,
            "templ_home_folder": "/home/" + user
        }

    dn.deploy('riak', user, host, d)
Beispiel #3
0
def deploy_mongodb(user, host):

    d = {
        "templ_bind_ip": host,
        "templ_replica_set_name": const.keyspace_name,
        "templ_home_folder": "/home/" + user
    }

    dn.deploy('mongodb', user, host, d)
Beispiel #4
0
def deploy_cassandra(user, host):

    seeds = ""
    for ip in config.cassandra_ips:
        seeds += ip + ","

    d = {
            "templ_user": user,
            "templ_listen_address": host,
            "templ_rpc_address": host,
            "templ_seeds_list": seeds,
        }

    dn.deploy('cassandra', user, host, d)
Beispiel #5
0
def deploy_bigcouch(user, host):

    d = {
            "templ_home_folder": "/home/" + user
        }
    dn.deploy('bigcouch', user, host, d)