You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update cflinuxfs from version 3 to version 4 with optional 5 (#1104)
## Proposed Changes
* Update code and documentation `cflinuxfs3` references to `cflinuxfs4`
and `cflinuxfs5`. KF now defaults to `cflinuxfs4` instead of
`cflinuxfs3`.
## Release Notes
```release-note
`Changed` default cflinuxfs version to 4
`Added` support of `cflinuxfs5`
```
## Before updating
The new stack is based on `Ubuntu 22.04` by default, or `Ubuntu 24.04`
if you opt into `cflinuxfs5`, which is significantly newer than the
current `Ubuntu 18.04`. Before updating, ensure your application does
not depend on utilities or libraries that behave differently in newer
Ubuntu versions. Newer stack means newer buildpacks platforms, kf now
uses `CNB_PLATFORM_API=0.15` for all builds (unless running on legacy
stack). You can override this behavior during push `kf push (...) -env
CNB_PLATFORM_API=0.15`. Furthermore, newer stacks contain fewer
pre-installed packages (for example, `python` is no longer included) and
fewer default buildpacks (for example, `cflinuxfs5` does not contain the
Go buildpack).
Legacy stacks are still available but must be manually specified (via
`kf push --stack cflinuxfs3 ...`); otherwise, `cflinuxfs4` is used by
default. We recommend manually specifying the legacy stack, updating to
the latest KF release, and testing the application build and runtime in
a separate space. Once verified, migrate away from the legacy stacks
entirely.
Use [spring initializr](https://start.spring.io/) to create a Java 8 maven project with a spring web dependency and JAR packaging. Download it, extract it, and once extracted, push to Kf with the cloud native buildpack.
V3 kf-v2-to-v3-shim gcr.io/kf-releases/v2-to-v3:v2.7.0 gcr.io/buildpacks/gcp/run:v1 This is a stack added by the integration tests to assert that v2->v3 shim works
85
85
V3 google gcr.io/buildpacks/builder:v1 gcr.io/buildpacks/gcp/run:v1 Google buildpacks (https://github.com/GoogleCloudPlatform/buildpacks)
86
-
V3 org.cloudfoundry.stacks.cflinuxfs3 cloudfoundry/cnb:cflinuxfs3@sha256:f96b6e3528185368dd6af1d9657527437cefdaa5fa135338462f68f9c9db3022 cloudfoundry/run:full-cnb@sha256:dbe17be507b1cc6ffae1e9edf02806fe0e28ffbbb89a6c7ef41f37b69156c3c2 A large Cloud Foundry stack based on Ubuntu 18.04
86
+
V3 org.cloudfoundry.stacks.cflinuxfs5 cloudfoundry/cflinuxfs5 A large Cloud Foundry stack based on Ubuntu 24.04
Copy file name to clipboardExpand all lines: docs/content/en/docs/v2.11/examples/spring-music/_index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ Music](https://github.com/cloudfoundry-samples/spring-music) reference App using
34
34
cd spring-music
35
35
```
36
36
37
-
1. Edit `manifest.yml`, and replace `path: build/libs/spring-music-1.0.jar` with `stack: org.cloudfoundry.stacks.cflinuxfs3`. This instructs Kf to build from source using [cloud native buildpacks](https://cloud.google.com/blog/products/containers-kubernetes/google-cloud-now-supports-buildpacks) so you don't have to compile locally.
37
+
1. Edit `manifest.yml`, and replace `path: build/libs/spring-music-1.0.jar` with `stack: org.cloudfoundry.stacks.cflinuxfs5`. This instructs Kf to build from source using [cloud native buildpacks](https://cloud.google.com/blog/products/containers-kubernetes/google-cloud-now-supports-buildpacks) so you don't have to compile locally.
Copy file name to clipboardExpand all lines: docs/content/en/docs/v2.11/migrating/builds.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,13 +23,13 @@ Best practices for container runtimes differ from Cloud Foundry's application be
23
23
24
24
In Cloud Foundry and Kf it's common to `push` in every environment which produces a separate build and image. This is a common source of errors if an application development team hasn't pinned the dependencies for their application correctly.
25
25
26
-
In Cloud Foundry and Kf this pushing provides an additional purpose, a platform operations team can change buildpacks or base images in an environment to patch applications on the fly. This has always been risky, but large base images like `cflinuxfs3`, come with many security vulnerabilities.
26
+
In Cloud Foundry and Kf this pushing provides an additional purpose, a platform operations team can change buildpacks or base images in an environment to patch applications on the fly. This has always been risky, but large base images like `cflinuxfs*`, come with many security vulnerabilities.
27
27
28
28
**Things to consider:**
29
29
30
30
* Applications should be built with the dependencies they need for all environments. They shouldn't depend on the environment like the [Spring Autoreconfiguration buildpack](https://github.com/cloudfoundry/java-buildpack-auto-reconfiguration).
31
31
* Teams should be able to patch and promote an image quickly up through environments as the preferred method of patching.
32
-
* Building on smaller base images than `cflinuxfs3` may leave teams without tools they expect to use when using `ssh` to debug containers or may expose hidden dependencies.
32
+
* Building on smaller base images than `cflinuxfs*` may leave teams without tools they expect to use when using `ssh` to debug containers or may expose hidden dependencies.
33
33
* Cloud Foundry and Kf add a [launcher process](https://github.com/cloudfoundry/buildpackapplifecycle/tree/main/launcher) responsible for reading Procfiles and certain environment variables. Applications will need to stop using these, or you should create a drop-in replacement launcher.
34
34
* Operations teams should monitor deployed images for vulnerabilities.
0 commit comments