From 698cc670b0b27c67c646432c8b6dc66068d45167 Mon Sep 17 00:00:00 2001 From: Jeremy Lewi Date: Thu, 18 Jan 2018 20:45:49 -0800 Subject: [PATCH] Make Argo UI available publicly at testing-argo.kubeflow.ui (#132) * We use Argo to run our E2E tests so the UI is very useful for debugging tests. * Add an ingress with a static IP to expose it publicly. * Fix #131 --- README.md | 8 ++-- testing/README.md | 10 +++++ testing/test-infra/components/argo.jsonnet | 1 + testing/test-infra/components/argo.libsonnet | 44 +++++++++++++++++--- 4 files changed, 55 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ed079388507..6f9e209211c 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,5 @@ # Kubeflow -[Prow test dashboard](https://k8s-testgrid.appspot.com/sig-big-data) -[Prow jobs dashboard](https://prow.k8s.io/?repo=google%2Fkubeflow) - The Kubeflow project is dedicated to making Machine Learning on Kubernetes easy, portable and scalable. Our goal is **not** to recreate other services, but to provide a straightforward way for spinning up best of breed OSS solutions. Contained in this repository are manifests for creating: * A JupyterHub to create & manage interactive Jupyter notebooks @@ -11,6 +8,11 @@ The Kubeflow project is dedicated to making Machine Learning on Kubernetes easy, This document details the steps needed to run the Kubeflow project in any environment in which Kubernetes runs. +## Quick Links +* [Prow test dashboard](https://k8s-testgrid.appspot.com/sig-big-data) +* [Prow jobs dashboard](https://prow.k8s.io/?repo=google%2Fkubeflow) +* [Argo UI for E2E tests](http://testing-argo.kubeflow.io) + ## The Kubeflow Mission Our goal is to help folks use ML more easily, by letting Kubernetes to do what it's great at: diff --git a/testing/README.md b/testing/README.md index 55d2585b437..0bfc64474ec 100644 --- a/testing/README.md +++ b/testing/README.md @@ -164,6 +164,16 @@ User or service account deploying the test infrastructure needs sufficient permi kubectl create clusterrolebinding default-admin --clusterrole=cluster-admin --user=user@gmail.com ``` +##### Operator Logs + +The following Stackdriver filter can be used to get the pod logs for the operator + +``` +resource.type="container" +resource.labels.namespace_id="e2e-0117-1911-3a53" +resource.labels.container_name="tf-job-operator" +``` + ## Managing namespaces All namespaces created for the tests should be labeled with `app=kubeflow-e2e-test`. diff --git a/testing/test-infra/components/argo.jsonnet b/testing/test-infra/components/argo.jsonnet index 893ad92c9ac..b6f86ca149d 100644 --- a/testing/test-infra/components/argo.jsonnet +++ b/testing/test-infra/components/argo.jsonnet @@ -9,6 +9,7 @@ std.prune(k.core.v1.list.new([argo.parts(namespace).crd, argo.parts(namespace).deploy, argo.parts(namespace).deployUi, argo.parts(namespace).uiService, + argo.parts(namespace).uiIngress, argo.parts(namespace).serviceAccount, argo.parts(namespace).roleBinding, argo.parts(namespace).defaultRoleBinding,])) \ No newline at end of file diff --git a/testing/test-infra/components/argo.libsonnet b/testing/test-infra/components/argo.libsonnet index aec3f98bcf5..984838f3b3e 100644 --- a/testing/test-infra/components/argo.libsonnet +++ b/testing/test-infra/components/argo.libsonnet @@ -85,7 +85,7 @@ } } ], - "image": "argoproj/workflow-controller:v2.0.0-alpha2", + "image": "argoproj/workflow-controller:v2.0.0-alpha3", "imagePullPolicy": "IfNotPresent", "name": "workflow-controller", "resources": {}, @@ -157,7 +157,7 @@ "value": "true" } ], - "image": "argoproj/argoui:v2.0.0-alpha2", + "image": "argoproj/argoui:v2.0.0-alpha3", "imagePullPolicy": "IfNotPresent", "name": "argo-ui", "resources": {}, @@ -171,12 +171,47 @@ "securityContext": {}, "serviceAccount": "argo", "serviceAccountName": "argo", - "terminationGracePeriodSeconds": 30 + "terminationGracePeriodSeconds": 30, + "readinessProbe": { + "httpGet": { + "path": "/", + "port": 8001, + } + }, } } }, }, // deployUi + uiIngress:: { + "apiVersion": "extensions/v1beta1", + "kind": "Ingress", + "metadata": { + "name": "argo-ui", + "namespace": namespace, + }, + "annotations": { + "kubernetes.io/ingress.global-static-ip-name": "argo-ui", + }, + "spec": { + "rules": [ + { + "http": { + "paths": [ + { + "backend": { + "serviceName": "argo-ui", + "servicePort": 80, + }, + "path": "/*" + }, + ] + } + } + ], + } + }, // ingress + uiService: { "apiVersion": "v1", "kind": "Service", @@ -198,8 +233,7 @@ "app": "argo-ui" }, "sessionAffinity": "None", - # TODO(jlewi): Add an option to provision a load balancer? - # "type": "LoadBalancer" + "type": "NodePort", } },