Skip to content

Commit 6b2bb02

Browse files
authored
Merge pull request #579 from rashedkvm/stack-management
Update stacks doc with Stack Management states and cflinuxfs4 as primary stack
2 parents 619f096 + 500c436 commit 6b2bb02

File tree

1 file changed

+64
-29
lines changed

1 file changed

+64
-29
lines changed

deploy-apps/stacks.html.md.erb

Lines changed: 64 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,26 @@ Docker apps do not use stacks.</p>
2727

2828
## <a id='available-stacks'></a> Available stacks
2929

30-
Cloud Foundry includes support for `cflinuxfs3`. The Linux `cflinuxfs3` stack is derived from Ubuntu Bionic 18.04. For more information about supported libraries, see the [GitHub stacks page](https://github.com/cloudfoundry/cflinuxfs3/blob/main/receipt.cflinuxfs3.x86_64).
30+
Cloud Foundry includes support for `cflinuxfs4`, which is derived from Ubuntu 22.04 LTS (Jammy Jellyfish). For more information, see [GitHub cflinuxfs4 stack receipt](https://github.com/cloudfoundry/cflinuxfs4/blob/main/receipt.cflinuxfs4.x86_64).
3131

32-
The latest versions of <%= vars.product_short %> include support for `cflinuxfs4` which is derived from Ubuntu 22.04 LTS (Jammy Jellyfish). For more information, see [GitHub cflinuxfs4 stack receipt](https://github.com/cloudfoundry/cflinuxfs4/blob/main/receipt.cflinuxfs4.x86_64).
32+
You can also build your own custom stack. For more information, see [Adding a Custom Stack](../../running/custom-stack.html).
3333

34-
<%= vars.custom_stack %>
34+
## <a id='stack-states'></a> Stack states
3535

36+
Operators can assign a lifecycle state to each stack. The state affects what operations you can perform with that stack:
3637

37-
## <a id='cli-commands'></a> Restaging apps on a new stack
38+
| State | What it means for developers |
39+
|--------------|------------------------------|
40+
| `ACTIVE` | The stack is fully available. You can push new apps and restage existing apps. |
41+
| `DEPRECATED` | The stack is still usable, but a warning is shown during `cf push` and `cf restage`. Plan to migrate your apps soon. |
42+
| `RESTRICTED` | You cannot push new apps using this stack. Existing apps can still be restarted and scaled. |
43+
| `DISABLED` | You cannot stage or restage any app using this stack. Existing apps continue to run and can be restarted and scaled. |
44+
45+
When a stack has a state other than `ACTIVE`, operators typically provide a **reason** message with migration guidance. This reason is shown in `cf stacks`, `cf stack STACK_NAME`, and in any warning or error messages during `cf push` or `cf restage`.
46+
47+
If you encounter a restricted or disabled stack, contact your CF operator for migration instructions, or see the reason message provided in the stack details.
48+
49+
## <a id='restage-apps'></a> Restaging apps on a new stack
3850

3951
For security, stacks receive regular updates to address Common Vulnerabilities and Exposures ([CVEs](http://www.ubuntu.com/usn/)). Apps pick up on these stack changes through new releases of <%= vars.product_short %>. However, if your app links statically to a library provided in the rootfs, you might have to manually restage it to pick up the changes.
4052

@@ -46,41 +58,64 @@ To restage an app on a new stack:
4658

4759
<pre class="terminal">
4860
$ cf stacks
49-
Getting stacks in org MY-ORG / space development as developer@example<span>.</span>com...
50-
OK
61+
Getting stacks in org MY-ORG / space development as developer@example.com...
62+
63+
name description state
64+
cflinuxfs4 Cloud Foundry Linux-based filesystem (Ubuntu 22.04) ACTIVE
65+
cflinuxfs3 Cloud Foundry Linux-based filesystem (Ubuntu 18.04) DEPRECATED
66+
</pre>
67+
68+
The `state` column shows the current lifecycle state of each stack. For stacks in a `DEPRECATED`, `RESTRICTED`, or `DISABLED` state, contact your operator or run `cf stack STACK_NAME` to view the reason and migration instructions.
69+
70+
1. To view details and any operator-provided reason for a specific stack, run:
71+
72+
<pre class="terminal">
73+
cf stack STACK_NAME
74+
</pre>
75+
76+
Example output for a deprecated stack:
5177

52-
name description
53-
cflinuxfs3 Cloud Foundry Linux-based filesystem (Ubuntu 18.04)
54-
cflinuxfs4 Cloud Foundry Linux-based filesystem (Ubuntu 22.04)
78+
<pre class="terminal">
79+
$ cf stack cflinuxfs3
80+
Getting info for stack cflinuxfs3 as developer@example.com...
81+
82+
name: cflinuxfs3
83+
description: Cloud Foundry Linux-based filesystem (Ubuntu 18.04)
84+
state: DEPRECATED
85+
reason: This stack is based on Ubuntu 18.04, which is no longer supported.
86+
Please migrate your applications to 'cflinuxfs4'.
87+
For more information, see: https://docs.example.com/migrate-stacks.
5588
</pre>
5689

57-
2. To change your stack and restage your app, run:
90+
The `reason` field is shown only when the state is not `ACTIVE`.
5891

59-
```
92+
1. To change your stack and restage your app, run:
93+
94+
<pre class="terminal">
6095
cf push MY-APP -s STACK-NAME
61-
```
96+
</pre>
6297

6398
Where:
64-
- MY-APP is the name of the app.
65-
- STACK-NAME is the name of the new stack.
99+
- `MY-APP` is the name of the app.
100+
- `STACK-NAME` is the name of the new stack.
66101

67102
For example, to restage your app on the stack `cflinuxfs4`, run `cf push MY-APP -s cflinuxfs4`:
68-
<pre class="terminal">
69-
$ cf push MY-APP -s cflinuxfs4
70-
Using stack cflinuxfs4...
71-
OK
72-
Creating app MY-APP in org MY-ORG / space development as developer@example<span>.</span>com...
73-
OK
74-
...
75-
requested state: started
76-
instances: 1/1
77-
usage: 1G x 1 instances
78-
urls: MY-APP.cfapps.io
79-
last uploaded: Wed 17 Jul 22:57:04 UTC 2024
80-
state since cpu memory disk logging cpu entitlement details
81-
\#0 running 2024-07-17T22:57:22Z 0.3% 49.5M of 1G 130.2M of 1G 0B/s of 16K/s 2.4%
82-
</pre>
83103

104+
<pre class="terminal">
105+
$ cf push MY-APP -s cflinuxfs4
106+
Using stack cflinuxfs4...
107+
OK
108+
Creating app MY-APP in org MY-ORG / space development as developer@example.com...
109+
OK
110+
...
111+
requested state: started
112+
instances: 1/1
113+
usage: 1G x 1 instances
114+
urls: MY-APP.cfapps.io
115+
last uploaded: Wed 17 Jul 22:57:04 UTC 2024
116+
state since cpu memory disk logging cpu entitlement details
117+
#0 running 2024-07-17T22:57:22Z 0.3% 49.5M of 1G 130.2M of 1G 0B/s of 16K/s 2.4%
118+
</pre>
84119

85120
## <a id='stacks-api'></a> Stacks API
86121

0 commit comments

Comments
 (0)