Exemplo n.º 1
0
def stream_logs(build: 'BuildJob') -> Iterable[str]:
    k8s_manager = K8SManager(namespace=conf.get(K8S_NAMESPACE),
                             in_cluster=True)
    return base.stream_logs(
        k8s_manager=k8s_manager,
        pod_id=build.pod_id,
        container_job_name=conf.get(CONTAINER_NAME_BUILD_JOBS))
Exemplo n.º 2
0
def stream_logs(pod_id, task_type, task_id):
    k8s_manager = K8SManager(namespace=settings.K8S_NAMESPACE, in_cluster=True)
    return base.stream_logs(k8s_manager=k8s_manager,
                            pod_id=pod_id,
                            container_job_name=settings.CONTAINER_NAME_EXPERIMENT_JOB,
                            task_type=task_type,
                            task_idx=task_id)
Exemplo n.º 3
0
def stream_logs(build):
    pod_id = JOB_NAME_FORMAT.format(name=DOCKERIZER_JOB_NAME,
                                    job_uuid=build.uuid.hex)
    k8s_manager = K8SManager(namespace=settings.K8S_NAMESPACE, in_cluster=True)
    return base.stream_logs(
        k8s_manager=k8s_manager,
        pod_id=pod_id,
        container_job_name=settings.CONTAINER_NAME_DOCKERIZER_JOB)
Exemplo n.º 4
0
def stream_logs(pod_id: str, task_type: str, task_id: int) -> Iterable[str]:
    k8s_manager = K8SManager(namespace=conf.get('K8S_NAMESPACE'),
                             in_cluster=True)
    return base.stream_logs(
        k8s_manager=k8s_manager,
        pod_id=pod_id,
        container_job_name=conf.get('CONTAINER_NAME_EXPERIMENT_JOB'),
        task_type=task_type,
        task_idx=task_id)
Exemplo n.º 5
0
def stream_logs(experiment):
    pod_id = EXPERIMENT_JOB_NAME_FORMAT.format(
        task_type=TaskType.MASTER,  # We default to master
        task_idx=0,
        experiment_uuid=experiment.uuid.hex)
    k8s_manager = K8SManager(namespace=settings.K8S_NAMESPACE, in_cluster=True)
    return base.stream_logs(
        k8s_manager=k8s_manager,
        pod_id=pod_id,
        container_job_name=settings.CONTAINER_NAME_EXPERIMENT_JOB)
Exemplo n.º 6
0
def stream_logs(experiment: 'Experiment') -> Iterable[str]:
    pod_id = EXPERIMENT_JOB_NAME_FORMAT.format(
        task_type=TaskType.MASTER,  # We default to master
        task_idx=0,
        experiment_uuid=experiment.uuid.hex)
    k8s_manager = K8SManager(namespace=conf.get('K8S_NAMESPACE'),
                             in_cluster=True)
    return base.stream_logs(
        k8s_manager=k8s_manager,
        pod_id=pod_id,
        container_job_name=conf.get('CONTAINER_NAME_EXPERIMENT_JOB'))
Exemplo n.º 7
0
def stream_logs(experiment: 'Experiment') -> Iterable[str]:
    pod_id = EXPERIMENT_JOB_NAME_FORMAT.format(
        task_type=experiment.default_job_role,
        task_idx=0,
        experiment_uuid=experiment.uuid.hex)
    k8s_manager = K8SManager(namespace=conf.get('K8S_NAMESPACE'), in_cluster=True)
    container_job_name = get_experiment_job_container_name(backend=experiment.backend,
                                                           framework=experiment.framework)
    return base.stream_logs(k8s_manager=k8s_manager,
                            pod_id=pod_id,
                            container_job_name=container_job_name)
Exemplo n.º 8
0
def stream_logs(build):
    k8s_manager = K8SManager(namespace=settings.K8S_NAMESPACE, in_cluster=True)
    return base.stream_logs(k8s_manager=k8s_manager,
                            pod_id=build.pod_id,
                            container_job_name=settings.CONTAINER_NAME_DOCKERIZER_JOB)
Exemplo n.º 9
0
def stream_logs(pod_id):
    k8s_manager = K8SManager(namespace=conf.get('K8S_NAMESPACE'),
                             in_cluster=True)
    return base.stream_logs(k8s_manager=k8s_manager,
                            pod_id=pod_id,
                            container_job_name=conf.get('CONTAINER_NAME_JOB'))