The Power of Buildpacks in a Platform as-a-Service (PaaS)

33 %
67 %
Information about The Power of Buildpacks in a Platform as-a-Service (PaaS)

Published on February 26, 2014

Author: activestate



uildpacks are the primary method for deploying applications in Stackato. In essence a buildpack is a network-available directory containing a handful of configuration scripts used to set up containers to provision cloud applications. Developed by Heroku, buildpacks are part of the Cloud Foundry v2 architecture. Understanding their use and power in a private PaaS is important in order give you the flexibility you need to deploy almost any applications, regardless of its complexity, technology stack, or dependencies. Buildpacks will help your users tremendously by setting up the exact environment according to their application needs.

In this webinar, Technology Evangelist, John Wetherill, and Cloud Engineer, Ho Ming Li, will discuss the power of buildpacks in more detail. You will learn:

- What a buildpack is
- The history/origins of buildpacks
- Which sites and services support buildpacks today
- Who uses buildpacks and why they are important
- How buildpacks work
- How custom buildpacks are used and created
- Buildpack alternatives / alternate approaches
- Buildpack limitations and gotchas
- The future of buildpacks

The Power of Buildpacks in PaaS The Platform for the Agile Enterprise John Wetherill Technology Evangelist Ho Ming Li Cloud Engineer

Recent Events | @activestate | #stackato | | Copyright 2014

Recent Events | @activestate | #stackato | | Copyright 2014

What is Stackato? A secure, stable, and commercially supported Platform-as-aService (PaaS) built with open source components such as Cloud Foundry and Docker | @activestate | #stackato | | Copyright 2014

Buildpacks Defined “Cloud Foundry uses buildpacks to transform user-provided artifacts into runnable applications” Buildpacks can be used to: • • • • examine user-provided artifacts download dependencies configure application properties specify the application entry point and runtime options | @activestate | #stackato | | Copyright 2014

Anatomy of a Buildpack • a buildpack is a network-accessible git repository • repo must contain a bin directory with three scripts bin/detect bin/release bin/compile | @activestate | #stackato | | Copyright 2014

detect script • determine whether to apply a buildpack • single parameter: BUILD_DIR • script examines this directory If buildpack can service this app: • print framework name to stdout • exit 0 | @activestate | #stackato | | Copyright 2014

sample detect script #!/bin/sh if [-f $1/*.js]; then # looks like a node application echo “nodejs” exit 0 else exit 1 fi | @activestate | #stackato | | Copyright 2014

compile script • perform the buildpack transformation • three parameters: BUILD_DIR CACHE_DIR ENV_DIR • anything goes here: download dependencies, configure environment, tweak files | @activestate | #stackato | | Copyright 2014

sample compile script #!/bin/sh if [ ! -s $1/hello.txt ]; then echo "hello.txt was empty" exit 1 fi cat $1/hello.txt | sed -e "s/[Hh]ello/Goodbye/g" > $1/goodbye.txt | @activestate | #stackato | | Copyright 2014

sample compile script #!/bin/sh wget something apt-get install something-else echo “some: config” > config-file.yml | @activestate | #stackato | | Copyright 2014

release script • release script must output yaml • specify “addons” • specify Procfile entries (app entrypoint) (config_vars from Heroku deprecated - use shell-script in app instead) | @activestate | #stackato | | Copyright 2014

sample release script #!/usr/bin/env bash cat <<EOF --web: java $JAVA_OPT jetty-runner --port $PORT addons: mysql:dev EOF | @activestate | #stackato | | Copyright 2014

Procfile • Not part of buildpack • Specifies app entrypoint • Procfile must be present in app build dir Sample procfile for Java app: web: java $JAVA_OPTS jetty-runner --port $PORT | @activestate | #stackato | | Copyright 2014

CloudFoundry / Stackato built-in buildpacks For Java, Ruby, NodeJS • • • | @activestate | #stackato | | Copyright 2014

CloudFoundry Community Buildpacks | @activestate | #stackato | | Copyright 2014

Summary Procfile Buildpack Application source | @activestate | #stackato | | Copyright 2014

Minimal buildpack | @activestate | #stackato | | Copyright 2014

Buildpacks and stackato.yml stackato.yml is used in conjunction with buildpack to: • specify buildpack location • configure environment • specify staging and runtime hooks • request services • request resources • specify app properties | @activestate | #stackato | | Copyright 2014

Specifying Buildpacks • Buildpack can be selected in stackato.yml: buildpack: • Or as option to stackato command: stackato push --buildpack ssh://git/buildpack.git | @activestate | #stackato | | Copyright 2014

Legacy Buildpack • special bundled buildpack for “legacy” Stackato apps • provides all frameworks from pre 3.0 Stackato • specify framework and runtime in stackato.yml name: bottle-py3 framework: type: python runtime: python32 | @activestate | #stackato | | Copyright 2014

Buildpack Catalog | @activestate | #stackato | | Copyright 2014

Customizing a buildpack Why customize? • alternate versions of runtimes, frameworks, services • new (or old) runtimes (FORTRAN anyone?) • complete control of app provisioning process | @activestate | #stackato | | Copyright 2014

Customizing a buildpack Three simple steps: 1. fork an existing buildpack 2. tweak the scripts in bin, add assets 3. specify location of new buildpack in stackato.yml or as parameter to “stackato push --buildpack https://…” | @activestate | #stackato | | Copyright 2014

Buildpacks and Licenses EULAs Software license strings API keys Commercial Software Example: | @activestate | #stackato | | Copyright 2014

Buildpack Futures Better Asset Caching More services and frameworks Docker Integration? | @activestate | #stackato | | Copyright 2014

Why Enterprises Use Stackato Faster Time to Market With Stackato, developers can get apps to the cloud in minutes, not weeks. Greater Security Stackato has been extended and hardened to provide enterprises with tighter security, better compliance, and more control over secure, sensitive data. Agility and Scalability As usage grows, Stackato scales applications to deliver performance for end-users demand. Productivity and Innovation Stackato automates the configuration, deployment, and management of applications. Flexibility Stackato gives developers and IT managers the freedom they need. The polyglot nature of Stackato means you can give your developers the flexibility to work with the best choice of language for any task. | @activestate | #stackato | | Copyright 2014

Download your own Stackato micro cloud at:

#stackato presentations

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

A Flexible PaaS: Stackato for the Agile Enterprise - YouTube

... Private PaaS. Stackato is a polyglot PaaS that ... Buildpacks in a Platform as a Service (PaaS) ... Platform for Creating a Private PaaS ...
Read more

Platform As A Service Paas | LinkedIn

View 6786 Platform As A Service Paas ... Platform as a service means that a company like ours can build ... The Power of Buildpacks in a Platform as ...
Read more

The future of Platform as a Service | Tivix

... modeled after well-known "Platform as a Service" (PaaS) ... The future of Platform as a Service. ... Heroku buildpacks, with the additional power ...
Read more

ActiveState Introduces Stackato Support for Heroku Buildpacks

Home » ActiveState Introduces Stackato Support for ... (PaaS), now supports Heroku buildpacks. ... for creating a private platform as a service (PaaS), ...
Read more

Kevin N - Heroku Buildpacks - YouTube

Kevin N - Heroku Buildpacks ... Heroku Buildpacks ... The Power of Buildpacks in a Platform as a Service (PaaS) - Duration: 57:32.
Read more

ActiveState Introduces Stackato Support for Heroku Buildpacks

ActiveState Introduces Stackato Support for Heroku Buildpacks. June ... private Platform as a Service (PaaS), ... the power and flexibility to ...
Read more

ActiveState Introduces Stackato Support for Heroku Buildpacks

... the application platform for creating a private Platform as a Service (PaaS), now supports Heroku buildpacks. ... Heroku calls upon buildpacks ...
Read more

Platform as a Service: A Market Analysis - Jedidjah

PaaS offers a new way to ... Platform as a Service ... The big problem with PaaS is basically that they don't really give you power over the servers you ...
Read more

Cloud Foundry has landed on the DCOS - Mesosphere

... (PaaS) onto Apache Mesos and the Mesosphere Datacenter Operating System. Huawei is integrating the Cloud Foundry platform-as-a-service (PaaS) ... power ...
Read more

Review: Cloud Foundry brings power and polish to PaaS - 推酷

... The platform-as-a-service ... (mobile back end as a service) on Pivotal's PaaS, ... Cloud Foundry brings power and polish to PaaS," was originally ...
Read more