GithubHelp home page GithubHelp logo

tekton's Introduction

layout title date categories description thumbnail disable_comments authorbox toc mathjax tags published
post
Tekton Pipelines
2019-05-27
wiki
img/placeholder.jpg
false
true
true
true
dockerhub
kubernetes
helm
tekton
CI/CD Pipeline
true

Overview

In this post, we will go through the basics of Google Tekton and build Tekton pipeline to build container images using Kaniko and publish them to dockerhub. As of now triggering of the build is manual until auto trigger feature is live.

Goal

Creating a pipeline for building and publishing Container images.

Prerequisites

To start using Tekton, you need to have:

  1. A GitHub account
  2. Owner permissions for a project hosted on GitHub.
  3. Account and Docker Repository in DockerHub.
  4. Running Kubernetes Environment

Overview

Tekton Pipelines is an OpenSource project by Google to Build, Run and Maintain CI/CD pipelines for Kubernetes Apps and provides k8s-style resources declaration for CI/CD-style pipelines. Tekton Pipelines are built using Kubernetes CRD’s, it is based on Operator model.

  • Steps are fundamental blocks of Pipelines. A step is actually an instance of an image and it is Kubernetes container spec. step contains the actual work to be done.

  • Tasks contain a series of steps to be executed in sequential order on the same node, so they can share resources i.e. output/artifacts/parameters of one step to another. Tasks can exist and be invoked completely independently of Pipelines; they are highly cohesive and loosely coupled. Tasks can be invoked via TaskRuns

  • Pipelines lets you put together the tasks, so they can run concurrently/Sequentially. They are not guaranteed to execute on the same node, it depends on K8S’s scheduling of pods. But you can have inputs for one task that come from the output of another task, which is specified in the pipeline. They can be triggered by events or by manually creating PipelineRuns

  • Pipelines and tasks are declared once and they are used again and again. We create TaskRuns and PipelineRuns to invoke Tasks and PipelineRuns.

  • PipelineResources are the artifacts used as inputs and outputs of Tasks.

Getting Started

  1. clone git clone https://github.com/kvenkata986/tekton.git and cd tekton

  2. Install Tekton. This command downloads latest release of tekton and does a kubectl apply -f https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.7.0/release.yaml

     ./install.sh deploy_tekton
    
  3. Create Docker Registry Secret and Service Account

     ./install.sh docker_registry
    
  4. Now create PipelineResource for Github and DockerHub. Here we specify our git repository and Project in DockerHub were images are pushed

     ./install.sh create_PipelineResource
    
  5. Now Create a Task which downloads our repo specified in above step from github and using the Dockerfile from the downloaded repo, it builds Image using kaniko.

     ./install.sh create_Task
    
  6. Now Create TaskRun to run above pipeline

     ./install.sh create_TaskRun
    

tekton's People

Contributors

kvenkata986 avatar

Watchers

James Cloos avatar

Forkers

srinivma1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.