Git Product home page Git Product logo

cnb2cf's Introduction

cnb2cf

A tool to convert Cloud Native Buildpacks (CNBs) to a single Cloud Foundry Buildpack (Shimmed buildpack)

A shimmed buildpack is a wrapper around a group of CNBs, allowing them to run on Cloud Foundry deployments.

Installation

Requirements

  • Go 1.11+
$ git clone https://github.com/cloudfoundry/cnb2cf
$ cd cnb2cf
$ ./scripts/build.sh

The binary (cnb2cf) can be found in the build dir.

Usage

cnb2cf package -stack <stack> [-cached] [-version <version>] [-cachedir <path to cachedir>] [-manifestpath <optional path to manifest>]

This command creates a shimmed buildpack .zip file when run from within a shimmed buildpacks root directory. This allows you to cache the CNB dependencies in your shimmed buildpack, and to be run as a github url. The command must be run from the directory of a shimmed buildpack repo.

An example of the shimmed buildpack buildpack.toml can be found here. It must have the lifecycle as a dependency along with other required dependencies.

The output of the command is a buildpack .zip file in the current directory, with the name <language>_buildpack[-<cached>]-<stack>-<version>.zip. That zip file can be then uploaded to Cloud Foundry by running the cf create-buildpack command.

Simple Workflow Example

A simple example workflow using the using a shimmed python Cloud Native Buildpack:

$ cd <directory-that-contains-the-shimmed-buildpack.toml>

$ cnb2cf package -stack cflinuxfs3 -version 1.0.0
# the above produces python_buildpack-cflinuxfs3-1.0.0.zip

# then upload to Cloud Foundry using the cf cli
$ cf create-buildpack my_shimmed_buildpack python_buildpack-cflinuxfs3-1.0.0.zip 1

Debug Options

For additional output during detection phase set the CF environment variable LOG_LEVEL to debug, using cf set-env Additional LOG_LEVEL options are specified here

cnb2cf's People

Contributors

cf-buildpacks-eng avatar dependabot-preview[bot] avatar thitch97 avatar ryanmoran avatar dwillist avatar arjun024 avatar dfreilich avatar chhhavi avatar kardolus avatar joshzarrabi avatar foresteckhardt avatar mvalliath avatar

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.