Exemplo n.º 1
0
def workers():
    """
    Deploy workers configuration to the worker nodes.
    This will not deploy configuration for a coordinator that is also a worker
    """
    if env.host in util.get_worker_role() and env.host not in util.get_coordinator_role():
        _LOGGER.info("Setting worker configuration for " + env.host)
        configure_presto(w.get_conf(), constants.REMOTE_CONF_DIR)
Exemplo n.º 2
0
def workers():
    """
    Deploy workers configuration to the worker nodes.
    This will not deploy configuration for a coordinator that is also a worker
    """
    if env.host in util.get_worker_role() and env.host \
            not in util.get_coordinator_role():
        _LOGGER.info("Setting worker configuration for " + env.host)
        configure_presto(w.get_conf(), constants.REMOTE_CONF_DIR)
Exemplo n.º 3
0
def set_env_from_conf():
    conf = get_conf()

    env.user = conf['username']
    env.port = conf['port']
    env.roledefs['coordinator'] = [conf['coordinator']]
    env.roledefs['worker'] = conf['workers']
    env.roledefs['all'] = dedup_list(util.get_coordinator_role()
                                     + util.get_worker_role())

    if not env.hosts:
        env.hosts = env.roledefs['all'][:]
Exemplo n.º 4
0
    def set_env_from_conf(self, conf):
        env.user = conf['username']
        env.port = conf['port']
        try:
            env.java8_home = conf['java8_home']
        except KeyError:
            env.java8_home = None
        env.roledefs['coordinator'] = [conf['coordinator']]
        env.roledefs['worker'] = conf['workers']
        env.roledefs['all'] = self._dedup_list(util.get_coordinator_role() +
                                               util.get_worker_role())

        env.hosts = env.roledefs['all'][:]
Exemplo n.º 5
0
def set_env_from_conf():
    conf = get_conf()

    env.user = conf['username']
    env.port = conf['port']
    env.roledefs['coordinator'] = [conf['coordinator']]
    env.roledefs['worker'] = conf['workers']
    env.roledefs['all'] = dedup_list(util.get_coordinator_role() +
                                     util.get_worker_role())

    # This ensures that we honor a hosts list passed on the command line.
    if not env.hosts:
        env.hosts = env.roledefs['all'][:]
Exemplo n.º 6
0
    def set_env_from_conf(self, conf):
        env.user = conf['username']
        env.port = conf['port']
        try:
            env.java8_home = conf['java8_home']
        except KeyError:
            env.java8_home = None
        env.roledefs['coordinator'] = [conf['coordinator']]
        env.roledefs['worker'] = conf['workers']
        env.roledefs['all'] = self._dedup_list(util.get_coordinator_role() +
                                               util.get_worker_role())

        env.hosts = env.roledefs['all'][:]
Exemplo n.º 7
0
def get_conf_from_fabric():
    return {'coordinator': util.get_coordinator_role()[0],
            'workers': util.get_worker_role(),
            'port': env.port,
            'username': env.user}
Exemplo n.º 8
0
def get_conf_from_fabric():
    return {'coordinator': util.get_coordinator_role()[0],
            'workers': util.get_worker_role(),
            'port': env.port,
            'username': env.user}