From 0f41e89ff63a5b4ef97961871ee34a9d1d3c9c50 Mon Sep 17 00:00:00 2001 From: Vincent-DeSousa-Tereso Date: Thu, 6 Jun 2019 10:50:29 -0400 Subject: [PATCH] Add yaml to install gcr images, updated docs --- README.md | 33 +++++------ ...shboard.yaml => dev-tekton-dashboard.yaml} | 0 config/gcr-tekton-dashboard.yaml | 59 +++++++++++++++++++ 3 files changed, 75 insertions(+), 17 deletions(-) rename config/{tekton-dashboard.yaml => dev-tekton-dashboard.yaml} (100%) create mode 100644 config/gcr-tekton-dashboard.yaml diff --git a/README.md b/README.md index 5bbbfc9b9..950f34efc 100644 --- a/README.md +++ b/README.md @@ -5,37 +5,36 @@ Tekton Dashboard is a general purpose, web-based UI for Tekton Pipelines. It allows users to manage and view Tekton Pipeline and Task runs and the resources involved in their creation, execution, and completion. ![Dashboard UI workloads page](docs/dashboard-ui.png) - ## Install Dashboard -To install the Dashboard using `ko`: -```sh +The Tekton Dashboard has a hosted image located at gcr.io/tekton-nightly/dashboard:latest +To install the latest dashboard using this image: +``` +kubectl apply -f config/gcr-tekton-dashboard.yaml +``` + +Alternatively, the dashboard can be installed through the same Git Hub release asset: +``` +curl -L https://github.com/tektoncd/dashboard/releases/download/v0/gcr-tekton-dashboard.yaml | kubectl apply -f - +``` + +Development installation of the Dashboard uses `ko`: +``` +sh $ docker login $ export KO_DOCKER_REPO=docker.io/ $ npm install $ npm run build_ko -$ ko apply -f config +$ ko apply -f config/dev-tekton-dashboard.yaml ``` The `ko apply` command will build and push an image of the Tekton Dashboard to the Docker registry which you are logged into. Any Docker registry will do, but in this case it will push to Dockerhub. -The Dashboard can also be installed without `ko`: - -```sh -$ docker build -t /dashboard: . -$ docker push /dashboard: -``` -- Replace the image path at `config/tekton-dashboard.yaml` with the value for /dashboard: -- Replace the WEB_RESOURCES_DIR value in the same file with the value __./web__ -``` -$ kubectl apply -f config -``` - ## Install on Minishift 1. Install [tektoncd-pipeline-operator](https://github.com/openshift/tektoncd-pipeline-operator#deploy-openshift-pipelines-operator-on-minikube-for-testing) 2. [Checkout](https://github.com/tektoncd/dashboard/blob/master/DEVELOPMENT.md#checkout-your-fork) the repository 3. Install deployment config `$oc process -f config/templates/deploy.yaml | oc apply -f-` -4. Install build config `$oc process -f build.yaml | oc apply -f-` +4. Install build config `$oc process -f config/templates/build.yaml | oc apply -f-` ## Accessing Dashboard The Dashboard has can be accessed through its ClusterIP Service by running `kubectl proxy`. Assuming default is the install namespace for the dashboard, you can access the web UI at `localhost:8001/api/v1/namespaces/default/services/tekton-dashboard:http/proxy/` diff --git a/config/tekton-dashboard.yaml b/config/dev-tekton-dashboard.yaml similarity index 100% rename from config/tekton-dashboard.yaml rename to config/dev-tekton-dashboard.yaml diff --git a/config/gcr-tekton-dashboard.yaml b/config/gcr-tekton-dashboard.yaml new file mode 100644 index 000000000..24ab98a78 --- /dev/null +++ b/config/gcr-tekton-dashboard.yaml @@ -0,0 +1,59 @@ +# ------------------- Dashboard Deployment ------------------- # +apiVersion: apps/v1 +kind: Deployment +metadata: + name: tekton-dashboard + labels: + app: tekton-dashboard +spec: + replicas: 1 + selector: + matchLabels: + app: tekton-dashboard + template: + metadata: + name: tekton-dashboard + labels: + app: tekton-dashboard + spec: + containers: + - name: tekton-dashboard + image: gcr.io/tekton-nightly/dashboard:latest + ports: + - containerPort: 9097 + livenessProbe: + httpGet: + path: /health + port: 9097 + readinessProbe: + httpGet: + path: /readiness + port: 9097 + resources: + env: + - name: PORT + value: "9097" + - name: WEB_RESOURCES_DIR + value: /var/run/ko/web + - name: PIPELINE_RUN_SERVICE_ACCOUNT + value: "" + - name: INSTALLED_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace +--- +# ------------------- Dashboard Service ------------------- # +kind: Service +apiVersion: v1 +metadata: + name: tekton-dashboard + labels: + app: tekton-dashboard +spec: + ports: + - name: http + protocol: TCP + port: 9097 + targetPort: 9097 + selector: + app: tekton-dashboard