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)
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)
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'][:]
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'][:]
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'][:]
def get_conf_from_fabric(): return {'coordinator': util.get_coordinator_role()[0], 'workers': util.get_worker_role(), 'port': env.port, 'username': env.user}