Reader small image

You're reading from  Building CI/CD Systems Using Tekton

Product typeBook
Published inSep 2021
PublisherPackt
ISBN-139781801078214
Edition1st Edition
Right arrow
Author (1)
Joel Lord
Joel Lord
author image
Joel Lord

Joel Lord (joel__lord on Twitter) is passionate about the web and technology in general. He likes to learn new things, but most of all, he wants to share his discoveries. He does so by traveling to various conferences all across the globe. He graduated from college with a degree in computer programming in the last millennium. Apart from a little break to get his BSc in computational astrophysics, he has always worked in the industry. In his daily job, Joel is a developer advocate with MongoDB, where he connects with software engineers to help them make the web better by using best practices around JavaScript. In his free time, he can be found stargazing on a campground somewhere or brewing a fresh batch of beer in his garage.
Read more about Joel Lord

Right arrow

Preface

Tekton is a powerful yet flexible Kubernetes-native open source framework for creating continuous integration and continuous delivery (CI/CD) systems. It lets you build, test, and deploy across multiple cloud providers or on-premises systems by abstracting away the underlying implementation details.

Building CI/CD Systems Using Tekton covers everything you need to know to start building your pipeline and automate application delivery in a cloud-native environment. Using a hands-on approach, you will learn about the basic building blocks that you can use to compose your CI/CD pipelines. You will then learn how to use these components in conjunction with Tekton Triggers to automate the delivery of your application in a Kubernetes cluster.

By the end of this book, you will know how to compose Tekton Pipelines and use them with Tekton Triggers to build powerful CI/CD systems.

Who this book is for

This book caters to everyone who wants to learn about one of the most powerful Kubernetes-native CI/CD systems: Tekton. This book is aimed at software developers who want to use the Custom Resource Definitions (CRDs) in Kubernetes and use Tekton to run pipeline tasks in order to build and own application delivery pipelines.

What this book covers

Chapter 1, A Brief History of CI/CD, takes you a step back in time and explains where CI/CD comes from and why it is so important nowadays. This will help you understand the importance of building robust pipelines for quicker delivery of your application.

Chapter 2, A Cloud-Native Approach to CI/CD, explains that Tekton is different from other CI/CD solutions because of its cloud-native approach. In this chapter, you will learn what cloud-native development is and what it means in the context of CI/CD pipelines.

Chapter 3, Installation and Getting Started, explains how to prepare your environment for the exercises that will be presented in the book.

Chapter 4, Stepping into Tasks, explains that tasks are the basic building block of Tekton pipelines. They are at the heart of the Tekton philosophy. In this chapter, you will learn how to build and use tasks that are reusable.

Chapter 5, Jumping into Pipelines, explains that a Tekton pipeline is composed of multiple tasks. In this chapter, you will learn how to use the tasks you learned about in the previous chapter to build pipelines.

Chapter 6, Debugging and Cleaning Up Pipelines and Tasks, demonstrates that when authoring tasks, things don’t always work as expected. This chapter introduces concepts to help find issues with Tekton pipelines and tasks. It also introduces a new concept called finally, which helps to clean up after a pipeline has been executed.

Chapter 7, Sharing Data with Workspaces, explains that in order to share data across the various tasks in a pipeline, there was originally a concept of pipeline resources. In the latest iteration of Tekton, workspaces are now the recommended way to do this.

Chapter 8, Adding when Expressions, explains that in order to add conditional statements in the execution of a pipeline, when expressions can be used. These expressions control the flow of the pipeline based on conditions.

Chapter 9, Securing Authentication, demonstrates that for certain operations, it is necessary to authenticate into a service. This can be done without exposing credentials by using secrets.

Chapter 10, Getting Started with Triggers, covers Tekton Triggers, a sister project of Tekton Pipelines that adds the ability to automatically trigger a pipeline by opening a route on your Kubernetes cluster and listening for incoming requests. In this chapter, you will learn about the new objects that are introduced by Tekton Triggers and how to install and prepare a local minikube cluster to listen for incoming requests.

Chapter 11, Triggering Tekton, explains how to create the required objects for the cluster to listen for a GitHub webhook and trigger a pipeline on certain actions.

Chapter 12, Preparing for a New Pipeline, prepares you to deploy a full real-world example of a Tekton pipeline. You will start by cleaning up the cluster and install all the required components on a fresh new installation of minikube. You will then be invited to explore the application that is about to be deployed. This will be a Node.js Express server with a few basic routes. Finally, you will be guided through the process of manually deploying and updating the application into the local cluster.

Chapter 13, Building a Deployment Pipeline, shows you how to build the tasks that are required for the pipeline and link them together. You will also need to create conditions, secrets, and workspaces to fully deploy the application.

To get the most out of this book

In order to use Tekton Pipelines, you will need access to a Kubernetes cluster. All the examples in this book are running on minikube. The installation instructions are provided in the book.

If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Building-CI-CD-systems-using-Tekton. In case there’s an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Code in Action

Code in Action videos for this book can be viewed at https://bit.ly/2VmDYy0.

Download the color images

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: http://www.packtpub.com/sites/default/files/downloads/9781801078214_ColorImages.pdf.

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “Mount the downloaded WebStorm-10*.dmg disk image file as another disk in your system.”

A block of code is set as follows:

apiVersion: apps/v1 
kind: Deployment 
... 
   spec: 
     containers:

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

     - name: tekton-pod 
       image: <YOUR_USERNAME>/tekton-lab-app 
       ports: 
       - containerPort: 3000

Any command-line input or output is written as follows:

$ kubectl apply -f ./deploy.yaml 
deployment.apps/tekton-deployment created 
service/tekton-svc created 
ingress.networking.k8s.io/tekton-ingress created  

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: “On the Add webhook screen on GitHub, fill in the form.”

Tips or important notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, mention the book title in the subject of your message and email us at customercare@packtpub.com.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.

Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at copyright@packt.com with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share your thoughts

Once you've read Building CI/CD Systems Using Tekton., we'd love to hear your thoughts! Please https://packt.link/r/1801078211 for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we're delivering excellent quality content.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Building CI/CD Systems Using Tekton
Published in: Sep 2021Publisher: PacktISBN-13: 9781801078214
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Author (1)

author image
Joel Lord

Joel Lord (joel__lord on Twitter) is passionate about the web and technology in general. He likes to learn new things, but most of all, he wants to share his discoveries. He does so by traveling to various conferences all across the globe. He graduated from college with a degree in computer programming in the last millennium. Apart from a little break to get his BSc in computational astrophysics, he has always worked in the industry. In his daily job, Joel is a developer advocate with MongoDB, where he connects with software engineers to help them make the web better by using best practices around JavaScript. In his free time, he can be found stargazing on a campground somewhere or brewing a fresh batch of beer in his garage.
Read more about Joel Lord