Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/buildpacks/github-…
Browse files Browse the repository at this point in the history
…actions-5.7.0
  • Loading branch information
AidanDelaney committed Jun 4, 2024
2 parents 51ec51f + 3ec1c78 commit 879c0ef
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 45 deletions.
2 changes: 1 addition & 1 deletion content/docs/.common/concepts/composite-buildpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title="What is a composite buildpack?"
weight=99
+++

A composite buildpack, also sometimes called a "meta-buildpack",
A composite buildpack, also sometimes called a "meta buildpack",
is a buildpack that does not contain any `./bin/detect` or `./bin/build` binaries,
but instead references other buildpacks in its `buildpack.toml` via the `[[order]]` array.

Expand Down
46 changes: 36 additions & 10 deletions content/docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,30 @@ weight=1
summary="Get started with Cloud Native Buildpacks."
+++

## Talks
## Welcome

{{< talks >}}
Cloud Native Buildpacks (CNBs) transform your application source code into [container images](https://github.com/opencontainers/image-spec/blob/main/spec.md) that can run on any cloud.

With buildpacks, organizations can concentrate the knowledge of container build best practices within a specialized team, instead of having application developers across the organization individually maintain their own Dockerfiles. This makes it easier to know what is inside application images, enforce security and compliance requirements, and perform upgrades with minimal effort and intervention.

The CNB project was initiated by Pivotal and Heroku in January 2018 and joined the Cloud Native Computing Foundation (CNCF) as an Apache-2.0 licensed project in October 2018. It is currently an incubating project within the CNCF.

---

## Tutorials

* [An App’s Brief Journey from Source to Image](/docs/app-journey/) - An easy-to-follow introduction to Cloud Native Buildpacks using `pack`, a command line tool for Cloud Native Buildpacks.
* [Creating a Cloud Native Buildpack](/docs/for-buildpack-authors/tutorials/basic-buildpack) - Tutorial walking through the creation of a simple Ruby buildpack.
* [How to write a basic buildpack](/docs/for-buildpack-authors/tutorials/basic-buildpack) - A tutorial walking through the creation of an example NodeJS buildpack.

---

## Going deeper

See how-to guides, concepts, and tutorials tailored to specific personas:

* [App Developers](/docs/for-app-developers/)
* [Buildpack Authors](/docs/for-buildpack-authors/)
* [Operators](/docs/for-platform-operators/)
* [App Developers](/docs/for-app-developers/)
* [Buildpack Authors](/docs/for-buildpack-authors/)
* [Operators](/docs/for-platform-operators/)

## [Tools](/docs/for-platform-operators/)

Expand All @@ -31,6 +37,8 @@ See how-to guides, concepts, and tutorials tailored to specific personas:
* **[Pack](/docs/for-platform-operators/how-to/integrate-ci/pack)** - {{< summary "/docs/for-platform-operators/how-to/integrate-ci/pack" >}}
* **[Tekton](/docs/for-platform-operators/how-to/integrate-ci/tekton)** - {{< summary "/docs/for-platform-operators/how-to/integrate-ci/tekton" >}}

---

## [Reference](/docs/reference/)

Reference documents for various key aspects of the project.
Expand All @@ -40,18 +48,36 @@ Reference documents for various key aspects of the project.

---

# Community and Support
## Talks

We love talks to share the latest development updates, explain buildpacks basics and more, receive feedback and questions, and get to know other members of the community.

### Conference Talks

Check out some of our most recent and exciting conference talks below. More talks are available in our [Conference Talks Playlist](https://www.youtube.com/playlist?list=PL1p8pquzNvRqz3v7Q-OA7wldIxLCNFHcC) on YouTube.

{{< talks >}}

If you are interested in giving a talk about buildpacks, the linked slides may provide a useful starting point. Please feel free to reach out in Slack if you'd like input or help from the CNB team!

### Meetings

Feel free to look through the archive of previous community meetings in our [Working Group Playlist](https://www.youtube.com/playlist?list=PL1p8pquzNvRpDbbgZ0db0MRA-W5_w0G1U) on YouTube. If you would like to attend a Working Group meeting, check out our [community](/community/) page.

---

## Community and Support

Cloud Native Buildpacks is an incubating project in the CNCF. We welcome contribution from the community. Here you will find helpful information for interacting with the core team and contributing to the project.

## Community
### Community

The best place to contact the Cloud Native Buildpack team is on the [CNCF Slack](https://slack.cncf.io/) in the #buildpacks or [mailing list](https://lists.cncf.io/g/cncf-buildpacks).

## Contributor's Guide
### Contributor's Guide

Find out the various ways that _you_ can contribute to the Cloud Native Buildpacks project using our [contributor's guide](https://github.com/buildpacks/community/blob/main/contributors/guide.md).

## Project Roadmap
### Project Roadmap

This is a community driven project and our roadmap is publicly available on our [Github page](https://github.com/buildpacks/community/blob/main/ROADMAP.md). We encourage you to contribute with feature requests.
15 changes: 8 additions & 7 deletions content/docs/for-buildpack-authors/concepts/buildpack-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,27 @@ Buildpack groups allow you to connect multiple modular buildpacks together, maki

For example, you might have a buildpack that installs Java and a buildpack that uses Maven to build your application. These two buildpacks can be combined into a group to implement higher-level functionality, specifically that the first one will install Java and the second will use Java to run Maven, which is a Java build tool.

Because you can have many buildpack groups in a [builder][builder] or [meta-buildpack][meta-buildpack] and you can reuse buildpacks, you could have a second buildpack group that reuses the buildpack to provide Java but uses a third buildpack that provides Gradle to build your application. By doing this, you can create additional high-level functionality without having duplication.
Because you can have many buildpack groups in a [builder][builder] or [composite buildpack][composite buildpack] (sometimes referred to as a "meta buildpack"),
and you can reuse buildpacks, you could have a second buildpack group that reuses the buildpack to provide Java but uses a third buildpack that provides Gradle to build your application. By doing this, you can create additional high-level functionality without having duplication.

## Anatomy of a buildpack group

A [buildpack group][buildpack-group] is a list of buildpack entries defined in the order in which they will run.

A buildpack entry is identified by an id and a version. It may also be marked as optional. While you may have one or more buildpacks in a buildpack group, you may have one or more buildpack groups in a builder or meta-buildpack.
A buildpack entry is identified by an id and a version. It may also be marked as optional. While you may have one or more buildpacks in a buildpack group, you may have one or more buildpack groups in a builder or composite buildpack.

## Detection with buildpack groups

A [builder][builder] or [meta-buildpack][meta-buildpack] may contain multiple buildpack groups. When the lifecycle executes the detection process, it will process each buildpack group it finds in the order that the groups are specified. For each buildpack group, the lifecycle will execute the detect phase of all buildpacks in that group (these can be executed in parallel) and aggregate the results. The lifecycle will select the first buildpack group by order where all of the non-optional buildpacks in that group pass detection.
A [builder][builder] or [composite buildpack][composite buildpack] may contain multiple buildpack groups. When the lifecycle executes the detection process, it will process each buildpack group it finds in the order that the groups are specified. For each buildpack group, the lifecycle will execute the detect phase of all buildpacks in that group (these can be executed in parallel) and aggregate the results. The lifecycle will select the first buildpack group by order where all of the non-optional buildpacks in that group pass detection.

For example, if a builder has buildpack groups A, B and C. The lifecycle will run detection against A. If all of the non-optional buildpacks in that group pass detection, then it will select A. In that case, B and C will not be processed. If A has any failing non-optional buildpacks, then the lifecycle will move on to process buildpack group B. If B has any failing non-optional buildpacks, then the lifecycle will move on to process buildpack group C. If C fails, then the entire detection process will fail.

If a buildpack group contains meta-buildpacks, which in turn may contain more buildpack groups those are expanded using [the order resolution rules][order-resolution] such that each buildpack group in the meta-buildpack is tried with the other buildpacks in the containing buildpack group.
If a buildpack group contains composite buildpacks, which in turn may contain more buildpack groups those are expanded using [the order resolution rules][order-resolution] such that each buildpack group in the composite buildpack is tried with the other buildpacks in the containing buildpack group.

For example:

- the builder has a buildpack group A that contains buildpacks X, Y and Z
- Y is a meta-buildpack containing buildpack groups B and C
- Y is a composite buildpack containing buildpack groups B and C
- buildpack group B contains buildpacks T and U
- buildpack group C contains buildpacks V and W

Expand All @@ -43,7 +44,7 @@ The lifecycle will expand this into the following buildpack groups:
- X, T, U, Z
- X, V, W, Z

Y is not included because meta-buildpacks only provide groups, they do not participate in the build process or contain build/detect binaries.
Y is not included because composite buildpacks only provide groups, they do not participate in the build process or contain build/detect binaries.

The [order resolution rules in the buildpacks spec][order-resolution] contains additional examples that illustrate more complex scenarios.

Expand All @@ -57,4 +58,4 @@ The [Operator's Guide][operator-guide] has more information on creating builders
[order-resolution]: https://github.com/buildpacks/spec/blob/main/buildpack.md#order-resolution
[operator-guide]: /docs/for-platform-operators/
[builder]: /docs/for-platform-operators/concepts/builder/
[meta-buildpack]: /docs/for-platform-operators/concepts/composite-buildpack
[composite buildpack]: /docs/for-platform-operators/concepts/composite-buildpack
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ In the example we run `pack` on the NodeJS application to produce an application

## NodeJS buildpack

The example NodeJS buildpack is a meta-buildpack. It is composed of
The example NodeJS buildpack is a composite buildpack (sometimes referred to as a "meta buildpack"). It is composed of

* `node-engine` buildpack that provides the `node` and `npm` binaries,
* `yarn` buildpack that provides the `yarn` binary,
* `yarn-install` and `npm-install` buildpacks that install dependencies using either `yarn` or `npm`,
* `yarn-start` and `npm-start` buildpacks that configure the entrypoint to the application image,
* `procfile` a buildpack that allows developers to provide a [Heroku-style](https://devcenter.heroku.com/articles/procfile#procfile-format) entrypoint for the image.

The `nodejs` buildpack itself is a meta-buildpack which defines two **order groups**. Here we represent the order groups visually:
The `nodejs` buildpack itself is a composite buildpack which defines two **order groups**. Here we represent the order groups visually:

![nodejs order groups](/images/order-groups.svg)

Expand Down Expand Up @@ -79,7 +79,7 @@ The dependencies are provided using the mechanism an NodeJS developer expects.

Finally, we describe the container entrypoint using a script in the `package.json`. The script must be named `start` according to NodeJS convention. Here we see that the entrypoint should run the provided `node index.js` command.

We build our application using the default builder and specify to only use the `nodejs` meta-buildpack in the build. The restriction to use only the `nodejs` meta-buildpack simplifies the explanation as that buildpack provides only two order groups.
We build our application using the default builder and specify to only use the `nodejs` composite buildpack in the build. The restriction to use only the `nodejs` composite buildpack simplifies the explanation as that buildpack provides only two order groups.

<asciinema-player
idle-time-limit="0.5s"
Expand Down Expand Up @@ -388,4 +388,4 @@ Our NodeJS example image requires an entrypoint called `web`. The `web` entrypo

## Summary

We have taken a detailed look at how buildpacks are used to build a sample application. The meta-buildpack contains two order groups and we have seen examples of how an order group is resolved. In addition we have looked at the contributions that a buildpack makes to the build plan and considered how these are resolved into a buildpack plan to be provided to the build phase of specific buildpacks. Finally, we have briefly considered how the analyze and restore phases can allow advanced caching strategies.
We have taken a detailed look at how buildpacks are used to build a sample application. The composite buildpack contains two order groups and we have seen examples of how an order group is resolved. In addition we have looked at the contributions that a buildpack makes to the build plan and considered how these are resolved into a buildpack plan to be provided to the build phase of specific buildpacks. Finally, we have briefly considered how the analyze and restore phases can allow advanced caching strategies.
5 changes: 3 additions & 2 deletions content/docs/reference/config/buildpack-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ The schema is as follows:
A list of mixins required on the stack images.

- **`order`** _(list, optional)_\
A list of buildpack groups for the purpose of creating a [meta-buildpack][meta-buildpack]. This list determines the
A list of buildpack groups for the purpose of creating a [composite buildpack][composite buildpack] (sometimes referred to as a "meta buildpack"). This list determines the
order in which groups of buildpacks will be tested during detection. _If omitted, `targets` or `stacks` list must be present.
Cannot be used in conjunction with `targets` or `stacks` list._

Expand All @@ -109,4 +109,5 @@ The schema is as follows:
Arbitrary data for buildpack.

[buildpack]: /docs/for-buildpack-authors/concepts/buildpack
[lifecycle]: /docs/for-buildpack-authors/concepts/lifecycle-phases
[lifecycle]: /docs/for-buildpack-authors/concepts/lifecycle-phases
[composite buildpack]: /docs/for-platform-operators/concepts/composite-buildpack
2 changes: 1 addition & 1 deletion content/docs/reference/config/package-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The schema is as follows:
A URL or path to an [archive][supported-archives], or a path to a directory. If path is relative, it must be relative to the `package.toml`.

- #### `dependencies` _(list, optional)_
A set of dependent buildpack locations, for packaging a meta-buildpack. Each dependent buildpack location must correspond to an [order group][order-group] within the meta-buildpack being packaged, and must have **one** of the following fields:
A set of dependent buildpack locations, for packaging a composite buildpack (sometimes referred to as a "meta buildpack"). Each dependent buildpack location must correspond to an [order group][order-group] within the composite buildpack being packaged, and must have **one** of the following fields:

- **`uri`** _(string)_\
A URL or path to an [archive][supported-archives], a packaged buildpack (saved as a `.cnb` file), or a directory. If path is relative, it must be relative to the `package.toml`.
Expand Down
41 changes: 21 additions & 20 deletions data/talks.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# - name (required): Name of video
# description: Short video description
# event_name: Name of the event
# preseters: Presenters of talk
# presenters: Presenters of talk
# - Name, Employer
# youtube_id (required): URL to video
# year (required): Year recorded
Expand Down Expand Up @@ -78,25 +78,6 @@
- name: Slides
icon: file-powerpoint
url: https://docs.google.com/presentation/d/1Ejo8Mf7GXxVHL7PjiApCZMJLtbX6VO8n2H7vEcZkV0I/view
- name: "Pack to the Future: Cloud-Native Buildpacks on k8s"
presenters:
- Emily Casey, Pivotal
- Joe Kutner, Heroku
description: >-
Are you a developer that would rather build features than maintain Dockerfiles? Is your organization
excited about Kubernetes but worried about patching vulnerable dependencies across a great number of
containers? In this talk, you’ll learn how to use the pack CLI to go from source to image in seconds
and patch a pod even faster. Cloud Foundry and Heroku users have long appreciated the developer
experience and security guarantees provided by buildpacks. Cloud-Native Buildpacks (a CNCF sandbox
project) represents a generational leap in buildpacks, bringing the power of buildpacks to k8s and
beyond.
event_name: SpringOne Platform
youtube_id: J2SXkmOo8iQ
year: 2019
resources:
- name: Slides
icon: file-powerpoint
url: https://docs.google.com/presentation/d/14rkLA2hn3nVu_liiW6Y7hy3hSsnz1HueEdLkhvChONM/view
- name: "Production CI/CD w/CNBs: Tekton, Gitlab & CircleCI(plus), Oh My!"
presenters:
- David Freilich, VMware
Expand Down Expand Up @@ -146,3 +127,23 @@
- name: Slides
icon: file-powerpoint
url: https://slides.com/danielleadams/cnbs-node-js-interactive-19
- name: "Pack to the Future: Cloud-Native Buildpacks on k8s"
presenters:
- Emily Casey, Pivotal
- Joe Kutner, Heroku
description: >-
Are you a developer that would rather build features than maintain Dockerfiles? Is your organization
excited about Kubernetes but worried about patching vulnerable dependencies across a great number of
containers? In this talk, you’ll learn how to use the pack CLI to go from source to image in seconds
and patch a pod even faster. Cloud Foundry and Heroku users have long appreciated the developer
experience and security guarantees provided by buildpacks. Cloud-Native Buildpacks (a CNCF sandbox
project) represents a generational leap in buildpacks, bringing the power of buildpacks to k8s and
beyond.
event_name: SpringOne Platform
youtube_id: J2SXkmOo8iQ
year: 2019
resources:
- name: Slides
icon: file-powerpoint
url: https://docs.google.com/presentation/d/14rkLA2hn3nVu_liiW6Y7hy3hSsnz1HueEdLkhvChONM/view

0 comments on commit 879c0ef

Please sign in to comment.