def create_hbase_table(): if build_utils.get_build_info_option('owl', 'hbase_table') == 'created': return os.chdir(OPENTSDB_ROOT) log_message = "Creating hbase table for opentsdb in %s" % OPENTSDB_ROOT cmd = ["env", "COMPRESSION=NONE", "HBASE_HOME=%s" % HBASE_ROOT, "./src/create_table.sh"] build_utils.execute_command(cmd, log_message=log_message) os.chdir(MINOS_ROOT) # Mark hbase table created build_utils.output_build_info('owl', 'hbase_table', 'created')
def create_hbase_table(): if build_utils.get_build_info_option('owl', 'hbase_table') == 'created': return os.chdir(OPENTSDB_ROOT) log_message = "Creating hbase table for opentsdb in %s" % OPENTSDB_ROOT cmd = [ "env", "COMPRESSION=NONE", "HBASE_HOME=%s" % HBASE_ROOT, "./src/create_table.sh" ] build_utils.execute_command(cmd, log_message=log_message) os.chdir(MINOS_ROOT) # Mark hbase table created build_utils.output_build_info('owl', 'hbase_table', 'created')
def build_hbase(): if build_utils.get_build_info_option('owl', 'hbase') == 'built': return if not os.path.exists(BUILD_DOWNLOAD_ROOT): os.mkdir(BUILD_DOWNLOAD_ROOT) os.chdir(BUILD_DOWNLOAD_ROOT) log_message = "Setup hbase in %s" % BUILD_DOWNLOAD_ROOT if not os.path.exists(os.path.basename(HBASE_TARBALL)): cmd = ["wget", "%s" % HBASE_TARBALL] build_utils.execute_command(cmd, log_message=log_message) if not os.path.exists(HBASE_ROOT): cmd = ["tar", "xfz", "%s" % os.path.basename(HBASE_TARBALL)] build_utils.execute_command(cmd) generate_hbase_configuration() os.chdir(MINOS_ROOT) # Mark hbase built build_utils.output_build_info('owl', 'hbase', 'built')
def deploy_opentsdb(): if not os.path.exists(OPENTSDB_ROOT): log_message = "Checkout opentsdb in %s" % OPENTSDB_ROOT cmd = ["git", "clone", "%s" % OPENTSDB_REPOSITORY, "%s" % OPENTSDB_ROOT] build_utils.execute_command(cmd, log_message=log_message) # copy the startup script to the OPENTSDB_ROOT cmd = ["cp", "%s/start_opentsdb.sh" % BUILD_BIN_ROOT, OPENTSDB_ROOT] build_utils.execute_command(cmd) # Compile opentsdb os.chdir(OPENTSDB_ROOT) log_message = "Compiling opentsdb in %s" % OPENTSDB_ROOT cmd = ["./build.sh"] build_utils.execute_command(cmd, log_message=log_message) os.chdir(MINOS_ROOT)
def deploy_opentsdb(): if not os.path.exists(OPENTSDB_ROOT): log_message = "Checkout opentsdb in %s" % OPENTSDB_ROOT cmd = [ "git", "clone", "%s" % OPENTSDB_REPOSITORY, "%s" % OPENTSDB_ROOT ] build_utils.execute_command(cmd, log_message=log_message) # copy the startup script to the OPENTSDB_ROOT cmd = ["cp", "%s/start_opentsdb.sh" % BUILD_BIN_ROOT, OPENTSDB_ROOT] build_utils.execute_command(cmd) # Compile opentsdb os.chdir(OPENTSDB_ROOT) log_message = "Compiling opentsdb in %s" % OPENTSDB_ROOT cmd = ["./build.sh"] build_utils.execute_command(cmd, log_message=log_message) os.chdir(MINOS_ROOT)
def create_django_database(): django_entry = os.path.join(OWL_ROOT, 'manage.py') cmd = [ENV_PYTHON, "%s" % django_entry, "syncdb"] build_utils.execute_command(cmd)