10
10
## Summary
11
11
12
12
[ Cloud Native Buildpacks (CNBs)] ( https://buildpacks.io/ ) , also known as v3
13
- buildpacks, are the current generation of buildpacks, and offer some
13
+ buildpacks, are the current generation of buildpacks and offer some
14
14
improvements over the v2 buildpacks that CF Deployment currently uses. The
15
15
Cloud Foundry Foundation already has an implementation of Cloud Native
16
16
Buildpacks via the [ Paketo] ( https://paketo.io/ ) project, however these CNBs are
@@ -23,7 +23,7 @@ buildpacks in CF Deployment.
23
23
24
24
The v2 buildpacks are effectively in maintenance mode and do not receive
25
25
substantial new features. By not integrating with v3 buildpacks, Cloud Foundry
26
- is missing out on new capabilities like application
26
+ is missing out on new capabilities like app
27
27
[ SBOM] ( https://en.wikipedia.org/wiki/Software_supply_chain ) generation, new
28
28
buildpacks like the Java Native and Web Servers CNBs, as well as any new
29
29
features that are added to the still-actively-developed v3 buildpacks.
@@ -56,11 +56,11 @@ Cloud Foundry with OCI images, container registries, etc.
56
56
57
57
1 . Align CF Deployment with the main focus of the Buildpacks team
58
58
1 . Bring new build capabilities to CF Deployment users, including:
59
- 1 . [ Application SBOMs] ( https://paketo.io/docs/howto/sbom/ )
59
+ 1 . [ App SBOMs] ( https://paketo.io/docs/howto/sbom/ )
60
60
1 . [ Web Servers Buildpack] ( https://github.com/paketo-buildpacks/web-servers )
61
61
1 . [ Java Native Buildpack] ( https://github.com/paketo-buildpacks/java-native-image )
62
62
1 . Easier buildpack customization/composition
63
- 1 . Increase cohesion and application portability between CF Deployment and
63
+ 1 . Increase cohesion and app portability between CF Deployment and
64
64
[ Korifi] ( https://www.cloudfoundry.org/technology/korifi/ ) , via mutual Paketo
65
65
integration
66
66
1 . Increase user base for the CNB lifecycle and Paketo buildpacks
@@ -69,8 +69,8 @@ Cloud Foundry with OCI images, container registries, etc.
69
69
70
70
### High Level Implementation
71
71
72
- Cloud Foundry will produce a series of experimental shimmed
73
- buildpacks that include:
72
+ Cloud Foundry will produce a series of experimental, shimmed buildpacks that
73
+ include:
74
74
1 . A Paketo CNB
75
75
1 . Select executables from the CNB lifecycle
76
76
1 . Orchestrator executables that conform to the v2 buildpack interface
@@ -86,15 +86,15 @@ $ cf push my-app --buildpack=ruby_cnb
86
86
```
87
87
88
88
At build time, the procedure will be as follows:
89
- 1 . The Cloud Foundry Buildpack App Lifecycle's Builder will invoke shim
90
- orchestrator executables, consistent with the v2 buildpack interface
91
- 1 . The shim orchestrator will invoke bundled CNB lifecycle executables
92
- 1 . The CNB lifecycle executables will invoke Paketo buildpack executables,
93
- consistent with the v3 buildpack interface
94
- 1 . The Paketo buildpack will build a set of "layer" directories
89
+ 1 . The Cloud Foundry Buildpack App Lifecycle's Builder will invoke the shim
90
+ orchestrator executables, consistent with the v2 buildpack interface.
91
+ 1 . The shim orchestrator will invoke the bundled CNB lifecycle executables.
92
+ 1 . The CNB lifecycle executables will invoke the Paketo buildpack executables,
93
+ consistent with the v3 buildpack interface.
94
+ 1 . The Paketo buildpack will build a set of "layer" directories.
95
95
1 . The shim orchestrator will package the layer directories and
96
96
buildpack-generated SBOMs into a Cloud Foundry droplet and return it back to
97
- the Cloud Foundry Lifecycle
97
+ the Cloud Foundry Lifecycle.
98
98
99
99
For a proof of concept of shimmed buildpacks, see @ryanmoran 's
100
100
[ cfnb] ( https://github.com/ryanmoran/cfnb ) project. Developing the shim
@@ -119,7 +119,7 @@ builder.
119
119
120
120
### Shim at Run Time
121
121
122
- At run time, the Cloud Foundry Buildpack App Lifecycle launcher will invoke the
122
+ At run time, the Cloud Foundry Buildpack App Lifecycle's Launcher will invoke the
123
123
CNB Lifecycle ` launcher ` executable that was included in the droplet at build
124
124
time. In order to support custom start commands for apps using the CNB
125
125
buildpack shims, the CNB launcher invocation will be prepended to the app start
@@ -144,21 +144,21 @@ variables.
144
144
#### Emulating Kubernetes Service Bindings
145
145
146
146
In order to securely place credentials on the filesystem, Diego will need the
147
- ability to mount in-memory filesystems (e.g. ` tmpfs ` ) in application
148
- containers. Once an in-memory filesystem is available, select ` VCAP_SERVICES `
149
- environment variables can be translated into their Kubernetes Service Binding
150
- equivalents by the shim orchestrator, for consumption by the Paketo buildpacks.
147
+ ability to mount in-memory filesystems (e.g. ` tmpfs ` ) in app containers. Once
148
+ an in-memory filesystem is available, select ` VCAP_SERVICES ` environment
149
+ variables can be translated into their Kubernetes Service Binding equivalents
150
+ by the shim orchestrator, for consumption by the Paketo buildpacks.
151
151
152
152
#### Paketo Buildpacks Consume Environment Variables
153
153
154
- There is work in progress for v3 buldpacks using the libcnb package to read
155
- Cloud Foundry environment variables in addition to Kubernetes Service Bindings
154
+ There is work in progress for CNBs using the ` libcnb ` package to read Cloud
155
+ Foundry environment variables in addition to Kubernetes Service Bindings
156
156
(see [ buildpacks/libcnb #227 ] ( https://github.com/buildpacks/libcnb/pull/227 ) ).
157
157
Outside of the Java buildpacks, the Paketo buildpacks do not currently use
158
- libcnb, so the remaining Paketo buildpacks that consume envionrment variables
159
- will need to be updated to use libcnb or add equivalent logic. If the Paketo
160
- buildpacks are updated, then no changes will be needed to the core Cloud
161
- Foundry runtime.
158
+ ` libcnb ` , so the remaining Paketo buildpacks that consume service bindings
159
+ will need to be updated to use ` libcnb ` or add equivalent logic. If the Paketo
160
+ buildpacks are updated with this change , then no changes will be needed to the
161
+ core Cloud Foundry runtime.
162
162
163
163
#### Recommendation
164
164
@@ -192,12 +192,12 @@ is as follows (in rough priority order):
192
192
It is possible that not all buildpacks will be shimmed during the first phase
193
193
of this project. Depending on the effort to shim buildpacks and other factors,
194
194
it may make sense to move to later phases of CNB integration before all Paketo
195
- buildpacks are shimmed. In such an event, a follow-on RFC will describe this
196
- work.
195
+ buildpacks are shimmed. In such an event, follow-on RFCs will describe
196
+ additional phases of work.
197
197
198
198
The CNBs will initially be opt-in for CF Deployment operators via an
199
199
experimental ops file. When installed, the Paketo buildpacks will follow a
200
- different naming convention than the v2 buildpacks (e.g. ` paketo_ruby ` instead
200
+ different naming convention than the v2 buildpacks (e.g. ` ruby_cnb ` instead
201
201
of ` ruby_buildpack ` ) and will be installed with a lower detect order than the
202
202
v2 buildpacks. Once the v3 buildpacks have reached a suitable level of maturity
203
203
and stability, they will be added to the default set of buildpacks installed as
@@ -206,12 +206,12 @@ part of CF Deployment.
206
206
### Possible Future Work
207
207
208
208
The following areas are not directly covered by this RFC, but suggest some of
209
- the possible follow-on work that could be executed on in later phases of Cloud
209
+ the possible follow-on work that could be executed in later phases of Cloud
210
210
Foundry CNB integration.
211
211
212
212
#### Support Unmodified Paketo Buildpacks
213
213
214
- Unmodified (not shimmed) Paketo buildpacks could be natively supported by Cloud
214
+ Unmodified (non- shimmed) Paketo buildpacks could be natively supported by Cloud
215
215
Foundry. For instance, this could be implemented by integrating the buildpack
216
216
shim logic into a new or existing Cloud Foundry lifecycle. The details of this
217
217
integration should be covered by an additional RFC, once the first phase of CNB
@@ -233,8 +233,8 @@ that are compatible with the Paketo buildpacks. There is an opportunity to
233
233
adopt some or all of the Paketo stacks into CF Deployment. The Paketo
234
234
buildpacks have greater cohesion with the Paketo stacks than with ` cflinuxfs4 ` ,
235
235
and the Paketo "base" and "tiny" stacks could offer security-conscious CF
236
- Deployment users stacks with fewer native packages than are currently included
237
- with ` cflinuxfs4 ` . This RFC does not cover the adoption of additional stacks
238
- into CF Deployment, but it does open the door to add these stacks in the
236
+ Deployment users stacks with far fewer native packages than are currently
237
+ included with ` cflinuxfs4 ` . This RFC does not cover the adoption of additional
238
+ stacks into CF Deployment, but it does open the door to add these stacks in the
239
239
future.
240
240
0 commit comments