4. ❏ Find an old computer
❏ Install Linux
❏ Install Apache, MySQL, PHP
❏ Install PHP Plugins
❏ Configure Apache
❏ Create VirtualHosts
❏ Create New User
❏ Create Folder
❏ Open up firewall and port
Remember all the work you
had to do just to get a server
going?
10. ● A buildpack is a set of executables that inspects your app source
code and creates a plan to build and run your application
● TL;DR, Build containers without a dockerfile
● Originated at CloudFoundry
● CNCF Project
● Great for CI/CD
11. Buildpacks allow developers to
take advantage of the benefits
of containers, without needing
to understand them.
Source code OCI
Container
13. npm-install
/bin/detect
/bin/build
printf ‘hello world’
if 1+1==2
printf “I love math”
else
…
end
Builder (OCI container)
npm-install
/bin/detect
/bin/build
npm-install
/bin/detect
/bin/build
Buildpacks
Buildpacks are run in a container
called a builder.
14. Definition: "builder"
● An OCI (Docker) image.
● A composition of buildpacks, groups, and lifecycle binaries.
● The "platform" (e.g., Cloud Build, Tekton, pack) provides the user source to the
builder image and invokes it to get an application image built.
% pack suggest-builders
Suggested builders:
Google: gcr.io/buildpacks/builder:v1
Ubuntu 18 base image with buildpacks for .NET, Go, Java, Node.js, and Python
Paketo Buildpacks: gcr.io/paketo-buildpacks/builder:tiny
Tiny base image (bionic build image, distroless run image) with buildpacks for Golang
…
15. ● An ordered list of buildpacks that operate as a group.
● Roughly equivalent to "how do I build this language?"
Node.js
NPM
runtime gcp-build npm-install entrypoint devmode
Node.js
Yarn
runtime gcp-build yarn-install entrypoint devmode
Golang runtime go-mod go-build entrypoint devmode
Definition: "buildpack group"
16. Ubuntu
System libraries
node_modules dependencies
User application
"stack"
application
image
● The base image on which application layers are built.
● Each buildpack supports a set of stacks.
● Buildpacks cannot apt-get, so those sorts of things need to be part of
the stack.
Definition: "stack"
17. Buildpacks are run in a container called a builder.
The buildpack groups run /bin/detect to see which apply, and the run /bin/build
for each buildpack to build the source into layers.
These layers are placed on top of the stack.
npm-install
/bin/detect
/bin/build Ubuntu
System libraries
node_modules
dependencies
User application
stack
App
image
Builder (OCI Image)
npm-install
/bin/detect
/bin/build
npm-install
/bin/detect
/bin/build
Buildpacks
printf ‘hello world’
if 1+1==2
printf “I love math”
else
…
end
18.
19. ● Open Source and governed by the new Continuous Delivery
Foundation (cd.foundation)
● Kubernetes-native components that are declarative, reproducible
and composable
● Event Triggers for automating builds
● Catalog of reusable Tasks and Pipelines
● Integrated with other projects such as Jenkins X, Knative and more!
https://tekton.dev
https://github.com/tektoncd
Tekton aims to improve the security, velocity and reliability of software
delivery for everyone by creating a set of standard CI/CD components
based on cloud native technologies.
20. ● Pipelines: The CI/CD component
● Step: an operation in a CI/CD workflow such as running pytest
on a python application
● Task: A collection of steps. These are instantiated in a
Kubernetes Pod
● Pipeline: A collection of tasks in order.
● Trigger: The component for Eventing
○ EventListener: A CRD that enables declarative way to
collect HTTP events with JSON Payloads
○ TriggerTemplate: Resource templates for triggers
○ TriggerBinding: Binds events with the trigger template.
Pass parameters from JSON payload
23. Catalog
● Pluggable, reusable Tasks assembled
into Pipelines
● Tasks can be defined once and reused
by multiple Pipelines, different teams
go test
deploy
us-west1
image build
deploy
10%
canary
canary
analysis
deploy
us-east1
deploy
us-central1
image scan
Catalog
go test
image build
deploy x%
somewhere
canary
analysis
deploy
somewhere
image scan
28. Resources:
● Tekton Integration Example in BuildPacks GitHub
● Build an app with Buildpacks
● Tekton Hub: Buildpacks
● Build and ARM App with Buildpacks
● Build a Windows App with Buildpacks
● Build a BuildPack