Skip to content

Commit

Permalink
Fix references to "meta buildpack" (#717)
Browse files Browse the repository at this point in the history
It should be called a "composite buildpack" but we can refer to the old name too

Signed-off-by: Natalie Arellano <narellano@vmware.com>
  • Loading branch information
AidanDelaney committed Jun 2, 2024
1 parent 6706ad0 commit 470af9d
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 25 deletions.
13 changes: 7 additions & 6 deletions docs/for-buildpack-authors/concepts/buildpack-group/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -902,18 +902,19 @@ <h1 class="title">What is a buildpack group?</h1>
<p>A buildpack group is a list of individual buildpacks that are designged to work together to build an application.</p>
<p>Buildpack groups allow you to connect multiple modular buildpacks together, making buildpacks modular and re-usable.</p>
<p>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.</p>
<p>Because you can have many buildpack groups in a <a href="/docs/for-platform-operators/concepts/builder/">builder</a> or <a href="/docs/for-platform-operators/concepts/composite-buildpack">meta-buildpack</a> 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.</p>
<p>Because you can have many buildpack groups in a <a href="/docs/for-platform-operators/concepts/builder/">builder</a> or <a href="/docs/for-platform-operators/concepts/composite-buildpack">composite buildpack</a> (sometimes referred to as a &ldquo;meta buildpack&rdquo;),
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.</p>
<h2 id="anatomy-of-a-buildpack-group">Anatomy of a buildpack group</h2>
<p>A <a href="/docs/reference/config/builder-config/#order-_list-required_">buildpack group</a> is a list of buildpack entries defined in the order in which they will run.</p>
<p>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.</p>
<p>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.</p>
<h2 id="detection-with-buildpack-groups">Detection with buildpack groups</h2>
<p>A <a href="/docs/for-platform-operators/concepts/builder/">builder</a> or <a href="/docs/for-platform-operators/concepts/composite-buildpack">meta-buildpack</a> 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.</p>
<p>A <a href="/docs/for-platform-operators/concepts/builder/">builder</a> or <a href="/docs/for-platform-operators/concepts/composite-buildpack">composite buildpack</a> 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.</p>
<p>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.</p>
<p>If a buildpack group contains meta-buildpacks, which in turn may contain more buildpack groups those are expanded using <a href="https://github.com/buildpacks/spec/blob/main/buildpack.md#order-resolution">the order resolution rules</a> such that each buildpack group in the meta-buildpack is tried with the other buildpacks in the containing buildpack group.</p>
<p>If a buildpack group contains composite buildpacks, which in turn may contain more buildpack groups those are expanded using <a href="https://github.com/buildpacks/spec/blob/main/buildpack.md#order-resolution">the order resolution rules</a> such that each buildpack group in the composite buildpack is tried with the other buildpacks in the containing buildpack group.</p>
<p>For example:</p>
<ul>
<li>the builder has a buildpack group A that contains buildpacks X, Y and Z</li>
<li>Y is a meta-buildpack containing buildpack groups B and C</li>
<li>Y is a composite buildpack containing buildpack groups B and C</li>
<li>buildpack group B contains buildpacks T and U</li>
<li>buildpack group C contains buildpacks V and W</li>
</ul>
Expand All @@ -922,7 +923,7 @@ <h2 id="detection-with-buildpack-groups">Detection with buildpack groups</h2>
<li>X, T, U, Z</li>
<li>X, V, W, Z</li>
</ul>
<p>Y is not included because meta-buildpacks only provide groups, they do not participate in the build process or contain build/detect binaries.</p>
<p>Y is not included because composite buildpacks only provide groups, they do not participate in the build process or contain build/detect binaries.</p>
<p>The <a href="https://github.com/buildpacks/spec/blob/main/buildpack.md#order-resolution">order resolution rules in the buildpacks spec</a> contains additional examples that illustrate more complex scenarios.</p>
<p>After the buildpack groups are expanded they are processed in the same way and have the same requirements for selection that are defined above.</p>
<h3 id="resources">Resources</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="A composite buildpack, also sometimes called a &amp;ldquo;meta-buildpack&amp;rdquo;, is a buildpack that does not contain any ./bin/detect or ./bin/build binaries, but instead references other buildpacks in…"/>
<meta name="description" content="A composite buildpack, also sometimes called a &amp;ldquo;meta buildpack&amp;rdquo;, is a buildpack that does not contain any ./bin/detect or ./bin/build binaries, but instead references other buildpacks in…"/>
<link rel="canonical" content="https://buildpacks.io/docs/for-buildpack-authors/concepts/composite-buildpack/">
<link rel="icon" type="image/png" href="/images/favicon.png">

Expand All @@ -22,7 +22,7 @@
<meta property="og:url" content="https://buildpacks.io/docs/for-buildpack-authors/concepts/composite-buildpack/">
<meta property="og:locale" content="en_US">
<meta property="og:site_name" content="Cloud Native Buildpacks">
<meta property="og:description" content="A composite buildpack, also sometimes called a &amp;ldquo;meta-buildpack&amp;rdquo;, is a buildpack that does not contain any ./bin/detect or ./bin/build binaries, but instead references other buildpacks in…">
<meta property="og:description" content="A composite buildpack, also sometimes called a &amp;ldquo;meta buildpack&amp;rdquo;, is a buildpack that does not contain any ./bin/detect or ./bin/build binaries, but instead references other buildpacks in…">
<meta property="og:type" content="article">
<meta property="og:image" content="https://buildpacks.io/images/buildpacks-social-card.jpg">
<meta property="og:image:alt" content="Buildpacks project logo">
Expand Down Expand Up @@ -897,7 +897,7 @@
<h1 class="title">What is a composite buildpack?</h1>
</div>

<p>A composite buildpack, also sometimes called a &ldquo;meta-buildpack&rdquo;,
<p>A composite buildpack, also sometimes called a &ldquo;meta buildpack&rdquo;,
is a buildpack that does not contain any <code>./bin/detect</code> or <code>./bin/build</code> binaries,
but instead references other buildpacks in its <code>buildpack.toml</code> via the <code>[[order]]</code> array.</p>
<p>This is useful for composing more complex detection strategies.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/for-buildpack-authors/concepts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ <h2><a href="https://buildpacks.io/docs/for-buildpack-authors/concepts/component
</div>

<h2><a href="https://buildpacks.io/docs/for-buildpack-authors/concepts/composite-buildpack/" class="">What is a composite buildpack?</a></h2>
<p class="m-1">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.
<p class="m-1">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.
This is useful for composing more complex detection strategies.</p>


Expand Down
2 changes: 1 addition & 1 deletion docs/for-buildpack-authors/concepts/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<link>https://buildpacks.io/docs/for-buildpack-authors/concepts/composite-buildpack/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://buildpacks.io/docs/for-buildpack-authors/concepts/composite-buildpack/</guid>
<description>A composite buildpack, also sometimes called a &amp;ldquo;meta-buildpack&amp;rdquo;, 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.&#xA;This is useful for composing more complex detection strategies.</description>
<description>A composite buildpack, also sometimes called a &amp;ldquo;meta buildpack&amp;rdquo;, 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.&#xA;This is useful for composing more complex detection strategies.</description>
</item>
<item>
<title>What is an image extension?</title>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -904,15 +904,15 @@ <h1 class="title">What is the lifecycle?</h1>
<p>We work through a full example of building a &ldquo;hello world&rdquo; NodeJs web application.</p>
<p>In the example we run <code>pack</code> on the NodeJS application to produce an application image. We assume that we have a NodeJS buildpack, <code>registry.fake/buildpacks/nodejs:latest</code>, that is decomposed into buildpacks that help with the build. We expand each of the buildpacks phases to explain the process. Throughout the example we take a production-level view of their operation. For example, our assumed NodeJS buildpack will be described to create different build, cache and launch layers in a manner similar to how a real NodeJS buildpack would operate.</p>
<h2 id="nodejs-buildpack">NodeJS buildpack</h2>
<p>The example NodeJS buildpack is a meta-buildpack. It is composed of</p>
<p>The example NodeJS buildpack is a composite buildpack (sometimes referred to as a &ldquo;meta buildpack&rdquo;). It is composed of</p>
<ul>
<li><code>node-engine</code> buildpack that provides the <code>node</code> and <code>npm</code> binaries,</li>
<li><code>yarn</code> buildpack that provides the <code>yarn</code> binary,</li>
<li><code>yarn-install</code> and <code>npm-install</code> buildpacks that install dependencies using either <code>yarn</code> or <code>npm</code>,</li>
<li><code>yarn-start</code> and <code>npm-start</code> buildpacks that configure the entrypoint to the application image,</li>
<li><code>procfile</code> a buildpack that allows developers to provide a <a href="https://devcenter.heroku.com/articles/procfile#procfile-format">Heroku-style</a> entrypoint for the image.</li>
</ul>
<p>The <code>nodejs</code> buildpack itself is a meta-buildpack which defines two <strong>order groups</strong>. Here we represent the order groups visually:</p>
<p>The <code>nodejs</code> buildpack itself is a composite buildpack which defines two <strong>order groups</strong>. Here we represent the order groups visually:</p>
<p><img src="/images/order-groups.svg" alt="nodejs order groups"></p>
<p>The order group containing <code>yarn</code> logic has higher precedence in the <code>nodejs</code> buildpack than the order group containing <code>npm-install</code>. In both order groups the <code>procfile</code> buildpack is optional. The function of order groups will become more clear as we proceed through our example.</p>
<h2 id="running-pack">Running <code>pack</code></h2>
Expand Down Expand Up @@ -947,7 +947,7 @@ <h2 id="running-pack">Running <code>pack</code></h2>
</span></span><span class="line"><span class="cl"> <span class="p">}</span>
</span></span><span class="line"><span class="cl"><span class="p">}</span>
</span></span></code></pre></div><p>Finally, we describe the container entrypoint using a script in the <code>package.json</code>. The script must be named <code>start</code> according to NodeJS convention. Here we see that the entrypoint should run the provided <code>node index.js</code> command.</p>
<p>We build our application using the default builder and specify to only use the <code>nodejs</code> meta-buildpack in the build. The restriction to use only the <code>nodejs</code> meta-buildpack simplifies the explanation as that buildpack provides only two order groups.</p>
<p>We build our application using the default builder and specify to only use the <code>nodejs</code> composite buildpack in the build. The restriction to use only the <code>nodejs</code> composite buildpack simplifies the explanation as that buildpack provides only two order groups.</p>
<p><asciinema-player
idle-time-limit="0.5s"
font-size="medium"
Expand Down Expand Up @@ -1185,7 +1185,7 @@ <h3 id="phase-5-export">Phase 5: Export</h3>
<p>The export phase constructs a new OCI image using all the layers provided in the build phase. In addition the application source is added as a layer to the output image and the image <code>ENTRYPOINT</code> is set. The exported image, which we call <code>example</code>, contains only launch layers. Cache layers are preserved on the local machine for subsequent builds.</p>
<p>Our NodeJS example image requires an entrypoint called <code>web</code>. The <code>web</code> entrypoint is implemented on the application image as a symlink to the <code>launcher</code> binary. As we have specified a single entrypoint, this then becomes the default entrypoint of the image.</p>
<h2 id="summary">Summary</h2>
<p>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.</p>
<p>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.</p>



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="A composite buildpack, also sometimes called a &amp;ldquo;meta-buildpack&amp;rdquo;, is a buildpack that does not contain any ./bin/detect or ./bin/build binaries, but instead references other buildpacks in…"/>
<meta name="description" content="A composite buildpack, also sometimes called a &amp;ldquo;meta buildpack&amp;rdquo;, is a buildpack that does not contain any ./bin/detect or ./bin/build binaries, but instead references other buildpacks in…"/>
<link rel="canonical" content="https://buildpacks.io/docs/for-platform-operators/concepts/composite-buildpack/">
<link rel="icon" type="image/png" href="/images/favicon.png">

Expand All @@ -22,7 +22,7 @@
<meta property="og:url" content="https://buildpacks.io/docs/for-platform-operators/concepts/composite-buildpack/">
<meta property="og:locale" content="en_US">
<meta property="og:site_name" content="Cloud Native Buildpacks">
<meta property="og:description" content="A composite buildpack, also sometimes called a &amp;ldquo;meta-buildpack&amp;rdquo;, is a buildpack that does not contain any ./bin/detect or ./bin/build binaries, but instead references other buildpacks in…">
<meta property="og:description" content="A composite buildpack, also sometimes called a &amp;ldquo;meta buildpack&amp;rdquo;, is a buildpack that does not contain any ./bin/detect or ./bin/build binaries, but instead references other buildpacks in…">
<meta property="og:type" content="article">
<meta property="og:image" content="https://buildpacks.io/images/buildpacks-social-card.jpg">
<meta property="og:image:alt" content="Buildpacks project logo">
Expand Down Expand Up @@ -897,7 +897,7 @@
<h1 class="title">What is a composite buildpack?</h1>
</div>

<p>A composite buildpack, also sometimes called a &ldquo;meta-buildpack&rdquo;,
<p>A composite buildpack, also sometimes called a &ldquo;meta buildpack&rdquo;,
is a buildpack that does not contain any <code>./bin/detect</code> or <code>./bin/build</code> binaries,
but instead references other buildpacks in its <code>buildpack.toml</code> via the <code>[[order]]</code> array.</p>
<p>This is useful for composing more complex detection strategies.</p>
Expand Down
2 changes: 1 addition & 1 deletion docs/for-platform-operators/concepts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ <h2><a href="https://buildpacks.io/docs/for-platform-operators/concepts/lifecycl


<h2><a href="https://buildpacks.io/docs/for-platform-operators/concepts/composite-buildpack/" class="">What is a composite buildpack?</a></h2>
<p class="m-1">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.
<p class="m-1">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.
This is useful for composing more complex detection strategies.</p>


Expand Down
Loading

0 comments on commit 470af9d

Please sign in to comment.