예제 #1
0
파일: build_owl.py 프로젝트: HanJack/minos
def _build(args):
  if args.owl_ip == '127.0.0.1' or args.owl_port == 0:
    Log.print_critical("ERROR: Building owl needs to specify the localhost ip " \
      "with '--owl_ip' and the owl monitor http port with '--owl_port'")

  Log.print_info("Building owl")
  # Check and install prerequisite python libraries
  Log.print_info("Check and install prerequisite python libraries")
  build_utils.check_and_install_modules(OWL_PREREQUISITE_PYTHON_LIBS)

  check_third_party_tool_exists("gnuplot")
  check_third_party_tool_exists("mysql")
  create_and_configure_mysql_for_owl(args)
  create_django_database()

  # Deploy hbase
  if not args.skip_setup_hbase:
    build_hbase()
    start_hbase()

  # Deploy opentsdb
  deploy_opentsdb()
  if not args.skip_setup_hbase:
    start_opentsdb()

  # Configure opentsdb collector
  configure_opentsdb_collector(str(args.owl_port))
  # Configure owl config
  configure_owl_config(args)

  # Output build information
  build_utils.output_build_info(args.component, 'owl_port', args.owl_port)
  build_utils.output_build_info(args.component, 'build_status', 'success')
  Log.print_info("The component %s is built successfully" % args.component)
예제 #2
0
def _build(args):
    if args.tank_ip == TANK_DEFAULT_IP:
        Log.print_critical("ERROR: Building supervisor needs to specify the package server " \
          "with '--tank_ip' and '--tank_port'")

    Log.print_info("Building supervisor")
    # Check and install prerequisite python libraries
    Log.print_info("Check and install prerequisite python libraries")
    build_utils.check_and_install_modules(SUPERVISOR_PREREQUISITE_PYTHON_LIBS)

    # Create deployment directory
    deploy_path = raw_input("Please input the root directory to deploy services " \
      "(default: /home/%s): " % getpass.getuser())

    if deploy_path:
        deploy_path = os.path.abspath(os.path.realpath(deploy_path))
    else:
        deploy_path = "/home/%s" % getpass.getuser()
    _create_deployment_directory(deploy_path)

    # Deploy supervisor
    _deploy_supervisor(args, deploy_path)

    # Output build information
    build_utils.output_build_info(args.component, 'build_status', 'success')
    Log.print_info("The component %s is built successfully" % args.component)
예제 #3
0
def _build(args):
    if args.owl_ip == '127.0.0.1' or args.owl_port == 0:
        Log.print_critical("ERROR: Building owl needs to specify the localhost ip " \
          "with '--owl_ip' and the owl monitor http port with '--owl_port'")

    Log.print_info("Building owl")
    # Check and install prerequisite python libraries
    Log.print_info("Check and install prerequisite python libraries")
    build_utils.check_and_install_modules(OWL_PREREQUISITE_PYTHON_LIBS)

    check_third_party_tool_exists("gnuplot")
    check_third_party_tool_exists("mysql")
    create_and_configure_mysql_for_owl(args)
    create_django_database()

    # Deploy hbase
    if not args.skip_setup_hbase:
        build_hbase()
        start_hbase()

    # Deploy opentsdb
    deploy_opentsdb()
    if not args.skip_setup_hbase:
        start_opentsdb()

    # Configure opentsdb collector
    configure_opentsdb_collector(str(args.owl_port))
    # Configure owl config
    configure_owl_config(args)

    # Output build information
    build_utils.output_build_info(args.component, 'owl_port', args.owl_port)
    build_utils.output_build_info(args.component, 'build_status', 'success')
    Log.print_info("The component %s is built successfully" % args.component)
예제 #4
0
파일: build_tank.py 프로젝트: HanJack/minos
def _build(args):
  Log.print_info("Building tank server")

  # Check and install prerequisite python libraries
  Log.print_info("Check and install prerequisite python libraries")
  build_utils.check_and_install_modules(TANK_PREREQUISITE_PYTHON_LIBS)

  # Output build information
  if args.tank_ip != TANK_DEFAULT_IP or args.tank_port != TANK_DEFAULT_PORT:
    build_utils.output_build_info(args.component, 'tank_ip', args.tank_ip)
    build_utils.output_build_info(args.component, 'tank_port', args.tank_port)

  build_utils.output_build_info(args.component, 'build_status', 'success')
  Log.print_info("The component %s is built successfully" % args.component)
예제 #5
0
def _build(args):
    Log.print_info("Building tank server")

    # Check and install prerequisite python libraries
    Log.print_info("Check and install prerequisite python libraries")
    build_utils.check_and_install_modules(TANK_PREREQUISITE_PYTHON_LIBS)

    # Output build information
    if args.tank_ip != TANK_DEFAULT_IP or args.tank_port != TANK_DEFAULT_PORT:
        build_utils.output_build_info(args.component, 'tank_ip', args.tank_ip)
        build_utils.output_build_info(args.component, 'tank_port',
                                      args.tank_port)

    build_utils.output_build_info(args.component, 'build_status', 'success')
    Log.print_info("The component %s is built successfully" % args.component)
예제 #6
0
def build_client():
    # Check and install prerequisite python libraries
    Log.print_info("Check and install prerequisite python libraries")
    build_utils.check_and_install_modules(CLIENT_PREREQUISITE_PYTHON_LIBS)
    Log.print_success("Build Minos client success")
예제 #7
0
def build_client():
  # Check and install prerequisite python libraries
  Log.print_info("Check and install prerequisite python libraries")
  build_utils.check_and_install_modules(CLIENT_PREREQUISITE_PYTHON_LIBS)
  Log.print_success("Build Minos client success")