diff --git a/tutorials/katacoda/getting-started/intro.md b/tutorials/katacoda/getting-started/intro.md index 3487de42769375c3028ed8d5f9b44b679ddca3bf..7bca8c6a1848b49416cb9b4080be8233b1482fa8 100644 --- a/tutorials/katacoda/getting-started/intro.md +++ b/tutorials/katacoda/getting-started/intro.md @@ -1,7 +1,7 @@ -![logo](https://github.com/tektoncd/website/tree/master/tutorials/katacoda/getting-started/images/logo.png?raw=true) +![logo](https://raw.githubusercontent.com/tektoncd/website/master/tutorials/katacoda/logo.png) -Tekton is a powerful and flexible open-source framework for creating -CI/CD systems, allowing developers to build, test, and deploy across +Tekton is a powerful and flexible open-source framework for creating +CI/CD systems, allowing developers to build, test, and deploy across cloud providers and on-premise systems. In this scenario, you will build a basic CI/CD workflow with Tekton that diff --git a/tutorials/katacoda/getting-started/images/logo.png b/tutorials/katacoda/logo.png similarity index 100% rename from tutorials/katacoda/getting-started/images/logo.png rename to tutorials/katacoda/logo.png diff --git a/tutorials/katacoda/runs/index.json b/tutorials/katacoda/runs/index.json index eab3f9eb15c91b9cb0e0516f6d677cb5c9dc392b..115fe716253d1c1bfdd52bace9f9b2fb55349897 100644 --- a/tutorials/katacoda/runs/index.json +++ b/tutorials/katacoda/runs/index.json @@ -7,7 +7,8 @@ "steps": [ { "title": "Setup", - "text": "setup.md" + "text": "setup.md", + "foreground": "init.sh" }, { "title": "Basics", @@ -23,8 +24,7 @@ } ], "intro": { - "text": "intro.md", - "courseData": "init.sh" + "text": "intro.md" }, "finish": { "text": "finish.md" @@ -34,6 +34,6 @@ "uilayout": "terminal" }, "backend": { - "imageid": "kubernetes" + "imageid": "kubernetes-cluster-running:1.18" } } diff --git a/tutorials/katacoda/runs/intro.md b/tutorials/katacoda/runs/intro.md index ac5d66e640908893b6092f5bf89b142093108a34..0c23ede2a30229f2752d15791a0c3754c3eecbef 100644 --- a/tutorials/katacoda/runs/intro.md +++ b/tutorials/katacoda/runs/intro.md @@ -1,10 +1,8 @@ -![logo](https://github.com/tektoncd/website/tree/master/tutorials/katacoda/getting-started/images/logo.png?raw=true) +![logo](https://raw.githubusercontent.com/tektoncd/website/master/tutorials/katacoda/logo.png) -Tekton is Kubernetes-native and works well with widely-adopted CI/CD solutions, -such as [Jenkins](https://jenkins.io/)/[Jenkins X](https://jenkins-x.io/), -[Skaffold](https://skaffold.dev/), and [Knative](https://knative.dev/). -It is flexible, and supports many advanced CI/CD patterns, including -rolling, blue/green, and canary deployment. +[Tekton](https://tekton.dev) is a cloud native continuous integration and +delivery (CI/CD) solution. It allows developers to build, test, and deploy +across cloud providers and on-premises systems. In this scenario, you will learn about Tekton TaskRuns and PipelineRuns, the custom resources in Tekton for running a specific task or pipeline. diff --git a/tutorials/katacoda/runs/src/tekton-katacoda/pipelineResources/git.yaml b/tutorials/katacoda/runs/src/tekton-katacoda/pipelineResources/git.yaml index afdb5b7635d5c8f9e90732fc75ac20d50692c9b0..96bf0caa6351e4737e67776cab5d09105e9b2fb8 100644 --- a/tutorials/katacoda/runs/src/tekton-katacoda/pipelineResources/git.yaml +++ b/tutorials/katacoda/runs/src/tekton-katacoda/pipelineResources/git.yaml @@ -1,4 +1,4 @@ -apiVersion: tekton.dev/v1beta1 +apiVersion: tekton.dev/v1alpha1 kind: PipelineResource metadata: # The name of the pipeline resource diff --git a/tutorials/katacoda/runs/src/tekton-katacoda/tasks/task.yaml b/tutorials/katacoda/runs/src/tekton-katacoda/tasks/task.yaml index f6367a5955c3b0e08ebdaa87c200823657f0377c..e5a2afec6d4e0b643bcc019117bb4c54e5523dc2 100644 --- a/tutorials/katacoda/runs/src/tekton-katacoda/tasks/task.yaml +++ b/tutorials/katacoda/runs/src/tekton-katacoda/tasks/task.yaml @@ -10,9 +10,9 @@ spec: steps: - name: pytest image: python - script : | - #!/bin/bash - cd /workspace/git/runs/src/app - pip install -r requirements.txt - pip install -r dev_requirements.txt - pytest . + script: | + #!/bin/bash + cd /workspace/git/tutorials/katacoda/runs/src/app + pip install -r requirements.txt + pip install -r dev_requirements.txt + pytest . diff --git a/tutorials/katacoda/runs/src/tekton-katacoda/tasks/taskRun.yaml b/tutorials/katacoda/runs/src/tekton-katacoda/tasks/taskRun.yaml index f23ada0e77882a92927e5cdba173fa2eeca607a7..367c8ddc003c760793cd0cf28e914cdcc556fb50 100644 --- a/tutorials/katacoda/runs/src/tekton-katacoda/tasks/taskRun.yaml +++ b/tutorials/katacoda/runs/src/tekton-katacoda/tasks/taskRun.yaml @@ -5,8 +5,8 @@ metadata: spec: taskRef: name: example-task - inputs: - resources: + resources: + inputs: - name: git resourceRef: name: example-git diff --git a/tutorials/katacoda/runs/src/tekton-katacoda/tasks/taskRunTemplate.yaml b/tutorials/katacoda/runs/src/tekton-katacoda/tasks/taskRunTemplate.yaml index 336f118c1ec82288a2912c8c5ae4f9e4ed0bcd0a..b5a2615a9e221c1a15edcb61c793f83266af1f56 100644 --- a/tutorials/katacoda/runs/src/tekton-katacoda/tasks/taskRunTemplate.yaml +++ b/tutorials/katacoda/runs/src/tekton-katacoda/tasks/taskRunTemplate.yaml @@ -5,5 +5,6 @@ metadata: spec: taskRef: ... - inputs: + resources: + inputs: ... diff --git a/tutorials/katacoda/src/tekton-katacoda/resources/git.yaml b/tutorials/katacoda/src/tekton-katacoda/resources/git.yaml deleted file mode 100644 index d96734b53b66485693fdb3f23e62d35838ba49fd..0000000000000000000000000000000000000000 --- a/tutorials/katacoda/src/tekton-katacoda/resources/git.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - # The name of the pipeline resource - name: example-git -spec: - type: git - params: - # The revision/branch of the repository - - name: revision - value: master - # The URL of the repository - - name: url - value: https://github.com/tektoncd/website/ - diff --git a/tutorials/katacoda/tasks/index.json b/tutorials/katacoda/tasks/index.json index af23eb2f7d1d2566651d8d5645eba35a97316a86..7071be77dd15e159c349479bee31ccd04dc13062 100644 --- a/tutorials/katacoda/tasks/index.json +++ b/tutorials/katacoda/tasks/index.json @@ -7,7 +7,8 @@ "steps": [ { "title": "Setup", - "text": "setup.md" + "text": "setup.md", + "foreground": "init.sh" }, { "title": "Basics", @@ -35,8 +36,7 @@ } ], "intro": { - "text": "intro.md", - "courseData": "init.sh" + "text": "intro.md" }, "finish": { "text": "finish.md" @@ -46,6 +46,6 @@ "uilayout": "terminal" }, "backend": { - "imageid": "kubernetes" + "imageid": "kubernetes-cluster-running:1.18" } } diff --git a/tutorials/katacoda/tasks/intro.md b/tutorials/katacoda/tasks/intro.md index 95e6eedd7c8137027a53308bf9803138750e58ca..6299c652fd4bd207ab4816b18eb190a93453c3cd 100644 --- a/tutorials/katacoda/tasks/intro.md +++ b/tutorials/katacoda/tasks/intro.md @@ -1,10 +1,8 @@ -![logo](https://github.com/tektoncd/website/tree/master/tutorials/katacoda/getting-started/images/logo.png?raw=true) +![logo](https://raw.githubusercontent.com/tektoncd/website/master/tutorials/katacoda/logo.png) -Tekton is Kubernetes-native and works well with widely-adopted CI/CD solutions, -such as [Jenkins](https://jenkins.io/)/[Jenkins X](https://jenkins-x.io/), -[Skaffold](https://skaffold.dev/), and [Knative](https://knative.dev/). -It is flexible, and supports many advanced CI/CD patterns, including -rolling, blue/green, and canary deployment. +[Tekton](https://tekton.dev) is a cloud native continuous integration and +delivery (CI/CD) solution. It allows developers to build, test, and deploy +across cloud providers and on-premises systems. In this scenario, you will learn about Tekton tasks, the basic building block of CI/CD pipelines in Tekton. More specifically, **you will use a Tekton task diff --git a/tutorials/katacoda/tasks/src/tekton-katacoda/tasks/task.yaml b/tutorials/katacoda/tasks/src/tekton-katacoda/tasks/task.yaml index aec700dc891e8cf11104974374de728057290ed3..b0a76529232486e37d9d142898c7ae5656c50f4d 100644 --- a/tutorials/katacoda/tasks/src/tekton-katacoda/tasks/task.yaml +++ b/tutorials/katacoda/tasks/src/tekton-katacoda/tasks/task.yaml @@ -3,8 +3,8 @@ kind: Task metadata: name: example-task spec: - inputs: - resources: + resources: + inputs: - name: git type: git steps: @@ -14,7 +14,7 @@ spec: - /bin/bash - -c args: - - cd /workspace/git/tasks/src/client && pip install -r requirements.txt && pip install -r dev_requirements.txt && pytest . + - cd /workspace/git/tutorials/katacoda/tasks/src/client && pip install -r requirements.txt && pip install -r dev_requirements.txt && pytest . volumeMounts: - name: credential mountPath: /etc/credential @@ -34,4 +34,4 @@ spec: # Here you will change the directory, install all the dependencies the app uses, # and run the app args: - - git clone https://github.com/tektoncd/website.git && cd ./tutorials/katacoda/tasks/src/server && pip install -r requirements.txt && python main.py + - git clone https://github.com/tektoncd/website.git && cd ./website/tutorials/katacoda/tasks/src/server && pip install -r requirements.txt && python main.py diff --git a/tutorials/katacoda/tasks/src/tekton-katacoda/tasks/taskRun.yaml b/tutorials/katacoda/tasks/src/tekton-katacoda/tasks/taskRun.yaml index 1bc9acb07e5b43c7406863a9c66aa93d61ba5b76..2efed679d90c79a04cf045740fd0175ae8e440c0 100644 --- a/tutorials/katacoda/tasks/src/tekton-katacoda/tasks/taskRun.yaml +++ b/tutorials/katacoda/tasks/src/tekton-katacoda/tasks/taskRun.yaml @@ -3,8 +3,8 @@ kind: TaskRun metadata: name: example-task-run spec: - inputs: - resources: + resources: + inputs: - name: git resourceRef: name: example-git diff --git a/tutorials/katacoda/tasks/src/tekton-katacoda/tasks/taskTemplate.yaml b/tutorials/katacoda/tasks/src/tekton-katacoda/tasks/taskTemplate.yaml index 534ec74b583316c095a6780364a5e38511d9b6b8..45c0936a7e16b1b16b38a8b4345c4ad918b159e6 100644 --- a/tutorials/katacoda/tasks/src/tekton-katacoda/tasks/taskTemplate.yaml +++ b/tutorials/katacoda/tasks/src/tekton-katacoda/tasks/taskTemplate.yaml @@ -3,8 +3,8 @@ kind: Task metadata: name: example-task spec: - inputs: - resources: + resources: + inputs: ... steps: ... diff --git a/tutorials/katacoda/tekton-dashboard/index.json b/tutorials/katacoda/tekton-dashboard/index.json index 4f99cd053817b0c66627980e93dcaf4900b99482..f037afa0d49344cbbf60ce621ab8f21b9dc4ede7 100644 --- a/tutorials/katacoda/tekton-dashboard/index.json +++ b/tutorials/katacoda/tekton-dashboard/index.json @@ -46,7 +46,7 @@ "uilayout": "terminal-iframe" }, "backend": { - "imageid": "kubernetes", + "imageid": "kubernetes-cluster-running:1.18", "port": "80" } -} \ No newline at end of file +} diff --git a/tutorials/katacoda/tekton-dashboard/step1.md b/tutorials/katacoda/tekton-dashboard/step1.md index be444dd21c441413c62577aeda4b841e82e5a855..755dbf6e6fef244a841007989754ef37fa4e3a0b 100644 --- a/tutorials/katacoda/tekton-dashboard/step1.md +++ b/tutorials/katacoda/tekton-dashboard/step1.md @@ -11,9 +11,7 @@ Now, let's begin! ## Install the Tekton Dashboard Prerequisites - [Tekton Pipelines](https://github.com/tektoncd/pipeline/blob/master/docs/install.md) -`kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.10.1/release.yaml`{{execute}} -- [Tekton Triggers](https://github.com/tektoncd/triggers/blob/master/docs/install.md) (optional) -`kubectl apply --filename https://storage.googleapis.com/tekton-releases/triggers/previous/v0.3.1/release.yaml`{{execute}} +`kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.15.2/release.yaml`{{execute}} Verify the pods are running: `kubectl get pods -n tekton-pipelines`{{execute}} @@ -22,7 +20,7 @@ Verify the pods are running: For reference, the installation instructions are [here](https://github.com/tektoncd/dashboard#install-dashboard). To install the Tekton Dashboard, run the following command: -`kubectl apply --filename https://storage.googleapis.com/tekton-releases/dashboard/previous/v0.5.3/tekton-dashboard-release.yaml`{{execute}} +`kubectl apply --filename https://storage.googleapis.com/tekton-releases/dashboard/previous/v0.8.2/tekton-dashboard-release.yaml`{{execute}} @@ -31,45 +29,16 @@ Verify the Dashboard pod is running: ## Expose the Tekton Dashboard -### Install Ingress controller - -Install the nginx ingress controller into the `ingress-nginx` namespace: - -```bash -kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud/deploy.yaml -```{{execute}} - -Verify the ingress controller pod is running: - -```bash -kubectl get pods -n ingress-nginx -```{{execute}} - -### Create Ingress for the Tekton Dashboard - View the Tekton Dashboard Service: `kubectl get svc tekton-dashboard -n tekton-pipelines`{{execute}} -The Tekton Dashboard Service is exposed on port `9097`. So, create an Ingress +The Tekton Dashboard Service is exposed on port `9097`. So, set up a port forward for the `tekton-dashboard` Service on port `9097`: ```bash -cat << EOF | kubectl apply -f - -apiVersion: networking.k8s.io/v1beta1 -kind: Ingress -metadata: - name: tekton-dashboard - namespace: tekton-pipelines -spec: - backend: - serviceName: tekton-dashboard - servicePort: 9097 -EOF +kubectl port-forward -n tekton-pipelines --address=0.0.0.0 service/tekton-dashboard 80:9097 > /dev/null 2>&1 & ```{{execute}} -Verify the Ingress was created: -`kubectl get ingress -n tekton-pipelines`{{execute}} - ## Open the Tekton Dashboard Open the `Dashboard` tab in your Katacoda window, or click on the following link: diff --git a/tutorials/katacoda/tekton-dashboard/step5.md b/tutorials/katacoda/tekton-dashboard/step5.md index 0c942b3902c70305026518debb62c1b5cd280008..f979e7dee687d7478ceec7349724a219d59e685b 100644 --- a/tutorials/katacoda/tekton-dashboard/step5.md +++ b/tutorials/katacoda/tekton-dashboard/step5.md @@ -18,8 +18,12 @@ Verify both the `build` and `deploy` tasks have passed. ## Open the Deployed App -MyApp will be running on port `3000`. Click on the following link to open the -app: +Expose the app on port 3000: +```bash +kubectl port-forward --address=0.0.0.0 service/myapp 3000:3000 > /dev/null 2>&1 & +```{{execute}} + +Click on the following link to open the app: https://[[HOST_SUBDOMAIN]]-3000-[[KATACODA_HOST]].environments.katacoda.com/ ![View MyApp screenshot.](./assets/view-myapp.png)