GithubHelp home page GithubHelp logo

builder's Introduction

riff Buildpack Group

This repository hosts the files necessary to create the buildpack builder used when riff builds functions from source with the riff function create <buildpack> <fn-name> command.

Relation to the projectriff/riff-buildpack Repository

In the v3 buildpack ecosystem, a distinction needs to be made between a buildpack and a builder.

The latter is what is actually involved when running riff function create with the java buildpack approach. A builder is the composition of several buildpacks using groups. It takes the form of a docker image. In the case of riff, its official location is projectriff/buildpack. The purpose of this repository is to allow the creation of that builder.

The former, a buildpack, is a more fine grained unit of logic that can be composed and collaborate with other buildpacks. The projectriff/riff-buildpack repository hosts one of them, responsible for applying the riff-specific logic on top of the more general java building logic. As more languages become supported by riff, that buildpack will evolve to collaborate with other buildpacks (e.g. node), while this repository’s builder-riff.toml file will enhance its group(s) to reference e.g. the generic node buildpack.

Building

Prerequisites

To build the projectriff/buildpack builder you’ll need

  • Go 1.11+

  • a running local docker daemon

  • the pack command line tool. At the time of writing, a version built from master is required (to support references to remote buildpacks in builder-riff.toml):

    git clone https://github.com/buildpack/pack
    cd pack
    GO111MODULE=on go install ./cmd/pack

Creating the Builder

Then, building the builder is as simple as

git clone https://github.com/projectriff/riff-buildpack-group
cd riff-buildpack-group
pack create-builder -b builder-riff.toml projectriff/buildpack

Using the Builder Locally

Lastly, to use the builder created above, just refer to the pack build reference:

cd where-your-function-is
pack build --builder projectriff/buildpack --no-pull -p . your-org/my-function

You should get something similar to

2018/10/17 12:11:51 Selected run image 'packs/run' from stack 'io.buildpacks.stacks.bionic'
*** DETECTING:
2018/10/17 10:11:53 Group: Cloud Foundry OpenJDK Buildpack: pass | Cloud Foundry Build System Buildpack: pass | riff Buildpack: pass
*** ANALYZING: Reading information from previous image for possible re-use
*** BUILDING:
-----> Cloud Foundry OpenJDK Buildpack 1.0.0-BUILD-SNAPSHOT
-----> OpenJDK JDK 1.8.181: Reusing cached dependency
-----> OpenJDK JRE 1.8.181: Contributing to launch
       Downloading from https://java-buildpack.cloudfoundry.org/openjdk/bionic/x86_64/openjdk-1.8.0_181.tar.gz
[...]
---> Running in 68e4eef095c7
---> f36967212b6c
---> f36967212b6c
Successfully built f36967212b6c
Successfully tagged your-org/my-function

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.