예제 #1
0
파일: main.py 프로젝트: waterdrops/heron
def config_path_option():
  return click.option(
      "--config-path",
      default=config.get_heron_conf_dir(),
      show_default=True,
      help="Path to heron's config clusters config directory"
  )
예제 #2
0
파일: args.py 프로젝트: takeratta/heron
def add_config(parser):
  """ add config """
  # the default config path
  default_config_path = config.get_heron_conf_dir()

  parser.add_argument(
      '--config-path',
      metavar='(a string; path to cluster config; default: "' + default_config_path + '")',
      default=os.path.join(config.get_heron_dir(), default_config_path))

  return parser
예제 #3
0
def download(uri, cluster):
  tmp_dir = tempfile.mkdtemp()
  cmd_downloader = config.get_heron_bin_dir() + "/heron-downloader.sh"
  cmd_uri = "-u " + uri
  cmd_destination = "-f " + tmp_dir
  cmd_heron_root = "-d " + config.get_heron_dir()
  cmd_heron_config = "-p " + config.get_heron_cluster_conf_dir(cluster, config.get_heron_conf_dir())
  cmd_mode = "-m local"
  cmd = [cmd_downloader, cmd_uri, cmd_destination, cmd_heron_root, cmd_heron_config, cmd_mode]
  Log.debug("download uri command: %s", cmd)
  subprocess.call(cmd)
  suffix = (".jar", ".tar", ".tar.gz", ".pex", ".dylib", ".so")
  for f in os.listdir(tmp_dir):
    if f.endswith(suffix):
      return os.path.join(tmp_dir, f)
예제 #4
0
파일: submit.py 프로젝트: ashvina/heron
def download(uri, cluster):
  tmp_dir = tempfile.mkdtemp()
  cmd_downloader = config.get_heron_bin_dir() + "/heron-downloader.sh"
  cmd_uri = "-u " + uri
  cmd_destination = "-f " + tmp_dir
  cmd_heron_root = "-d " + config.get_heron_dir()
  cmd_heron_config = "-p " + config.get_heron_cluster_conf_dir(cluster, config.get_heron_conf_dir())
  cmd_mode = "-m local"
  cmd = [cmd_downloader, cmd_uri, cmd_destination, cmd_heron_root, cmd_heron_config, cmd_mode]
  Log.debug("download uri command: %s", cmd)
  subprocess.call(cmd)
  suffix = (".jar", ".tar", ".tar.gz", ".pex", ".dylib", ".so")
  for f in os.listdir(tmp_dir):
    if f.endswith(suffix):
      return os.path.join(tmp_dir, f)
예제 #5
0
파일: args.py 프로젝트: kennylbj/heron
def add_config(parser):
  '''
  :param parser:
  :return:
  '''
  # the default config path
  default_config_path = config.get_heron_conf_dir()

  parser.add_argument(
      '--config-path',
      metavar='(a string; path to cluster config; default: "' + default_config_path + '")',
      default=os.path.join(config.get_heron_dir(), default_config_path))

  parser.add_argument(
      '--config-property',
      metavar='(key=value; a config key and its value; default: [])',
      action='append',
      default=[])
  return parser
예제 #6
0
파일: args.py 프로젝트: takeratta/heron
def add_config(parser):
    '''
  :param parser:
  :return:
  '''
    # the default config path
    default_config_path = config.get_heron_conf_dir()

    parser.add_argument('--config-path',
                        default=os.path.join(config.get_heron_dir(),
                                             default_config_path),
                        help='Path to cluster configuration files')

    parser.add_argument(
        '--config-property',
        metavar='PROPERTY=VALUE',
        action='append',
        default=[],
        help='Configuration properties that overrides default options')
    return parser
예제 #7
0
파일: args.py 프로젝트: ashvina/heron
def add_config(parser):
  '''
  :param parser:
  :return:
  '''
  # the default config path
  default_config_path = config.get_heron_conf_dir()

  parser.add_argument(
      '--config-path',
      default=os.path.join(config.get_heron_dir(), default_config_path),
      help='Path to cluster configuration files')

  parser.add_argument(
      '--config-property',
      metavar='PROPERTY=VALUE',
      action='append',
      default=[],
      help='Configuration properties that overrides default options')
  return parser
예제 #8
0
파일: args.py 프로젝트: Leeshine/heron
def add_config(parser):
    '''
  :param parser:
  :return:
  '''
    # the default config path
    default_config_path = config.get_heron_conf_dir()

    parser.add_argument(
        '--config-path',
        metavar='(a string; path to cluster config; default: "' +
        default_config_path + '")',
        default=os.path.join(config.get_heron_dir(), default_config_path))

    parser.add_argument(
        '--config-property',
        metavar='(key=value; a config key and its value; default: [])',
        action='append',
        default=[])
    return parser
예제 #9
0
def get_heron_tools_job_file(cl_args):
  '''
  get path to api server job file
  '''
  return "%s/standalone/resources/heron_tools.hcl" % config.get_heron_conf_dir()
예제 #10
0
def get_nomad_slave_config_file(cl_args):
  '''
  get path to nomad slave config file
  '''
  return "%s/standalone/resources/slave.hcl" % config.get_heron_conf_dir()
예제 #11
0
def get_nomad_master_config_file(cl_args):
  '''
  get path to nomad master config file
  '''
  return "%s/standalone/resources/master.hcl" % config.get_heron_conf_dir()
예제 #12
0
def get_heron_tools_job_file(cl_args):
    '''
  get path to api server job file
  '''
    return "%s/standalone/resources/heron_tools.hcl" % config.get_heron_conf_dir(
    )
예제 #13
0
def get_nomad_slave_config_file(cl_args):
    '''
  get path to nomad slave config file
  '''
    return "%s/standalone/resources/slave.hcl" % config.get_heron_conf_dir()
예제 #14
0
def get_nomad_master_config_file(cl_args):
    '''
  get path to nomad master config file
  '''
    return "%s/standalone/resources/master.hcl" % config.get_heron_conf_dir()