Why now’s a great time to use the Tekton Dashboard
Learn more about the Tekton Dashboard and how to better view what's going on with your Tekton resources.
Over the past year, Tekton’s usage has grown significantly. However, as a Tekton enthusiasts, I’ve grown tired of trawling through YAML, using
kubectl logs, describing or getting pods, and either forgetting to use
-n or using
kubens every few commands. I bet you can relate and are probably thinking, like I am, that there has to be a better way to learn about what’s going on with your Tekton resources.
In this blog, I discuss the Tekton Dashboard, which has been around for a while. The Tekton team is always adding new features, listening to community feedback, and continuously pushing out releases. It’s certainly not intended as a guide to all things Tekton, but definitely serves as a great incentive to give Tekton a try and hopefully contribute to the community. It also resolves a few of the issues I mentioned above. Now let’s dive in!
Where and how to run a Tekton Dashboard
Right now, the Tekton Dashboard is tested on OpenShift 4.2, OpenShift 4.3, and Docker Desktop. If you have questions about where and how to run a Tekton Dashboard, I suggest browsing through the Tekton Dashboard documentation. Here you can find the answers to questions like:
- How do I install the latest version?
- I’m feeling brave. What does it take to tackle nightly builds?
- I’m feeling really brave. How can I begin building from source?
As well as providing comprehensive pages for your Tekton resources, such as
TaskRuns, and tasks, the Tekton Dashboard also provides an interface for creating and deleting Tekton annotated secrets and
ServiceAccounts. These are important and are usually used if you’re pushing to an image registry requiring authentication or interacting with a GitHub repository. You can always read up on how secrets work and whether or not you’ll need them.
Create a PipelineRun from scratch
Did you know that you can create
PipelineRuns from scratch? This includes the ability to create associated secrets and
PipelineRuns are associated to
ServiceAccounts. You need to ensure they have the secrets you need patched to them first. The image below illustrates what that would look like.
Load extensions into the dashboard
The Webhooks Extension allows you to use continuous integration (CI) and continuous delivery (CD) methodologies by applying Tekton triggers with a managed Tekton EventListener. Sound complicated? It’s not! You can create webhooks through panelling (so they’ll be created on either GitHub or GitLab) and the trigger resources are created and managed for you. However, you do still need a triggers-based pipeline to generate based on events, such as pushes, pull requests, or tags. Triggers are a Tekton-native way of doing things with events, like triggering
PipelineRuns, to build your freshly checked in code to a repository. If you’d like to learn more about how extensions work, see the extensions documentation.
The Webhooks Extension is the only one that the Tekton Dashboard currently supports, but the dashboard uses a lookup mechanism, as documented above, so anyone can build their own and have it served through the dashboard.
Check out this handy getting started guide on how to begin using the Tekton Dashboard Webhooks Extension for more detailed information.
Import resources from Git
You also have the ability to import resources from Git. A simple pipeline is provided as part of the install and panelling exists, such that you are directed to a repository and a
PipelineRun is started.
GitOps, a way of implementing continuous deployment for cloud-native applications, is popular and doing it through Tekton is even cooler. As an added advantage, there is a log (in the form of a
PipelineRun and its pod) that tells you exactly what happened and when.
The image below shows the current implementation of the import resources page. You’ll notice a variety of options are available so you can import the resources into a namespace of your choice, and the directory of your Tekton resources can be provided.
Read-only installs are available
It’s useful to prevent dangerous operations from running. Tekton Pipelines can be super powerful, and you may not want just anyone creating secrets,
PipelineResources, or pipelines. A good case in point is the Tekton Dashboard deployed as part of the Tekton “dogfooding” cluster, which is how the Tekton releases themselves are done.
This is a case of installing the appropriate file. Just use a -readonly suffix and then everything’s handled for you.
You’re finally ready to begin browsing a few Tekton projects and maybe begin contributing! There are many different repositories under this organization and you’re as welcomed in one as you are in any. If you’d like to raise issues or create a pull request, that’s even better! Here’s how to get started:
Great! You’re officially ready to begin your Tekton journey.
Now’s a great time to get involved with Tekton and having a dashboard provides a convenient means to view what’s going on and to create resources that your Tekton Pipelines need to run. There’s plenty you can do through Tekton that isn’t covered through this guide. I encourage you to check out the examples available across the Tekton repositories and either create something awesome, leave a bit of feedback, share the knowledge, help others, or all of the above!