Tekton is an open source project that provides a Kubernetes-native way to declare continuous integration/continuous deployment-style pipelines. In this code pattern, we show you how we used Tekton to reduce application deployment time from 45 minutes of clicking around and configuring down to 15 minutes and a few commands. We speed up the installation of Tekton itself by means of the Red Hat OpenShift Pipelines Operator that is available from the OperaterHub in clusters of version 4.1 and greater.
To demonstrate the functionality of Tekton, we need an example application to deploy. Example Health is a sample app we created to demonstrate application modernization. As often is the case in production applications, Example Health started out as two separate applications. When our business needs grew faster than we anticipated, we quickly added analytic capabilities to our application.
In the vein of 12-factor application best practices, we split our workload into five microservices. This translates into the Example Health application consisting of five different images. Currently, we have all five of these services deployed into one Red Hat® OpenShift® on IBM Cloud™ cluster.
- User creates an OpenShift cluster.
- User subscribes to the OpenShift Pipelines Operator via the OperatorHub.
- Retrieve Pipelines installer image from the Red Hat Ecosystem Catalog.
- Install Tekton Pipelines, Triggers, and ClusterTasks.
- Execute pipeline and build, deploy, and expose Example Health images.
- Confirm functionality of resources.
Ready to get started? Check out the README for detailed instructions on how to:
- Target your cluster.
- Install Tekton
- Create a service account.
- Install tasks.
- Apply resources, pipeline, and run.