Making Your App Soar
Without a Container
Manifest
Jason (Jay) Smith
@thejaysmith
● Defining Environments
● Build Packs
● Tekton
● Demo Time
● Q&A
Agenda
❏ 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?
Virtual machine
OS
Dependencies
Application Code
Hardware
Bare-metal server
OS
Dependencies
Application Code
Hardware
VMs Raised the abstraction
VMs and IaaS
Virtual machine
OS
Dependencies
Application Code
Hardware
Bare-metal server
OS
Dependencies
Application Code
Hardware
Container
OS
Dependencies
Application Code
Hardware
Containers raised the abstraction even more!
Nodes
Master
Kubernetes abstracts away infrastructure
Photo courtesy of https://n8d.at/
● 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
Buildpacks allow developers to
take advantage of the benefits
of containers, without needing
to understand them.
Source code OCI
Container
CNCF
Incubated
Project
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.
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
…
● 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"
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"
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
● 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.
● 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
Task with Steps
Pipeline
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
Tekton Hub has some Tasks
DEMO
Q&A
Thank you
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

Making your app soar without a container manifest

  • 1.
    Making Your AppSoar Without a Container Manifest
  • 2.
  • 3.
    ● Defining Environments ●Build Packs ● Tekton ● Demo Time ● Q&A Agenda
  • 4.
    ❏ Find anold 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?
  • 5.
    Virtual machine OS Dependencies Application Code Hardware Bare-metalserver OS Dependencies Application Code Hardware VMs Raised the abstraction
  • 6.
  • 7.
    Virtual machine OS Dependencies Application Code Hardware Bare-metalserver OS Dependencies Application Code Hardware Container OS Dependencies Application Code Hardware Containers raised the abstraction even more!
  • 8.
  • 9.
    Photo courtesy ofhttps://n8d.at/
  • 10.
    ● A buildpackis 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 developersto take advantage of the benefits of containers, without needing to understand them. Source code OCI Container
  • 12.
  • 13.
    npm-install /bin/detect /bin/build printf ‘hello world’ if1+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" ● AnOCI (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 orderedlist 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 Userapplication "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 runin 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
  • 19.
    ● Open Sourceand 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: TheCI/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
  • 21.
  • 22.
  • 23.
    Catalog ● Pluggable, reusableTasks 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
  • 24.
    Tekton Hub hassome Tasks
  • 25.
  • 26.
  • 27.
  • 28.
    Resources: ● Tekton IntegrationExample 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