Esempio n. 1
0
def configure_owl_config(args):
  Log.print_info("Configure owl config file: %s" % OWL_CONFIG_FILE)
  owl_config_dict = {
    'owl_ip': args.owl_ip,
    'opentsdb_port': OPENTSDB_PORT,
  }
  build_utils.generate_config_file(OWL_CONFIG_TEMPLATE,
    OWL_CONFIG_FILE, owl_config_dict)
Esempio n. 2
0
def configure_owl_config(args):
    Log.print_info("Configure owl config file: %s" % OWL_CONFIG_FILE)
    owl_config_dict = {
        'owl_ip': args.owl_ip,
        'opentsdb_port': OPENTSDB_PORT,
    }
    build_utils.generate_config_file(OWL_CONFIG_TEMPLATE, OWL_CONFIG_FILE,
                                     owl_config_dict)
Esempio n. 3
0
def configure_mysql_for_owl(database_name, host='localhost', port='3306'):
  Log.print_info("Configuring mysql for owl in %s" % OWL_SETTING_FILE)
  owl_setting_dict = {
    'DATABASE': database_name,
    'HOST': host,
    'PORT': port,
  }
  build_utils.generate_config_file(OWL_SETTING_TEMPLATE,
    OWL_SETTING_FILE, owl_setting_dict)
Esempio n. 4
0
def configure_mysql_for_owl(database_name, host='localhost', port='3306'):
    Log.print_info("Configuring mysql for owl in %s" % OWL_SETTING_FILE)
    owl_setting_dict = {
        'DATABASE': database_name,
        'HOST': host,
        'PORT': port,
    }
    build_utils.generate_config_file(OWL_SETTING_TEMPLATE, OWL_SETTING_FILE,
                                     owl_setting_dict)
Esempio n. 5
0
def configure_opentsdb_collector(owl_port):
  # Configure opentsdb collector config file
  Log.print_info("Configuring opentsdb collector in %s" %
    OPENTSDB_COLLECTOR_CONFIG_FILE)
  opentsdb_collector_dict = {
    'owl_monitor_http_port': owl_port,
    'tsdb': OPENTSDB_BIN_PATH,
  }
  build_utils.generate_config_file(OPENTSDB_COLLECTOR_CONFIG_TEMPLATE,
    OPENTSDB_COLLECTOR_CONFIG_FILE, opentsdb_collector_dict)
Esempio n. 6
0
def _deploy_supervisor(args, deploy_path):
    Log.print_info("Deploying supervisor in %s" % SUPERVISOR_ROOT)

    # Generate supervisord.conf according to the deploying information
    deploy_info_dict = {
        'DEPLOY_PATH': deploy_path,
        'PACKAGE_SERVER': "%s:%d" % (args.tank_ip, args.tank_port),
    }
    build_utils.generate_config_file(SUPERVISOR_CONFIG_TEMPLATE,
                                     SUPERVISOR_CONFIG_FILE, deploy_info_dict)
Esempio n. 7
0
def configure_opentsdb_collector(owl_port):
    # Configure opentsdb collector config file
    Log.print_info("Configuring opentsdb collector in %s" %
                   OPENTSDB_COLLECTOR_CONFIG_FILE)
    opentsdb_collector_dict = {
        'owl_monitor_http_port': owl_port,
        'tsdb': OPENTSDB_BIN_PATH,
    }
    build_utils.generate_config_file(OPENTSDB_COLLECTOR_CONFIG_TEMPLATE,
                                     OPENTSDB_COLLECTOR_CONFIG_FILE,
                                     opentsdb_collector_dict)
Esempio n. 8
0
def generate_hbase_configuration():
  Log.print_info("Modify hbase-site.xml in %s" % HBASE_CONFIG_ROOT)
  cmd = "hbase_rootdir=${TMPDIR-'/tmp'}/tsdhbase;" \
    "iface=lo`uname | sed -n s/Darwin/0/p`; echo $hbase_rootdir,$iface"
  hbase_rootdir, iface = build_utils.get_command_variable(cmd).split(',')

  configuration_dict = {
    'hbase_rootdir': hbase_rootdir,
    'iface': iface,
  }
  build_utils.generate_config_file(HBASE_CONFIG_TEMPLATE,
    HBASE_CONFIG_FILE, configuration_dict)
Esempio n. 9
0
def generate_hbase_configuration():
    Log.print_info("Modify hbase-site.xml in %s" % HBASE_CONFIG_ROOT)
    cmd = "hbase_rootdir=${TMPDIR-'/tmp'}/tsdhbase;" \
      "iface=lo`uname | sed -n s/Darwin/0/p`; echo $hbase_rootdir,$iface"
    hbase_rootdir, iface = build_utils.get_command_variable(cmd).split(',')

    configuration_dict = {
        'hbase_rootdir': hbase_rootdir,
        'iface': iface,
    }
    build_utils.generate_config_file(HBASE_CONFIG_TEMPLATE, HBASE_CONFIG_FILE,
                                     configuration_dict)