Skip to content

dsabeti/cfnb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cloud (Foundry) Native Buildpacks

This is a spike on a tool to repackage Cloud Native Buildpacks as Cloud Foundry Buildpacks.

Usage

  1. Download a CNB buildpackage (eg. a Ruby release).
  2. Download a lifecycle.
  3. Run
    package.sh \
      --buildpack /path/to/buildpackage.cnb \
      --lifecycle /path/to/lifecycle.tgz \
      --output /tmp/buildpack.zip
    
  4. Upload the created buildpack to a Cloud Foundry.
  5. Push your app.

Questions for further investigation

  1. What is the contract for config.yml? This supports name and version, but some buildpacks include extra config:
  2. What should we do about the cache?

Supporting VCAP_SERVICES

The current buildpacks have support for reading the VCAP_SERVICES environment variable, but only so that they can support integrations by third-party vendors. Below is a survey of the buildpacks we maintain today that reference VCAP_SERVICES and how they use it.

Python

Go

Node.js

.Net Core

Staticfile

Supporting override.yml

The override.yml feature allows users to override values in the buildpack manifest. This is mostly to include their own dependencies or override the default values. To use the feature, users will create their own buildpack that contains an override.yml file. This buildpack will then be included in the build prior to the buildpack that it overrides. When the buildpack executes it will simply copy its override.yml into its designated dependencies directory. Later, when the buildpack that will be overridden executes, it searches the entire dependencies directory for any override.yml file that may override its manifest and then overrides its manifest to include these new settings. Once it has overridden the manifest, it continues execution as normal.

It is not clear what the impact of not including this in our implementation might be. The shimmed buildpacks will not have a manifest.yml file that can be overridden. Instead, we would need to map this to something like our existing dependency mapping functionality.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%