From 373e6bce39932c66034326d9b92dcc81e36dc7ad Mon Sep 17 00:00:00 2001 From: Sam Gunaratne <385176+Samze@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:45:24 -0600 Subject: [PATCH 001/132] Add app log information --- deploy-apps/streaming-logs.html.md.erb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/deploy-apps/streaming-logs.html.md.erb b/deploy-apps/streaming-logs.html.md.erb index 75f95173..4b400222 100644 --- a/deploy-apps/streaming-logs.html.md.erb +++ b/deploy-apps/streaming-logs.html.md.erb @@ -111,6 +111,19 @@ For example: 2016-06-14T14:10:15.18-0700 [APP/0] OUT Exit status 0 +The logs allow you to determine the particular revision and process of the application instance logging. + +For example, below shows the log line from two different revisions and web instances. +
+2022-09-15T01:59:33.99+0000 [APP/PROC/REV/2/WEB/0] OUT hello world from new
+2022-09-15T01:59:34.99+0000 [APP/PROC/REV/1/WEB/1] OUT hello world from old
+
+ +

+Note +Logs with revision id are only available if enabled in the platform installation

+ + Each app might have a configured log rate limit. If the app logs exceed the configured log rate limit, you see a log entry indicating that the limit was exceeded. For example: From e93aa0dc2d921b3e96a2db925b97aa5d939f3da5 Mon Sep 17 00:00:00 2001 From: Sam Gunaratne <385176+Samze@users.noreply.github.com> Date: Wed, 7 Aug 2024 15:47:16 -0600 Subject: [PATCH 002/132] Rephrase app revision note --- deploy-apps/streaming-logs.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy-apps/streaming-logs.html.md.erb b/deploy-apps/streaming-logs.html.md.erb index 4b400222..2d6d4f15 100644 --- a/deploy-apps/streaming-logs.html.md.erb +++ b/deploy-apps/streaming-logs.html.md.erb @@ -121,7 +121,7 @@ For example, below shows the log line from two different revisions and web insta

Note -Logs with revision id are only available if enabled in the platform installation

+Logs with revision id are only available if the application uses revisions and it is enabled in the platform

Each app might have a configured log rate limit. If the app logs exceed the configured log rate limit, you see a log entry indicating that the limit was exceeded. From 301ec722d9d49341ce5ae7a484f37a3d77012423 Mon Sep 17 00:00:00 2001 From: Sam Gunaratne Date: Mon, 12 Aug 2024 11:09:22 -0600 Subject: [PATCH 003/132] Add new/stopped app limitation for deployments --- deploy-apps/canary-deploy.html.md.erb | 6 ++++++ deploy-apps/rolling-deploy.html.md.erb | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/deploy-apps/canary-deploy.html.md.erb b/deploy-apps/canary-deploy.html.md.erb index 8f30973b..447e6f1b 100644 --- a/deploy-apps/canary-deploy.html.md.erb +++ b/deploy-apps/canary-deploy.html.md.erb @@ -297,6 +297,12 @@ The following table describes the limitations of when using canary deployments. Using CF CLI the logs can be retrieved using "cf logs APP_NAME" and search for "revision version" + + New or stopped applications + + When pushing an application for the first time, or if the app is stopped, no deployment strategy is used and all application instances are started immediately. + + diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index 5bcb3860..1adb927a 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -299,6 +299,12 @@ The following table describes the limitations of when using rolling deployments. like Cannot scale this process while a deployment is in flight.. For more information, see Scale a process or Update a process in the CAPI V3 documentation. + + New or stopped applications + + When pushing an application for the first time, or if the app is stopped, no deployment strategy is used and all application instances are started immediately. + + From 909ff45de3de182e93d5659a963aeaf6c8e90a53 Mon Sep 17 00:00:00 2001 From: Sam Gunaratne Date: Mon, 12 Aug 2024 11:38:13 -0600 Subject: [PATCH 004/132] Document max_in_flight for deployments --- deploy-apps/canary-deploy.html.md.erb | 12 ++++++++---- deploy-apps/rolling-deploy.html.md.erb | 21 ++++++++++++++------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/deploy-apps/canary-deploy.html.md.erb b/deploy-apps/canary-deploy.html.md.erb index 8f30973b..adf6e2de 100644 --- a/deploy-apps/canary-deploy.html.md.erb +++ b/deploy-apps/canary-deploy.html.md.erb @@ -45,9 +45,10 @@ Review the limitations of this feature before running the command. For more info * **For CF CLI v8:** ``` - cf push APP-NAME --strategy canary + cf push APP-NAME --strategy canary --max-in-flight MAX_IN_FLIGHT ``` Where `APP-NAME` is the name that you want to give your app. + Where `MAX_IN_FLIGHT` applies **after** the single canary instance is successful and specifies the maximum number of new instances to start simultaneous until the deployment is complete. Optional and defaults to 1.

Note @@ -148,6 +149,9 @@ Review the limitations of this feature before running the command. For more info "droplet": { "guid": "DROPLET-GUID" }, + "options": { + "max_in_flight": MAX_IN_FLIGHT + }, "strategy": "canary", "relationships": { "app": { @@ -159,6 +163,7 @@ Review the limitations of this feature before running the command. For more info }' ``` Where `DROPLET-GUID` and `APP-GUID` are the GUIDs that you recorded in earlier steps. + Where `MAX_IN_FLIGHT` is an integer that applies **after** the single canary instance is successful and specifies the maximum number of new instances to start simultaneous until the deployment is complete. Optional and defaults to 1. For more information about this command, see [How it works](#how-it-works). @@ -276,9 +281,8 @@ The following table describes the limitations of when using canary deployments. Quotas - Pushing updates to your app using a canary deployment strategy creates an extra instance - of your app. If you lack sufficient quota, the deployment fails. Administrators might need to increase - quotas to accommodate canary deployments. + Pushing updates to your app using a deployment strategy creates up to `max_in_flight` new instances (defaults to 1) . If you lack sufficient quota, the deployment fails. Administrators might need to increase + quotas to accommodate deployments. Simultaneous apps when interrupting a push diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index 5bcb3860..adaca12c 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -38,9 +38,10 @@ Review the limitations of this feature before running the command. For more info * **For cf CLI v7+, run:** ``` - cf push APP-NAME --strategy rolling + cf push APP-NAME --strategy rolling --max-in-flight MAX_IN_FLIGHT ``` Where `APP-NAME` is the name that you want to give your app. + Where `MAX_IN_FLIGHT` specifies the maximum number of new instances to start up simultaneous until the deployment is complete. Optional and defaults to 1.

Note @@ -144,6 +145,9 @@ Review the limitations of this feature before running the command. For more info "guid": "DROPLET-GUID" }, "strategy": "rolling", + "options": { + "max_in_flight": MAX_IN_FLIGHT + }, "relationships": { "app": { "data": { @@ -154,6 +158,7 @@ Review the limitations of this feature before running the command. For more info }' ``` Where `DROPLET-GUID` and `APP-GUID` are the GUIDs that you recorded in earlier steps. + Where `MAX_IN_FLIGHT` is an integer that specifies the maximum number of new instances to start up simultaneous until the deployment is complete. Optional and defaults to 1. For more information about this command, see [How it works](#how-it-works). @@ -211,6 +216,9 @@ configuration updates that require a restart, such as environment variables or s "guid": "DROPLET-GUID" }, "strategy": "rolling", + "options": { + "max_in_flight": MAX_IN_FLIGHT + }, "relationships": { "app": { "data": { @@ -221,7 +229,7 @@ configuration updates that require a restart, such as environment variables or s }' ``` Where `DROPLET-GUID` and `APP-GUID` are the GUIDs that you recorded in earlier steps. - + Where `MAX_IN_FLIGHT` is an integer that specifies the maximum number of new instances to start up simultaneous until the deployment is complete. Optional and defaults to 1. ## How it works @@ -235,14 +243,14 @@ This section describes pushing an app with a rolling deployment strategy. 1. Stages the updated app package. 2. Creates a droplet with the updated app package. 3. Creates a deployment with the new droplet and any new configuration. - * This starts a new process with one instance that shares the route with the old process. + * This starts up to `max_in_flight` processes that shares the route with the old process. * Now, if you run `cf app` on your app, you see multiple `web` processes.
For more information about the deployment object, see the [Deployments](http://v3-apidocs.cloudfoundry.org/index.html#deployments) section of the CAPI V3 documentation. 2. After the command creates the deployment, the `cc_deployment_updater` BOSH job runs in the background, updating deployments as follows: - 1. Adds another instance of the new web process and removes an instance from the old web process. This step repeats until the new web process reaches the required number of instances. + 1. Adds up to `max_in_flight` instances of the new web process and removes instances from the old web process. This step repeats until the new web process reaches the required number of instances.

Important This happens only if all instances of the new web process are running.

@@ -282,9 +290,8 @@ The following table describes the limitations of when using rolling deployments. Quotas - Pushing updates to your app using a rolling deployment strategy creates an extra instance - of your app. If you lack sufficient quota, the deployment fails. Administrators might need to increase - quotas to accommodate rolling deployments. + Pushing updates to your app using a deployment strategy creates up to `max_in_flight` new instances (defaults to 1). + If you lack sufficient quota, the deployment fails. Administrators might need to increase quotas to accommodate deployments. Simultaneous apps when interrupting a push From 70ec1ef49c1f4351c3a2f211c4c24791665e07d5 Mon Sep 17 00:00:00 2001 From: Sam Gunaratne <385176+Samze@users.noreply.github.com> Date: Wed, 14 Aug 2024 10:56:48 -0600 Subject: [PATCH 005/132] Improve canary limitation docs --- deploy-apps/canary-deploy.html.md.erb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/deploy-apps/canary-deploy.html.md.erb b/deploy-apps/canary-deploy.html.md.erb index 0d7abe2d..811c310b 100644 --- a/deploy-apps/canary-deploy.html.md.erb +++ b/deploy-apps/canary-deploy.html.md.erb @@ -291,14 +291,19 @@ The following table describes the limitations of when using canary deployments. of the app running at the same time. Eventually, the app runs the code from your most recent push. + + V3 APIs + During a rolling deploy for an app, requests to the V3 APIs for scaling or updating a process fail with an error message + like Cannot scale this process while a deployment is in flight.. For more information, see Scale a process + or Update a process in the CAPI V3 documentation. Evaluating the Canary Instance Given that the current processes share the same route the best way to validate that traffic is reaching the canary instance by looking at the logs. - The logs for all instance will be tagged with "process_id", and "revision_version". + If app revision logging is enabled, the logs for all instance will be tagged with "process_id", and "revision_version". e.g. `APP/REV/4/PROC/WEB/1` - Using CF CLI the logs can be retrieved using "cf logs APP_NAME" and search for "revision version" + Using CF CLI the logs can be retrieved using "cf logs APP_NAME". From 1e53750882229a6b4820f525e4bbcc5a20a551f2 Mon Sep 17 00:00:00 2001 From: Sam Gunaratne <385176+Samze@users.noreply.github.com> Date: Wed, 14 Aug 2024 10:57:32 -0600 Subject: [PATCH 006/132] Update deploy-apps/canary-deploy.html.md.erb --- deploy-apps/canary-deploy.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy-apps/canary-deploy.html.md.erb b/deploy-apps/canary-deploy.html.md.erb index 811c310b..5b561288 100644 --- a/deploy-apps/canary-deploy.html.md.erb +++ b/deploy-apps/canary-deploy.html.md.erb @@ -293,7 +293,7 @@ The following table describes the limitations of when using canary deployments. V3 APIs - During a rolling deploy for an app, requests to the V3 APIs for scaling or updating a process fail with an error message + During a canary deploy for an app, requests to the V3 APIs for scaling or updating a process fail with an error message like Cannot scale this process while a deployment is in flight.. For more information, see Scale a process or Update a process in the CAPI V3 documentation. From 93426504a1311d30eeae51f70233ce1cae9a3ad6 Mon Sep 17 00:00:00 2001 From: Pascal Zimmermann Date: Fri, 16 Aug 2024 09:12:07 +0200 Subject: [PATCH 007/132] fix: Add the missing closing quotes --- services/log-management.html.md.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/log-management.html.md.erb b/services/log-management.html.md.erb index 4232e6a7..2809490a 100644 --- a/services/log-management.html.md.erb +++ b/services/log-management.html.md.erb @@ -101,7 +101,7 @@ You can create a syslog drain service and bind apps to it using Cloud Foundry Co If you are using the mTLS feature delivered in [CAPI release 1.143.0](https://github.com/cloudfoundry/capi-release/releases/tag/1.143.0), you can use the `-p` flag to define the client certificate and key as credentials, filling in values as follows.
-    $ cf create-user-provided-service DRAIN-NAME -l SYSLOG-URL -p '{"cert":"-----BEGIN CERTIFICATE-----\nMIIH...-----END CERTIFICATE-----","key":"-----BEGIN PRIVATE KEY-----\nMIIE...-----END PRIVATE KEY-----"}
+    $ cf create-user-provided-service DRAIN-NAME -l SYSLOG-URL -p '{"cert":"-----BEGIN CERTIFICATE-----\nMIIH...-----END CERTIFICATE-----","key":"-----BEGIN PRIVATE KEY-----\nMIIE...-----END PRIVATE KEY-----"}'
     
If your certs include the V3 extension `X509v3 Extended Key Usage`, ensure that you are using the right key policies. For TLS, you need server authentication, and for mTLS, you also need client authentication. For example, TLS Web Server Authentication for TLS with TLS Web Client Authentication for mTLS is defined as follows: @@ -121,7 +121,7 @@ You can create a syslog drain service and bind apps to it using Cloud Foundry Co A combination of the approaches described earlier uses a certificate authority for a server certificate signed by your private ca and a client certificate and key.
-    $ cf create-user-provided-service DRAIN-NAME -l SYSLOG-URL -p '{"ca":"-----BEGIN CERTIFICATE-----\nMIIH...-----END CERTIFICATE-----", "cert":"-----BEGIN CERTIFICATE-----\nMIIH...-----END CERTIFICATE-----","key":"-----BEGIN PRIVATE KEY-----\nMIIE...-----END PRIVATE KEY-----"}
+    $ cf create-user-provided-service DRAIN-NAME -l SYSLOG-URL -p '{"ca":"-----BEGIN CERTIFICATE-----\nMIIH...-----END CERTIFICATE-----", "cert":"-----BEGIN CERTIFICATE-----\nMIIH...-----END CERTIFICATE-----","key":"-----BEGIN PRIVATE KEY-----\nMIIE...-----END PRIVATE KEY-----"}'
     
For more information, see [User-provided service instances](./user-provided.html). From bb5bd0a4dea0ebd37dc258e30f128a6629e6c662 Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Mon, 19 Aug 2024 18:20:47 -0700 Subject: [PATCH 008/132] format PR #524 --- deploy-apps/canary-deploy.html.md.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy-apps/canary-deploy.html.md.erb b/deploy-apps/canary-deploy.html.md.erb index 5b561288..987fdb92 100644 --- a/deploy-apps/canary-deploy.html.md.erb +++ b/deploy-apps/canary-deploy.html.md.erb @@ -300,10 +300,10 @@ The following table describes the limitations of when using canary deployments. Evaluating the Canary Instance - Given that the current processes share the same route the best way to validate that traffic is reaching the canary instance by looking at the logs. - If app revision logging is enabled, the logs for all instance will be tagged with "process_id", and "revision_version". e.g. `APP/REV/4/PROC/WEB/1` + Because the current processes share the same route, the best way to validate that traffic is reaching the canary instance by looking at the logs. + If app revision logging is enabled, the logs for all instances will be tagged with `process_id` and `revision_version` values. e.g. `APP/REV/4/PROC/WEB/1` - Using CF CLI the logs can be retrieved using "cf logs APP_NAME". + Retrieve the logs by running the cf CLI command `cf logs APP_NAME`. From ec1734d5877da756fb33519b81849f241fec6d04 Mon Sep 17 00:00:00 2001 From: Amin Jamali Date: Tue, 20 Aug 2024 13:10:43 +0000 Subject: [PATCH 009/132] Update docs for SMB 3.1.1 support --- services/_using-vol-services.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/_using-vol-services.html.md.erb b/services/_using-vol-services.html.md.erb index 5db07eb0..3aca12db 100644 --- a/services/_using-vol-services.html.md.erb +++ b/services/_using-vol-services.html.md.erb @@ -454,7 +454,7 @@ To create an SMB volume service:
  • SERVICE-INSTANCE-NAME is a name you provide for this SMB volume service instance.
  • //SERVER/SHARE is the SMB address of your server and share.
  • - (Optional) SMB-VERSION is the SMB protocol version you want to use. For example, to use SMB 2.1, set the version to 2.1. Valid values are 1.0, 2.0, 2.1, or 3.0. If you do not specify a version, the client and server negotiate a protocol version at mount time. The client and server usually select the latest available version. + (Optional) SMB-VERSION is the SMB protocol version you want to use. For example, to use SMB 2.1, set the version to 2.1. Valid values are 1.0, 2.0, 2.1, or 3.0, 3.1.1. If you do not specify a version, the client and server negotiate a protocol version at mount time. The client and server usually select the latest available version. 3.1.1 is supported as of [v3.2.0 smb-volume-release](https://github.com/cloudfoundry/smb-volume-release/releases/tag/v3.2.0).
  • From fe8c6253823949d6ba681941872acb8b31bfdef6 Mon Sep 17 00:00:00 2001 From: Amin Jamali Date: Tue, 20 Aug 2024 13:25:35 +0000 Subject: [PATCH 010/132] Use pora from cf-acceptance-test repo instead of cf-volume-services-acceptance-tests --- services/_using-vol-services.html.md.erb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/services/_using-vol-services.html.md.erb b/services/_using-vol-services.html.md.erb index 3aca12db..2db86bfc 100644 --- a/services/_using-vol-services.html.md.erb +++ b/services/_using-vol-services.html.md.erb @@ -298,13 +298,13 @@ To deploy and bind a sample app: cd ~/workspace ``` ```console - git clone https://github.com/cloudfoundry/persi-acceptance-tests.git + git clone https://github.com/cloudfoundry/cf-acceptance-tests.git ``` -1. Change into the `persi-acceptance-tests/assets/pora/` directory: +1. Change into the `cf-acceptance-tests/assets/pora/` directory: ```console - cd ~/workspace/persi-acceptance-tests/assets/pora + cd ~/workspace/cf-acceptance-tests/assets/pora ``` 1. Push the `pora` test app by running: @@ -476,13 +476,13 @@ To deploy and bind a sample app: cd ~/workspace ``` ```console - git clone https://github.com/cloudfoundry/persi-acceptance-tests.git + git clone https://github.com/cloudfoundry/cf-acceptance-tests.git ``` -1. Change into the `persi-acceptance-tests/assets/pora/` directory: +1. Change into the `cf-acceptance-tests/assets/pora/` directory: ```console - cd ~/workspace/persi-acceptance-tests/assets/pora + cd ~/workspace/cf-acceptance-tests/assets/pora ``` 1. Push the `pora` test app. Run: From 09a31927228e47f8c68bc0a216c63cde240b3f04 Mon Sep 17 00:00:00 2001 From: Greg Cobb Date: Fri, 6 Sep 2024 15:14:11 -0700 Subject: [PATCH 011/132] Add example debug sidecar use case --- sidecars.html.md.erb | 120 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) diff --git a/sidecars.html.md.erb b/sidecars.html.md.erb index dd1a79d4..5001f311 100644 --- a/sidecars.html.md.erb +++ b/sidecars.html.md.erb @@ -338,3 +338,123 @@ To view the web URL and logs for the app: "crash_count"=>1, "crash_timestamp"=>1555544935367052708, "version"=>"50892dcb-274d-4cf6-b944-3eda1e000283"} + +## Sample Use Case: Debug Running Processes + +Sidecars can be used to collect debug information (e.g. thread dumps) from +another process running in the same container. This is especially useful if you +want to debug a running process using an HTTP request, for instance if you do +not have ssh access to the application container. + +This is an example of a simple routable debug sidecar for java applications, +but the same concept can be adapted to more advanced debug tooling and other +languages or frameworks. + +### Prerequisites + +Before you begin, you must have: +- A java app with [a manifest](./deploy-apps/manifest.html) that is ready to be +pushed. For example, the [java sample +app](https://github.com/cloudfoundry/cf-acceptance-tests/tree/main/assets/java) +from CF Acceptance Tests. +- A route to map to the debug sidecar + +### Procedure + +To add a debug sidecar to the java app: + +1. Create a sidecar that responds to HTTP requests and calls `kill -3` on the +java process. When a java process receives the resulting SIGQUIT signal, it +will print a thread dump to STDOUT. For an example, see the +[java_debug_sidecar](https://github.com/Gerg/java-debug-buildpack/blob/main/java_debug_sidecar.go) +on GitHub. + +1. Place the sidecar binary in the root directory of your java app + +1. Add the following to your app manifest: + + ``` + sidecars: + - name: debug-sidecar + process_types: [ 'web' ] + command: START-COMMAND + memory: 256MB + ``` + + Where `START-COMMAND` is the command used to start the sidecar. For the above + example sidecar, `./java_debug_sidecar`. + +1. Push the java application. For example: + + ``` + cf push APP-NAME -f manifest.yml -m 1G + ``` + + Where `APP-NAME` is the name of your app. + +1. Map a route to the sidecar process's port. For detailed steps, see +[Configuring Cloud Foundry to route traffic to apps on custom ports](./custom-ports.html). + + ``` + cf curl -X PATCH /v3/routes/ROUTE-GUID/destinations -d '{ + "destinations": [ + { + "app": { + "guid": "APP-GUID", + "process": { + "type": "web" + } + }, + "port": PORT, + "protocol": "http1" + } + ] + }' + ``` + + Where: +
      +
    • APP-GUID is the GUID of your app.
    • +
    • ROUTE-GUID is the GUID of the route to map to the sidecar.
    • +
    • PORT is a custom port on which your app is configured to + receive requests. This is 8081 for the above example.
    • +
    + +1. Restart the app to complete the port mapping + + ``` + cf restart APP_NAME + ``` + + Where `APP-NAME` is the name of your app. + +1. Tail the app logs: + + ``` + cf logs APP_NAME + ``` + + Where `APP-NAME` is the name of your app. + + +1. In another terminal, make a HTTP request to the sidecar, to trigger the +thread dump. For example: + + ``` + curl https://debug-sidecar.example.com/threaddump + ``` + +1. Observe the thread dump in the app logs + +### Next Steps + +Now that you have a simple debugging sidecar working, here are some ideas for +next steps: + +- Use more sophisticated debugging tools +- Return the debug information in the HTTP response, rather than logging to STDOUT +- Inject the debug sidecar via a [Sidecar +buildpacks](../buildpacks/sidecar-buildpacks.html). For example: +[java-debug-buildpack](https://github.com/Gerg/java-debug-buildpack) on GitHub. +- Add authentication for the debug sidecar's HTTP route, for instance using an +authentication [Route Service](../services/route-services.html). From 53922ca9a8b4c44efebef30d597353cf04b39a87 Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Mon, 9 Sep 2024 10:49:32 -0700 Subject: [PATCH 012/132] PR #527 tweaks --- sidecars.html.md.erb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sidecars.html.md.erb b/sidecars.html.md.erb index 5001f311..0b2a318e 100644 --- a/sidecars.html.md.erb +++ b/sidecars.html.md.erb @@ -255,9 +255,13 @@ To push the app and sidecar: cf push sidecar-dependent-app ``` -After you push the app, you can further explore it in [View the processes running in the container](#view-processes) and [View the web URL and app logs](#view-logs). +After you push the app, you can further explore it as described in the sections below: -### View the processes running in the container +- [View processes running in the app container via SSH](#view-processes-ssh) +- [View the web URL and app logs via SSH](#view-logs) +- [View and debug processes running in the app container via HTTP](#debug-processes-http) + +### View processes running in the app container via SSH To view the app and sidecar process running in the container: @@ -300,7 +304,7 @@ To view the app and sidecar process running in the container: ruby 13 vcap 11u IPv4 17274965 0t0 TCP localhost:42266->localhost:8082 (ESTABLISHED) -### View the web URL and app logs +### View the web URL and app logs via SSH To view the web URL and logs for the app: @@ -339,7 +343,7 @@ To view the web URL and logs for the app: "version"=>"50892dcb-274d-4cf6-b944-3eda1e000283"} -## Sample Use Case: Debug Running Processes +### View and debug processes running in the app container via HTTP Sidecars can be used to collect debug information (e.g. thread dumps) from another process running in the same container. This is especially useful if you From cfddeaf7315fa1b87341eff962c0a1419333f6ca Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Mon, 9 Sep 2024 11:55:38 -0700 Subject: [PATCH 013/132] fix hed levels --- sidecars.html.md.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sidecars.html.md.erb b/sidecars.html.md.erb index 0b2a318e..73ef18de 100644 --- a/sidecars.html.md.erb +++ b/sidecars.html.md.erb @@ -354,7 +354,7 @@ This is an example of a simple routable debug sidecar for java applications, but the same concept can be adapted to more advanced debug tooling and other languages or frameworks. -### Prerequisites +###S# Prerequisites Before you begin, you must have: - A java app with [a manifest](./deploy-apps/manifest.html) that is ready to be @@ -363,7 +363,7 @@ app](https://github.com/cloudfoundry/cf-acceptance-tests/tree/main/assets/java) from CF Acceptance Tests. - A route to map to the debug sidecar -### Procedure +#### Procedure To add a debug sidecar to the java app: From 75910e996793d7e9eb5b7527a571f9fc2074b35a Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Mon, 9 Sep 2024 12:57:45 -0700 Subject: [PATCH 014/132] typo --- sidecars.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sidecars.html.md.erb b/sidecars.html.md.erb index 73ef18de..e101a724 100644 --- a/sidecars.html.md.erb +++ b/sidecars.html.md.erb @@ -354,7 +354,7 @@ This is an example of a simple routable debug sidecar for java applications, but the same concept can be adapted to more advanced debug tooling and other languages or frameworks. -###S# Prerequisites +#### Prerequisites Before you begin, you must have: - A java app with [a manifest](./deploy-apps/manifest.html) that is ready to be From ba2710098c8965b8f4b5d3866bc331667cd9f78f Mon Sep 17 00:00:00 2001 From: Greg Cobb Date: Thu, 12 Sep 2024 13:26:39 -0700 Subject: [PATCH 015/132] Fix sidecar formatting issues --- sidecars.html.md.erb | 111 ++++++++++++++++++++++--------------------- 1 file changed, 56 insertions(+), 55 deletions(-) diff --git a/sidecars.html.md.erb b/sidecars.html.md.erb index e101a724..6806efe1 100644 --- a/sidecars.html.md.erb +++ b/sidecars.html.md.erb @@ -357,11 +357,13 @@ languages or frameworks. #### Prerequisites Before you begin, you must have: -- A java app with [a manifest](./deploy-apps/manifest.html) that is ready to be + +* A java app with [a manifest](./deploy-apps/manifest.html) that is ready to be pushed. For example, the [java sample app](https://github.com/cloudfoundry/cf-acceptance-tests/tree/main/assets/java) from CF Acceptance Tests. -- A route to map to the debug sidecar + +* A route to map to the debug sidecar #### Procedure @@ -377,76 +379,75 @@ on GitHub. 1. Add the following to your app manifest: - ``` - sidecars: - - name: debug-sidecar - process_types: [ 'web' ] - command: START-COMMAND - memory: 256MB - ``` + ``` + sidecars: + - name: debug-sidecar + process_types: [ 'web' ] + command: START-COMMAND + memory: 256MB + ``` - Where `START-COMMAND` is the command used to start the sidecar. For the above - example sidecar, `./java_debug_sidecar`. + Where `START-COMMAND` is the command used to start the sidecar. For the above + example sidecar, `./java_debug_sidecar`. 1. Push the java application. For example: - ``` - cf push APP-NAME -f manifest.yml -m 1G - ``` + ``` + cf push APP-NAME -f manifest.yml -m 1G + ``` - Where `APP-NAME` is the name of your app. + Where `APP-NAME` is the name of your app. 1. Map a route to the sidecar process's port. For detailed steps, see [Configuring Cloud Foundry to route traffic to apps on custom ports](./custom-ports.html). - ``` - cf curl -X PATCH /v3/routes/ROUTE-GUID/destinations -d '{ - "destinations": [ - { - "app": { - "guid": "APP-GUID", - "process": { - "type": "web" - } - }, - "port": PORT, - "protocol": "http1" - } - ] - }' - ``` - - Where: -
      -
    • APP-GUID is the GUID of your app.
    • -
    • ROUTE-GUID is the GUID of the route to map to the sidecar.
    • -
    • PORT is a custom port on which your app is configured to - receive requests. This is 8081 for the above example.
    • -
    + ``` + cf curl -X PATCH /v3/routes/ROUTE-GUID/destinations -d '{ + "destinations": [ + { + "app": { + "guid": "APP-GUID", + "process": { + "type": "web" + } + }, + "port": PORT, + "protocol": "http1" + } + ] + }' + ``` + + Where: +
      +
    • APP-GUID is the GUID of your app.
    • +
    • ROUTE-GUID is the GUID of the route to map to the sidecar.
    • +
    • PORT is a custom port on which your app is configured to + receive requests. This is 8081 for the above example.
    • +
    1. Restart the app to complete the port mapping - ``` - cf restart APP_NAME - ``` + ``` + cf restart APP_NAME + ``` - Where `APP-NAME` is the name of your app. + Where `APP-NAME` is the name of your app. 1. Tail the app logs: - ``` - cf logs APP_NAME - ``` - - Where `APP-NAME` is the name of your app. + ``` + cf logs APP_NAME + ``` + Where `APP-NAME` is the name of your app. 1. In another terminal, make a HTTP request to the sidecar, to trigger the thread dump. For example: - ``` - curl https://debug-sidecar.example.com/threaddump - ``` + ``` + curl https://debug-sidecar.example.com/threaddump + ``` 1. Observe the thread dump in the app logs @@ -455,10 +456,10 @@ thread dump. For example: Now that you have a simple debugging sidecar working, here are some ideas for next steps: -- Use more sophisticated debugging tools -- Return the debug information in the HTTP response, rather than logging to STDOUT -- Inject the debug sidecar via a [Sidecar +* Use more sophisticated debugging tools +* Return the debug information in the HTTP response, rather than logging to STDOUT +* Inject the debug sidecar via a [Sidecar buildpacks](../buildpacks/sidecar-buildpacks.html). For example: [java-debug-buildpack](https://github.com/Gerg/java-debug-buildpack) on GitHub. -- Add authentication for the debug sidecar's HTTP route, for instance using an +* Add authentication for the debug sidecar's HTTP route, for instance using an authentication [Route Service](../services/route-services.html). From 4e4d08992a981d0caa604cd5c4b959c15c72e9ad Mon Sep 17 00:00:00 2001 From: Greg Cobb Date: Thu, 12 Sep 2024 14:42:16 -0700 Subject: [PATCH 016/132] Update deploy app (push) docs with new links - Add links to newer push features that have docs pages but are not linked from the main "cf push" page --- deploy-apps/deploy-app.html.md.erb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/deploy-apps/deploy-app.html.md.erb b/deploy-apps/deploy-app.html.md.erb index ad453c46..fa8b9ffb 100644 --- a/deploy-apps/deploy-app.html.md.erb +++ b/deploy-apps/deploy-app.html.md.erb @@ -253,13 +253,21 @@ For apps that are not already set up for the services that they use: 1. (Optional) Configure the app with the service URL and credentials, if needed. For more information, see [Configuring Service Connections](../../buildpacks/java/configuring-service-connections.html). +### Build custom push workflows (optional) + +The CF CLI includes [composible push sub-step +commands](../push-sub-commands.html) that empower you to build your own push. +These are useful if the default behavior of `cf push` does not match your +needs, or if you want to implement more complicated app build, promotion, and +run workflows. + ## App updates and downtime -When you push an app that is already running, <%= vars.app_runtime_abbr %> stops all existing instances of that app. Users who try to access the app see a `404 Not Found` message while `cf push` runs. +By default, when you push an app that is already running, <%= vars.app_runtime_abbr %> stops all existing instances of that app. Users who try to access the app see a `404 Not Found` message while `cf push` runs. -With some app updates, old and new versions of your code must never run at the same time. A worst-case example is if your app update migrates a database schema, causing old app instances to fail and lose user data. To prevent this, you must stop all running instances of your app before you push the new version. +When old and new versions of your app can run simultaneously, you can avoid app downtime by using [Rolling deployments](./rolling-deploy.html). Alternatively, you can use the blue-green deployment method to swap routes between app versions running in parallel. For more information, see [Using blue-green deployment to reduce downtime and risk](blue-green.html). -When old and new versions of your app can run simultaneously, you can avoid app downtime by using the blue-green deployment method to swap routes between app versions running in parallel. For more information, see [Using blue-green deployment to reduce downtime and risk](blue-green.html). +With some app updates, old and new versions of your code must never run at the same time. A worst-case example is if your app update migrates a database schema, causing old app instances to fail and lose user data. To prevent this, you must stop all running instances of your app before you push the new version. ## Troubleshoot app push problems From 36439d3cb7f0d55b819ec1430de4fdd619c1c8fb Mon Sep 17 00:00:00 2001 From: Greg Cobb Date: Thu, 12 Sep 2024 15:04:37 -0700 Subject: [PATCH 017/132] Push sub-commands: Remove v6 notice - v6 commands no longer exist on page --- push-sub-commands.html.md.erb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/push-sub-commands.html.md.erb b/push-sub-commands.html.md.erb index 39010adc..ead6ee82 100644 --- a/push-sub-commands.html.md.erb +++ b/push-sub-commands.html.md.erb @@ -20,10 +20,6 @@ The following table describes the building blocks as resources and lists the com For information about using these commands, see [Example workflows](#example-workflows). -

    -Important -The cf CLI v6 commands described in this topic are experimental and unsupported, but are supported in cf CLI v7. The latest supported cf CLI release is cf CLI v8. To upgrade to cf CLI v7, see Upgrading to cf CLI v7. To upgrade to cf CLI v8, see Upgrading to cf CLI v8.

    - From c3bc1157a34822ff946d1dfeaac60ebbc0e4da42 Mon Sep 17 00:00:00 2001 From: Greg Cobb Date: Fri, 13 Sep 2024 10:48:08 -0700 Subject: [PATCH 018/132] Push sub-commands: Small content updates - Add additional CLI commands to table - Small copy edits - Add link to rolling deployments docs --- push-sub-commands.html.md.erb | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/push-sub-commands.html.md.erb b/push-sub-commands.html.md.erb index ead6ee82..d4842a6f 100644 --- a/push-sub-commands.html.md.erb +++ b/push-sub-commands.html.md.erb @@ -24,7 +24,7 @@ For information about using these commands, see [Example workflows](#example-wor - + @@ -32,6 +32,8 @@ For information about using these commands, see [Example workflows](#example-wor For more information, see Apps in the CAPI documentation. @@ -43,12 +45,13 @@ For information about using these commands, see [Example workflows](#example-wor - @@ -72,7 +77,8 @@ For information about using these commands, see [Example workflows](#example-wor For more information, see Space Manifest in the CAPI documentation. @@ -101,7 +107,7 @@ This example workflow describes how to push an app using sub-step commands inste ``` Where `APP-NAME` is the name of your app. -1. Locate and copy the `package guid` from the output of an earlier step. See the following example output: +1. Locate and copy the `package guid` from the output of an earlier step or by using the `cf packages` command. See the following example output:
         Uploading and creating bits package for app APP-NAME in org test / space test as admin...
    @@ -120,7 +126,7 @@ This example workflow describes how to push an app using sub-step commands inste
             
  • PACKAGE-GUID is the package GUID you recorded in an earlier step.
  • -3. Locate and copy the `droplet guid` from the output of an earlier step. See the following example output: +3. Locate and copy the `droplet guid` from the output of an earlier step or by using the `cf droplets` command. See the following example output:
         Staging package for APP-NAME in org test / space test as admin...
    @@ -134,7 +140,7 @@ This example workflow describes how to push an app using sub-step commands inste
     4. Assign the droplet to your app:
     
         ```
    -    cf set-droplet APP-NAME -d DROPLET-GUID
    +    cf set-droplet APP-NAME DROPLET-GUID
         ```
         Where:
         
      @@ -178,10 +184,14 @@ This example workflow describes how to roll back to a previous droplet used by y cf stop APP-NAME ``` + If you wish to avoid incurring downtime when changing your droplet, + consider using [Rolling deployemnts](./deploy-apps/rolling-deploy.html) + instead of stopping and starting your app. + 1. Set the app to use the previous droplet: ``` - cf set-droplet APP-NAME -d PREVIOUS-DROPLET-GUID + cf set-droplet APP-NAME PREVIOUS-DROPLET-GUID ``` Where:
        From 1d945cf06ed8408fc8de9a64107a123e16b097ec Mon Sep 17 00:00:00 2001 From: Greg Cobb Date: Fri, 13 Sep 2024 10:49:50 -0700 Subject: [PATCH 019/132] Push sub-commands: Add droplet download example - Add additional example workflow for downloading and uploading droplets --- push-sub-commands.html.md.erb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/push-sub-commands.html.md.erb b/push-sub-commands.html.md.erb index d4842a6f..064e72eb 100644 --- a/push-sub-commands.html.md.erb +++ b/push-sub-commands.html.md.erb @@ -13,6 +13,7 @@ Here are some example use cases for the sub-step commands: * Calling external services to report audit data during push * Scanning a droplet before deploy * Integrating with a change request system +* Running droplets built on a different Cloud Foundry deployment To support these custom push workflows, Cloud Foundry divides apps into smaller building blocks. @@ -205,3 +206,29 @@ This example workflow describes how to roll back to a previous droplet used by y cf start APP-NAME ``` Where `APP-NAME` is the name of your app. + +### Downloading and uploading droplets + +This example workflow describes how to download a built droplet and then push +it to an app. You might want to use this for building apps in one location and +then deploying it elsewhere. For instance, you might use this to "promote" +built apps from pre-production environments to production environments, without +having to re-build the app. + +1. Download the current droplet for your app: + + ``` + cf download-droplet APP-NAME --path PATH + ``` + + Where `APP-NAME` is the name of your app and `PATH` is the file path to download the droplet to. + +1. Log in to the desired Cloud Foundry environment and target the organization and space where you want to run the droplet you downloaded. + +1. Push a new or existing app with the downloaded droplet: + + ``` + cf push APP-NAME --droplet PATH + ``` + + Where `APP-NAME` is the name of your app and `PATH` is the file path to the downloaded droplet. From 6dc8ac297c5fed4135917f3e572e120651617074 Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Fri, 13 Sep 2024 15:25:22 -0700 Subject: [PATCH 020/132] typo --- push-sub-commands.html.md.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/push-sub-commands.html.md.erb b/push-sub-commands.html.md.erb index 064e72eb..bb7ce7a7 100644 --- a/push-sub-commands.html.md.erb +++ b/push-sub-commands.html.md.erb @@ -186,7 +186,7 @@ This example workflow describes how to roll back to a previous droplet used by y ``` If you wish to avoid incurring downtime when changing your droplet, - consider using [Rolling deployemnts](./deploy-apps/rolling-deploy.html) + consider using [Rolling deployments](./deploy-apps/rolling-deploy.html) instead of stopping and starting your app. 1. Set the app to use the previous droplet: @@ -211,8 +211,8 @@ This example workflow describes how to roll back to a previous droplet used by y This example workflow describes how to download a built droplet and then push it to an app. You might want to use this for building apps in one location and -then deploying it elsewhere. For instance, you might use this to "promote" -built apps from pre-production environments to production environments, without +then deploying it elsewhere. For instance, you might use this to promote +built apps from pre-production environments to production environments without having to re-build the app. 1. Download the current droplet for your app: From 578fe9cf2a4d8323283359d0663ed2a586ccfc94 Mon Sep 17 00:00:00 2001 From: Ralf Pannemans Date: Fri, 20 Sep 2024 10:18:40 +0200 Subject: [PATCH 021/132] adapted link to changed buildpack structure --- deploy-apps/manifest-attributes.html.md.erb | 2 +- push.html.md.erb | 2 +- sidecars.html.md.erb | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deploy-apps/manifest-attributes.html.md.erb b/deploy-apps/manifest-attributes.html.md.erb index df1fce72..85878d69 100644 --- a/deploy-apps/manifest-attributes.html.md.erb +++ b/deploy-apps/manifest-attributes.html.md.erb @@ -156,7 +156,7 @@ You can refer to a buildpack by name in a manifest or a command-line option. The The `-b` command-line flag overrides this attribute. -For more information, see [Pushing an app with multiple buildpacks](../../buildpacks/use-multiple-buildpacks.html). +For more information, see [Pushing an app with multiple buildpacks](../../buildpacks/classical/use-multiple-buildpacks.html). ### command diff --git a/push.html.md.erb b/push.html.md.erb index d7fa41ee..791cdba2 100644 --- a/push.html.md.erb +++ b/push.html.md.erb @@ -17,7 +17,7 @@ These topics contain the procedures for deploying apps with `cf push`: * [Starting, restarting, and restaging Apps](./deploy-apps/start-restart-restage.html) -* [Pushing your app with multiple buildpacks](../buildpacks/use-multiple-buildpacks.html) +* [Pushing your app with multiple buildpacks](../buildpacks/classical/use-multiple-buildpacks.html) * [Pushing an app with multiple processes](./multiple-processes.html) diff --git a/sidecars.html.md.erb b/sidecars.html.md.erb index 6806efe1..6fedb9d2 100644 --- a/sidecars.html.md.erb +++ b/sidecars.html.md.erb @@ -24,7 +24,7 @@ single container on Diego. Both processes within the container undergo health ch You can push sidecar processes with your app by using one of two methods: * Using an app manifest. For instructions, see [Push an app with a sidecar Using an app manifest](#create). -* With a custom buildpack. For instructions, see [Sidecar buildpacks](../buildpacks/sidecar-buildpacks.html). +* With a custom buildpack. For instructions, see [Sidecar buildpacks](../buildpacks/classical/sidecar-buildpacks.html). For additional information about sidecars, see [Sidecars](http://v3-apidocs.cloudfoundry.org/version/release-candidate/#sidecars) in the Cloud Foundry API (CAPI) documentation. @@ -88,7 +88,7 @@ Where: * `START-COMMAND` is the command used to start the sidecar. For example, `./binary` or `java -jar java-file.jar`. You must also allocate memory to sidecars that you push with a custom buildpack. -For more information, see [Sidecar buildpacks](../buildpacks/sidecar-buildpacks.html). +For more information, see [Sidecar buildpacks](../buildpacks/classical/sidecar-buildpacks.html). ### Packaging binaries @@ -459,7 +459,7 @@ next steps: * Use more sophisticated debugging tools * Return the debug information in the HTTP response, rather than logging to STDOUT * Inject the debug sidecar via a [Sidecar -buildpacks](../buildpacks/sidecar-buildpacks.html). For example: +buildpacks](../buildpacks/classical/sidecar-buildpacks.html). For example: [java-debug-buildpack](https://github.com/Gerg/java-debug-buildpack) on GitHub. * Add authentication for the debug sidecar's HTTP route, for instance using an authentication [Route Service](../services/route-services.html). From f47659d58cf07cf543d98a31a797f905361881d7 Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Mon, 30 Sep 2024 13:11:08 -0700 Subject: [PATCH 022/132] standardize .gitignore across TPCF repos --- .gitignore | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 969d4ad4..f2e804b0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,13 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. -# -# If you find yourself ignoring temporary files generated by your text editor -# or operating system, you probably want to add a global ignore instead: -# git config --global core.excludesfile ~/.gitignore_global - -# Ignore bundler config +output +final_app .bundle - -# Ignore the build directory -build - -# Ignore Sass' cache -.sass-cache - -.idea +Gemfile.lock +final_app/* +cached_shas.yml +**/.sass-cache/* +bin vendor -.DS_Store \ No newline at end of file +[#]*[#] +.DS_Store +.ruby-version +.vscode/ \ No newline at end of file From 04a32b7f139830a1a809ec2c11d8e50535e125bf Mon Sep 17 00:00:00 2001 From: Sam Gunaratne <385176+Samze@users.noreply.github.com> Date: Tue, 15 Oct 2024 11:55:06 -0600 Subject: [PATCH 023/132] Update cf cli version in canary docs --- deploy-apps/canary-deploy.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy-apps/canary-deploy.html.md.erb b/deploy-apps/canary-deploy.html.md.erb index 987fdb92..663cd46d 100644 --- a/deploy-apps/canary-deploy.html.md.erb +++ b/deploy-apps/canary-deploy.html.md.erb @@ -25,7 +25,7 @@ The expected workflow for this feature is: The procedures in this topic require one of the following: -* **cf CLI v8 or later** +* **cf CLI v8.8.0 or later** * **CAPI V3.173.0 or later:** If you use CAPI V3, you must install the cf CLI version 8+. From 8bf88df14c17b945088a6becb2ba0b073d98d971 Mon Sep 17 00:00:00 2001 From: Sam Gunaratne <385176+Samze@users.noreply.github.com> Date: Tue, 15 Oct 2024 11:59:27 -0600 Subject: [PATCH 024/132] Update max-in-flight description for rolling deployment --- deploy-apps/rolling-deploy.html.md.erb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index 6a09a719..aef4bd2e 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -38,10 +38,9 @@ Review the limitations of this feature before running the command. For more info * **For cf CLI v7+, run:** ``` - cf push APP-NAME --strategy rolling --max-in-flight MAX_IN_FLIGHT + cf push APP-NAME --strategy rolling ``` Where `APP-NAME` is the name that you want to give your app. - Where `MAX_IN_FLIGHT` specifies the maximum number of new instances to start up simultaneous until the deployment is complete. Optional and defaults to 1.

        Note @@ -54,6 +53,15 @@ Review the limitations of this feature before running the command. For more info If the deployment stops and doesn't restart, cancel it and run it again as described in an earlier step. To cancel, see [Cancel a deployment](#cancel). + +* **For cf CLI v8.8.0+ and CAPI V3.173.0 or later** + Allows you to additionally specify the `--max-in-flight` property, run: + ``` + cf push APP-NAME --strategy rolling --max-in-flight MAX_IN_FLIGHT + ``` + Where `APP-NAME` is the name that you want to give your app. + Where `MAX_IN_FLIGHT` specifies the maximum number of new instances to start up simultaneous until the deployment is complete. Optional and defaults to 1. + * **For CAPI V3:** 1. Log in to the cf CLI. From 43507873bfacbcba7887749690e340d84732c2dd Mon Sep 17 00:00:00 2001 From: Sam Gunaratne <385176+Samze@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:41:14 -0600 Subject: [PATCH 025/132] Add max_in_flight example to rolling deployment docs --- deploy-apps/rolling-deploy.html.md.erb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index aef4bd2e..7e752b35 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -213,6 +213,14 @@ configuration updates that require a restart, such as environment variables or s ``` Where `APP-NAME` is the name of the app. +* **For cf CLI v8.8.0+ and CAPI V3.173.0 or later** + Allows you to additionally specify the `--max-in-flight` property, run: + ``` + cf restart APP-NAME --strategy rolling --max-in-flight MAX_IN_FLIGHT + ``` + Where `APP-NAME` is the name of the app. + Where `MAX_IN_FLIGHT` specifies the maximum number of new instances to restart simultaneous until the deployment is complete. Optional and defaults to 1. + * **For CAPI V3, run:** ``` From 3215edfd719e19716bea9d327662f6aa0ccd187d Mon Sep 17 00:00:00 2001 From: Pavel Busko Date: Mon, 30 Sep 2024 14:50:57 +0200 Subject: [PATCH 026/132] Add lifecycle attribute Co-authored-by: Ralf Pannemans --- deploy-apps/manifest-attributes.html.md.erb | 20 +++++++++++++++++++- push.html.md.erb | 2 +- sidecars.html.md.erb | 6 +++--- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/deploy-apps/manifest-attributes.html.md.erb b/deploy-apps/manifest-attributes.html.md.erb index 85878d69..8b56875f 100644 --- a/deploy-apps/manifest-attributes.html.md.erb +++ b/deploy-apps/manifest-attributes.html.md.erb @@ -156,7 +156,7 @@ You can refer to a buildpack by name in a manifest or a command-line option. The The `-b` command-line flag overrides this attribute. -For more information, see [Pushing an app with multiple buildpacks](../../buildpacks/classical/use-multiple-buildpacks.html). +For more information, see [Pushing an app with multiple buildpacks](../../buildpacks/use-multiple-buildpacks.html). ### command @@ -368,6 +368,24 @@ The default number of instances is 1. To ensure that platform maintenance does not interrupt your app, <%= vars.recommended_by %> recommends running at least two instances. +### lifecycle + +The `lifecycle` attribute specifies which application lifecycle to use for staging and running the application. Three variants are supported at the moment: + +- [`buildpack`](../../buildpacks/classic.html) +- [`cnb`](../../buildpacks/cnb/index.html) +- [`docker`](push-docker.html) + +For example: + +``` +--- + ... + lifecycle: buildpack +``` + +The default is `buildpack` unless the [`docker`](#docker) attribute is specified. + ### log-rate-limit-per-second The `log-rate-limit-per-second` attribute specifies the log rate limit for all instances of an app. This attribute requires a unit of measurement: `B`, `K`, `KB`, `M`, `MB`, `G`, or `GB`, in either uppercase or lowercase. diff --git a/push.html.md.erb b/push.html.md.erb index 791cdba2..d7fa41ee 100644 --- a/push.html.md.erb +++ b/push.html.md.erb @@ -17,7 +17,7 @@ These topics contain the procedures for deploying apps with `cf push`: * [Starting, restarting, and restaging Apps](./deploy-apps/start-restart-restage.html) -* [Pushing your app with multiple buildpacks](../buildpacks/classical/use-multiple-buildpacks.html) +* [Pushing your app with multiple buildpacks](../buildpacks/use-multiple-buildpacks.html) * [Pushing an app with multiple processes](./multiple-processes.html) diff --git a/sidecars.html.md.erb b/sidecars.html.md.erb index 6fedb9d2..6806efe1 100644 --- a/sidecars.html.md.erb +++ b/sidecars.html.md.erb @@ -24,7 +24,7 @@ single container on Diego. Both processes within the container undergo health ch You can push sidecar processes with your app by using one of two methods: * Using an app manifest. For instructions, see [Push an app with a sidecar Using an app manifest](#create). -* With a custom buildpack. For instructions, see [Sidecar buildpacks](../buildpacks/classical/sidecar-buildpacks.html). +* With a custom buildpack. For instructions, see [Sidecar buildpacks](../buildpacks/sidecar-buildpacks.html). For additional information about sidecars, see [Sidecars](http://v3-apidocs.cloudfoundry.org/version/release-candidate/#sidecars) in the Cloud Foundry API (CAPI) documentation. @@ -88,7 +88,7 @@ Where: * `START-COMMAND` is the command used to start the sidecar. For example, `./binary` or `java -jar java-file.jar`. You must also allocate memory to sidecars that you push with a custom buildpack. -For more information, see [Sidecar buildpacks](../buildpacks/classical/sidecar-buildpacks.html). +For more information, see [Sidecar buildpacks](../buildpacks/sidecar-buildpacks.html). ### Packaging binaries @@ -459,7 +459,7 @@ next steps: * Use more sophisticated debugging tools * Return the debug information in the HTTP response, rather than logging to STDOUT * Inject the debug sidecar via a [Sidecar -buildpacks](../buildpacks/classical/sidecar-buildpacks.html). For example: +buildpacks](../buildpacks/sidecar-buildpacks.html). For example: [java-debug-buildpack](https://github.com/Gerg/java-debug-buildpack) on GitHub. * Add authentication for the debug sidecar's HTTP route, for instance using an authentication [Route Service](../services/route-services.html). From 6d6217eec3b669a85339526ec0fc4e2fe6af81ac Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Fri, 1 Nov 2024 12:32:03 -0700 Subject: [PATCH 027/132] remove extra Note class --- custom-ports.html.md.erb | 1 - deploy-apps/_c2c_oss_overlay.html.md.erb | 1 - deploy-apps/_v3-note.html.md.erb | 1 - deploy-apps/app-lifecycle.html.md.erb | 1 - deploy-apps/blue-green.html.md.erb | 1 - deploy-apps/cf-networking.html.md.erb | 1 - deploy-apps/cf-scale.html.md.erb | 1 - deploy-apps/deploy-app.html.md.erb | 1 - deploy-apps/large-app-deploy.html.md.erb | 1 - deploy-apps/ssh-services.html.md.erb | 1 - deploy-apps/streaming-logs.html.md.erb | 1 - deploy-apps/windows-stacks.html.md.erb | 1 - multiple-processes.html.md.erb | 1 - 13 files changed, 13 deletions(-) diff --git a/custom-ports.html.md.erb b/custom-ports.html.md.erb index b546250d..c69cbd93 100644 --- a/custom-ports.html.md.erb +++ b/custom-ports.html.md.erb @@ -122,7 +122,6 @@ To configure your app to receive HTTP or TCP requests on custom ports:

      - Caution This API call removes all destinations for a route and replaces them with the destinations you provide in the API request.

      ## Additional resources diff --git a/deploy-apps/_c2c_oss_overlay.html.md.erb b/deploy-apps/_c2c_oss_overlay.html.md.erb index fa644abf..2eb048dd 100644 --- a/deploy-apps/_c2c_oss_overlay.html.md.erb +++ b/deploy-apps/_c2c_oss_overlay.html.md.erb @@ -33,7 +33,6 @@ To change the number of Diego Cells supported by the overlay network in your Clo
    Resource
    Resource DescriptionCommandCommands
    App
      +
    • cf app
    • +
    • cf apps
    • cf create-app
    • cf create-package
    • +
    • cf packages
    BuildStaging the app. Creating a build combines a Package with a Buildpack and builds it into an executable resource.
    +
    Staging the app. Creating a build combines a Package with a Buildpack and builds it into an executable resource, called a Droplet.
    For more information, see Builds in the CAPI documentation.
      @@ -62,6 +65,8 @@ For information about using these commands, see [Example workflows](#example-wor For more information, see Droplet in the CAPI documentation.
      +
    • cf download-droplet
    • +
    • cf droplets
    • cf set-droplet
      -
    • cf create-app-manifest, cf apply-manifest
    • +
    • cf apply-manifest
    • +
    • cf create-app-manifest

    -Caution The overlay network IP address range must not conflict with any other IP addresses in the network. If a conflict exists, Diego Cells cannot reach any endpoint that has a conflicting IP address.

    ### Configure the number of containers per cell diff --git a/deploy-apps/_v3-note.html.md.erb b/deploy-apps/_v3-note.html.md.erb index 3cfe8b8d..31e5e807 100644 --- a/deploy-apps/_v3-note.html.md.erb +++ b/deploy-apps/_v3-note.html.md.erb @@ -1,5 +1,4 @@
    -Important This attribute is available with CAPI V3 only. To push a manifest that uses this attribute, do one of the following:

      diff --git a/deploy-apps/app-lifecycle.html.md.erb b/deploy-apps/app-lifecycle.html.md.erb index 81d43fae..6f7ce99f 100644 --- a/deploy-apps/app-lifecycle.html.md.erb +++ b/deploy-apps/app-lifecycle.html.md.erb @@ -53,5 +53,4 @@ This might increase the time it takes to drain Diego Cells, which causes increas <%= vars.app_graceful_shutdown_config %>

      -Note An exception to the cases previously mentioned is when monit restarts a Diego Cell replacement or Garden server that has failed. In this case, <%= vars.app_runtime_abbr %> immediately stops the apps that are still running using SIGKILL.

      diff --git a/deploy-apps/blue-green.html.md.erb b/deploy-apps/blue-green.html.md.erb index f109a36f..72453524 100644 --- a/deploy-apps/blue-green.html.md.erb +++ b/deploy-apps/blue-green.html.md.erb @@ -25,7 +25,6 @@ version by switching back to Blue. You can adjust the route mapping pattern to display a static maintenance page during a maintenance window for time-consuming tasks such as migrating a database. In this scenario, the router switches all incoming requests from Blue to Maintenance to Green.

      -Important If your app uses a relational database, blue-green deployment can lead to discrepancies between your green and glue databases during an update. To maximize data integrity, configure a single database for backward and forward compatibility.

      diff --git a/deploy-apps/cf-networking.html.md.erb b/deploy-apps/cf-networking.html.md.erb index eb0a1471..35104328 100644 --- a/deploy-apps/cf-networking.html.md.erb +++ b/deploy-apps/cf-networking.html.md.erb @@ -7,7 +7,6 @@ owner: CF for VMs Networking The container-to-container networking feature, also known as CF Networking, allows direct network traffic between apps. For an overview of how container-to-container networking works, see [Container-to-container networking](../../concepts/understand-cf-networking.html).

      -Important Container-to-container networking is not available for apps hosted on Microsoft Windows.

      <%= vars.app_traffic_logging %> diff --git a/deploy-apps/cf-scale.html.md.erb b/deploy-apps/cf-scale.html.md.erb index 17517652..831b629a 100644 --- a/deploy-apps/cf-scale.html.md.erb +++ b/deploy-apps/cf-scale.html.md.erb @@ -34,7 +34,6 @@ $ cf scale myApp -i 5

      -Note In cf CLI v7+, you can also use --process with cf scale to scale specific processes of your app.

      ## Scaling vertically diff --git a/deploy-apps/deploy-app.html.md.erb b/deploy-apps/deploy-app.html.md.erb index fa8b9ffb..eed81df5 100644 --- a/deploy-apps/deploy-app.html.md.erb +++ b/deploy-apps/deploy-app.html.md.erb @@ -188,7 +188,6 @@ You can configure the `cf push` command to run custom initialization tasks for These tasks run after <%= vars.app_runtime_abbr %> loads the app droplet but before it starts the app to allow the initialization script to access the app language runtime environment. For example, your script can map values from `$VCAP_SERVICES` into other environment variables or a config file that the app uses.
      -Important The following notes include important information about configuring app initialization when you use certain buildpacks:
      • Java: Initialization scripts for the Java buildpack require additional configuration. diff --git a/deploy-apps/large-app-deploy.html.md.erb b/deploy-apps/large-app-deploy.html.md.erb index 6c0130e5..ac7de665 100644 --- a/deploy-apps/large-app-deploy.html.md.erb +++ b/deploy-apps/large-app-deploy.html.md.erb @@ -37,7 +37,6 @@ To deploy large apps to <%= vars.app_runtime_abbr %>, ensure that: For more information about using the cf CLI to deploy apps, see [Push](../../cf-cli/getting-started.html#push) in _Getting Started with the cf CLI_.

        -Important Changing the timeout setting for the cf CLI does not change the timeout limit for <%= vars.app_runtime_abbr %> server-side jobs such as staging or starting apps. You must change server-side timeouts in the manifest. Because of the differences between the <%= vars.app_runtime_abbr %> and cf CLI timeout values, your app might start even though the cf CLI reports App failed. To review the status of your app, run cf apps APP-NAME, where APP-NAME is the name of your app.

        diff --git a/deploy-apps/ssh-services.html.md.erb b/deploy-apps/ssh-services.html.md.erb index 7580d0e8..7c04bd33 100644 --- a/deploy-apps/ssh-services.html.md.erb +++ b/deploy-apps/ssh-services.html.md.erb @@ -14,7 +14,6 @@ _This topic requires Cloud Foundry Command Line Interface (cf CLI) v6.15.0 or la <%= vars.mutual_tls_ssh %>

        -Important The procedure in this topic requires use of a service key, and not all services support service keys. Some services support credentials through app binding only.

        diff --git a/deploy-apps/streaming-logs.html.md.erb b/deploy-apps/streaming-logs.html.md.erb index 2d6d4f15..c12f5193 100644 --- a/deploy-apps/streaming-logs.html.md.erb +++ b/deploy-apps/streaming-logs.html.md.erb @@ -120,7 +120,6 @@ For example, below shows the log line from two different revisions and web insta

        -Note Logs with revision id are only available if the application uses revisions and it is enabled in the platform

        diff --git a/deploy-apps/windows-stacks.html.md.erb b/deploy-apps/windows-stacks.html.md.erb index f75d1784..42c51fb0 100644 --- a/deploy-apps/windows-stacks.html.md.erb +++ b/deploy-apps/windows-stacks.html.md.erb @@ -20,7 +20,6 @@ You can also use the Stack Auditor plug-in for the Cloud Foundry Command Line In A stack is a prebuilt root file system (rootfs) that supports a specific operating system. For example, Linux-based systems need `/usr` and `/bin` directories at their root and Windows needs `/windows`. The stack works in tandem with a buildpack to support apps running in compartments. Under Diego architecture, cell VMs can support multiple stacks.

        -Note Docker apps do not use stacks.

        ## Available stacks diff --git a/multiple-processes.html.md.erb b/multiple-processes.html.md.erb index f1ed829b..b5ac0b93 100644 --- a/multiple-processes.html.md.erb +++ b/multiple-processes.html.md.erb @@ -124,5 +124,4 @@ To view the processes running as part of an app:

        - Important To avoid security exposure, ensure that you migrated your apps and custom buildpacks to use the cflinuxfs4 stack based on Ubuntu 22.04 LTS (Jammy Jellyfish). The cflinuxfs3 stack is based on Ubuntu 18.04 (Bionic Beaver), which reaches end of standard support in April 2023.

        From 1fbc55425f5ee6bc02a1fe691081626b79b2f176 Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Fri, 1 Nov 2024 12:41:38 -0700 Subject: [PATCH 028/132] remove extra Note class --- deploy-apps/environment-variable.html.md.erb | 2 -- deploy-apps/ssh-apps.html.md.erb | 2 -- deploy-apps/stacks.html.md.erb | 1 - deploy-apps/stop-delete.html.md.erb | 2 -- http2-protocol.html.md.erb | 5 ++--- revisions.html.md.erb | 2 -- services/application-binding.html.md.erb | 2 -- services/fluentd.html.md.erb | 1 - services/managing-services.html.md.erb | 1 - services/route-binding.html.md.erb | 2 -- services/service-keys.html.md.erb | 1 - services/sharing-instances.html.md.erb | 2 -- 12 files changed, 2 insertions(+), 21 deletions(-) diff --git a/deploy-apps/environment-variable.html.md.erb b/deploy-apps/environment-variable.html.md.erb index e5bcd749..8c7b52ff 100644 --- a/deploy-apps/environment-variable.html.md.erb +++ b/deploy-apps/environment-variable.html.md.erb @@ -15,11 +15,9 @@ Environment variables are the means <%= vars.app_runtime_abbr %> uses to communi For information about setting your own app-specific environment variables, see the [Environment variable](./manifest.html#env-block) in _Deploying with app manifests_.

        -Important Do not use user-provided environment variables for security-sensitive information such as credentials. They might unintentionally show up in cf CLI output and Cloud Controller logs. Use user-provided service instances instead. The system-provided environment variable VCAP_SERVICES is properly redacted for user roles such as Space Supporter and in Cloud Controller log files.

        -Important The maximum size of an environment variable is 130 KB. This limit applies also to <%= vars.app_runtime_abbr %> system environment variables such as VCAP_SERVICES and VCAP_APPLICATION.

        diff --git a/deploy-apps/ssh-apps.html.md.erb b/deploy-apps/ssh-apps.html.md.erb index 6948aa9c..731b86cf 100644 --- a/deploy-apps/ssh-apps.html.md.erb +++ b/deploy-apps/ssh-apps.html.md.erb @@ -7,7 +7,6 @@ owner: Diego The Cloud Foundry Command Line Interface (cf CLI) lets you securely log in to remote host virtual machines (VMs) running <%= vars.app_runtime_full %> (<%= vars.app_runtime_abbr %>) app instances. The commands that activate SSH access to apps, and activate, deactivate, and verify permissions for such access are described here.

        -Important The cf ssh command in cf CLI v7+ include the all_proxy environment variable, which allows you to specify a proxy server to activate proxying for all requests. For more information, see ssh in the Cloud Foundry CLI Reference Guide and Use SOCKS5 with cf v3-ssh in Using the cf CLI with a proxy server.

        The cf CLI looks up the `app_ssh_oauth_client` identifier in the Cloud Controller `/v2/info` endpoint, and uses this identifier to query the UAA server for an SSH authorization code. On the target VM side, the SSH proxy contacts the Cloud Controller through the `app_ssh_endpoint` listed in `/v2/info` to confirm permission for SSH access. @@ -419,7 +418,6 @@ When present, `host_fingerprint` declares the expected fingerprint of the SSH da ```

        -Important To avoid security exposure, migrate your apps and custom buildpacks to use the cflinuxfs4 stack based on Ubuntu 22.04 LTS (Jammy Jellyfish). The cflinuxfs3 stack is based on Ubuntu 18.04 (Bionic Beaver), which reaches end of standard support in April 2023.

        ### Daemon discovery diff --git a/deploy-apps/stacks.html.md.erb b/deploy-apps/stacks.html.md.erb index ff0082ba..5134216a 100644 --- a/deploy-apps/stacks.html.md.erb +++ b/deploy-apps/stacks.html.md.erb @@ -22,7 +22,6 @@ You can also use the Stack Auditor plug-in for the Cloud Foundry Command Line In A stack is a prebuilt root file system (rootfs) that supports a specific operating system. For example, Linux-based systems need `/usr` and `/bin` directories at their root. The stack works in tandem with a buildpack to support apps running in compartments. Under Diego architecture, cell VMs can support multiple stacks.

        -Note Docker apps do not use stacks.

        diff --git a/deploy-apps/stop-delete.html.md.erb b/deploy-apps/stop-delete.html.md.erb index dde9217e..66af01bb 100644 --- a/deploy-apps/stop-delete.html.md.erb +++ b/deploy-apps/stop-delete.html.md.erb @@ -29,7 +29,6 @@ Example: ## Delete an app

        -Caution Deleting an app is irreversible. We recommend that you run cf target before you start to confirm you are deleting the app from the correct org and space.

        Many apps use services and routes. Deleting an app does not delete the services used by the app, and you must explicitly remove routes between your app and the Internet. @@ -55,7 +54,6 @@ Example:
        $ cf delete -r my-example-app

        -Important In cf CLI v7+, -r no longer deletes routes when the route is mapped to more than one app.

        If you delete an app without the `r` option, you can delete the route manually. diff --git a/http2-protocol.html.md.erb b/http2-protocol.html.md.erb index f50a25ed..fc34263e 100644 --- a/http2-protocol.html.md.erb +++ b/http2-protocol.html.md.erb @@ -91,8 +91,8 @@ To push an HTTP/1.1 app that can serve HTTP/2 traffic: ``` Where `MY-APP.EXAMPLE.COM` is the route mapped to your app.

        The request and response are both issued over HTTP/2. +

        - Important To issue this request, you must use a version of curl that supports HTTP/2.

        1. Review the app logs by running: @@ -144,8 +144,7 @@ For example, you can use the HTTP/2 test app from [Cloud Foundry Acceptance Test The recommended way to do this is using the `routes` attribute in the manifest YAML file.

        -Important -The following procedure is supported only for cf CLI v6. The `--hostname` flag is deprecated in cf CLI v7, and must be specified in the manifest.

        +The following procedure is supported only for cf CLI v6. The --hostname flag is deprecated in cf CLI v7, and must be specified in the manifest.

        To push an app that serves HTTP/2 traffic using the cf CLI (v6 only): diff --git a/revisions.html.md.erb b/revisions.html.md.erb index 59fdc47c..20cabf51 100644 --- a/revisions.html.md.erb +++ b/revisions.html.md.erb @@ -9,11 +9,9 @@ App revisions do not include any tasks run on the app. For additional information about app revisions, see [Revisions](http://v3-apidocs.cloudfoundry.org/version/release-candidate/#revisions) in the Cloud Foundry API (CAPI) documentation.

        -Important CAPI v3 is the recommended API version for revisions. While revisions work with CAPI v2, there are several inconsistencies. For example, revision descriptions for apps with multiple processes can be inaccurate because CAPI v2 does not support apps with multiple processes. Additionally, pushing an app for the first time with revisions in CAPI v2 creates two revisions.

        -Caution The app revisions API is experimental, and future releases might have breaking changes.

        ## Revisions use cases diff --git a/services/application-binding.html.md.erb b/services/application-binding.html.md.erb index 362f1556..158e821c 100644 --- a/services/application-binding.html.md.erb +++ b/services/application-binding.html.md.erb @@ -23,7 +23,6 @@ $ cf restart my-app

        -Important You must restart or in some cases re-push your app for changes to be applied to the VCAP_SERVICES environment variable and for the app to recognize these changes.

        ### Arbitrary parameters @@ -177,5 +176,4 @@ OK

        -Important You must restart or in some cases re-push your app for changes to be applied to the VCAP_SERVICES environment variable and for the app to recognize these changes.

        diff --git a/services/fluentd.html.md.erb b/services/fluentd.html.md.erb index a76a5b64..4be4faf1 100644 --- a/services/fluentd.html.md.erb +++ b/services/fluentd.html.md.erb @@ -58,7 +58,6 @@ To set up Fluentd for Cloud Foundry, configure the syslog input of Fluentd as fo 2. Restart the Fluentd service.

        -Important The Fluentd syslog input plug-in supports tls and tcp options. You must use the same transport that Cloud Foundry is using.

        Fluentd starts listening for syslog message on port 8080 and tagging the messages with `cf.app`, which can be used later for data routing. For more details about the full setup for the service, see [Config File](https://docs.fluentd.org/configuration/config-file). diff --git a/services/managing-services.html.md.erb b/services/managing-services.html.md.erb index 765c5c9c..127dd4ac 100644 --- a/services/managing-services.html.md.erb +++ b/services/managing-services.html.md.erb @@ -306,7 +306,6 @@ OK ## Upgrade a service instance

        -Important Upgrading a Service instance requires at least cf CLI v6.46.0+ and CAPI release 1.83.0+.

        diff --git a/services/route-binding.html.md.erb b/services/route-binding.html.md.erb index 2f2fc64a..93ca748c 100644 --- a/services/route-binding.html.md.erb +++ b/services/route-binding.html.md.erb @@ -22,7 +22,6 @@ To view an example demonstrating the use of a sample route service, see [Route S You must install the Cloud Foundry Command Line Interface (cf CLI) to bind a route to a service instance. For more information, see [Installing the cf CLI](../../cf-cli/install-go-cli.html).

        -Important Gorouter rejects WebSocket requests for routes that are bound to route services. These requests return a 503 error and a X-Cf-Routererror route_service_unsupported header.

        Run [cf bind-route-service](http://cli.cloudfoundry.org/en-US/cf/bind-route-service.html) to bind a route from an app to a service instance. @@ -37,7 +36,6 @@ OK

        -Caution When binding a service instance to a route, Cloud Foundry might have proxy requests for the route to the service instance, or configure a network component already in the request path.

        ### Bind with parameters diff --git a/services/service-keys.html.md.erb b/services/service-keys.html.md.erb index fd41c5bd..afb17ecc 100644 --- a/services/service-keys.html.md.erb +++ b/services/service-keys.html.md.erb @@ -10,7 +10,6 @@ Here are instructions for managing service instance credentials (binding credent Service keys generate credentials for manually configuring consumers of Marketplace services. After you configure them for your service, local clients, apps in other spaces, or entities outside your deployment can access your service with these keys.

        -Important Some service brokers do not support service keys. To build a service broker that supports service keys, see Services. To use a service broker that does not support service keys, see Delivering service credentials to an app.

        ## Create a service key diff --git a/services/sharing-instances.html.md.erb b/services/sharing-instances.html.md.erb index 45ce8165..7d01e26d 100644 --- a/services/sharing-instances.html.md.erb +++ b/services/sharing-instances.html.md.erb @@ -146,7 +146,6 @@ In this case, no information about other spaces is exposed. ## Unsharing a service instance

        -Caution Unsharing a service instance deletes all bindings to apps in the spaces it was shared into. This might cause apps to fail. Before unsharing a service instance, run the cf service SERVICE-INSTANCE command to find out how many bindings exist in the spaces the service instance is shared into.

        You can unshare a service instance if you have the Space Developer role in the @@ -201,7 +200,6 @@ If a service binding is not deleted, the script continues trying to unshare subs To use this script, you must be logged in as an administrator and have jq installed.

        -Caution This script was tested on macOS Sierra 10.12.4 and Ubuntu 14.04.5. Use the script at your own risk.

        ``` From e1d5b49c25efaf11ab0ecac5df7853610a63ecd6 Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Fri, 1 Nov 2024 13:08:02 -0700 Subject: [PATCH 029/132] remove extra Note class --- deploy-apps/healthchecks.html.md.erb | 4 ---- deploy-apps/manifest-attributes.html.md.erb | 11 ----------- deploy-apps/push-docker.html.md.erb | 2 -- deploy-apps/rolling-deploy.html.md.erb | 4 ---- sidecars.html.md.erb | 4 +--- using-tasks.html.md.erb | 4 ---- 6 files changed, 1 insertion(+), 28 deletions(-) diff --git a/deploy-apps/healthchecks.html.md.erb b/deploy-apps/healthchecks.html.md.erb index cba576a8..b4ce37b4 100644 --- a/deploy-apps/healthchecks.html.md.erb +++ b/deploy-apps/healthchecks.html.md.erb @@ -70,7 +70,6 @@ For more information about the `cf push` command, see [push](http://cli.cloudfoundry.org/en-US/cf/push.html) in the Cloud Foundry CLI Reference Guide.

        -Important The health check configuration that you provide with cf push overrides any configuration in the app manifest.

        @@ -99,7 +98,6 @@ For more information about the `cf set-health-check` command, see the Cloud Foundry CLI Reference Guide.

        -Important After you set the health check configuration of a deployed app with the cf set-health-check command, you must restart the app for the change to take effect.

        @@ -145,7 +143,6 @@ circumstances in which to use them: web app is ready to serve HTTP requests. The configured endpoint must respond within one second to be considered healthy.

        - Important To prevent false negatives, use a dedicated endpoint for health checks where response time and result do not depend on business logic.

        @@ -184,5 +181,4 @@ path portion of a URI that must be served by the app and return `HTTP 200` when This command only checks the health of the default port of the app.

        -Important For HTTP apps, <%= vars.company_name %> recommends setting the health check type to http instead of a simple port check.

        diff --git a/deploy-apps/manifest-attributes.html.md.erb b/deploy-apps/manifest-attributes.html.md.erb index 8b56875f..cde392d5 100644 --- a/deploy-apps/manifest-attributes.html.md.erb +++ b/deploy-apps/manifest-attributes.html.md.erb @@ -32,7 +32,6 @@ applications: ```

        -Important If your app name begins with the dash character (-), you cannot interact with the app using the cf CLI. This is because the cf CLI interprets the dash as a flag.

        ### Add schema version to a manifest @@ -73,7 +72,6 @@ To add variables to an app manifest: command: go_calls_ruby ```

        - Note You can also use variables for partial values. For example, you can specify host in your variables file and - route: ((host)).env.com in your manifest file.

        1. Run: @@ -115,7 +113,6 @@ memory for `bigapp`. This section explains how to describe optional app attributes in manifests. You can also specify each of these attributes using a command line option. Command-line options override the manifest.

        -Important In cf CLI v6, the route component attributes domain, domains, host, hosts, and no-hostname are deprecated in favor of the routes attribute. In cf CLI v7+, these attributes are removed. For more information, see domain, domains, host, hosts, and no-hostname.

        @@ -146,7 +143,6 @@ You can refer to a buildpack by name in a manifest or a command-line option. The - buildpack_URL ```
        - Important
        • This feature does not work with the deprecated buildpack attribute. For more information, see buildpack.
        • @@ -236,7 +232,6 @@ The `--docker-image` or `-o` command-line flag overrides `docker.image`. The `- The manifest attribute `docker.username` is optional. If it is used, the password must be provided in the environment variable `CF_DOCKER_PASSWORD`. If a Docker user name is specified, then a Docker image must also be specified.

          -Important Using the docker attribute with the buildpacks or path attributes causes an error.

          ### health-check-type @@ -441,7 +436,6 @@ For more information about metadata, see [Using metadata](../../adminguide/metad ### no-route

          -Important If you use the no-route flag attribute in the manifest or the flag option, it overrides all route-related attributes.

          By default, `cf push` assigns a route to every app. But, some apps process data while running in the background and must not be assigned routes. @@ -554,13 +548,11 @@ The `--random-route` command-line flag overrides this attribute. The `routes` attribute in the manifest provides multiple HTTP and TCP routes. Each route for this app is created if it does not already exist.

          -Important This attribute is a combination of push options that include --hostname, -d, and --route-path flags in v6. These flags are not supported in cf CLI v7, so the routes flag must be used.

          You can specify the `protocol` attribute to configure which network protocol the route uses for app ingress traffic. This is optional. The available protocols are `http2`, `http1`, and `tcp`.

          -Important The protocol route attribute is available only for <%= vars.app_runtime_abbr %> deployments that use HTTP/2 routing. <%= vars.http2_admin_link %>

          For example: @@ -658,7 +650,6 @@ You can increase the timeout length for very large apps that require more time t The `-t` command-line flag overrides this attribute.

          -Important If you configure timeout with a value greater than cc.maximum_health_check_timeout, the Cloud Controller reports a validation error with the maximum limit.

          @@ -680,7 +671,6 @@ For example: `cf push` deploys the app to a container on the server. The variables belong to the container environment.
          -Important
          • You must name variables with alphanumeric characters and underscores. Non-conforming variable names might cause unpredictable behavior.
          • Do not use user-provided environment variables for security sensitive information such as credentials, because they might unintentionally show up in cf CLI output and Cloud Controller logs. Use user-provided service instances instead. The system-provided environment variable VCAP_SERVICES is properly redacted for user roles such as Space Supporter and in Cloud Controller log files.
          • @@ -773,7 +763,6 @@ service](../services/application-binding.html#bind) in _Delivering Service Crede This section describes app manifest features that are deprecated in favor of other features.

            -Caution Running cf push app -f manifest.yml fails if your manifest uses any of these deprecated features with the feature that replaces it.

            ### Top-level attributes diff --git a/deploy-apps/push-docker.html.md.erb b/deploy-apps/push-docker.html.md.erb index 5144321f..5929044b 100644 --- a/deploy-apps/push-docker.html.md.erb +++ b/deploy-apps/push-docker.html.md.erb @@ -20,7 +20,6 @@ To push an app based on a Docker image, you need: * The total size of the Docker image file system layers must not exceed the disk quota for the app. The maximum disk allocation for apps is set by the Cloud Controller. The default maximum disk quota is 2048 MB per app.

            - Important If the total size of the Docker image file system layers exceeds the disk quota, the app instances do not start.

            * The location of the Docker image on Docker Hub or another Docker registry. <%= vars.docker_auth1 %> @@ -276,7 +275,6 @@ Where: * The key.json file must point to the file you created earlier.

            -Note For information about specifying YOUR-REGISTRY-URL, see Pushing and Pulling Images in the Google Cloud documentation.

            diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index 7e752b35..78b19c88 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -31,7 +31,6 @@ This section describes the commands for working with rolling app deployments. To deploy an app without incurring downtime:

            -Caution Review the limitations of this feature before running the command. For more information, see Limitations.

            @@ -43,7 +42,6 @@ Review the limitations of this feature before running the command. For more info Where `APP-NAME` is the name that you want to give your app.

            - Note cf CLI v7 exits when one instance of each process is healthy. It also includes a --no-wait flag on push for users who don't want to wait for the operation to complete. @@ -196,7 +194,6 @@ This reverts the app to its state from before the deployment started by: * Resetting the `current_droplet` on the app

            -Note The cancel command is designed to revert the app to its original state as quickly as possible and does not guarantee zero downtime. Additionally, changes to environment variables and service bindings will not be reverted.

            @@ -268,7 +265,6 @@ This section describes pushing an app with a rolling deployment strategy. background, updating deployments as follows: 1. Adds up to `max_in_flight` instances of the new web process and removes instances from the old web process. This step repeats until the new web process reaches the required number of instances.

            - Important This happens only if all instances of the new web process are running.

            2. Removes the old web process. The new web process now fully replaces the old web process. 3. Restarts all non-web processes of the app. diff --git a/sidecars.html.md.erb b/sidecars.html.md.erb index 6806efe1..fad6fe77 100644 --- a/sidecars.html.md.erb +++ b/sidecars.html.md.erb @@ -9,7 +9,6 @@ are called sidecar processes, or sidecars. An example of a sidecar is an Applica Monitoring (APM) tool.

            -Important The cf CLI v6 commands described in this topic are unsupported, but are supported in cf CLI v7. The latest supported cf CLI release is cf CLI v8. To upgrade to cf CLI v7, see Upgrading to cf CLI v7. To upgrade to cf CLI v8, see Upgrading to cf CLI v8.

            <%= vars.capi_sidecar_req %> @@ -188,7 +187,6 @@ To push an app with a sidecar: You can explore sidecars using the app in the [capi-sidecar-samples](https://github.com/cloudfoundry-samples/capi-sidecar-samples) repository on GitHub. The following sections describe the app, how to build and push the app, and some ways to observe the app and its processes after pushing.

            -Important In this tutorial, you are pushing the Ruby sample app. You can also follow this tutorial for a Java app using the sidecar-dependent-java-app and push_java_app_with_binary_sidecar.sh in the samples repository. When pushing a Java app, follow the requirements listed in Requirements for Java apps.

            ### About the sample app @@ -343,7 +341,7 @@ To view the web URL and logs for the app: "version"=>"50892dcb-274d-4cf6-b944-3eda1e000283"} -### View and debug processes running in the app container via HTTP +### View and debug processes running in the app container via HTTP Sidecars can be used to collect debug information (e.g. thread dumps) from another process running in the same container. This is especially useful if you diff --git a/using-tasks.html.md.erb b/using-tasks.html.md.erb index 363c0427..8aa4c8b3 100644 --- a/using-tasks.html.md.erb +++ b/using-tasks.html.md.erb @@ -49,7 +49,6 @@ The life cycle of a task is as follows: The container also inherits environment variables, service bindings, and security groups bound to the app.

            -Note You cannot SSH into the container running a task.

            ### Task logging and execution history @@ -80,7 +79,6 @@ about the `cf run-task` command, see the [Cloud Foundry CLI reference guide](htt You can use the Cloud Foundry Command Line Interface (cf CLI) to run a task in the context of an app.
            -Important
            • To run tasks with the cf CLI, you must install cf CLI v6.23.0 or later, or install cf CLI v7 or v8. To download, install, and uninstall the cf CLI, see Installing the Cloud Foundry Command Line Interface.
            • To run a task using cf CLI v6 without starting the app, push the app with cf push -i 0 and then run the task. You can run the app later by scaling up its instance count.
            • @@ -125,7 +123,6 @@ To run a task on an app with cf CLI v6:

              - Note To run a task again, you must run it as a new task using the previous command.

              1. To display the recent logs of the app and all its tasks, run: @@ -187,7 +184,6 @@ To run a task on an app with cf CLI v7:

            - Important cf run-task allows you to include the --process and --command flags. Including the --command flag overrides the manifest property.

            The following example command runs a task on the `example-app` app: From aa035ed2860ef733a45b0459f726334d4edb7ff2 Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Fri, 1 Nov 2024 13:15:12 -0700 Subject: [PATCH 030/132] remove extra Note class --- deploy-apps/routes-domains.html.md.erb | 8 -------- deploy-apps/troubleshoot-app-health.html.md.erb | 4 ---- services/_using-vol-services.html.md.erb | 11 +---------- services/index.html.md.erb | 4 ---- services/user-provided.html.md.erb | 3 --- 5 files changed, 1 insertion(+), 29 deletions(-) diff --git a/deploy-apps/routes-domains.html.md.erb b/deploy-apps/routes-domains.html.md.erb index 26afe35d..2724dc4c 100644 --- a/deploy-apps/routes-domains.html.md.erb +++ b/deploy-apps/routes-domains.html.md.erb @@ -118,7 +118,6 @@ OK

            -Important The cf CLI v7 create-route command does not require the space as an argument. It uses the space you are targeting.

            This command instructs <%= vars.app_runtime_abbr %> to only route requests to apps mapped to this route for these URLs: @@ -220,7 +219,6 @@ If the developer maps the first route with path `products` to the `products` app <%= vars.app_runtime_abbr %> attempts to match routes with a path, and then attempts to match host and domain.
            -Important
            • Routes with the same domain and host name but different paths can only be created in the same space. Private domains do not have this limitation.
            • <%= vars.app_runtime_abbr %> does not route requests for context paths to the root context of an app. Apps must serve requests on the context path.
            • @@ -496,7 +494,6 @@ To share a route with another space: ### Transfer ownership of a route to another space

              -Important To follow the procedure in this section, you must use cf CLI v8.5.0 or later. To download cf CLI v8.5.0 or later, see the Cloud Foundry CLI repository on GitHub.

              @@ -557,7 +554,6 @@ $ cf delete-route tcp.<%= vars.private_app_domain %> --port 60000 Users can route HTTP requests to a specific app instance using the header `X-Cf-App-Instance`.

              -Important Use of the X-Cf-App-Instance header is available only for users on the Diego architecture.

              @@ -660,7 +656,6 @@ $ cf create-shared-domain <%= vars.app_domain %> To create a TCP shared domain, first discover the name of the TCP router group.

              -Important cf CLI v7 does not support TCP routing or creating shared domains with router groups.

              @@ -738,7 +733,6 @@ $ cf delete-private-domain <%= vars.private_app_domain %>
               

              -Important cf CLI v7 renames the delete-domain command to delete-private-domain.

              ### Requirements for parent and child domains @@ -836,7 +830,6 @@ If you use a wildcard as the subdomain name, then your DNS provider can route fr To use your root domain for apps on <%= vars.app_runtime_abbr %>, you can use custom DNS record types like ALIAS and ANAME, if your DNS provider offers them, or you can use subdomain redirection.

              -Note Root domains are also called zone apex domains.

              If your DNS provider supports using an ALIAS or ANAME record, configure your root domain with your DNS provider to point at a shared domain in @@ -860,7 +853,6 @@ If your DNS provider supports using an ALIAS or ANAME record, configure your roo If your DNS provider does not support ANAME or ALIAS records, you can use subdomain redirection, also known as domain forwarding, to redirect requests for your root domain to a subdomain configured as a CNAME.

              -Important If you use domain forwarding, SSL requests to the root domain might fail if the SSL certificate matches only the subdomain. For more information about SSL certificates, see the Cloud Foundry documentation.

              diff --git a/deploy-apps/troubleshoot-app-health.html.md.erb b/deploy-apps/troubleshoot-app-health.html.md.erb index cf524594..e251be78 100644 --- a/deploy-apps/troubleshoot-app-health.html.md.erb +++ b/deploy-apps/troubleshoot-app-health.html.md.erb @@ -211,7 +211,6 @@ To view app logs streamed in real time, run `cf logs APP-NAME`. To aggregate your app logs to view log history, bind your app to a syslog drain service. For more information, see [Streaming app logs to log management services](./../services/log-management.html).

              -Important The Diego architecture does not support the cf files command, and cf files was removed as of cf CLI v7.

              ### Trace Cloud Controller REST API calls @@ -240,7 +239,6 @@ export CF_TRACE=PATH-TO-TRACE.LOG ```

              -Caution CF_TRACE is a local environment variable that modifies the behavior of the cf CLI. Do not confuse CF_TRACE with the variables in the container environment where your apps run. For more information about these container variables, see Examine environment variables.

              ### Analyze Zipkin trace IDs @@ -261,7 +259,6 @@ Some cf CLI commands return connection credentials. Remove credentials and other * `cf app APP-NAME`: Returns information about the processes in the current space. Apps are listed alphabetically.

              - Important CPU values returned by cf app show the total usage of each app instance on all CPU cores on a host VM, where each core contributes 100%. For example, the CPU of a single-threaded app instance on a Diego Cell with one core cannot exceed 100%, and four instances sharing the Diego Cell cannot exceed an average CPU of 25%. A multi-threaded app instance running alone on a Diego Cell with eight cores can draw up to 800% CPU.

              * `cf env APP-NAME`: Returns environment variables set using `cf set-env` and variables existing in the container environment. @@ -275,7 +272,6 @@ Logging in <%= vars.app_runtime_abbr %>_. * `cf logs APP-NAME`: Returns a real-time stream of the app stdout and stderr. Press **Ctrl+C** or **Command+C** on your keyboard to exit the real-time stream.

              -Important Your app must direct its logs to stdout and stderr. The cf logs command also returns messages from any Log4j facility that you configure to send logs to STDOUT. For more information, see the Log4j website.

              diff --git a/services/_using-vol-services.html.md.erb b/services/_using-vol-services.html.md.erb index 2db86bfc..7470ac76 100644 --- a/services/_using-vol-services.html.md.erb +++ b/services/_using-vol-services.html.md.erb @@ -44,7 +44,6 @@ The following sections describe how to mount an external file system to your app To use a volume service deployed by your <%= vars.admin %>, you must first create an instance of the specific volume service that you need.

              -Note You can also bind volume services using an app manifest. However, app manifests do not support bind configuration. To bind a volume service using an app manifest, you must specify bind configuration when you create the service instance. The releases that support this are nfs-volume v1.3.1 and later and smb-volume v1.0.0 and later. For more information, see Services in Deploying with App Manifests.

              To create and bind an instance for the volume service: @@ -81,13 +80,11 @@ To create and bind an instance for the volume service: file permissions can be granted at the app level. If this is not needed, the you can eliminate the performance overhead of mapfs by managing permissions on the NFS server.
              The user specified by uid must have access to the files on the share. When uid and gid are omitted, the app file operations use the UID of the running app process. For buildpack apps, this UID is always 2000. For Docker apps, the effective UID is the same as the UID of the process inside the Docker container, except for root, which is mapped to 4294967294 outside the Docker container.

              - Caution Specifying UID and GID values affects performance because the FUSE file system mapfs is used to translate UID and GID values.

            • (Optional) OPTIONAL-MOUNT-PATH is a JSON string that indicates that the volume must be mounted to a particular path in your app rather than the default path. Choose a path with a root-level directory that already exists in the container, such as /home, /usr, or /var.

              - Important Do not specify a MOUNT-PATH in the /app directory, which is where <%= vars.app_runtime_abbr %> unpacks the droplet. For more information, see Mount a shared volume in the /app directory.

            • @@ -115,7 +112,6 @@ To create and bind an instance for the volume service:
            • (Optional) OPTIONAL-MOUNT-PATH is a JSON string that indicates the volume must be mounted to a particular path within your app rather than the default path. Choose a path with a root-level directory that already exists in the container, such as /home, /usr, or /var.

              - Important Do not specify a MOUNT-PATH within the /app directory, which is where <%= vars.app_runtime_abbr %> unpacks the droplet. For more information, see Mount a shared volume in the /app directory.

            • @@ -230,7 +226,6 @@ This section describes how to use the NFS volume service. Both services offer a single plan called `Existing`.

              -Note NFS is not available on Windows systems.

              ### Create an NFS volume service @@ -249,7 +244,6 @@ To create an NFS volume service using the `Existing` plan of the `nfs` service:
            • SERVICE-INSTANCE-NAME is a name you provide for this NFS volume service instance.
            • SERVER/SHARE is the NFS address of your server and share.

              - Important Omit the : that usually follows the server name in the address.

            • @@ -258,15 +252,13 @@ To create an NFS volume service using the `Existing` plan of the `nfs` service:
            <% if vars.platform_code != "CF" %>

            - Important Tanzu Application Service versions shipping with nfs-volume versions v7.1.45 - v7.1.47 or v5.0.55 - 5.0.58 (as of 22 Feb., 2024: 2.11.52 - 2.11.53, 2.13.34 - 2.13.35, 4.0.15 - 4.0.17, 5.0.6 - 5.0.7) do not support specifying NFS version: 3.0. These updated the contained nfs-utils (a dependency of nfs-volume-service) to a newer version that uses stricter option parsing.
            NFSv3 does not utilize a MINOR version, but NFSv4 introduced MINOR versions that can be specified.
            This has been mitigated by adding auto-correction logic to the nfsdriver process available with nfs-volume >= v7.1.48 and >= v5.0.59.

            <% else %>

            - Important nfs-volume versions v7.1.45 - v7.1.47 ship with a recent version of nfs-utils (a dependency of nfs-volume-service). Recent versions of nfs-utils have stricter option parsing. This leads to an issue with environments that configured the `vers=3.0` mount option.
            - NFSv3 does not utilize a MINOR version, but NFSv4 introduced MINOR versions that can be specified.
            + NFSv3 does not utilize a MINOR version, but NFSv4 introduced MINOR versions that can be specified.
            This has been mitigated by adding auto-correction logic to the nfsdriver process available with nfs-volume >= v7.1.48.

            <% end %> @@ -336,7 +328,6 @@ To deploy and bind a sample app: while allowing <%= vars.app_runtime_abbr %> to run your app as an arbitrary user. UID and GID must be positive integer values.

            - Important In NFS v2.0.0 and later, uid and gid values of 0 are no longer permissible because of security concerns.

          diff --git a/services/index.html.md.erb b/services/index.html.md.erb index e49f9f24..78802800 100644 --- a/services/index.html.md.erb +++ b/services/index.html.md.erb @@ -13,7 +13,6 @@ Cloud Foundry offers a Marketplace of services, from which users can provision r For more information about provisioning service instances and other life cycle operations, see [Managing service instances](./managing-services.html).

          -Note For a service to be available in the Marketplace, it must be integrated with Cloud Foundry by way of APIs. <%= vars.custom_services %>

          ### User-provided service instances @@ -38,7 +37,6 @@ Credentials managed manually are known as service keys. Use service keys when yo For more information about creating a user-provided service instance with service keys, see [User-provided service instances](./user-provided.html). For more information about service keys, see [Managing service keys](./service-keys.html).

          -Important Not all services support service keys. Some services support credentials through app binding only.

          @@ -71,7 +69,6 @@ If your app relies on a relational database, you must apply schema changes perio For more information about running cf CLI tasks, see [Running tasks in your apps](../using-tasks.html).

          -Important To run tasks with the cf CLI, you must install cf CLI v6.23.0 or later. The current supported version is cf CLI v8. For information about downloading, installing, and uninstalling the cf CLI, see the Installing the cf CLI.

          To do a database schema migration with cf CLI: @@ -82,7 +79,6 @@ To do a database schema migration with cf CLI: Where `APP-NAME` is the name of the app.

          - Note To run a task without starting the app, push the app with cf push -i 0 and then run the task. You can run the app later by scaling up its instance count.

          1. Do a database schema migration as a task on the app: diff --git a/services/user-provided.html.md.erb b/services/user-provided.html.md.erb index 1cece067..c2112265 100644 --- a/services/user-provided.html.md.erb +++ b/services/user-provided.html.md.erb @@ -47,7 +47,6 @@ After creating the user-provided service instance, to deliver the credentials to User-provided service instances allow developers to stream app logs to a syslog compatible aggregation or analytics service that isn't available in the Marketplace. For more information about the syslog protocol see [RFC 5424](http://tools.ietf.org/html/rfc5424) and [RFC 6587](http://tools.ietf.org/html/rfc6587).

          -Important RFC-5424 is used to establish connections over HTTP/HTTPS. RFC-6587 is used for TCP based communication over syslog/syslog-tls drains.

          @@ -70,7 +69,6 @@ OK

          -Important When creating the user-provided service, the route service URL you specify must be "https."

          @@ -86,5 +84,4 @@ You can use rolling restarts to avoid any app downtime. For more information, see [Restart an app](../deploy-apps/rolling-deploy.html#restart) in _Rolling App Deployments_.

          -Caution If you are rotating credentials, the old credentials must be active until the restart is finished.

          From 998b57a657977908a2c5cb5c720523c3169cc8bc Mon Sep 17 00:00:00 2001 From: Sam Gunaratne Date: Mon, 2 Dec 2024 10:36:49 -0700 Subject: [PATCH 031/132] Add task documentation --- using-tasks.html.md.erb | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/using-tasks.html.md.erb b/using-tasks.html.md.erb index 8aa4c8b3..5b8e1c7c 100644 --- a/using-tasks.html.md.erb +++ b/using-tasks.html.md.erb @@ -206,6 +206,41 @@ To run a task on an app with cf CLI v7: ``` Where `APP-NAME` is the name of your app. +## Get a task for an app + +To get a task for a given app: + +1. In a terminal window, run: + + ``` + cf task APP-NAME TASK-ID + ``` + Where `APP-NAME` is the name of your app. + And where `TASK-ID` is the ID of the task you want to get. + + The command returns output similar to the following example: +
          +    Getting task 4 for app static in org org-1 / space space-1 as admin...
          +
          +    id:               4
          +    name:             125c884d
          +    state:            FAILED
          +    start time:       2024-11-22T17:41:19Z
          +    command:          custom_command
          +    memory in mb:     256
          +    disk in mb:       1024
          +    log rate limit:   -1
          +    failure reason:   APP/TASK/125c884d: Exited with status 127
          +    
          + +Tasks can be in these states: + +| State | Description | +| ----- | ----------- | +| `RUNNING` | The task is in progress. | +| `FAILED` | The task did not complete. This state occurs when a task does not work correctly or a user cancels the task. | +| `SUCCEEDED` | The task completed successfully. | + ## List tasks running on an app From 6aeee298344c5e72ec1f4f27412dcacd0e7c6734 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Thu, 26 Dec 2024 16:47:18 -0800 Subject: [PATCH 032/132] Update canary-deploy.html.md.erb Clarify canary deployment process --- deploy-apps/canary-deploy.html.md.erb | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/deploy-apps/canary-deploy.html.md.erb b/deploy-apps/canary-deploy.html.md.erb index 663cd46d..211c211b 100644 --- a/deploy-apps/canary-deploy.html.md.erb +++ b/deploy-apps/canary-deploy.html.md.erb @@ -228,20 +228,15 @@ This section describes pushing an app with a canary deployment strategy. 1. Stages the updated app package. 2. Creates a droplet with the updated app package. 3. Creates a deployment with the new droplet and any new configuration. - * This starts a new process with one instance that shares the route with the old process. - * Now, if you run `cf app` on your app, you see multiple `web` processes.
          For more information about the deployment object, see the [Deployments](http://v3-apidocs.cloudfoundry.org/index.html#deployments) section of the CAPI V3 documentation. 2. After the command creates the deployment, the `cc_deployment_updater` BOSH job runs in the background, updating deployments as follows: - 1. Adds another instance of the new web process and removes an instance from the old web process. This step repeats until the new web process reaches the required number of instances. -

          - Important - This happens only if all instances of the new web process are running.

          - 2. Removes the old web process. The new web process now fully replaces the old web process. - 3. Restarts all non-web processes of the app. - 4. Sets the deployment to `PAUSED`. + 1. Adds one instance of the new web process (the 'canary' instance). + * This process shares routes with the old process. + * Now, if you run `cf app` on your app, you see multiple `web` processes. + 1. Sets the deployment to `PAUSED`. 3. After validating that the canary instance is running as expected execute the command `cf continue-deployment APP-NAME`: 1. Changes the deployment reason to `DEPLOYING` and starts doing a rolling deployment From d2ecfac4db03ebc41a66e16d314e08337904c601 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Thu, 16 Jan 2025 15:42:58 -0800 Subject: [PATCH 033/132] Fix format in revision logs documentation --- deploy-apps/streaming-logs.html.md.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy-apps/streaming-logs.html.md.erb b/deploy-apps/streaming-logs.html.md.erb index c12f5193..77e4e455 100644 --- a/deploy-apps/streaming-logs.html.md.erb +++ b/deploy-apps/streaming-logs.html.md.erb @@ -115,8 +115,8 @@ The logs allow you to determine the particular revision and process of the appli For example, below shows the log line from two different revisions and web instances.
          -2022-09-15T01:59:33.99+0000 [APP/PROC/REV/2/WEB/0] OUT hello world from new
          -2022-09-15T01:59:34.99+0000 [APP/PROC/REV/1/WEB/1] OUT hello world from old
          +2022-09-15T01:59:33.99+0000 [APP/REV/2/PROC/WEB/0] OUT hello world from new
          +2022-09-15T01:59:34.99+0000 [APP/REV/1/PROC/WEB/1] OUT hello world from old
           

          From 1afaef917d243b663104ef10b9b651378d8bd75f Mon Sep 17 00:00:00 2001 From: Anita Flegg Date: Fri, 17 Jan 2025 05:43:27 -0800 Subject: [PATCH 034/132] minor wording and formatting changes --- using-tasks.html.md.erb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/using-tasks.html.md.erb b/using-tasks.html.md.erb index 5b8e1c7c..c98ba97c 100644 --- a/using-tasks.html.md.erb +++ b/using-tasks.html.md.erb @@ -215,10 +215,11 @@ To get a task for a given app: ``` cf task APP-NAME TASK-ID ``` - Where `APP-NAME` is the name of your app. - And where `TASK-ID` is the ID of the task you want to get. + + Where `APP-NAME` is the name of your app and `TASK-ID` is the ID of the task you want to get. The command returns output similar to the following example: +

               Getting task 4 for app static in org org-1 / space space-1 as admin...
           
          @@ -233,7 +234,7 @@ To get a task for a given app:
               failure reason:   APP/TASK/125c884d: Exited with status 127
               
          -Tasks can be in these states: +Tasks can be in the states shown in the following table: | State | Description | | ----- | ----------- | From 0555c6653f7386ec771c28dff794364ba92a4e46 Mon Sep 17 00:00:00 2001 From: Anita Flegg Date: Fri, 17 Jan 2025 06:04:46 -0800 Subject: [PATCH 035/132] remove note class that results in duplication --- deploy-apps/canary-deploy.html.md.erb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/deploy-apps/canary-deploy.html.md.erb b/deploy-apps/canary-deploy.html.md.erb index 211c211b..af30c66f 100644 --- a/deploy-apps/canary-deploy.html.md.erb +++ b/deploy-apps/canary-deploy.html.md.erb @@ -39,7 +39,6 @@ This section describes the commands for working with canary app deployments. To deploy a canary version of an app:

          -Caution Review the limitations of this feature before running the command. For more information, see Limitations.

          @@ -51,7 +50,6 @@ Review the limitations of this feature before running the command. For more info Where `MAX_IN_FLIGHT` applies **after** the single canary instance is successful and specifies the maximum number of new instances to start simultaneous until the deployment is complete. Optional and defaults to 1.

          - Note cf CLI will exit when the canary instance is healthy. It also includes a --no-wait flag on push for users who don't want to wait for the operation to complete. @@ -212,7 +210,6 @@ This reverts the app to its state from before the deployment started by: * Resetting the `current_droplet` on the app

          -Note The cancel command is designed to remove the canary instance of the app.

          If this command is used after continue-deployment it will behave like a cancelation of a rolling deployment. @@ -245,7 +242,6 @@ background, updating deployments as follows: background, updating deployments as follows: 1. Adds MaxInFlight number of instances (**by default it is 1**) of the new web process and removes MaxInFlight number of instance from the old web process. This step repeats until the new web process reaches the required number of instances.

          - Important This happens only if all instances of the new web process are running.

          2. Removes the old web process. The new web process now fully replaces the old web process. 3. Restarts all non-web processes of the app. From 940f8e7b7ad90c132d28eb8ebc57ec6bc2c794ab Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Thu, 23 Jan 2025 09:07:31 -0800 Subject: [PATCH 036/132] remove canary deploy file and refs to it --- deploy-apps/canary-deploy.html.md.erb | 393 -------------------------- index.html.md.erb | 3 +- push.html.md.erb | 5 +- 3 files changed, 3 insertions(+), 398 deletions(-) delete mode 100644 deploy-apps/canary-deploy.html.md.erb diff --git a/deploy-apps/canary-deploy.html.md.erb b/deploy-apps/canary-deploy.html.md.erb deleted file mode 100644 index af30c66f..00000000 --- a/deploy-apps/canary-deploy.html.md.erb +++ /dev/null @@ -1,393 +0,0 @@ ---- -title: Configuring canary app deployments -owner: CAPI ---- - -You can use Cloud Foundry Command Line Interface (cf CLI) commands -or the Cloud Foundry API (CAPI) to push your apps to <%= vars.app_runtime_first %> using a canary deployment. - -For information about the traditional method for addressing app downtime while pushing app updates, -see [Using blue-green deployment to reduce downtime and risk](./blue-green.html). - -For more information about CAPI, see the -[Cloud Foundry API (CAPI) documentation](https://v3-apidocs.cloudfoundry.org/). - -Canary deployments will allow users to deploy a single instance of a new version of an application and check if it is running as expected, -before continuing the rolling deployment of the rest of the instances. If the new version of the application is not running as expected, the canary deployment can be cancelled. - -The expected workflow for this feature is: -1. Deploy a single canary instance with the changed code -1. Manually verify that canary instance with new code runs as expected -1. Continue the rolling deployment for the remaining instances. - - -## Prerequisites - -The procedures in this topic require one of the following: - -* **cf CLI v8.8.0 or later** - -* **CAPI V3.173.0 or later:** If you use CAPI V3, you must install the cf CLI version 8+. - - -## Commands - -This section describes the commands for working with canary app deployments. - -### Deploy an app - -To deploy a canary version of an app: - -

          -Review the limitations of this feature before running the command. For more information, see -Limitations.

          - -* **For CF CLI v8:** - ``` - cf push APP-NAME --strategy canary --max-in-flight MAX_IN_FLIGHT - ``` - Where `APP-NAME` is the name that you want to give your app. - Where `MAX_IN_FLIGHT` applies **after** the single canary instance is successful and specifies the maximum number of new instances to start simultaneous until the deployment is complete. Optional and defaults to 1. - -

          - cf CLI will exit when the canary instance is healthy. - It also includes a --no-wait flag on push for users who don't want to wait - for the operation to complete. -

          - - To cancel, see [Cancel a canary deployment](#cancel). - -* **For CAPI V3:** - 1. Log in to the cf CLI. - - ``` - cf login - ``` - 2. Create an empty app by running the following `curl` command with `POST /v3/apps`. Record the - app GUID from the output. - - ``` - cf curl /v3/apps \ - -X POST \ - -H "Content-type: application/json" \ - -d '{ - "name": "APP-NAME", - "relationships": { - "space": { - "data": { - "guid": "SPACE-GUID" - } - } - } - }' - ``` - - Where: -
            -
          • APP-NAME is the name that you want to give your app.
          • -
          • SPACE-GUID is the space identifier that you want to associate with your app.
          • -
          - 3. Create a package with the following `curl` command with `POST /v3/packages`. Record the package - GUID from the output. - - ``` - cf curl /v3/packages \ - -X POST \ - -H "Content-type: application/json" \ - -d '{ - "type": "bits", - "relationships": { - "app": { - "data": { - "guid": "APP-GUID" - } - } - } - }' - ``` - Where `APP-GUID` is the app GUID that you recorded in an earlier step. This app GUID is a - unique identifier for your app. - 4. Upload the package bits by running the following `curl` command with - `POST /v3/packages/PACKAGE-GUID/upload`. - - ``` - cf curl /v3/packages/PACKAGE-GUID/upload \ - -X POST \ - -F bits=@"PACKAGED-APP" \ - ``` - - Where: -
            -
          • PACKAGE-GUID is the package GUID that you recorded in an earlier step.
          • -
          • PACKAGED-APP is your app packaged in a file such as .zip.
          • -
          - 5. Create the build by running the following `curl` command with `POST /v3/builds`. Record the - droplet GUID from the output. - - ``` - cf curl /v3/builds \ - -X POST \ - -H "Content-type: application/json" \ - -d '{ - "package": { - "guid": PACKAGE-GUID" - } - }' - ``` - Where `PACKAGE-GUID` is the package GUID that you recorded in an earlier step. - 6. Deploy your app by running the following `curl` command with `POST /v3/deployments`. To verify - the status of the deployment or take action on the deployment, record the deployment GUID from the - output. - - ``` - cf curl /v3/deployments \ - -X POST \ - -H "Content-type: application/json" \ - -d '{ - "droplet": { - "guid": "DROPLET-GUID" - }, - "options": { - "max_in_flight": MAX_IN_FLIGHT - }, - "strategy": "canary", - "relationships": { - "app": { - "data": { - "guid": "APP-GUID" - } - } - } - }' - ``` - Where `DROPLET-GUID` and `APP-GUID` are the GUIDs that you recorded in earlier steps. - Where `MAX_IN_FLIGHT` is an integer that applies **after** the single canary instance is successful and specifies the maximum number of new instances to start simultaneous until the deployment is complete. Optional and defaults to 1. - -For more information about this command, see [How it works](#how-it-works). - -### Continue the canary deployment - -To finish the deployment after validating the canary: - -* **For cf CLI v8+, run:** - - ``` - cf continue-deployment APP-NAME - ``` - Where `APP-NAME` is the name of the app. - -* **For CAPI V3, run:** - - ``` - cf curl /v3/deployments/DEPLOYMENT-GUID/actions/continue" -X POST - ``` - Where `DEPLOYMENT-GUID` is the GUID of the deployment that you recorded after following the - CAPI procedure in [Deploy an app](#deploy). - -This continues the rolling deployment of the app. - -## Cancel a canary deployment - -To stop the deployment of an app that you pushed: - -* **For cf CLI v8+, run:** - - ``` - cf cancel-deployment APP-NAME - ``` - Where `APP-NAME` is the name of the app. - -* **For CAPI V3, run:** - - ``` - cf curl /v3/deployments/DEPLOYMENT-GUID/actions/cancel" -X POST - ``` - Where `DEPLOYMENT-GUID` is the GUID of the deployment that you recorded after following the - CAPI procedure in [Deploy an app](#deploy). - -This reverts the app to its state from before the deployment started by: -* Removing any deployment artifacts -* Resetting the `current_droplet` on the app - -

          -The cancel command is designed to remove the canary instance of the app.

          -If this command is used after continue-deployment it will behave like a cancelation of a rolling deployment. - -## How it works - -This section describes the canary deployments and their limitations. - -### Canary deployment - -This section describes pushing an app with a canary deployment strategy. - -1. The `cf push APP-NAME --strategy canary` command: - 1. Stages the updated app package. - 2. Creates a droplet with the updated app package. - 3. Creates a deployment with the new droplet and any new configuration. -
          - For more information about the deployment object, see the [Deployments](http://v3-apidocs.cloudfoundry.org/index.html#deployments) section of the CAPI V3 documentation. - -2. After the command creates the deployment, the `cc_deployment_updater` BOSH job runs in the -background, updating deployments as follows: - 1. Adds one instance of the new web process (the 'canary' instance). - * This process shares routes with the old process. - * Now, if you run `cf app` on your app, you see multiple `web` processes. - 1. Sets the deployment to `PAUSED`. - -3. After validating that the canary instance is running as expected execute the command `cf continue-deployment APP-NAME`: - 1. Changes the deployment reason to `DEPLOYING` and starts doing a rolling deployment - -4. After the command changes the status of the deployment, the `cc_deployment_updater` BOSH job runs in the -background, updating deployments as follows: - 1. Adds MaxInFlight number of instances (**by default it is 1**) of the new web process and removes MaxInFlight number of instance from the old web process. This step repeats until the new web process reaches the required number of instances. -

          - This happens only if all instances of the new web process are running.

          - 2. Removes the old web process. The new web process now fully replaces the old web process. - 3. Restarts all non-web processes of the app. - 4. Sets the deployment to `DEPLOYED`. - -### Limitations - -The following table describes the limitations of when using canary deployments. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          LimitationDescription
          Multiple app versionsDuring a deployment, <%= vars.app_runtime_abbr %> serves both the old and new version of your app at the - same route. This can lead to user issues if you push backwards-incompatible API changes.
          Database migrationsDeployments do not handle database migrations. Migrating an app database when the existing - app is not compatible with the migration can result in downtime.
          Non-web processesCanary deployment will only create an instance of the web process.
          QuotasPushing updates to your app using a deployment strategy creates up to `max_in_flight` new instances (defaults to 1) . If you lack sufficient quota, the deployment fails. Administrators might need to increase - quotas to accommodate deployments.
          Simultaneous apps when interrupting a pushIf you push app before your previous push command for the same app has completed, your - first push gets interrupted. Until the last deployment completes, there might be many versions - of the app running at the same time. Eventually, the app runs the code from your most recent - push.
          V3 APIsDuring a canary deploy for an app, requests to the V3 APIs for scaling or updating a process fail with an error message - like Cannot scale this process while a deployment is in flight.. For more information, see Scale a process - or Update a process in the CAPI V3 documentation.
          Evaluating the Canary Instance - Because the current processes share the same route, the best way to validate that traffic is reaching the canary instance by looking at the logs. - If app revision logging is enabled, the logs for all instances will be tagged with `process_id` and `revision_version` values. e.g. `APP/REV/4/PROC/WEB/1` - - Retrieve the logs by running the cf CLI command `cf logs APP_NAME`. -
          New or stopped applications - When pushing an application for the first time, or if the app is stopped, no deployment strategy is used and all application instances are started immediately. -
          - - -## View the status of canary deployments - -You can use CAPI to view the status of canary deployment. - -To view the status of a canary deployment: - -1. Log in to the cf CLI: - - ``` - cf login - ``` - -1. Find the GUID of your app by running: - - ``` - cf app APP-NAME --guid - ``` - Where `APP-NAME` is the name of the app. - -1. Find the deployment for that app by running: - - ``` - cf curl GET /v3/deployments?app_guids=APP-GUID&status_values=ACTIVE - ``` - Where `APP-GUID` is the GUID of the app. Deployments are listed in chronological order, with - the latest deployment displayed as the last in a list. - -1. Run: - - ``` - cf curl GET /v3/deployments/DEPLOYMENT-GUID - ``` - Where `DEPLOYMENT-GUID` is the GUID of the canary deployment. - -`cf curl GET /v3/deployments/DEPLOYMENT-GUID` returns these status properties for canary deployments: - -* `status.value`: Indicates if the deployment is `ACTIVE` or `FINALIZED`. - -* `status.reason`: Provides detail about the deployment status. - -* `status.details`: Provides the timestamp for the most recent successful health check. - The value of the `status.details` property can be `nil` with no successful health check - for the deployment. For example, there might be no successful health check if the deployment was - cancelled. - -The following table describes the possible values for the `status.value` and `status.reason` -properties: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
          status.valuestatus.reasonDescription
          ACTIVEDEPLOYINGThe deployment is deploying.
          ACTIVEPAUSEDThe deployment is paused waiting for the user to continue with the deployment.
          ACTIVECANCELLINGThe deployment is cancelling.
          FINALIZEDDEPLOYEDThe deployment was deployed.
          FINALIZEDCANCELLEDThe deployment was cancelled.
          FINALIZEDSUPERSEDEDThe deployment was stopped and did not finish deploying because there was another - deployment created for the app. -
          diff --git a/index.html.md.erb b/index.html.md.erb index 9677d668..1e96889f 100644 --- a/index.html.md.erb +++ b/index.html.md.erb @@ -33,8 +33,7 @@ If you do these things, you are a <%= vars.app_runtime_abbr %> **developer**, a * [Starting, restarting, and restaging apps](deploy-apps/start-restart-restage.html) * [Pushing an app with multiple processes](multiple-processes.html) * [Running cf push sub-step commands](push-sub-commands.html) - * [Canary app deployments](deploy-apps/canary-deploy.html) - * [Rolling app deployments](deploy-apps/rolling-deploy.html) + * [Configuring app deployments](deploy-apps/rolling-deploy.html) * [Pushing apps with sidecar processes](sidecars.html) * [Using blue-green deployment to reduce downtime and risk](deploy-apps/blue-green.html) * [Troubleshooting app deployment and health](deploy-apps/troubleshoot-app-health.html) diff --git a/push.html.md.erb b/push.html.md.erb index d7fa41ee..e5458bc8 100644 --- a/push.html.md.erb +++ b/push.html.md.erb @@ -9,6 +9,7 @@ These topics contain the procedures for deploying apps with `cf push`: * [Pushing your app using Cloud Foundry CLI (cf push)](./deploy-apps/deploy-app.html) * [Deploying with app manifests](./deploy-apps/manifest.html) + * [App manifest attribute reference](./deploy-apps/manifest-attributes.html) * [Deploying an app with Docker](./deploy-apps/push-docker.html) @@ -23,12 +24,10 @@ These topics contain the procedures for deploying apps with `cf push`: * [Running cf push sub-step commands](push-sub-commands.html) -* [Configuring canary app deployments](./deploy-apps/canary-deploy.html) +* [Configuring canary app deployments](./deploy-apps/rolling-deploy.html#how-deployment-strategies-work) * [Configuring rolling app deployments](./deploy-apps/rolling-deploy.html) -* [Starting a canary app deployments](./deploy-apps/canary-deploy.html) - * [Pushing apps with sidecar processes](./sidecars.html) From effcb2fa7e31a7a2b5a0f1690535328a81c686ad Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Thu, 23 Jan 2025 11:42:36 -0800 Subject: [PATCH 037/132] full edit of updated app deploy topic --- deploy-apps/rolling-deploy.html.md.erb | 364 ++++++++++++++++--------- push.html.md.erb | 2 +- 2 files changed, 239 insertions(+), 127 deletions(-) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index 78b19c88..877ef1a0 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -1,10 +1,10 @@ --- -title: Configuring rolling app deployments +title: Configuring app deployments owner: CAPI --- You can use Cloud Foundry Command Line Interface (cf CLI) commands -or the Cloud Foundry API (CAPI) to push your apps to <%= vars.app_runtime_first %> using a rolling deployment. +or the Cloud Foundry API (CAPI) to push your apps to <%= vars.app_runtime_first %> using a deployment. For information about the traditional method for addressing app downtime while pushing app updates, see [Using blue-green deployment to reduce downtime and risk](./blue-green.html). @@ -19,7 +19,143 @@ The procedures in this topic require one of the following: * **cf CLI v7 or later** -* **CAPI V3:** If you use CAPI V3, you must install the cf CLI. +* **CAPI V3:** If you use CAPI V3 API, you must install the cf CLI. + +Or for canary deployments: + +* **cf CLI v8.8.0 or later** + +* **CAPI V3.173.0 or later** + +## How Deployment Strategies Work + +Cloud Foundry provides two different strategies for deployments: + +1. Rolling deployments bring up one or more web processes (as defined by `max-in-flight`) at a time. After those instances report healthy and routable, the deployment brings down an equivalent number instances of the old revision. The deployment repeats this process until all instances have been replaced, and finally replaces all old non-web processes with new processes before finishing. +2. Canary deployments bring up a single web process of the new revision, then pause indefinitely. This gives time for app operators or developers to evaluate the health of a new revision. After evaluating the effects, app operators can choose to either `cancel` or `continue` the deployment. When the deployment is continued, the canary deployment proceeds in a way similar to a rolling deployment. + +The following sections describe these deployment strategies and their limitations in detail. + +### Rolling Deployments + +This section describes pushing an app with the rolling deployment strategy. + +1. The `cf push APP-NAME --strategy rolling` command: + 1. Stages the updated app package. + 2. Creates a droplet with the updated app package. + 3. Creates a deployment with the new droplet and any new configuration. + * This starts up to `max_in_flight` processes that shares the route with the old process. + * If you run `cf app` on your app at this point, you see multiple `web` processes. +
          + For more information about the deployment object, see the [Deployments](http://v3-apidocs.cloudfoundry.org/index.html#deployments) section of the CAPI V3 documentation. + +2. After the command creates the deployment, the `cc_deployment_updater` BOSH job runs in the +background, updating deployments as follows: + 1. Adds up to `max_in_flight` instances of the new web process and removes instances from the old web process. This step repeats until the new web process reaches the required number of instances. +

          + This happens only if all instances of the new web process are running.

          + 2. Removes the old web process. The new web process now fully replaces the old web process. + 3. Restarts all non-web processes of the app. + 4. Sets the deployment to `DEPLOYED`. + +### Canary Deployments + +This section describes pushing an app with the canary deployment strategy. + +1. The `cf push APP-NAME --strategy canary` command: + 1. Stages the updated app package. + 2. Creates a droplet with the updated app package. + 3. Creates a deployment with the new droplet and any new configuration. +
          + For more information about the deployment object, see the [Deployments](http://v3-apidocs.cloudfoundry.org/index.html#deployments) section of the CAPI V3 documentation. + +2. After the command creates the deployment, the `cc_deployment_updater` BOSH job runs in the +background, updating deployments as follows: + 1. Adds one instance of the new web process (the `canary` instance). + * This process shares routes with the old process. + * If you run `cf app` on your app at this point, you see multiple `web` processes. + 2. Sets the deployment to `PAUSED`. + +1. After validating that the canary instance is running as expected, execute the command `cf continue-deployment APP-NAME`: + * Changes the deployment reason to `DEPLOYING` and resumes in a way similar to a that of a rolling deployment. + +2. After the command changes the status of the deployment, the `cc_deployment_updater` BOSH job runs in the +background, updating deployments as follows: + 1. Adds MaxInFlight number of instances (**by default it is 1**) of the new web process and removes MaxInFlight number of instance from the old web process. This step repeats until the new web process reaches the required number of instances. +

          + Important + This happens only if all instances of the new web process are running.

          + 2. Removes the old web process. The new web process now fully replaces the old web process. + 3. Restarts all non-web processes of the app. + 4. Sets the deployment to `DEPLOYED`. + +### Limitations + +The following table describes the limitations when using these deployments. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          LimitationDescription
          Multiple app versionsDuring a deployment, <%= vars.app_runtime_abbr %> serves both the old and new version of your app at the + same route. This can lead to user issues if you push API changes that are not backwards-compatible.
          Database migrationsDeployments do not handle database migrations. Migrating an app database when the existing + app is not compatible with the migration can result in downtime.
          Non-web processesDeployments only run web processes through the update sequence described + earlier. The commands restart worker and other non-web processes in bulk after updating all web + processes.

          + The CAPI V3 API introduces the concept of processes as runnable units of an app. Each app has a + web process by default. You can specify additional processes with a Procfile, and in some cases + buildpacks create additional processes. For more information about processes, see + Processes in the CAPI V3 + documentation.
          QuotasPushing updates to your app using a deployment strategy creates up to max_in_flight new instances (defaults to 1). + Additionally, canary deployments use an extra instance when pausing with the canary instance deployed. + If you lack sufficient quota, the deployment fails. Administrators might need to increase quotas to accommodate deployments. +
          Simultaneous apps when interrupting a pushIf you push an app before your previous push command for the same app has completed, your + first push gets interrupted. Until the last deployment completes, there might be many versions + of the app running at the same time. Eventually, the app runs the code from your most recent + push.
          V3 APIsDuring a rolling deploy for an app, requests to the V3 APIs for scaling or updating a process fail with an error message + like Cannot scale this process while a deployment is in flight. For more information, see Scale a process + or Update a process in the CAPI V3 documentation.
          New or stopped applications + When pushing an application for the first time, or if the app is stopped, no deployment strategy is used and all application instances are started immediately. +
          Evaluating the canary instance + Because the current processes share the same route, the best way to validate that traffic is reaching the canary instance is by looking at the logs. + If app revision logging is enabled, the logs for all instances will be tagged with process_id and revision_version values. e.g. APP/REV/4/PROC/WEB/1 +
          +
          + Retrieve the logs by running the cf CLI command cf logs APP_NAME. +
          ## Commands @@ -43,22 +179,26 @@ Review the limitations of this feature before running the command. For more info

          cf CLI v7 exits when one instance of each process is healthy. - It also includes a --no-wait flag on push for users who don't want to wait + It also includes a --no-wait flag for users who don't want to wait for the operation to complete. - cf push used with the --no-wait flag exits as soon as one instance is healthy. + When cf push is used with the --no-wait flag, the process exits as soon as one instance is healthy.

          If the deployment stops and doesn't restart, cancel it and run it again as described in an earlier step. To cancel, see [Cancel a deployment](#cancel). -* **For cf CLI v8.8.0+ and CAPI V3.173.0 or later** - Allows you to additionally specify the `--max-in-flight` property, run: +* **For cf CLI v8.8.0+ and CAPI V3.173.0 or later, run:**
          + ``` - cf push APP-NAME --strategy rolling --max-in-flight MAX_IN_FLIGHT + cf push APP-NAME --strategy STRATEGY --max-in-flight MAX_IN_FLIGHT ``` - Where `APP-NAME` is the name that you want to give your app. - Where `MAX_IN_FLIGHT` specifies the maximum number of new instances to start up simultaneous until the deployment is complete. Optional and defaults to 1. + Where: +
            +
          • APP-NAME is the name that you want to give your app.
          • +
          • MAX_IN_FLIGHT specifies the maximum number of new instances to start up simultaneously until the deployment is complete. This parameter is optional and defaults to 1.
          • +
          • STRATEGY is the strategy you want to use for the deployment. Valid strategies are rolling and canary.
          • +
          * **For CAPI V3:** 1. Log in to the cf CLI. @@ -66,7 +206,7 @@ Review the limitations of this feature before running the command. For more info ``` cf login ``` - 2. Create an empty app by running the following `curl` command with `POST /v3/apps`. Record the + 2. Create an empty app by running the following `curl` command with `POST /v3/apps`.
          Record the app GUID from the output. ``` @@ -90,6 +230,7 @@ Review the limitations of this feature before running the command. For more info
        • APP-NAME is the name that you want to give your app.
        • SPACE-GUID is the space identifier that you want to associate with your app.
        + 3. Create a package with the following `curl` command with `POST /v3/packages`. Record the package GUID from the output. @@ -110,6 +251,7 @@ Review the limitations of this feature before running the command. For more info ``` Where `APP-GUID` is the app GUID that you recorded in an earlier step. This app GUID is a unique identifier for your app. + 4. Upload the package bits by running the following `curl` command with `POST /v3/packages/PACKAGE-GUID/upload`. @@ -138,6 +280,7 @@ Review the limitations of this feature before running the command. For more info }' ``` Where `PACKAGE-GUID` is the package GUID that you recorded in an earlier step. + 6. Deploy your app by running the following `curl` command with `POST /v3/deployments`. To verify the status of the deployment or take action on the deployment, record the deployment GUID from the output. @@ -150,7 +293,7 @@ Review the limitations of this feature before running the command. For more info "droplet": { "guid": "DROPLET-GUID" }, - "strategy": "rolling", + "strategy": STRATEGY, "options": { "max_in_flight": MAX_IN_FLIGHT }, @@ -163,12 +306,17 @@ Review the limitations of this feature before running the command. For more info } }' ``` - Where `DROPLET-GUID` and `APP-GUID` are the GUIDs that you recorded in earlier steps. - Where `MAX_IN_FLIGHT` is an integer that specifies the maximum number of new instances to start up simultaneous until the deployment is complete. Optional and defaults to 1. -For more information about this command, see [How it works](#how-it-works). + Where: +
          +
        • DROPLET-GUID and APP-GUID are the GUIDs that you recorded in earlier steps.
        • +
        • MAX_IN_FLIGHT is an integer that specifies the maximum number of new instances to start up simultaneously until the deployment is complete. Optional and defaults to 1.
        • +
        • STRATEGY is the strategy you would like to use for the deployment. Valid strategies are rolling and canary.
        • +
        + +For more information about this command, see [How Deployment Strategies Work](#how-deployment-strategies-work). -### Cancel a deployment +### Cancel a Deployment To stop the deployment of an app that you pushed: @@ -177,6 +325,7 @@ To stop the deployment of an app that you pushed: ``` cf cancel-deployment APP-NAME ``` + Where `APP-NAME` is the name of the app. * **For CAPI V3, run:** @@ -184,6 +333,7 @@ To stop the deployment of an app that you pushed: ``` cf curl /v3/deployments/DEPLOYMENT-GUID/actions/cancel" -X POST ``` + Where `DEPLOYMENT-GUID` is the GUID of the deployment that you recorded after following the CAPI procedure in [Deploy an app](#deploy). @@ -193,30 +343,62 @@ This reverts the app to its state from before the deployment started by: * Removing any deployment artifacts * Resetting the `current_droplet` on the app -

        +

        The cancel command is designed to revert the app to its -original state as quickly as possible and does not guarantee zero downtime. Additionally, changes -to environment variables and service bindings will not be reverted.

        +original state as quickly as possible and does not guarantee zero downtime.
        It is important to note that changes +to environment variables and service bindings are not reverted.

        + +### Continue a Canary Deployment + +To finish a canary deployment after the deployment has paused and the canary instance has been validated: + +* **For cf CLI v8+, run:** + + ``` + cf continue-deployment APP-NAME + ``` + Where `APP-NAME` is the name of the app. + +* **For CAPI V3, run:** + + ``` + cf curl /v3/deployments/DEPLOYMENT-GUID/actions/continue" -X POST + ``` + Where `DEPLOYMENT-GUID` is the GUID of the deployment that you recorded after following the + CAPI procedure in [Deploy an app](#deploy). + +This continues the rolling deployment of the app. ### Restart an app -To restart your app without downtime, run the appropriate command. Restart an app to apply -configuration updates that require a restart, such as environment variables or service bindings. +Restart your app to apply configuration updates that require a restart, such as environment variables or service bindings. + +To restart your app without downtime, run the appropriate command as shown here. * **For cf CLI v7+, run:** ``` - cf restart APP-NAME --strategy rolling + cf restart APP-NAME --strategy STRATEGY ``` - Where `APP-NAME` is the name of the app. -* **For cf CLI v8.8.0+ and CAPI V3.173.0 or later** - Allows you to additionally specify the `--max-in-flight` property, run: + Where: +
          +
        • APP-NAME is the name of the app.
        • +
        • STRATEGY is the strategy you would like to use for the deployment. Valid strategies are rolling and canary.
        • +
        + +* **For cf CLI v8.8.0+ and CAPI V3.173.0 or later, run:** + ``` - cf restart APP-NAME --strategy rolling --max-in-flight MAX_IN_FLIGHT + cf restart APP-NAME --strategy STRATEGY --max-in-flight MAX_IN_FLIGHT ``` - Where `APP-NAME` is the name of the app. - Where `MAX_IN_FLIGHT` specifies the maximum number of new instances to restart simultaneous until the deployment is complete. Optional and defaults to 1. + + Where: +
          +
        • APP-NAME is the name of the app.
        • +
        • MAX_IN_FLIGHT specifies the maximum number of new instances to restart simultaneous until the deployment is complete. Optional and defaults to 1.
        • +
        • STRATEGY is the strategy you would like to use for the deployment. Valid strategies are rolling and canary.
        • +
        * **For CAPI V3, run:** @@ -226,112 +408,35 @@ configuration updates that require a restart, such as environment variables or s -H "Content-type: application/json" \ -d '{ "droplet": { - "guid": "DROPLET-GUID" + "guid": DROPLET-GUID }, - "strategy": "rolling", + "strategy": STRATEGY, "options": { "max_in_flight": MAX_IN_FLIGHT }, "relationships": { "app": { "data": { - "guid": "APP-GUID" + "guid": APP-GUID } } } }' ``` - Where `DROPLET-GUID` and `APP-GUID` are the GUIDs that you recorded in earlier steps. - Where `MAX_IN_FLIGHT` is an integer that specifies the maximum number of new instances to start up simultaneous until the deployment is complete. Optional and defaults to 1. - -## How it works - -This section describes the rolling deployments and their limitations. - -### Rolling deployment - -This section describes pushing an app with a rolling deployment strategy. - -1. The `cf push APP-NAME --strategy rolling` command: - 1. Stages the updated app package. - 2. Creates a droplet with the updated app package. - 3. Creates a deployment with the new droplet and any new configuration. - * This starts up to `max_in_flight` processes that shares the route with the old process. - * Now, if you run `cf app` on your app, you see multiple `web` processes. -
        - For more information about the deployment object, see the [Deployments](http://v3-apidocs.cloudfoundry.org/index.html#deployments) section of the CAPI V3 documentation. - -2. After the command creates the deployment, the `cc_deployment_updater` BOSH job runs in the -background, updating deployments as follows: - 1. Adds up to `max_in_flight` instances of the new web process and removes instances from the old web process. This step repeats until the new web process reaches the required number of instances. -

        - This happens only if all instances of the new web process are running.

        - 2. Removes the old web process. The new web process now fully replaces the old web process. - 3. Restarts all non-web processes of the app. - 4. Sets the deployment to `DEPLOYED`. - -### Limitations -The following table describes the limitations of when using rolling deployments. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        LimitationDescription
        Multiple app versionsDuring a deployment, <%= vars.app_runtime_abbr %> serves both the old and new version of your app at the - same route. This can lead to user issues if you push backwards-incompatible API changes.
        Database migrationsDeployments do not handle database migrations. Migrating an app database when the existing - app is not compatible with the migration can result in downtime.
        Non-web processesRolling deployments only run web processes through the rolling update sequence described - earlier. The commands restart worker and other non-web processes in bulk after updating all web - processes.

        - The CAPI V3 API introduces the concept of processes as runnable units of an app. Each app has a - web process by default. You can specify additional processes with a Procfile, and in some cases - buildpacks create additional processes. For more information about processes, see - Processes in the CAPI V3 - documentation.
        QuotasPushing updates to your app using a deployment strategy creates up to `max_in_flight` new instances (defaults to 1). - If you lack sufficient quota, the deployment fails. Administrators might need to increase quotas to accommodate deployments.
        Simultaneous apps when interrupting a pushIf you push app before your previous push command for the same app has completed, your - first push gets interrupted. Until the last deployment completes, there might be many versions - of the app running at the same time. Eventually, the app runs the code from your most recent - push.
        V3 APIsDuring a rolling deploy for an app, requests to the V3 APIs for scaling or updating a process fail with an error message - like Cannot scale this process while a deployment is in flight.. For more information, see Scale a process - or Update a process in the CAPI V3 documentation.
        New or stopped applications - When pushing an application for the first time, or if the app is stopped, no deployment strategy is used and all application instances are started immediately. -
        + Where: +
          +
        • DROPLET-GUID and APP-GUID are the GUIDs that you recorded in earlier steps.
        • +
        • MAX_IN_FLIGH is an integer that specifies the maximum number of new instances to start up simultaneous until the deployment is complete. Optional and defaults to 1.
        • +
        • STRATEGY is the strategy you would like to use for the deployment. Valid strategies are rolling and canary.
        • +
        -## View the status of rolling deployments +## View the status of deployments -You can use CAPI to view the status of rolling deployments. +You can use CAPI to view the status of deployments. -To view the status of a rolling deployment: +To view the status of a deployment: 1. Log in to the cf CLI: @@ -344,6 +449,7 @@ To view the status of a rolling deployment: ``` cf app APP-NAME --guid ``` + Where `APP-NAME` is the name of the app. 1. Find the deployment for that app by running: @@ -352,16 +458,16 @@ To view the status of a rolling deployment: cf curl GET /v3/deployments?app_guids=APP-GUID&status_values=ACTIVE ``` Where `APP-GUID` is the GUID of the app. Deployments are listed in chronological order, with - the latest deployment displayed as the last in a list. + the latest deployment displayed as the last in the list. 1. Run: ``` cf curl GET /v3/deployments/DEPLOYMENT-GUID ``` - Where `DEPLOYMENT-GUID` is the GUID of the rolling deployment. + Where `DEPLOYMENT-GUID` is the GUID of the deployment. -`cf curl GET /v3/deployments/DEPLOYMENT-GUID` returns these status properties for rolling deployments: +The `cf curl GET /v3/deployments/DEPLOYMENT-GUID` command returns the following status properties: * `status.value`: Indicates if the deployment is `ACTIVE` or `FINALIZED`. @@ -376,14 +482,20 @@ The following table describes the possible values for the `status.value` and `st properties: - - - + + + + + + + + + @@ -392,7 +504,7 @@ properties: - + @@ -402,8 +514,8 @@ properties: -
        status.valuestatus.reasonDescription
        status.valuestatus.reasonDescription
        ACTIVE DEPLOYING The deployment is deploying.
        ACTIVEPAUSEDThe deployment is paused waiting for the user to continue with the deployment. Used only for canary Deployments.
        ACTIVE CANCELLING
        FINALIZED DEPLOYEDThe deployment was deployed.The deployment is complete.
        FINALIZED
        FINALIZED SUPERSEDEDThe deployment was stopped and did not finish deploying because there was another - deployment created for the app. + The deployment was stopped and did not finish deploying because another + deployment was created for the app.
        diff --git a/push.html.md.erb b/push.html.md.erb index e5458bc8..2bd2e256 100644 --- a/push.html.md.erb +++ b/push.html.md.erb @@ -24,7 +24,7 @@ These topics contain the procedures for deploying apps with `cf push`: * [Running cf push sub-step commands](push-sub-commands.html) -* [Configuring canary app deployments](./deploy-apps/rolling-deploy.html#how-deployment-strategies-work) +* [Configuring canary app deployments](./deploy-apps/rolling-deploy.html#canary-deployment-process) * [Configuring rolling app deployments](./deploy-apps/rolling-deploy.html) From ea10e8dc0fc409d5c1e944b7fa10524395005a17 Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Thu, 23 Jan 2025 12:11:44 -0800 Subject: [PATCH 038/132] try to fix formatting --- deploy-apps/rolling-deploy.html.md.erb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index 877ef1a0..07b0151c 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -83,7 +83,6 @@ background, updating deployments as follows: background, updating deployments as follows: 1. Adds MaxInFlight number of instances (**by default it is 1**) of the new web process and removes MaxInFlight number of instance from the old web process. This step repeats until the new web process reaches the required number of instances.

        - Important This happens only if all instances of the new web process are running.

        2. Removes the old web process. The new web process now fully replaces the old web process. 3. Restarts all non-web processes of the app. @@ -124,7 +123,6 @@ The following table describes the limitations when using these deployments. Pushing updates to your app using a deployment strategy creates up to max_in_flight new instances (defaults to 1). Additionally, canary deployments use an extra instance when pausing with the canary instance deployed. If you lack sufficient quota, the deployment fails. Administrators might need to increase quotas to accommodate deployments. - Simultaneous apps when interrupting a push @@ -226,10 +224,9 @@ Review the limitations of this feature before running the command. For more info ``` Where: -
          -
        • APP-NAME is the name that you want to give your app.
        • -
        • SPACE-GUID is the space identifier that you want to associate with your app.
        • -
        + + * APP-NAME is the name that you want to give your app. + * SPACE-GUID is the space identifier that you want to associate with your app. 3. Create a package with the following `curl` command with `POST /v3/packages`. Record the package GUID from the output. @@ -249,6 +246,7 @@ Review the limitations of this feature before running the command. For more info } }' ``` + Where `APP-GUID` is the app GUID that you recorded in an earlier step. This app GUID is a unique identifier for your app. From 3617734f2f9154caed8356d8bc49531b9dda4cac Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Thu, 23 Jan 2025 12:45:58 -0800 Subject: [PATCH 039/132] try to fix formatting(2) --- deploy-apps/rolling-deploy.html.md.erb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index 07b0151c..0fde6e02 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -228,6 +228,8 @@ Review the limitations of this feature before running the command. For more info * APP-NAME is the name that you want to give your app. * SPACE-GUID is the space identifier that you want to associate with your app. +

        + 3. Create a package with the following `curl` command with `POST /v3/packages`. Record the package GUID from the output. @@ -343,8 +345,9 @@ This reverts the app to its state from before the deployment started by:

        The cancel command is designed to revert the app to its -original state as quickly as possible and does not guarantee zero downtime.
        It is important to note that changes -to environment variables and service bindings are not reverted.

        +original state as quickly as possible and does not guarantee zero downtime. +
        It is important to note that changes +to environment variables and service bindings are not reverted.

        ### Continue a Canary Deployment From 413ce7c1c5f56d2f9b9eec6ec343049c6a058014 Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Thu, 23 Jan 2025 13:05:15 -0800 Subject: [PATCH 040/132] try to fix formatting(3) --- deploy-apps/rolling-deploy.html.md.erb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index 0fde6e02..bd7b667f 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -224,11 +224,12 @@ Review the limitations of this feature before running the command. For more info ``` Where: +
          +
        • APP-NAME is the name that you want to give your app.
        • +
        • SPACE-GUID is the space identifier that you want to associate with your app.
        • +
        - * APP-NAME is the name that you want to give your app. - * SPACE-GUID is the space identifier that you want to associate with your app. - -

        +

        3. Create a package with the following `curl` command with `POST /v3/packages`. Record the package GUID from the output. From e3a943de0b363c022bbfe6cd24ad33af963019b3 Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Thu, 23 Jan 2025 14:58:46 -0800 Subject: [PATCH 041/132] try to fix formatting(4) --- deploy-apps/rolling-deploy.html.md.erb | 273 +++++++++++++------------ 1 file changed, 142 insertions(+), 131 deletions(-) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index bd7b667f..283cb889 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -168,152 +168,163 @@ To deploy an app without incurring downtime: Review the limitations of this feature before running the command. For more information, see Limitations.

        -* **For cf CLI v7+, run:** +#### For cf CLI v7+ - ``` - cf push APP-NAME --strategy rolling - ``` - Where `APP-NAME` is the name that you want to give your app. +Run: + +``` +cf push APP-NAME --strategy rolling +``` + +Where `APP-NAME` is the name that you want to give your app. + +

        +cf CLI v7 exits when one instance of each process is healthy. +It also includes a --no-wait flag for users who don't want to wait +for the operation to complete. +When cf push is used with the --no-wait flag, the process exits as soon as one instance is healthy. +

        + +If the deployment stops and doesn't restart, cancel it and run it again as described in an earlier step. +To cancel, see [Cancel a deployment](#cancel). + + +#### For cf CLI v8.8.0+ and CAPI V3.173.0 or later -

        - cf CLI v7 exits when one instance of each process is healthy. - It also includes a --no-wait flag for users who don't want to wait - for the operation to complete. - When cf push is used with the --no-wait flag, the process exits as soon as one instance is healthy. -

        +Run: - If the deployment stops and doesn't restart, cancel it and run it again as described in an earlier step. - To cancel, see [Cancel a deployment](#cancel). +``` +cf push APP-NAME --strategy STRATEGY --max-in-flight MAX_IN_FLIGHT +``` +Where: +
          +
        • APP-NAME is the name that you want to give your app.
        • +
        • MAX_IN_FLIGHT specifies the maximum number of new instances to start up simultaneously until the deployment is complete. This parameter is optional and defaults to 1.
        • +
        • STRATEGY is the strategy you want to use for the deployment. Valid strategies are rolling and canary.
        • +
        -* **For cf CLI v8.8.0+ and CAPI V3.173.0 or later, run:**
        +#### For CAPI V3 +1. Log in to the cf CLI. + + ``` + cf login ``` - cf push APP-NAME --strategy STRATEGY --max-in-flight MAX_IN_FLIGHT + +2. Create an empty app by running the following `curl` command with `POST /v3/apps`.
        Record the +app GUID from the output. + + ``` + cf curl /v3/apps \ + -X POST \ + -H "Content-type: application/json" \ + -d '{ + "name": "APP-NAME", + "relationships": { + "space": { + "data": { + "guid": "SPACE-GUID" + } + } + } + }' ``` + Where: +
        • APP-NAME is the name that you want to give your app.
        • -
        • MAX_IN_FLIGHT specifies the maximum number of new instances to start up simultaneously until the deployment is complete. This parameter is optional and defaults to 1.
        • -
        • STRATEGY is the strategy you want to use for the deployment. Valid strategies are rolling and canary.
        • +
        • SPACE-GUID is the space identifier that you want to associate with your app.
        -* **For CAPI V3:** - 1. Log in to the cf CLI. - - ``` - cf login - ``` - 2. Create an empty app by running the following `curl` command with `POST /v3/apps`.
        Record the - app GUID from the output. - - ``` - cf curl /v3/apps \ - -X POST \ - -H "Content-type: application/json" \ - -d '{ - "name": "APP-NAME", - "relationships": { - "space": { - "data": { - "guid": "SPACE-GUID" - } - } - } - }' - ``` - - Where: -
          -
        • APP-NAME is the name that you want to give your app.
        • -
        • SPACE-GUID is the space identifier that you want to associate with your app.
        • -
        - -

        - - 3. Create a package with the following `curl` command with `POST /v3/packages`. Record the package - GUID from the output. - - ``` - cf curl /v3/packages \ - -X POST \ - -H "Content-type: application/json" \ - -d '{ - "type": "bits", - "relationships": { - "app": { - "data": { - "guid": "APP-GUID" - } - } - } - }' - ``` - - Where `APP-GUID` is the app GUID that you recorded in an earlier step. This app GUID is a - unique identifier for your app. - - 4. Upload the package bits by running the following `curl` command with - `POST /v3/packages/PACKAGE-GUID/upload`. - - ``` - cf curl /v3/packages/PACKAGE-GUID/upload \ - -X POST \ - -F bits=@"PACKAGED-APP" \ - ``` - - Where: -
          -
        • PACKAGE-GUID is the package GUID that you recorded in an earlier step.
        • -
        • PACKAGED-APP is your app packaged in a file such as .zip.
        • -
        - 5. Create the build by running the following `curl` command with `POST /v3/builds`. Record the - droplet GUID from the output. - - ``` - cf curl /v3/builds \ - -X POST \ - -H "Content-type: application/json" \ - -d '{ - "package": { - "guid": PACKAGE-GUID" - } - }' - ``` - Where `PACKAGE-GUID` is the package GUID that you recorded in an earlier step. - - 6. Deploy your app by running the following `curl` command with `POST /v3/deployments`. To verify - the status of the deployment or take action on the deployment, record the deployment GUID from the - output. - - ``` - cf curl /v3/deployments \ - -X POST \ - -H "Content-type: application/json" \ - -d '{ - "droplet": { - "guid": "DROPLET-GUID" - }, - "strategy": STRATEGY, - "options": { - "max_in_flight": MAX_IN_FLIGHT - }, - "relationships": { - "app": { - "data": { - "guid": "APP-GUID" - } +1. Create a package with the following `curl` command with `POST /v3/packages`. Record the package +GUID from the output. + + ``` + cf curl /v3/packages \ + -X POST \ + -H "Content-type: application/json" \ + -d '{ + "type": "bits", + "relationships": { + "app": { + "data": { + "guid": "APP-GUID" } } - }' - ``` - - Where: -
          -
        • DROPLET-GUID and APP-GUID are the GUIDs that you recorded in earlier steps.
        • -
        • MAX_IN_FLIGHT is an integer that specifies the maximum number of new instances to start up simultaneously until the deployment is complete. Optional and defaults to 1.
        • -
        • STRATEGY is the strategy you would like to use for the deployment. Valid strategies are rolling and canary.
        • -
        + } + }' + ``` + + Where `APP-GUID` is the app GUID that you recorded in an earlier step. This app GUID is a + unique identifier for your app. + +1. Upload the package bits by running the following `curl` command with +`POST /v3/packages/PACKAGE-GUID/upload`. + + ``` + cf curl /v3/packages/PACKAGE-GUID/upload \ + -X POST \ + -F bits=@"PACKAGED-APP" \ + ``` + + Where: + +
          +
        • PACKAGE-GUID is the package GUID that you recorded in an earlier step.
        • +
        • PACKAGED-APP is your app packaged in a file such as .zip.
        • +
        + +1. Create the build by running the following `curl` command with `POST /v3/builds`. Record the +droplet GUID from the output. + + ``` + cf curl /v3/builds \ + -X POST \ + -H "Content-type: application/json" \ + -d '{ + "package": { + "guid": PACKAGE-GUID" + } + }' + ``` + + Where `PACKAGE-GUID` is the package GUID that you recorded in an earlier step. + +1. Deploy your app by running the following `curl` command with `POST /v3/deployments`. To verify +the status of the deployment or take action on the deployment, record the deployment GUID from the +output. + + ``` + cf curl /v3/deployments \ + -X POST \ + -H "Content-type: application/json" \ + -d '{ + "droplet": { + "guid": "DROPLET-GUID" + }, + "strategy": STRATEGY, + "options": { + "max_in_flight": MAX_IN_FLIGHT + }, + "relationships": { + "app": { + "data": { + "guid": "APP-GUID" + } + } + } + }' + ``` + + Where: + +
          +
        • DROPLET-GUID and APP-GUID are the GUIDs that you recorded in earlier steps.
        • +
        • MAX_IN_FLIGHT is an integer that specifies the maximum number of new instances to start up simultaneously until the deployment is complete. Optional and defaults to 1.
        • +
        • STRATEGY is the strategy you would like to use for the deployment. Valid strategies are rolling and canary.
        • +
        For more information about this command, see [How Deployment Strategies Work](#how-deployment-strategies-work). From b71f4e74b489ea39774acf3f58d7d5e7bd93ed57 Mon Sep 17 00:00:00 2001 From: Amelia Downs Date: Wed, 29 Jan 2025 15:41:53 +0000 Subject: [PATCH 042/132] update oss c2c-overlay guide --- deploy-apps/_c2c_oss_overlay.html.md.erb | 194 ++++++++++++++++++----- 1 file changed, 152 insertions(+), 42 deletions(-) diff --git a/deploy-apps/_c2c_oss_overlay.html.md.erb b/deploy-apps/_c2c_oss_overlay.html.md.erb index 2eb048dd..63b8439c 100644 --- a/deploy-apps/_c2c_oss_overlay.html.md.erb +++ b/deploy-apps/_c2c_oss_overlay.html.md.erb @@ -1,67 +1,177 @@ ## Configure the overlay network -Container-to-container networking uses an overlay network to manage communication between app instances. -By default, each Diego Cell in the overlay network is allocated a /24 range that supports 254 containers per cell, one container for each of the usable IP addresses, `.1` through `.254`. +Container-to-container networking uses an overlay network to manage +communication between app instances. By default, each Diego Cell in the overlay +network is allocated a /24 range that supports 254 containers per cell, one +container for each of the usable IP addresses, `.1` through `.254`. -For more information about the overlay network, see [Overlay network](../../concepts/understand-cf-networking.html#overlay-network) in _Container-to-container networking_. +For more information about the overlay network, see [Overlay +network](../../concepts/understand-cf-networking.html#overlay-network) in +_Container-to-container networking_. -### Configure the number of Diego Cells +### Understanding the Overlay Network Properties via a Pie Metaphor -To change the number of Diego Cells supported by the overlay network in your Cloud Foundry deployment, edit the `cf_networking.network` property in your `cf-networking-release` manifest, and then re-deploy Cloud Foundry. See the following examples: +There are two <%= vars.app_runtime_abbr %> properties concerning the overlay +network. Before going into the details of the actual <%= vars.app_runtime_abbr +%> properties, let's talk about them metaphorically. - - - - - - +Imagine the entire overlay network is a group of pies. One <%= vars.app_runtime_abbr %> +property defines these pies and their sizes. + +The purpose of these pies are to serve the hungry, hungry Diego Cells. Each Diego +Cell is hungry and needs a slice of pie. Without a slice of pie the Diego Cell +cannot start because it has no energy. This is an egalitarian kitchen, so each +Diego Cell must get the same size pie slice. + +The second <%= vars.app_runtime_abbr %> property determines the size of the pie +slice that each Diego Cell is given. The smaller the slice of pie that each Diego +Cell gets, the less “energy” each Diego Cell has, and thus fewer apps can run on each +Diego Cell. The larger the slice of pie is that each Diego Cell gets, the more +“energy” the Diego Cell has, and thus more apps can run on each Diego Cell. + +If the pies and their sizes stay constant, smaller slices of pie means there can be +more Diego Cells (which are fed less each) and larger slices means there is a +smaller number of possible Diego Cells (which are fed more each). + +
        Overlay subnet maskNumber of cellsContainers per cell
        + - - - - + + + + + - - - + + + + - - - + + +
        /2015254
        Metaphorical PropertyActual Bosh PropertyDescriptionDefault
        /16255254Group of pies and their sizes"network" on the silk-controller jobAn list of CIDR address blocks for the overlay network provided as an + array of strings. Subnets for each Diego Cell are allocated out of this + network. The "subnet_prefix_length" property must be smaller than the + smallest CIDR address block. + `["10.255.0.0/16"]`
        /124,095254Slice size for each Diego Cell"subnet_prefix_length" on the silk-controller jobThe CIDR mask for each Diego Cell's individual overlay network subnet. + For a `/24` subnet for each Diego Cell, enter `24`. This subnet must be + smaller than all individual IP ranges provided in the "network" property. + `24`
        -

        -The overlay network IP address range must not conflict with any other IP addresses in the network. If a conflict exists, Diego Cells cannot reach any endpoint that has a conflicting IP address.

        -### Configure the number of containers per cell +### Configuring Overlay Networking Properties + +Changing the two overlay network properties "network" and +"subnet_prefix_length" affect how many Diego Cells can run in one deployment +and how many apps can be run on each Diego Cell. + +Use the following algorithm to determine how many Diego Cells can run with a +given configuration. + +``` +A = the total number of IPs in the "network" +B = number of IPs per Diego Cell as defined by the "subnet_prefix_length" +C = number of CIDRs in the "network" -To change the number of containers per Diego Cell in your Cloud Foundry deployment, edit the `cf_networking.subnet_prefix_length` property in your `cf-networking-release` manifest, and then re-deploy Cloud Foundry. See the following examples: +Max supported number of Diego Cells = (A/B) - C +``` - +Here is an example using the default values: +``` +network = ["10.255.0.0/16"] +subnet_prefix_length = 24 + +A = /16 CIDR = 65,536 IPs +B = /24 CIDR = 256 IPs +C = 1 + +Max supported number of Diego Cells = (65,536/256) - 1 = 255 +``` + +Here is an example using other values: +``` +network = ["10.255.0.0/20", "10.255.96.0/21"] +subnet_prefix_length = 24 + +A = /20 CIDR + /21 CIDR = 4,096 IPs + 2,048 IPs = 6,144 IPs +B = /24 CIDR = 256 IPs +C = 2 + +Max supported number of Diego Cells = (6,144/256) - 2 = 22 +``` + +All CIDRs provided in the "network" must have a larger prefix length +than the "subnet_prefix_length". + +Here are some examples of invalid combinations of properties: +
        + + + + - - - - + + - - - - + + - - - - + + + + +
        PropertyValue
        Overlay subnet maskNumber of cellsCell prefix lengthContainers per cell network`["10.255.0.0/20", "10.255.96.0/21", "10.255.200.0/23", "10.255.220.0/24"]`
        /16255/24254subnet_prefix_length`24`
        /16255/2662Invalid reason"subnet_prefix_length" must be smaller than all CIDRs in the "network". In this case it is the same size as `10.255.220.0/24`.
        + + + + + + + + + + + + + - - - - + + +
        PropertyValue
        network`["10.255.0.0/20", "10.255.96.0/21", "10.255.200.0/23", "10.255.220.0/32"]`
        subnet_prefix_length`24`
        /16255/2814Invalid reason"subnet_prefix_length" must be smaller than all CIDRs in the "network". In this case it is larger than `10.255.220.0/32`.
        + + + + + + + + + + + + + + + + + + + +
        PropertyValue
        network`["10.255.0.0/20", "10.255.0.0/16"]`
        subnet_prefix_length`24`
        Invalid reason"network" must not have any overlapping IP ranges. In this case `10.255.0.0/20` is a subset of `10.255.0.0/16`.
        + +### Changing the Overlay Network +Updating the "network" and "subnet_prefix_length" property is supported. However it will cause +container-to-container networking downtime during the deploy while the network +update is rolling out across Diego Cells. + +

        The overlay network IP address ranges must not conflict with any other IP +addresses in the network. If a conflict exists, Diego Cells cannot reach any +endpoint that has a conflicting IP address.

        From 493768509886b6ea86fba1e32d2c72781cbbbc32 Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Wed, 29 Jan 2025 14:09:32 -0800 Subject: [PATCH 043/132] move note to try fix hed formatting --- deploy-apps/rolling-deploy.html.md.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index 283cb889..b0ca72c3 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -164,10 +164,6 @@ This section describes the commands for working with rolling app deployments. To deploy an app without incurring downtime: -

        -Review the limitations of this feature before running the command. For more information, see -Limitations.

        - #### For cf CLI v7+ Run: @@ -178,6 +174,10 @@ cf push APP-NAME --strategy rolling Where `APP-NAME` is the name that you want to give your app. +

        +Review the limitations of this feature before running the command. For more information, see +Limitations.

        +

        cf CLI v7 exits when one instance of each process is healthy. It also includes a --no-wait flag for users who don't want to wait From f98842fb04aee05e74a5ea0cd95c8011db374da0 Mon Sep 17 00:00:00 2001 From: Tamara Boehm Date: Thu, 30 Jan 2025 07:51:50 +0100 Subject: [PATCH 044/132] feat: document usage of per-route features --- custom-per-route-options.html.md.erb | 85 +++++++++++++++++++++ deploy-apps/manifest-attributes.html.md.erb | 17 +++++ routing-index.html.md.erb | 2 + 3 files changed, 104 insertions(+) create mode 100644 custom-per-route-options.html.md.erb diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb new file mode 100644 index 00000000..02a147e6 --- /dev/null +++ b/custom-per-route-options.html.md.erb @@ -0,0 +1,85 @@ +--- +title: Configuring per-route options +owner: CF for VMs Networking +--- + +By default, the communication between Gorouter and backends can only be configured at the platform level. This means that any settings affecting this communication apply universally across the entire platform. +However, with the introduction of per-route features, developers now have the flexibility to customize this configuration on a more granular level. + +## Example: Configuring Load Balancing Algorithm + +One of the first per-route features implemented is the ability to configure the load balancing algorithm which defines how the load is distributed between Gorouters and backends. +This feature provides two options for load balancing: +- `round-robin` distributes the load evenly across all available backends +- `least-connections` directs traffic to the backend with the fewest active connections at any given time, optimizing resource utilization + +### Push an app configuring Load Balancing Algorithm via app manifest + +1. To configure the desired load balancing algorithm, developers need to add the `loadbalancing` key to a route object in their application manifest. +The value of this key should specify the chosen load balancing algorithm. Please note, the `route` attribute is required for the route object, and options can only be used as part of this object. + +An example for manifest.yml: + + ```yaml + --- + applications: + - name: MY-APP + routes: + - route: MY-APP.EXAMPLE.COM + options: + loadbalancing: least-connections + ``` + + Where `MY-APP` is the name of your app and `MY-APP.EXAMPLE.COM` is the route you want to map to your app. + +1. Push the app with the manifest by running: + + ``` + cf push -f manifest.yml + ``` + +1. Execute a request to the targeted API endpoint by running: + + ``` + cf curl /v3/routes/?hosts=MY-APP + ``` + Where `MY-APP` is the host attribute of the route. The response contains chosen load balancing algorithm as a custom option: + ``` + "options": { + "loadbalancing": "least-connections" + } + ``` + +### Update/Unset the Load Balancing Algorithm via cf curl + +For example, if the app has been initially configured with the load balancing algorithm set to `least-connections`, you can change the value to `round-robin` using the cf curl command. + +1. Execute a request to the targeted API endpoint by running: + +``` +cf curl /v3/routes/[guid] -X PATCH -H "Content-type: application/json" \ + -d '{ + "options": { + "loadbalancing": "round-robin" + } + }' +``` + + Where `guid` is a unique identifier for the route. + +1. Validate by running: + + ``` + cf curl /v3/routes/[guid] + ``` + + Where `guid` is a unique identifier for the route. The response contains chosen load balancing algorithm as a custom option: + + ``` + "options": { + "loadbalancing": "round-robin" + } + ``` + +The ability to customize properties on a per-route basis provides greater control and adaptability, ensuring that the route can be optimized for its unique requirements. + diff --git a/deploy-apps/manifest-attributes.html.md.erb b/deploy-apps/manifest-attributes.html.md.erb index cde392d5..e734206b 100644 --- a/deploy-apps/manifest-attributes.html.md.erb +++ b/deploy-apps/manifest-attributes.html.md.erb @@ -566,6 +566,23 @@ For example: - route: www.example.com/foo - route: tcp-example.com:1234 ``` +You can specify the `options` attribute to configure per-route options, though this is optional. + +The available options: +- `loadbalancing` which defines how the load is distributed across the application backends. The valid values are `round-robin` or `least-connections`. + +For example: +``` +--- + ... + routes: + - route: example.com + options: + loadbalancing: round-robin + - route: example2.com + options: + loadbalancing: least-connections +``` #### Manifest attributes diff --git a/routing-index.html.md.erb b/routing-index.html.md.erb index e7e898d9..5bbaa265 100644 --- a/routing-index.html.md.erb +++ b/routing-index.html.md.erb @@ -10,3 +10,5 @@ These topics contain information about configuring routes and domains: * [Configuring <%= vars.app_runtime_abbr %> to route traffic to apps on custom ports](custom-ports.html) * [Routing HTTP/2 and gRPC traffic to apps](http2-protocol.html) + +* [Configuring per-route options](custom-per-route-options.html) From c4b8bdbd98c5b5cf52669378e1582df5b0fcaf25 Mon Sep 17 00:00:00 2001 From: Tamara Boehm <34028368+b1tamara@users.noreply.github.com> Date: Thu, 30 Jan 2025 10:06:52 +0100 Subject: [PATCH 045/132] Apply suggestions from code review Co-authored-by: Alexander Lais --- custom-per-route-options.html.md.erb | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 02a147e6..bdbdb58a 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -6,13 +6,21 @@ owner: CF for VMs Networking By default, the communication between Gorouter and backends can only be configured at the platform level. This means that any settings affecting this communication apply universally across the entire platform. However, with the introduction of per-route features, developers now have the flexibility to customize this configuration on a more granular level. -## Example: Configuring Load Balancing Algorithm +The following per-route options exist: +- `loadbalancing`: Configures the load balancing algorithm used by Gorouter for this particular route. Possible options are: `round-robin` and `least-connections`. + +Available options are described in more detail in the following sections. Other options may follow in the future and will be documented here. + +## `loadbalancing`: Configuring Gorouter's Load Balancing Algorithm + +The per-route option `loadbalancing` allows configuring the load balancing algorithm, which defines how the load is distributed between Gorouters and backends. -One of the first per-route features implemented is the ability to configure the load balancing algorithm which defines how the load is distributed between Gorouters and backends. This feature provides two options for load balancing: - `round-robin` distributes the load evenly across all available backends - `least-connections` directs traffic to the backend with the fewest active connections at any given time, optimizing resource utilization +Depending on your application's load profile, one or the other may be more beneficial. The per-route option allows tailoring the behavior independent of the platform's global settings. + ### Push an app configuring Load Balancing Algorithm via app manifest 1. To configure the desired load balancing algorithm, developers need to add the `loadbalancing` key to a route object in their application manifest. @@ -46,13 +54,13 @@ An example for manifest.yml: Where `MY-APP` is the host attribute of the route. The response contains chosen load balancing algorithm as a custom option: ``` "options": { - "loadbalancing": "least-connections" + "loadbalancing": "least-connections" } ``` ### Update/Unset the Load Balancing Algorithm via cf curl -For example, if the app has been initially configured with the load balancing algorithm set to `least-connections`, you can change the value to `round-robin` using the cf curl command. +When an app has been initially configured with a specific load balancing algorithm , e.g. `least-connections`, you can change the value to `round-robin` using the cf curl command. 1. Execute a request to the targeted API endpoint by running: From 528f93be7e034c16227aab01e60d3e9f34ee6ad3 Mon Sep 17 00:00:00 2001 From: Tamara Boehm Date: Thu, 30 Jan 2025 10:22:52 +0100 Subject: [PATCH 046/132] Apply review feedback --- custom-per-route-options.html.md.erb | 5 ++--- deploy-apps/manifest-attributes.html.md.erb | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index bdbdb58a..4f351a67 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -6,6 +6,8 @@ owner: CF for VMs Networking By default, the communication between Gorouter and backends can only be configured at the platform level. This means that any settings affecting this communication apply universally across the entire platform. However, with the introduction of per-route features, developers now have the flexibility to customize this configuration on a more granular level. +The ability to customize properties on a per-route basis provides greater control and adaptability, ensuring that the route can be optimized for its unique requirements. + The following per-route options exist: - `loadbalancing`: Configures the load balancing algorithm used by Gorouter for this particular route. Possible options are: `round-robin` and `least-connections`. @@ -88,6 +90,3 @@ cf curl /v3/routes/[guid] -X PATCH -H "Content-type: application/json" \ "loadbalancing": "round-robin" } ``` - -The ability to customize properties on a per-route basis provides greater control and adaptability, ensuring that the route can be optimized for its unique requirements. - diff --git a/deploy-apps/manifest-attributes.html.md.erb b/deploy-apps/manifest-attributes.html.md.erb index e734206b..386107e8 100644 --- a/deploy-apps/manifest-attributes.html.md.erb +++ b/deploy-apps/manifest-attributes.html.md.erb @@ -569,7 +569,7 @@ For example: You can specify the `options` attribute to configure per-route options, though this is optional. The available options: -- `loadbalancing` which defines how the load is distributed across the application backends. The valid values are `round-robin` or `least-connections`. +- `loadbalancing` which defines how Gorouter is distributing requests across the application backends. The valid values are `round-robin` or `least-connections`. For example: ``` From f5b37f22e53b95ba88ffc6026e8770ee9936640a Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Thu, 30 Jan 2025 13:16:42 -0800 Subject: [PATCH 047/132] PR #541 tweaks --- custom-per-route-options.html.md.erb | 88 +++++++++++---------- deploy-apps/manifest-attributes.html.md.erb | 10 ++- routing-index.html.md.erb | 2 +- 3 files changed, 54 insertions(+), 46 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 4f351a67..7d438dec 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -1,89 +1,93 @@ --- -title: Configuring per-route options +title: Configuring Per-Route Options owner: CF for VMs Networking --- -By default, the communication between Gorouter and backends can only be configured at the platform level. This means that any settings affecting this communication apply universally across the entire platform. -However, with the introduction of per-route features, developers now have the flexibility to customize this configuration on a more granular level. +By default, communication between Gorouter and backends is configured via general settings at the platform level. -The ability to customize properties on a per-route basis provides greater control and adaptability, ensuring that the route can be optimized for its unique requirements. +This topic describes how to specify per-route Gorouter options scoped at the application level. +This greater granularity lets developers tailor optimal routing behavior for applications' unique load profiles or other requirements. -The following per-route options exist: -- `loadbalancing`: Configures the load balancing algorithm used by Gorouter for this particular route. Possible options are: `round-robin` and `least-connections`. +Gorouter supports the following per-route option, described in the section below: -Available options are described in more detail in the following sections. Other options may follow in the future and will be documented here. +- `loadbalancing`: Configures the load balancing algorithm used by Gorouter for this particular route. + - Settings: `round-robin`, `least-connections`. -## `loadbalancing`: Configuring Gorouter's Load Balancing Algorithm +## loadbalancing: Configure Gorouter's Load Balancing Algorithm The per-route option `loadbalancing` allows configuring the load balancing algorithm, which defines how the load is distributed between Gorouters and backends. -This feature provides two options for load balancing: +This option supports two settings for load balancing: + - `round-robin` distributes the load evenly across all available backends - `least-connections` directs traffic to the backend with the fewest active connections at any given time, optimizing resource utilization -Depending on your application's load profile, one or the other may be more beneficial. The per-route option allows tailoring the behavior independent of the platform's global settings. -### Push an app configuring Load Balancing Algorithm via app manifest +### Configure Load Balancing in an App Manifest -1. To configure the desired load balancing algorithm, developers need to add the `loadbalancing` key to a route object in their application manifest. -The value of this key should specify the chosen load balancing algorithm. Please note, the `route` attribute is required for the route object, and options can only be used as part of this object. +To configure per-route load balancing for an application that has not yet been pushed: -An example for manifest.yml: +1. In the application manifest, include a `route` definition with an `options: loadbalancing` attribute set to `round-robin` or `least-connections`. For example: - ```yaml - --- - applications: - - name: MY-APP - routes: - - route: MY-APP.EXAMPLE.COM - options: - loadbalancing: least-connections - ``` + ```yaml + --- + applications: + - name: MY-APP + routes: + - route: MY-APP.EXAMPLE.COM + options: + loadbalancing: least-connections + ``` - Where `MY-APP` is the name of your app and `MY-APP.EXAMPLE.COM` is the route you want to map to your app. + Where `MY-APP` is the name of your app and `MY-APP.EXAMPLE.COM` is the route you want to map to your app. -1. Push the app with the manifest by running: +1. Push the app with the manifest: ``` cf push -f manifest.yml ``` -1. Execute a request to the targeted API endpoint by running: +1. To confirm the setting, query the `routes` API endpoint for the app's route: ``` cf curl /v3/routes/?hosts=MY-APP ``` - Where `MY-APP` is the host attribute of the route. The response contains chosen load balancing algorithm as a custom option: + + Where `MY-APP` is the host attribute of the route. The response lists the chosen `loadbalancing` algorithm setting: + + ``` "options": { "loadbalancing": "least-connections" } ``` -### Update/Unset the Load Balancing Algorithm via cf curl +### Change Load Balancing of an Existing App + +To change the per-route `loadbalancing` setting of an app that has already been pushed, `cf curl` the `/v3/routes` API. +For example, to change an app route's algorithm from `least-connections` to `round-robin`: -When an app has been initially configured with a specific load balancing algorithm , e.g. `least-connections`, you can change the value to `round-robin` using the cf curl command. +1. Execute a `PATCH` request to the targeted API endpoint: -1. Execute a request to the targeted API endpoint by running: -``` -cf curl /v3/routes/[guid] -X PATCH -H "Content-type: application/json" \ - -d '{ - "options": { - "loadbalancing": "round-robin" - } - }' -``` + ``` + cf curl /v3/routes/GUID -X PATCH -H "Content-type: application/json" \ + -d '{ + "options": { + "loadbalancing": "round-robin" + } + }' + ``` - Where `guid` is a unique identifier for the route. + Where `GUID` is the unique identifier for the route. -1. Validate by running: +1. To confirm the setting, query the `routes` API endpoint for the route: ``` - cf curl /v3/routes/[guid] + cf curl /v3/routes/GUID ``` - Where `guid` is a unique identifier for the route. The response contains chosen load balancing algorithm as a custom option: + Where `GUID` is the unique identifier for the route. The response lists the new `round-robin` setting: ``` "options": { diff --git a/deploy-apps/manifest-attributes.html.md.erb b/deploy-apps/manifest-attributes.html.md.erb index 386107e8..1c73a376 100644 --- a/deploy-apps/manifest-attributes.html.md.erb +++ b/deploy-apps/manifest-attributes.html.md.erb @@ -557,6 +557,7 @@ The protocol route attribute is available only for <%= vars.app_run For example: + ``` --- ... @@ -566,12 +567,15 @@ For example: - route: www.example.com/foo - route: tcp-example.com:1234 ``` -You can specify the `options` attribute to configure per-route options, though this is optional. -The available options: -- `loadbalancing` which defines how Gorouter is distributing requests across the application backends. The valid values are `round-robin` or `least-connections`. +Under each route, you can optionally include an `options` attribute to configure per-route options as described in [Configuring Per-Route Options](../custom-per-route-options.html). + +Available options are: + +- `loadbalancing` - defines how Gorouter distributes requests across the application backends. Valid values are `round-robin` and `least-connections`. For example: + ``` --- ... diff --git a/routing-index.html.md.erb b/routing-index.html.md.erb index 5bbaa265..28524cd1 100644 --- a/routing-index.html.md.erb +++ b/routing-index.html.md.erb @@ -11,4 +11,4 @@ These topics contain information about configuring routes and domains: * [Routing HTTP/2 and gRPC traffic to apps](http2-protocol.html) -* [Configuring per-route options](custom-per-route-options.html) +* [Configuring Per-Route Options](custom-per-route-options.html) From d36b06c4030a8c7cd9940c6d99fb45301eba0115 Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Thu, 30 Jan 2025 13:25:44 -0800 Subject: [PATCH 048/132] PR #541 tweaks 2 --- index.html.md.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html.md.erb b/index.html.md.erb index 1e96889f..95c41d49 100644 --- a/index.html.md.erb +++ b/index.html.md.erb @@ -40,6 +40,7 @@ If you do these things, you are a <%= vars.app_runtime_abbr %> **developer**, a * **Routes and Domains:** How to configure routes and domains. * [Configuring routes and domains](deploy-apps/routes-domains.html) + * [Configuring Per-Route Options](custom-per-route-options.html) * [Configuring <%= vars.app_runtime_abbr %> to route traffic to apps on custom ports](custom-ports.html) * [Routing HTTP/2 and gRPC traffic to apps](http2-protocol.html) From 8dd456cce9fa3a443466a87c1cdf446758323bc8 Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Thu, 30 Jan 2025 14:46:20 -0800 Subject: [PATCH 049/132] PR #541 tweaks 3 --- custom-per-route-options.html.md.erb | 36 ++++++++++----------- deploy-apps/manifest-attributes.html.md.erb | 2 +- index.html.md.erb | 2 +- routing-index.html.md.erb | 4 +-- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 7d438dec..7c24e073 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -1,5 +1,5 @@ --- -title: Configuring Per-Route Options +title: Configuring per-route options owner: CF for VMs Networking --- @@ -39,28 +39,28 @@ To configure per-route load balancing for an application that has not yet been p loadbalancing: least-connections ``` - Where `MY-APP` is the name of your app and `MY-APP.EXAMPLE.COM` is the route you want to map to your app. + Where `MY-APP` is the name of your app and `MY-APP.EXAMPLE.COM` is the route you want to map to your app. 1. Push the app with the manifest: - ``` - cf push -f manifest.yml - ``` + ``` + cf push -f manifest.yml + ``` 1. To confirm the setting, query the `routes` API endpoint for the app's route: - ``` - cf curl /v3/routes/?hosts=MY-APP - ``` + ``` + cf curl /v3/routes/?hosts=MY-APP + ``` - Where `MY-APP` is the host attribute of the route. The response lists the chosen `loadbalancing` algorithm setting: + Where `MY-APP` is the host attribute of the route. The response lists the chosen `loadbalancing` algorithm setting: - ``` + ``` "options": { "loadbalancing": "least-connections" } - ``` + ``` ### Change Load Balancing of an Existing App @@ -70,22 +70,22 @@ For example, to change an app route's algorithm from `least-connections` to `rou 1. Execute a `PATCH` request to the targeted API endpoint: - ``` - cf curl /v3/routes/GUID -X PATCH -H "Content-type: application/json" \ + ``` + cf curl /v3/routes/GUID -X PATCH -H "Content-type: application/json" \ -d '{ "options": { "loadbalancing": "round-robin" } }' - ``` + ``` - Where `GUID` is the unique identifier for the route. + Where `GUID` is the unique identifier for the route. 1. To confirm the setting, query the `routes` API endpoint for the route: - ``` - cf curl /v3/routes/GUID - ``` + ``` + cf curl /v3/routes/GUID + ``` Where `GUID` is the unique identifier for the route. The response lists the new `round-robin` setting: diff --git a/deploy-apps/manifest-attributes.html.md.erb b/deploy-apps/manifest-attributes.html.md.erb index 1c73a376..d5a1a9fc 100644 --- a/deploy-apps/manifest-attributes.html.md.erb +++ b/deploy-apps/manifest-attributes.html.md.erb @@ -568,7 +568,7 @@ For example: - route: tcp-example.com:1234 ``` -Under each route, you can optionally include an `options` attribute to configure per-route options as described in [Configuring Per-Route Options](../custom-per-route-options.html). +Under each route, you can optionally include an `options` attribute to configure per-route options as described in [Configuring per-route options](../custom-per-route-options.html). Available options are: diff --git a/index.html.md.erb b/index.html.md.erb index 95c41d49..6dd3d23e 100644 --- a/index.html.md.erb +++ b/index.html.md.erb @@ -40,7 +40,7 @@ If you do these things, you are a <%= vars.app_runtime_abbr %> **developer**, a * **Routes and Domains:** How to configure routes and domains. * [Configuring routes and domains](deploy-apps/routes-domains.html) - * [Configuring Per-Route Options](custom-per-route-options.html) + * [Configuring per-route options](custom-per-route-options.html) * [Configuring <%= vars.app_runtime_abbr %> to route traffic to apps on custom ports](custom-ports.html) * [Routing HTTP/2 and gRPC traffic to apps](http2-protocol.html) diff --git a/routing-index.html.md.erb b/routing-index.html.md.erb index 28524cd1..37e392d9 100644 --- a/routing-index.html.md.erb +++ b/routing-index.html.md.erb @@ -7,8 +7,8 @@ These topics contain information about configuring routes and domains: * [Configuring routes and domains](deploy-apps/routes-domains.html) +* [Configuring per-route options](custom-per-route-options.html) + * [Configuring <%= vars.app_runtime_abbr %> to route traffic to apps on custom ports](custom-ports.html) * [Routing HTTP/2 and gRPC traffic to apps](http2-protocol.html) - -* [Configuring Per-Route Options](custom-per-route-options.html) From 844d8eb706dbf0762a3edc3dd5d5a38a2841a728 Mon Sep 17 00:00:00 2001 From: Alexander Lais Date: Fri, 31 Jan 2025 11:56:31 +0100 Subject: [PATCH 050/132] docs(per-route-lb): add version information Add version information from which this feature is available (via variable in docs-book-cloudfoundry). --- custom-per-route-options.html.md.erb | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 7c24e073..39b7fe79 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -10,11 +10,13 @@ This greater granularity lets developers tailor optimal routing behavior for app Gorouter supports the following per-route option, described in the section below: -- `loadbalancing`: Configures the load balancing algorithm used by Gorouter for this particular route. +- `loadbalancing`: Configures the load balancing algorithm used by Gorouter for this particular route. <%= vars.per_route_lb_version %> - Settings: `round-robin`, `least-connections`. ## loadbalancing: Configure Gorouter's Load Balancing Algorithm +<%= vars.per_route_lb_version %> + The per-route option `loadbalancing` allows configuring the load balancing algorithm, which defines how the load is distributed between Gorouters and backends. This option supports two settings for load balancing: @@ -73,10 +75,10 @@ For example, to change an app route's algorithm from `least-connections` to `rou ``` cf curl /v3/routes/GUID -X PATCH -H "Content-type: application/json" \ -d '{ - "options": { - "loadbalancing": "round-robin" - } - }' + "options": { + "loadbalancing": "round-robin" + } + }' ``` Where `GUID` is the unique identifier for the route. @@ -87,10 +89,10 @@ For example, to change an app route's algorithm from `least-connections` to `rou cf curl /v3/routes/GUID ``` - Where `GUID` is the unique identifier for the route. The response lists the new `round-robin` setting: + Where `GUID` is the unique identifier for the route. The response lists the new `round-robin` setting: - ``` - "options": { - "loadbalancing": "round-robin" - } - ``` + ``` + "options": { + "loadbalancing": "round-robin" + } + ``` From 7922fdaa52301be62aec8ad6c21654616aa917fb Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Fri, 31 Jan 2025 14:31:14 +0100 Subject: [PATCH 051/132] Per-route options via CF cli --- custom-per-route-options.html.md.erb | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 7c24e073..0e6af0eb 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -47,7 +47,15 @@ To configure per-route load balancing for an application that has not yet been p cf push -f manifest.yml ``` -1. To confirm the setting, query the `routes` API endpoint for the app's route: +1. To verify the setting, one can query the route via the cli route command: + ``` + cf route MY-APP.EXAMPLE.COM + ``` +The response lists the chosen `loadbalancing` algorithm option: + ``` + options: { loadbalancing: least-connections } + ``` +Alternatively, one can query the `routes` API endpoint for the app's route: ``` cf curl /v3/routes/?hosts=MY-APP @@ -64,9 +72,24 @@ To configure per-route load balancing for an application that has not yet been p ### Change Load Balancing of an Existing App -To change the per-route `loadbalancing` setting of an app that has already been pushed, `cf curl` the `/v3/routes` API. +To change the per-route `loadbalancing` setting of an app that has already been pushed, there is cli command update-route. For example, to change an app route's algorithm from `least-connections` to `round-robin`: +1. Execute an update-route command + ``` + cf update-route MY-APP.EXAMPLE.COM --option=loadbalancing=round-robin + ``` +1. To verify the setting, one can query the route via the cli route command: + ``` + cf route MY-APP.EXAMPLE.COM + ``` + +The response lists the changed `loadbalancing` algorithm option: + ``` + options: { loadbalancing: round-robin } + ``` + +Alternatively, it is also possible to `cf curl` the `/v3/routes` API. 1. Execute a `PATCH` request to the targeted API endpoint: From d8dba2512b440ac28355d5999cad4b7dbd7e3665 Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Fri, 31 Jan 2025 14:35:17 +0100 Subject: [PATCH 052/132] Update custom-per-route-options.html.md.erb --- custom-per-route-options.html.md.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 0e6af0eb..516c0200 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -47,7 +47,7 @@ To configure per-route load balancing for an application that has not yet been p cf push -f manifest.yml ``` -1. To verify the setting, one can query the route via the cli route command: +2. To verify the setting, one can query the route via the cli route command: ``` cf route MY-APP.EXAMPLE.COM ``` @@ -79,7 +79,7 @@ For example, to change an app route's algorithm from `least-connections` to `rou ``` cf update-route MY-APP.EXAMPLE.COM --option=loadbalancing=round-robin ``` -1. To verify the setting, one can query the route via the cli route command: +2. To verify the setting, one can query the route via the cli route command: ``` cf route MY-APP.EXAMPLE.COM ``` @@ -104,7 +104,7 @@ Alternatively, it is also possible to `cf curl` the `/v3/routes` API. Where `GUID` is the unique identifier for the route. -1. To confirm the setting, query the `routes` API endpoint for the route: +2. To confirm the setting, query the `routes` API endpoint for the route: ``` cf curl /v3/routes/GUID From 026a39ddc17d585e9d262eba726a0b45aed9ad40 Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Fri, 31 Jan 2025 14:42:40 +0100 Subject: [PATCH 053/132] Update custom-per-route-options.html.md.erb --- custom-per-route-options.html.md.erb | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 516c0200..2ae759d5 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -117,3 +117,42 @@ Alternatively, it is also possible to `cf curl` the `/v3/routes` API. "loadbalancing": "round-robin" } ``` + +### Creating a Route with a specified Load Balancing Algorithm +To create a route with the per-route `loadbalancing` option, you can use the cli command `create-route`. +For example: + +1. Execute a create-route command + ``` + cf create-route MY-APP.EXAMPLE.COM --option=loadbalancing=round-robin + ``` +2. To verify the setting, one can query the route via the cli route command: + ``` + cf route MY-APP.EXAMPLE.COM + ``` + +The response lists the changed `loadbalancing` algorithm option: + ``` + options: { loadbalancing: round-robin } + ``` + +### Mapping a New Route to an Existing App with a specified Load Balancing Algorithm +To map a new route with the per-route `loadbalancing` option, you can use the cli command `map-route`. +If the route does not exist, it will be created with the specified load-balancing option. +If the route does exist, the cli command `update-route` should be used as described before. + +For example: + +1. Execute a map-route command + ``` + cf map-route MY-APP MY-APP.EXAMPLE.COM --option=loadbalancing=round-robin + ``` +2. To verify the setting, one can query the route via the cli route command: + ``` + cf route MY-APP.EXAMPLE.COM + ``` + +The response lists the changed `loadbalancing` algorithm option: + ``` + options: { loadbalancing: round-robin } + ``` From 573474481bf2825ecc42c1a4f09a9e9c8b03bb44 Mon Sep 17 00:00:00 2001 From: Clemens Hoffmann Date: Fri, 31 Jan 2025 19:51:31 +0100 Subject: [PATCH 054/132] Rename all occurences of least-connections --- custom-per-route-options.html.md.erb | 12 ++++++------ deploy-apps/manifest-attributes.html.md.erb | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 7c24e073..62a454b4 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -11,7 +11,7 @@ This greater granularity lets developers tailor optimal routing behavior for app Gorouter supports the following per-route option, described in the section below: - `loadbalancing`: Configures the load balancing algorithm used by Gorouter for this particular route. - - Settings: `round-robin`, `least-connections`. + - Settings: `round-robin`, `least-connection`. ## loadbalancing: Configure Gorouter's Load Balancing Algorithm @@ -20,14 +20,14 @@ The per-route option `loadbalancing` allows configuring the load balancing algor This option supports two settings for load balancing: - `round-robin` distributes the load evenly across all available backends -- `least-connections` directs traffic to the backend with the fewest active connections at any given time, optimizing resource utilization +- `least-connection` directs traffic to the backend with the fewest active connections at any given time, optimizing resource utilization ### Configure Load Balancing in an App Manifest To configure per-route load balancing for an application that has not yet been pushed: -1. In the application manifest, include a `route` definition with an `options: loadbalancing` attribute set to `round-robin` or `least-connections`. For example: +1. In the application manifest, include a `route` definition with an `options: loadbalancing` attribute set to `round-robin` or `least-connection`. For example: ```yaml --- @@ -36,7 +36,7 @@ To configure per-route load balancing for an application that has not yet been p routes: - route: MY-APP.EXAMPLE.COM options: - loadbalancing: least-connections + loadbalancing: least-connection ``` Where `MY-APP` is the name of your app and `MY-APP.EXAMPLE.COM` is the route you want to map to your app. @@ -58,14 +58,14 @@ To configure per-route load balancing for an application that has not yet been p ``` "options": { - "loadbalancing": "least-connections" + "loadbalancing": "least-connection" } ``` ### Change Load Balancing of an Existing App To change the per-route `loadbalancing` setting of an app that has already been pushed, `cf curl` the `/v3/routes` API. -For example, to change an app route's algorithm from `least-connections` to `round-robin`: +For example, to change an app route's algorithm from `least-connection` to `round-robin`: 1. Execute a `PATCH` request to the targeted API endpoint: diff --git a/deploy-apps/manifest-attributes.html.md.erb b/deploy-apps/manifest-attributes.html.md.erb index d5a1a9fc..1cfd39d4 100644 --- a/deploy-apps/manifest-attributes.html.md.erb +++ b/deploy-apps/manifest-attributes.html.md.erb @@ -572,7 +572,7 @@ Under each route, you can optionally include an `options` attribute to configure Available options are: -- `loadbalancing` - defines how Gorouter distributes requests across the application backends. Valid values are `round-robin` and `least-connections`. +- `loadbalancing` - defines how Gorouter distributes requests across the application backends. Valid values are `round-robin` and `least-connection`. For example: @@ -585,7 +585,7 @@ For example: loadbalancing: round-robin - route: example2.com options: - loadbalancing: least-connections + loadbalancing: least-connection ``` #### Manifest attributes From 30327e776430bb0a743b1f85b1d9b70a99f82f48 Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Fri, 31 Jan 2025 10:53:11 -0800 Subject: [PATCH 055/132] PR #541 fix indent --- custom-per-route-options.html.md.erb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 7c24e073..8f8227eb 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -87,10 +87,10 @@ For example, to change an app route's algorithm from `least-connections` to `rou cf curl /v3/routes/GUID ``` - Where `GUID` is the unique identifier for the route. The response lists the new `round-robin` setting: + Where `GUID` is the unique identifier for the route. The response lists the new `round-robin` setting: - ``` - "options": { + ``` + "options": { "loadbalancing": "round-robin" - } - ``` + } + ``` From b1f33a5e57f10eb259c4c2c2d63295b4d9051a55 Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Tue, 4 Feb 2025 14:16:06 +0100 Subject: [PATCH 056/132] Rename least-connections --- custom-per-route-options.html.md.erb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 041cfb99..dc1c0248 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -11,7 +11,7 @@ This greater granularity lets developers tailor optimal routing behavior for app Gorouter supports the following per-route option, described in the section below: - `loadbalancing`: Configures the load balancing algorithm used by Gorouter for this particular route. <%= vars.per_route_lb_version %> - - Settings: `round-robin`, `least-connections`. + - Settings: `round-robin`, `least-connection`. ## loadbalancing: Configure Gorouter's Load Balancing Algorithm @@ -22,14 +22,14 @@ The per-route option `loadbalancing` allows configuring the load balancing algor This option supports two settings for load balancing: - `round-robin` distributes the load evenly across all available backends -- `least-connections` directs traffic to the backend with the fewest active connections at any given time, optimizing resource utilization +- `least-connection` directs traffic to the backend with the fewest active connections at any given time, optimizing resource utilization ### Configure Load Balancing in an App Manifest To configure per-route load balancing for an application that has not yet been pushed: -1. In the application manifest, include a `route` definition with an `options: loadbalancing` attribute set to `round-robin` or `least-connections`. For example: +1. In the application manifest, include a `route` definition with an `options: loadbalancing` attribute set to `round-robin` or `least-connection`. For example: ```yaml --- @@ -38,7 +38,7 @@ To configure per-route load balancing for an application that has not yet been p routes: - route: MY-APP.EXAMPLE.COM options: - loadbalancing: least-connections + loadbalancing: least-connection ``` Where `MY-APP` is the name of your app and `MY-APP.EXAMPLE.COM` is the route you want to map to your app. @@ -55,7 +55,7 @@ To configure per-route load balancing for an application that has not yet been p ``` The response lists the chosen `loadbalancing` algorithm option: ``` - options: { loadbalancing: least-connections } + options: { loadbalancing: least-connection } ``` Alternatively, one can query the `routes` API endpoint for the app's route: @@ -68,14 +68,14 @@ Alternatively, one can query the `routes` API endpoint for the app's route: ``` "options": { - "loadbalancing": "least-connections" + "loadbalancing": "least-connection" } ``` ### Change Load Balancing of an Existing App To change the per-route `loadbalancing` setting of an app that has already been pushed, there is cli command update-route. -For example, to change an app route's algorithm from `least-connections` to `round-robin`: +For example, to change an app route's algorithm from `least-connection` to `round-robin`: 1. Execute an update-route command ``` From 7b24f4476410f3e8a038192b8cf8205ef39fdb71 Mon Sep 17 00:00:00 2001 From: Anita Flegg Date: Tue, 4 Feb 2025 06:07:36 -0800 Subject: [PATCH 057/132] Fix indents + wording consistency (with doc set) changed "one can" to "you can" added colons to procedure steps changed "execute" to "run" removed "via" (Latinisms are not used in CF doc set) --- custom-per-route-options.html.md.erb | 38 +++++++++++++++------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index dc1c0248..a10c36a1 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -3,7 +3,7 @@ title: Configuring per-route options owner: CF for VMs Networking --- -By default, communication between Gorouter and backends is configured via general settings at the platform level. +By default, communication between Gorouter and backends is configured through the general settings at the platform level. This topic describes how to specify per-route Gorouter options scoped at the application level. This greater granularity lets developers tailor optimal routing behavior for applications' unique load profiles or other requirements. @@ -49,15 +49,15 @@ To configure per-route load balancing for an application that has not yet been p cf push -f manifest.yml ``` -2. To verify the setting, one can query the route via the cli route command: +2. To verify the setting, you can query the route using the cli route command: ``` cf route MY-APP.EXAMPLE.COM ``` -The response lists the chosen `loadbalancing` algorithm option: + The response lists the chosen `loadbalancing` algorithm option: ``` options: { loadbalancing: least-connection } ``` -Alternatively, one can query the `routes` API endpoint for the app's route: + Alternatively, you can query the `routes` API endpoint for the app's route: ``` cf curl /v3/routes/?hosts=MY-APP @@ -74,26 +74,25 @@ Alternatively, one can query the `routes` API endpoint for the app's route: ### Change Load Balancing of an Existing App -To change the per-route `loadbalancing` setting of an app that has already been pushed, there is cli command update-route. +To change the per-route `loadbalancing` setting of an app that has already been pushed, you can use the cli command, `update-route`. For example, to change an app route's algorithm from `least-connection` to `round-robin`: -1. Execute an update-route command +1. Run the update-route command: ``` cf update-route MY-APP.EXAMPLE.COM --option=loadbalancing=round-robin ``` -2. To verify the setting, one can query the route via the cli route command: +2. To verify the setting, you can query the route using the cli route command: ``` cf route MY-APP.EXAMPLE.COM ``` -The response lists the changed `loadbalancing` algorithm option: + The response lists the changed `loadbalancing` algorithm option: ``` options: { loadbalancing: round-robin } ``` -Alternatively, it is also possible to `cf curl` the `/v3/routes` API. -1. Execute a `PATCH` request to the targeted API endpoint: - + Alternatively, it is also possible to `cf curl` the `/v3/routes` API. +1. Run the `PATCH` request to the targeted API endpoint: ``` cf curl /v3/routes/GUID -X PATCH -H "Content-type: application/json" \ @@ -112,7 +111,9 @@ Alternatively, it is also possible to `cf curl` the `/v3/routes` API. cf curl /v3/routes/GUID ``` - Where `GUID` is the unique identifier for the route. The response lists the new `round-robin` setting: + Where `GUID` is the unique identifier for the route. + + The response lists the new `round-robin` setting: ``` "options": { @@ -124,37 +125,38 @@ Alternatively, it is also possible to `cf curl` the `/v3/routes` API. To create a route with the per-route `loadbalancing` option, you can use the cli command `create-route`. For example: -1. Execute a create-route command +1. Run the create-route command: ``` cf create-route MY-APP.EXAMPLE.COM --option=loadbalancing=round-robin ``` -2. To verify the setting, one can query the route via the cli route command: +2. To verify the setting, you can query the route using the cli route command: ``` cf route MY-APP.EXAMPLE.COM ``` -The response lists the changed `loadbalancing` algorithm option: + The response lists the changed `loadbalancing` algorithm option: ``` options: { loadbalancing: round-robin } ``` ### Mapping a New Route to an Existing App with a specified Load Balancing Algorithm + To map a new route with the per-route `loadbalancing` option, you can use the cli command `map-route`. If the route does not exist, it will be created with the specified load-balancing option. If the route does exist, the cli command `update-route` should be used as described before. For example: -1. Execute a map-route command +1. Run a map-route command: ``` cf map-route MY-APP MY-APP.EXAMPLE.COM --option=loadbalancing=round-robin ``` -2. To verify the setting, one can query the route via the cli route command: +2. To verify the setting, you can query the route using the cli route command: ``` cf route MY-APP.EXAMPLE.COM ``` -The response lists the changed `loadbalancing` algorithm option: + The response lists the changed `loadbalancing` algorithm option: ``` options: { loadbalancing: round-robin } ``` From 1917ef9ce7397eab0839aae7e5c9c2d64eff35f6 Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Tue, 4 Feb 2025 06:44:43 -0800 Subject: [PATCH 058/132] wording + formatting fixes of recent PRs --- custom-per-route-options.html.md.erb | 2 +- deploy-apps/_c2c_oss_overlay.html.md.erb | 28 ++++++++--------- deploy-apps/manifest-attributes.html.md.erb | 35 +++++++++++---------- 3 files changed, 33 insertions(+), 32 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 39b7fe79..2c239b36 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -13,7 +13,7 @@ Gorouter supports the following per-route option, described in the section below - `loadbalancing`: Configures the load balancing algorithm used by Gorouter for this particular route. <%= vars.per_route_lb_version %> - Settings: `round-robin`, `least-connections`. -## loadbalancing: Configure Gorouter's Load Balancing Algorithm +## Configure Gorouter's Load Balancing Algorithm <%= vars.per_route_lb_version %> diff --git a/deploy-apps/_c2c_oss_overlay.html.md.erb b/deploy-apps/_c2c_oss_overlay.html.md.erb index 63b8439c..4f7868ba 100644 --- a/deploy-apps/_c2c_oss_overlay.html.md.erb +++ b/deploy-apps/_c2c_oss_overlay.html.md.erb @@ -9,7 +9,7 @@ For more information about the overlay network, see [Overlay network](../../concepts/understand-cf-networking.html#overlay-network) in _Container-to-container networking_. -### Understanding the Overlay Network Properties via a Pie Metaphor +### Understanding the Overlay Network Properties using a Pie Metaphor There are two <%= vars.app_runtime_abbr %> properties concerning the overlay network. Before going into the details of the actual <%= vars.app_runtime_abbr @@ -49,15 +49,15 @@ smaller number of possible Diego Cells (which are fed more each). network. The "subnet_prefix_length" property must be smaller than the smallest CIDR address block. - `["10.255.0.0/16"]` + ["10.255.0.0/16"] Slice size for each Diego Cell "subnet_prefix_length" on the silk-controller job The CIDR mask for each Diego Cell's individual overlay network subnet. - For a `/24` subnet for each Diego Cell, enter `24`. This subnet must be + For a /24 subnet for each Diego Cell, enter /24. This subnet must be smaller than all individual IP ranges provided in the "network" property. - `24` + /24 @@ -104,7 +104,7 @@ Max supported number of Diego Cells = (6,144/256) - 2 = 22 ``` All CIDRs provided in the "network" must have a larger prefix length -than the "subnet_prefix_length". +than the "subnet_prefix_length." Here are some examples of invalid combinations of properties: @@ -114,15 +114,15 @@ Here are some examples of invalid combinations of properties: - + - + - +
        Value
        network`["10.255.0.0/20", "10.255.96.0/21", "10.255.200.0/23", "10.255.220.0/24"]`["10.255.0.0/20", "10.255.96.0/21", "10.255.200.0/23", "10.255.220.0/24"]
        subnet_prefix_length`24`24
        Invalid reason"subnet_prefix_length" must be smaller than all CIDRs in the "network". In this case it is the same size as `10.255.220.0/24`."subnet_prefix_length" must be smaller than all CIDRs in the "network." In this case it is the same size as 10.255.220.0/24.
        @@ -134,15 +134,15 @@ Here are some examples of invalid combinations of properties: Value network - `["10.255.0.0/20", "10.255.96.0/21", "10.255.200.0/23", "10.255.220.0/32"]` + ["10.255.0.0/20", "10.255.96.0/21", "10.255.200.0/23", "10.255.220.0/32"] subnet_prefix_length - `24` + 24 Invalid reason - "subnet_prefix_length" must be smaller than all CIDRs in the "network". In this case it is larger than `10.255.220.0/32`. + "subnet_prefix_length" must be smaller than all CIDRs in the "network." In this case it is larger than 10.255.220.0/32. @@ -154,15 +154,15 @@ Here are some examples of invalid combinations of properties: Value network - `["10.255.0.0/20", "10.255.0.0/16"]` + ["10.255.0.0/20", "10.255.0.0/16"] subnet_prefix_length - `24` + 24 Invalid reason - "network" must not have any overlapping IP ranges. In this case `10.255.0.0/20` is a subset of `10.255.0.0/16`. + "network" must not have any overlapping IP ranges. In this case 10.255.0.0/20 is a subset of 10.255.0.0/16. diff --git a/deploy-apps/manifest-attributes.html.md.erb b/deploy-apps/manifest-attributes.html.md.erb index d5a1a9fc..29409026 100644 --- a/deploy-apps/manifest-attributes.html.md.erb +++ b/deploy-apps/manifest-attributes.html.md.erb @@ -135,20 +135,21 @@ You can refer to a buildpack by name in a manifest or a command-line option. The * **Multiple buildpacks:** If you are using multiple buildpacks, you can provide an additional `-b` flag or add an additional value to your manifest: - ``` - --- - ... - buildpacks: - - buildpack_URL - - buildpack_URL - ``` -

        -
          -
        • This feature does not work with the deprecated buildpack attribute. For more information, see - buildpack.
        • -
        • You must specify multiple buildpacks in the correct order: the buildpack uses the app start command given by the final buildpack. For more information, see the multi-buildpack repository on GitHub.
        • -
        -
        + ``` + --- + ... + buildpacks: + - buildpack_URL + - buildpack_URL + ``` + +
        +
          +
        • This feature does not work with the deprecated buildpack attribute. For more information, see + buildpack.
        • +
        • You must specify multiple buildpacks in the correct order: the buildpack uses the app start command given by the final buildpack. For more information, see the multi-buildpack repository on GitHub.
        • +
        +
        The `-b` command-line flag overrides this attribute. @@ -367,9 +368,9 @@ To ensure that platform maintenance does not interrupt your app, <%= vars.recomm The `lifecycle` attribute specifies which application lifecycle to use for staging and running the application. Three variants are supported at the moment: -- [`buildpack`](../../buildpacks/classic.html) -- [`cnb`](../../buildpacks/cnb/index.html) -- [`docker`](push-docker.html) +- [buildpack](../../buildpacks/classic.html) +- [cnb](../../buildpacks/cnb/index.html) +- [docker](push-docker.html) For example: From 35611d3e3f8edc04fa99be95e7a19c4f24c4596b Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Tue, 4 Feb 2025 15:11:01 -0800 Subject: [PATCH 059/132] html format in tables --- deploy-apps/_c2c_oss_overlay.html.md.erb | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/deploy-apps/_c2c_oss_overlay.html.md.erb b/deploy-apps/_c2c_oss_overlay.html.md.erb index 4f7868ba..78799084 100644 --- a/deploy-apps/_c2c_oss_overlay.html.md.erb +++ b/deploy-apps/_c2c_oss_overlay.html.md.erb @@ -36,17 +36,17 @@ smaller number of possible Diego Cells (which are fed more each). - + - + @@ -55,9 +55,9 @@ smaller number of possible Diego Cells (which are fed more each). + For a /24 subnet for each Diego Cell, enter 24 This subnet must be + smaller than all individual IP ranges provided in the network property. +
        Metaphorical PropertyPie Metaphor Property Actual Bosh Property Description Default
        Group of pies and their sizes"network" on the silk-controller jobnetwork on the silk-controller job An list of CIDR address blocks for the overlay network provided as an array of strings. Subnets for each Diego Cell are allocated out of this - network. The "subnet_prefix_length" property must be smaller than the + network. The subnet_prefix_length property must be smaller than the smallest CIDR address block. ["10.255.0.0/16"]Slice size for each Diego Cell "subnet_prefix_length" on the silk-controller job The CIDR mask for each Diego Cell's individual overlay network subnet. - For a /24 subnet for each Diego Cell, enter /24. This subnet must be - smaller than all individual IP ranges provided in the "network" property. - /2424
        @@ -122,7 +122,7 @@ Here are some examples of invalid combinations of properties: Invalid reason - "subnet_prefix_length" must be smaller than all CIDRs in the "network." In this case it is the same size as 10.255.220.0/24. + subnet_prefix_length must be smaller than all CIDRs in the network. In this case it is the same size as 10.255.220.0/24. @@ -142,7 +142,7 @@ Here are some examples of invalid combinations of properties: Invalid reason - "subnet_prefix_length" must be smaller than all CIDRs in the "network." In this case it is larger than 10.255.220.0/32. + subnet_prefix_length must be smaller than all CIDRs in the network. In this case it is larger than 10.255.220.0/32. @@ -162,12 +162,17 @@ Here are some examples of invalid combinations of properties: Invalid reason +<<<<<<< HEAD "network" must not have any overlapping IP ranges. In this case 10.255.0.0/20 is a subset of 10.255.0.0/16. +======= + network must not have any overlapping IP ranges. In this case 10.255.0.0/20 is a subset of 10.255.0.0/16. +>>>>>>> 6a513a0d (html format in tables) ### Changing the Overlay Network + Updating the "network" and "subnet_prefix_length" property is supported. However it will cause container-to-container networking downtime during the deploy while the network update is rolling out across Diego Cells. From ea118bc2a6e0ecb1225d888504060ec9b5ec149f Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Wed, 5 Feb 2025 10:44:53 +0100 Subject: [PATCH 060/132] Update custom-per-route-options.html.md.erb Co-authored-by: Clemens Hoffmann --- custom-per-route-options.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 0c69d2e3..b072cea7 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -51,7 +51,7 @@ To configure per-route load balancing for an application that has not yet been p 2. To verify the setting, you can query the route using the cli route command: ``` - cf route MY-APP.EXAMPLE.COM + cf route EXAMPLE.COM --hostname MY-APP ``` The response lists the chosen `loadbalancing` algorithm option: ``` From 6abfc0393776384fefba2602993fe5d626de4759 Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Wed, 5 Feb 2025 10:45:16 +0100 Subject: [PATCH 061/132] Update custom-per-route-options.html.md.erb Co-authored-by: Clemens Hoffmann --- custom-per-route-options.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index b072cea7..f66ea127 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -55,7 +55,7 @@ To configure per-route load balancing for an application that has not yet been p ``` The response lists the chosen `loadbalancing` algorithm option: ``` - options: { loadbalancing: least-connection } + options: {loadbalancing=least-connection} ``` Alternatively, you can query the `routes` API endpoint for the app's route: From bbfe4782cd289e35b7595518ddcffb293160d40f Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Wed, 5 Feb 2025 10:45:29 +0100 Subject: [PATCH 062/132] Update custom-per-route-options.html.md.erb Co-authored-by: Clemens Hoffmann --- custom-per-route-options.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index f66ea127..f775dd9a 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -49,7 +49,7 @@ To configure per-route load balancing for an application that has not yet been p cf push -f manifest.yml ``` -2. To verify the setting, you can query the route using the cli route command: +2. To verify the option, you can query the route using the `route` command: ``` cf route EXAMPLE.COM --hostname MY-APP ``` From 516dcdb6266da46b3b8437dde5589b24208ef101 Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Wed, 5 Feb 2025 10:46:58 +0100 Subject: [PATCH 063/132] Update custom-per-route-options.html.md.erb --- custom-per-route-options.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index f775dd9a..0264a111 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -74,7 +74,7 @@ To configure per-route load balancing for an application that has not yet been p ### Change Load Balancing of an Existing App -To change the per-route `loadbalancing` setting of an app that has already been pushed, you can use the cli command, `update-route`. +To change the per-route `loadbalancing` option of an app that has already been pushed, you can use the cli command, `update-route`. For example, to change an app route's algorithm from `least-connection` to `round-robin`: From 41954bc068d5def472c2b2de617cb777b8df72f2 Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Wed, 5 Feb 2025 13:56:31 +0100 Subject: [PATCH 064/132] Update custom-per-route-options.html.md.erb --- custom-per-route-options.html.md.erb | 47 +++++++++++++--------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 0264a111..8d44984b 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -49,10 +49,8 @@ To configure per-route load balancing for an application that has not yet been p cf push -f manifest.yml ``` -2. To verify the option, you can query the route using the `route` command: - ``` - cf route EXAMPLE.COM --hostname MY-APP - ``` +2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`). + The response lists the chosen `loadbalancing` algorithm option: ``` options: {loadbalancing=least-connection} @@ -65,16 +63,13 @@ To configure per-route load balancing for an application that has not yet been p Where `MY-APP` is the host attribute of the route. The response lists the chosen `loadbalancing` algorithm setting: - ``` - "options": { - "loadbalancing": "least-connection" - } + "options": {"loadbalancing": "least-connection"} ``` ### Change Load Balancing of an Existing App -To change the per-route `loadbalancing` option of an app that has already been pushed, you can use the cli command, `update-route`. +To change the per-route `loadbalancing` option of an existing route, you can use the cli command, `update-route`. For example, to change an app route's algorithm from `least-connection` to `round-robin`: @@ -82,14 +77,11 @@ For example, to change an app route's algorithm from `least-connection` to `roun ``` cf update-route MY-APP.EXAMPLE.COM --option=loadbalancing=round-robin ``` -2. To verify the setting, you can query the route using the cli route command: - ``` - cf route MY-APP.EXAMPLE.COM - ``` +2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`). The response lists the changed `loadbalancing` algorithm option: ``` - options: { loadbalancing: round-robin } + options: {loadbalancing: round-robin} ``` Alternatively, it is also possible to `cf curl` the `/v3/routes` API. @@ -130,10 +122,7 @@ For example: ``` cf create-route MY-APP.EXAMPLE.COM --option=loadbalancing=round-robin ``` -2. To verify the setting, you can query the route using the cli route command: - ``` - cf route MY-APP.EXAMPLE.COM - ``` +2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`). The response lists the changed `loadbalancing` algorithm option: ``` @@ -142,9 +131,9 @@ For example: ### Mapping a New Route to an Existing App with a specified Load Balancing Algorithm -To map a new route with the per-route `loadbalancing` option, you can use the cli command `map-route`. -If the route does not exist, it will be created with the specified load-balancing option. -If the route does exist, the cli command `update-route` should be used as described before. +To create and map a new route to an existing application with the per-route `loadbalancing` option, you can use the cli command `map-route`. +Note: The command `map-route` supports the `--option` flag only for new routes. +To update an existing route, the command `update-route` must be used as described before. For example: @@ -152,12 +141,20 @@ For example: ``` cf map-route MY-APP MY-APP.EXAMPLE.COM --option=loadbalancing=round-robin ``` -2. To verify the setting, you can query the route using the cli route command: +2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`). + + The response lists the changed `loadbalancing` algorithm option: ``` - cf route MY-APP.EXAMPLE.COM + options: { loadbalancing: round-robin } ``` - The response lists the changed `loadbalancing` algorithm option: +### Retrieve Route Options + +To verify route options, you can query the route using the `route` command: ``` - options: { loadbalancing: round-robin } + cf route EXAMPLE.COM --hostname MY-APP + ``` + The response lists the chosen `loadbalancing` algorithm option, e.g. `loadbalancing`: + ``` + options: {loadbalancing=least-connection} ``` From a5959714ddcec46104bbdf6ac5effd1289a61728 Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Wed, 5 Feb 2025 13:58:32 +0100 Subject: [PATCH 065/132] Update custom-per-route-options.html.md.erb --- custom-per-route-options.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 8d44984b..724399ed 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -139,7 +139,7 @@ For example: 1. Run a map-route command: ``` - cf map-route MY-APP MY-APP.EXAMPLE.COM --option=loadbalancing=round-robin + cf map-route MY-APP EXAMPLE.COM --hostname MY-HOST --option loadbalancing=round-robin ``` 2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`). From b593ca837d24a12f6db42dda0fd35766cd029245 Mon Sep 17 00:00:00 2001 From: Anita Flegg Date: Wed, 5 Feb 2025 05:13:42 -0800 Subject: [PATCH 066/132] Change Note to use note class --- custom-per-route-options.html.md.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 724399ed..96bd559c 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -132,8 +132,10 @@ For example: ### Mapping a New Route to an Existing App with a specified Load Balancing Algorithm To create and map a new route to an existing application with the per-route `loadbalancing` option, you can use the cli command `map-route`. -Note: The command `map-route` supports the `--option` flag only for new routes. -To update an existing route, the command `update-route` must be used as described before. + +

        +The command map-route supports the --option flag only for new routes. +To update an existing route, the command update-route must be used as described before.

        For example: From 32d49f1c8ae3d7583a55400fc36e3caf0ee03ff6 Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Wed, 5 Feb 2025 14:26:25 +0100 Subject: [PATCH 067/132] Rename host MY-APP to MY-HOST --- custom-per-route-options.html.md.erb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 96bd559c..9e077e48 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -36,7 +36,7 @@ To configure per-route load balancing for an application that has not yet been p applications: - name: MY-APP routes: - - route: MY-APP.EXAMPLE.COM + - route: MY-HOST.EXAMPLE.COM options: loadbalancing: least-connection ``` @@ -58,10 +58,10 @@ To configure per-route load balancing for an application that has not yet been p Alternatively, you can query the `routes` API endpoint for the app's route: ``` - cf curl /v3/routes/?hosts=MY-APP + cf curl /v3/routes/?hosts=MY-HOST ``` - Where `MY-APP` is the host attribute of the route. The response lists the chosen `loadbalancing` algorithm setting: + Where `MY-HOST` is the host attribute of the route. The response lists the chosen `loadbalancing` algorithm setting: ``` "options": {"loadbalancing": "least-connection"} @@ -75,7 +75,7 @@ For example, to change an app route's algorithm from `least-connection` to `roun 1. Run the update-route command: ``` - cf update-route MY-APP.EXAMPLE.COM --option=loadbalancing=round-robin + cf update-route EXAMPLE.COM --host MY-HOST--option=loadbalancing=round-robin ``` 2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`). @@ -120,7 +120,7 @@ For example: 1. Run the create-route command: ``` - cf create-route MY-APP.EXAMPLE.COM --option=loadbalancing=round-robin + cf create-route EXAMPLE.COM --host MY-HOST --option=loadbalancing=round-robin ``` 2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`). @@ -154,7 +154,7 @@ For example: To verify route options, you can query the route using the `route` command: ``` - cf route EXAMPLE.COM --hostname MY-APP + cf route EXAMPLE.COM --hostname MY-HOST ``` The response lists the chosen `loadbalancing` algorithm option, e.g. `loadbalancing`: ``` From e57290dd91bbe5cf253457176c78659c837985bd Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Wed, 5 Feb 2025 14:28:50 +0100 Subject: [PATCH 068/132] Correct the chapter vars --- custom-per-route-options.html.md.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 9e077e48..8cce2916 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -75,7 +75,7 @@ For example, to change an app route's algorithm from `least-connection` to `roun 1. Run the update-route command: ``` - cf update-route EXAMPLE.COM --host MY-HOST--option=loadbalancing=round-robin + cf update-route EXAMPLE.COM --host MY-HOST --option=loadbalancing=round-robin ``` 2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`). @@ -114,7 +114,7 @@ For example, to change an app route's algorithm from `least-connection` to `roun } ``` -### Creating a Route with a specified Load Balancing Algorithm +### Creating a Route with a specified Load Balancing Algorithm To create a route with the per-route `loadbalancing` option, you can use the cli command `create-route`. For example: From 4226c08d7547b953e4cfb4e23e6349781cc21552 Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Wed, 5 Feb 2025 14:41:06 +0100 Subject: [PATCH 069/132] Unification --- custom-per-route-options.html.md.erb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 8cce2916..d9314a8c 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -41,7 +41,7 @@ To configure per-route load balancing for an application that has not yet been p loadbalancing: least-connection ``` - Where `MY-APP` is the name of your app and `MY-APP.EXAMPLE.COM` is the route you want to map to your app. + Where `MY-APP` is the name of your app and `MY-HOST.EXAMPLE.COM` is the route you want to map to your app. 1. Push the app with the manifest: @@ -49,11 +49,11 @@ To configure per-route load balancing for an application that has not yet been p cf push -f manifest.yml ``` -2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`). +2. To verify the option value, you can query the route using the cli route command `route` (see chapter `Retrieve Route Options`). The response lists the chosen `loadbalancing` algorithm option: ``` - options: {loadbalancing=least-connection} + options: {loadbalancing=least-connection} ``` Alternatively, you can query the `routes` API endpoint for the app's route: @@ -81,7 +81,7 @@ For example, to change an app route's algorithm from `least-connection` to `roun The response lists the changed `loadbalancing` algorithm option: ``` - options: {loadbalancing: round-robin} + options: {loadbalancing=round-robin} ``` Alternatively, it is also possible to `cf curl` the `/v3/routes` API. @@ -122,11 +122,11 @@ For example: ``` cf create-route EXAMPLE.COM --host MY-HOST --option=loadbalancing=round-robin ``` -2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`). +2. To verify the option value, you can query the route using the cli route command `route` (see chapter `Retrieve Route Options`). The response lists the changed `loadbalancing` algorithm option: ``` - options: { loadbalancing: round-robin } + options: {loadbalancing=round-robin} ``` ### Mapping a New Route to an Existing App with a specified Load Balancing Algorithm @@ -143,11 +143,11 @@ For example: ``` cf map-route MY-APP EXAMPLE.COM --hostname MY-HOST --option loadbalancing=round-robin ``` -2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`). +2. To verify the option value, you can query the route using the cli route command `route` (see chapter `Retrieve Route Options`). The response lists the changed `loadbalancing` algorithm option: ``` - options: { loadbalancing: round-robin } + options: { loadbalancing=round-robin } ``` ### Retrieve Route Options @@ -158,5 +158,5 @@ To verify route options, you can query the route using the `route` command: ``` The response lists the chosen `loadbalancing` algorithm option, e.g. `loadbalancing`: ``` - options: {loadbalancing=least-connection} + options: {loadbalancing=least-connection} ``` From 9180f0048c1c5e8ac5460a4f21ce53a65fb3c0df Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Wed, 5 Feb 2025 18:06:32 +0100 Subject: [PATCH 070/132] Remove repeating route check sections --- custom-per-route-options.html.md.erb | 78 ++++++++++------------------ 1 file changed, 28 insertions(+), 50 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index d9314a8c..4ad56869 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -49,42 +49,18 @@ To configure per-route load balancing for an application that has not yet been p cf push -f manifest.yml ``` -2. To verify the option value, you can query the route using the cli route command `route` (see chapter `Retrieve Route Options`). - - The response lists the chosen `loadbalancing` algorithm option: - ``` - options: {loadbalancing=least-connection} - ``` - Alternatively, you can query the `routes` API endpoint for the app's route: - - ``` - cf curl /v3/routes/?hosts=MY-HOST - ``` - - Where `MY-HOST` is the host attribute of the route. The response lists the chosen `loadbalancing` algorithm setting: - - ``` - "options": {"loadbalancing": "least-connection"} - ``` - ### Change Load Balancing of an Existing App To change the per-route `loadbalancing` option of an existing route, you can use the cli command, `update-route`. -For example, to change an app route's algorithm from `least-connection` to `round-robin`: +For example, to change an app route's algorithm from `least-connection` to `round-robin`, you can run the `update-route` command: -1. Run the update-route command: ``` - cf update-route EXAMPLE.COM --host MY-HOST --option=loadbalancing=round-robin + cf update-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin ``` -2. To verify the option value, you can query the route using the cli route command `route` (see Chapter `Retrieve Route Options`). - The response lists the changed `loadbalancing` algorithm option: - ``` - options: {loadbalancing=round-robin} - ``` +Alternatively, it is also possible to `cf curl` the `/v3/routes` API. - Alternatively, it is also possible to `cf curl` the `/v3/routes` API. 1. Run the `PATCH` request to the targeted API endpoint: ``` @@ -98,7 +74,7 @@ For example, to change an app route's algorithm from `least-connection` to `roun Where `GUID` is the unique identifier for the route. -2. To confirm the setting, query the `routes` API endpoint for the route: +1. To confirm the setting, query the `routes` API endpoint for the route: ``` cf curl /v3/routes/GUID @@ -115,48 +91,50 @@ For example, to change an app route's algorithm from `least-connection` to `roun ``` ### Creating a Route with a specified Load Balancing Algorithm -To create a route with the per-route `loadbalancing` option, you can use the cli command `create-route`. -For example: -1. Run the create-route command: - ``` - cf create-route EXAMPLE.COM --host MY-HOST --option=loadbalancing=round-robin - ``` -2. To verify the option value, you can query the route using the cli route command `route` (see chapter `Retrieve Route Options`). +To create a route with a per-route `loadbalancing` option, you can use the cli command `create-route`. +For example: - The response lists the changed `loadbalancing` algorithm option: ``` - options: {loadbalancing=round-robin} + cf create-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin ``` -### Mapping a New Route to an Existing App with a specified Load Balancing Algorithm +### Mapping a New Route to an Existing App with a specified Load Balancing Algorithm To create and map a new route to an existing application with the per-route `loadbalancing` option, you can use the cli command `map-route`. +For example: + + ``` + cf map-route MY-APP EXAMPLE.COM --hostname MY-HOST --option loadbalancing=round-robin + ``` +

        The command map-route supports the --option flag only for new routes. To update an existing route, the command update-route must be used as described before.

        -For example: +### Retrieve Route Options + +To verify route options, you can query the route using the `route` command: -1. Run a map-route command: ``` - cf map-route MY-APP EXAMPLE.COM --hostname MY-HOST --option loadbalancing=round-robin + cf route EXAMPLE.COM --hostname MY-HOST ``` -2. To verify the option value, you can query the route using the cli route command `route` (see chapter `Retrieve Route Options`). - - The response lists the changed `loadbalancing` algorithm option: + + The response lists the chosen `loadbalancing` algorithm option, e.g. `least-connection`: + ``` - options: { loadbalancing=round-robin } + options: {loadbalancing=least-connection} ``` -### Retrieve Route Options + Alternatively, you can query the `routes` API endpoint for the app's route: -To verify route options, you can query the route using the `route` command: ``` - cf route EXAMPLE.COM --hostname MY-HOST + cf curl /v3/routes/?hosts=MY-HOST ``` - The response lists the chosen `loadbalancing` algorithm option, e.g. `loadbalancing`: + + Where `MY-HOST` is the host attribute of the route. The response lists the chosen `loadbalancing` algorithm option as well: + ``` - options: {loadbalancing=least-connection} + "options": {"loadbalancing": "least-connection"} ``` From 907f00a54c2d77fd6255a65aa160e3f718a87236 Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Wed, 5 Feb 2025 18:23:41 +0100 Subject: [PATCH 071/132] Chapter adjustments --- custom-per-route-options.html.md.erb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 4ad56869..33ba556b 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -49,7 +49,7 @@ To configure per-route load balancing for an application that has not yet been p cf push -f manifest.yml ``` -### Change Load Balancing of an Existing App +### Change Load Balancing of an Existing Route To change the per-route `loadbalancing` option of an existing route, you can use the cli command, `update-route`. @@ -74,7 +74,7 @@ Alternatively, it is also possible to `cf curl` the `/v3/routes` API. Where `GUID` is the unique identifier for the route. -1. To confirm the setting, query the `routes` API endpoint for the route: +1. To confirm the option, query the `routes` API endpoint for the route: ``` cf curl /v3/routes/GUID @@ -82,7 +82,7 @@ Alternatively, it is also possible to `cf curl` the `/v3/routes` API. Where `GUID` is the unique identifier for the route. - The response lists the new `round-robin` setting: + The response lists the new `round-robin` option: ``` "options": { @@ -90,7 +90,7 @@ Alternatively, it is also possible to `cf curl` the `/v3/routes` API. } ``` -### Creating a Route with a specified Load Balancing Algorithm +### Creating a Route with a specified Load Balancing Algorithm To create a route with a per-route `loadbalancing` option, you can use the cli command `create-route`. For example: @@ -127,7 +127,7 @@ To verify route options, you can query the route using the `route` command: options: {loadbalancing=least-connection} ``` - Alternatively, you can query the `routes` API endpoint for the app's route: + Alternatively, you can query the `routes` API endpoint for a route: ``` cf curl /v3/routes/?hosts=MY-HOST From a4f163742d333772fd429bb8b6d6fc7993aff301 Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Wed, 5 Feb 2025 11:35:18 -0800 Subject: [PATCH 072/132] clean up cherry-pick --- deploy-apps/_c2c_oss_overlay.html.md.erb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/deploy-apps/_c2c_oss_overlay.html.md.erb b/deploy-apps/_c2c_oss_overlay.html.md.erb index 78799084..840f118a 100644 --- a/deploy-apps/_c2c_oss_overlay.html.md.erb +++ b/deploy-apps/_c2c_oss_overlay.html.md.erb @@ -162,11 +162,7 @@ Here are some examples of invalid combinations of properties: Invalid reason -<<<<<<< HEAD - "network" must not have any overlapping IP ranges. In this case 10.255.0.0/20 is a subset of 10.255.0.0/16. -======= network must not have any overlapping IP ranges. In this case 10.255.0.0/20 is a subset of 10.255.0.0/16. ->>>>>>> 6a513a0d (html format in tables) From f71173687f6468badd0e97529a39df3b80d60f8b Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Thu, 6 Feb 2025 12:01:04 +0100 Subject: [PATCH 073/132] Last review round --- custom-per-route-options.html.md.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 33ba556b..8c29de93 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -59,7 +59,7 @@ For example, to change an app route's algorithm from `least-connection` to `roun cf update-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin ``` -Alternatively, it is also possible to `cf curl` the `/v3/routes` API. +Alternatively, it is also possible to update the per-route load balancing option via the `/v3/routes` API. 1. Run the `PATCH` request to the targeted API endpoint: @@ -90,7 +90,7 @@ Alternatively, it is also possible to `cf curl` the `/v3/routes` API. } ``` -### Creating a Route with a specified Load Balancing Algorithm +### Create a Route with a specific Load Balancing Algorithm To create a route with a per-route `loadbalancing` option, you can use the cli command `create-route`. For example: @@ -99,7 +99,7 @@ For example: cf create-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin ``` -### Mapping a New Route to an Existing App with a specified Load Balancing Algorithm +### Map a Route to an Existing App with specific Load Balancing Algorithm To create and map a new route to an existing application with the per-route `loadbalancing` option, you can use the cli command `map-route`. From 985c202247030151255d320a99869e81dfd37ebc Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Thu, 6 Feb 2025 12:27:09 +0100 Subject: [PATCH 074/132] Add api way to create a route with a per-route option --- custom-per-route-options.html.md.erb | 32 +++++++++++++--------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 8c29de93..83de6725 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -61,7 +61,7 @@ For example, to change an app route's algorithm from `least-connection` to `roun Alternatively, it is also possible to update the per-route load balancing option via the `/v3/routes` API. -1. Run the `PATCH` request to the targeted API endpoint: +Run the `PATCH` request to the targeted API endpoint: ``` cf curl /v3/routes/GUID -X PATCH -H "Content-type: application/json" \ @@ -74,22 +74,6 @@ Alternatively, it is also possible to update the per-route load balancing option Where `GUID` is the unique identifier for the route. -1. To confirm the option, query the `routes` API endpoint for the route: - - ``` - cf curl /v3/routes/GUID - ``` - - Where `GUID` is the unique identifier for the route. - - The response lists the new `round-robin` option: - - ``` - "options": { - "loadbalancing": "round-robin" - } - ``` - ### Create a Route with a specific Load Balancing Algorithm To create a route with a per-route `loadbalancing` option, you can use the cli command `create-route`. @@ -99,6 +83,20 @@ For example: cf create-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin ``` +Alternatively, it is also possible to create a route with a per-route load balancing option via the `/v3/routes` API: + + ``` + cf curl /v3/routes -X POST -H "Content-type: application/json" \ + -d '{ + "host": "MY-HOST", + "path": "MY-PATH", + ... + "options": { + "loadbalancing": "round-robin" + } + }' + ``` + ### Map a Route to an Existing App with specific Load Balancing Algorithm To create and map a new route to an existing application with the per-route `loadbalancing` option, you can use the cli command `map-route`. From 864568685ab4cbcf3a4e5ee1df2492ca0d00b2e2 Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Thu, 6 Feb 2025 12:31:45 +0100 Subject: [PATCH 075/132] Tags correction --- custom-per-route-options.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 83de6725..560ab957 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -49,7 +49,7 @@ To configure per-route load balancing for an application that has not yet been p cf push -f manifest.yml ``` -### Change Load Balancing of an Existing Route +### Change Load Balancing Algorithm of an Existing Route To change the per-route `loadbalancing` option of an existing route, you can use the cli command, `update-route`. From c823864511fe9cab95195f3423d7599378931d7f Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Thu, 6 Feb 2025 14:16:29 +0100 Subject: [PATCH 076/132] word-level improvement Co-authored-by: Clemens Hoffmann --- custom-per-route-options.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 560ab957..711cd7c4 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -113,7 +113,7 @@ To update an existing route, the command update-route must be used ### Retrieve Route Options -To verify route options, you can query the route using the `route` command: +To read route options, you can query the route using the `route` command: ``` cf route EXAMPLE.COM --hostname MY-HOST From a6546209d78c23b8dc1801e8497b77fcb41755d2 Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Thu, 6 Feb 2025 14:21:56 +0100 Subject: [PATCH 077/132] add cf routes command doc --- custom-per-route-options.html.md.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 711cd7c4..0b0d560e 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -136,3 +136,5 @@ To read route options, you can query the route using the `route` command: ``` "options": {"loadbalancing": "least-connection"} ``` + +To retrieve all the routes with the corresponding options in a space of an organization, you can use `routes` command. From 8cdb9ec82371eff8d2e0988b4435f4560aa317eb Mon Sep 17 00:00:00 2001 From: Daria <66593181+Dariquest@users.noreply.github.com> Date: Thu, 6 Feb 2025 17:45:43 +0100 Subject: [PATCH 078/132] Fix the formatting of the console output --- custom-per-route-options.html.md.erb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 0b0d560e..c3c47600 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -45,7 +45,7 @@ To configure per-route load balancing for an application that has not yet been p 1. Push the app with the manifest: - ``` + ```console cf push -f manifest.yml ``` @@ -55,7 +55,7 @@ To change the per-route `loadbalancing` option of an existing route, you can use For example, to change an app route's algorithm from `least-connection` to `round-robin`, you can run the `update-route` command: - ``` + ```console cf update-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin ``` @@ -63,7 +63,7 @@ Alternatively, it is also possible to update the per-route load balancing option Run the `PATCH` request to the targeted API endpoint: - ``` + ```console cf curl /v3/routes/GUID -X PATCH -H "Content-type: application/json" \ -d '{ "options": { @@ -79,13 +79,13 @@ Run the `PATCH` request to the targeted API endpoint: To create a route with a per-route `loadbalancing` option, you can use the cli command `create-route`. For example: - ``` + ```console cf create-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin ``` Alternatively, it is also possible to create a route with a per-route load balancing option via the `/v3/routes` API: - ``` + ```console cf curl /v3/routes -X POST -H "Content-type: application/json" \ -d '{ "host": "MY-HOST", @@ -103,7 +103,7 @@ To create and map a new route to an existing application with the per-route `loa For example: - ``` + ```console cf map-route MY-APP EXAMPLE.COM --hostname MY-HOST --option loadbalancing=round-robin ``` @@ -115,26 +115,26 @@ To update an existing route, the command update-route must be used To read route options, you can query the route using the `route` command: - ``` + ```console cf route EXAMPLE.COM --hostname MY-HOST ``` The response lists the chosen `loadbalancing` algorithm option, e.g. `least-connection`: - ``` + ```console options: {loadbalancing=least-connection} ``` Alternatively, you can query the `routes` API endpoint for a route: - ``` + ```console cf curl /v3/routes/?hosts=MY-HOST ``` Where `MY-HOST` is the host attribute of the route. The response lists the chosen `loadbalancing` algorithm option as well: - ``` + ```console "options": {"loadbalancing": "least-connection"} ``` -To retrieve all the routes with the corresponding options in a space of an organization, you can use `routes` command. +To retrieve all the routes with the corresponding options in a space of an organization, you can use the `routes` command. From 89eaca99c8c217e328a90ac201b05f5113e7bdfe Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Mon, 10 Feb 2025 15:31:17 -0800 Subject: [PATCH 079/132] TNZ-23131 rm ssh app access via App ID and add note b/c no longer supported --- deploy-apps/ssh-apps.html.md.erb | 101 +------------------------------ 1 file changed, 3 insertions(+), 98 deletions(-) diff --git a/deploy-apps/ssh-apps.html.md.erb b/deploy-apps/ssh-apps.html.md.erb index 731b86cf..a3081e3e 100644 --- a/deploy-apps/ssh-apps.html.md.erb +++ b/deploy-apps/ssh-apps.html.md.erb @@ -148,17 +148,11 @@ _<%= vars.app_runtime_abbr %> Environment Variables_. ## App SSH access without cf CLI In addition to `cf ssh`, you can use other SSH clients such as `ssh`, `scp`, or `sftp` to access -your app, if you have SSH permissions. +your app via its process GUID, if you have SSH permissions. -Follow one of these procedures to securely connect to an app instance by logging in with a -specially-formed user name that passes information to the SSH proxy running on the host VM. For the -password, use a one-time SSH authorization code generated by -[cf ssh-code](http://cli.cloudfoundry.org/en-US/cf/ssh-code.html). +> **Note** Previous versions of <%= vars.app_runtime_abbr %> supported SSH access to apps via the app GUID, as archived at Access app SSH using app GUID -* [Access app SSH using process GUID](#process-guid) -* [Access app sSH using app GUID](#app-guid) - -### Access app SSH using process GUID +To securely connect to an app instance using its process GUID: 1. Query the `/v2/info` endpoint of the Cloud Controller in your deployment. Record the domain name and port number of the `app_ssh_endpoint` field, and the `app_ssh_host_key_fingerprint` field. You @@ -224,95 +218,6 @@ authorization code returned by `cf ssh-code`. For example: You have now securely connected to the app instance. -### Access app SSH using app GUID - -1. Display the GUID of your target app by running: - - ```console - cf app APP-NAME --guid` - ``` - Where `APP-NAME` is the name of the app. - - For example: -
        -    $ cf app my-app --guid
        -    abcdefab-1234-5678-abcd-1234abcd1234
        -    
        - -1. Query the `/v2/info` endpoint of the Cloud Controller in your deployment. Record the domain name -and port number of the `app_ssh_endpoint` field, and the `app_ssh_host_key_fingerprint` field. You can compare the `app_ssh_host_key_fingerprint` with the fingerprint returned by the SSH proxy on your target VM. For example: - -
        -    $ cf curl /v2/info
        -    {
        -         ...
        -         "app_ssh_endpoint": "ssh.example.com:2222",
        -         "app_ssh_host_key_fingerprint": "a6:14:c0:ea:42:07:b2:f7:53:2c:0b:60:e0:00:21:6c",
        -         ...
        -    }
        -    
        - - In this example: -
          -
        • The domain name is ssh.example.com.
        • -
        • The port number is 2222.
        • -
        • The fingerprint is a6:14:c0:ea:42:07:b2:f7:53:2c:0b:60:e0:00:21:6c.
        • -
        - - -1. Run `cf ssh-code` to obtain a one-time authorization code that substitutes for an SSH password. You can run `cf ssh-code | pbcopy` to copy the code to the clipboard. For example: - -
        -    $ cf ssh-code
        -    E1x89n
        -    
        - -1. Run your `ssh` or other command to connect to the app instance. - - SSH into the container hosting the first instance of your app by running: - - ```console - ssh -p `SSH-PORT` cf:APP-GUID/APP-INSTANCE-INDEX@SSH-ENDPOINT - ``` - - Where: -
          -
        • SSH-PORT is the port number recorded in earlier steps.
        • -
        • APP-GUID comes from earlier steps.
        • -
        • APP-INSTANCE-INDEX is the index of the instance that you want to access.
        • -
        • SSH-ENDPOINT comes from the earlier steps and is in the form ssh.MY-DOMAIN.com.
        • -
        - - For example: -
        -        $ ssh -p 2222 cf:abcdefab-1234-5678-abcd-1234abcd1234/0@ssh.example.com
        -        
        - - Or you can use `scp` to transfer files by running one of the following commands: - - ```console - scp -P `SSH-PORT` -o User=cf:APP-GUID/APP-INSTANCE-INDEX ssh.MY-DOMAIN.com:REMOTE-FILE-TO-RETRIEVE LOCAL-FILE-DESTINATION - ``` - ```console - scp -P `SSH-PORT` -o User=cf:APP-GUID/APP-INSTANCE-INDEX LOCAL-FILE-TO-COPY ssh.MY-DOMAIN.com:REMOTE-FILE-DESTINATION - ``` - - Or you can use `ssh` piped with `cat` to transfer the file: - - ```console - cat local_file_path | cf ssh MY-AWESOME-APP -c "cat > remote_file_path" - ``` - -2. When the SSH proxy reports its RSA fingerprint, confirm that it matches the `app_ssh_host_key_fingerprint` recorded previously. When prompted for a password, paste in the authorization code returned by `cf ssh-code`, for example: - -
        -    $ ssh -p 2222 cf:abcdefab-1234-5678-abcd-1234abcd1234/0@ssh.MY-DOMAIN.com
        -    The authenticity of host '[ssh.MY-DOMAIN.com]:2222 ([203.0.113.5]:2222)' can't be established.
        -    RSA key fingerprint is a6:14:c0:ea:42:07:b2:f7:53:2c:0b:60:e0:00:21:6c.
        -    Are you sure you want to continue connecting (yes/no)? yes
        -    Warning: Permanently added '[ssh.MY-DOMAIN.com]:2222 [203.0.113.5]:2222' (RSA) to the list of known hosts.
        -    cf:d0a2e11d-e6ca-4120-b32d-140@ssh.ketchup.cf-app.com's password:
        -    vcap@ce4l5164kws:~$
        -    
        - -You have now securely connected to the app instance. ## SSH proxy security configuration From 08b9a0044b227a7c991712f5d2e8743af5821d9d Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Tue, 18 Feb 2025 06:41:01 -0800 Subject: [PATCH 080/132] reduce console code snippets indent to 2 spaces --- custom-per-route-options.html.md.erb | 92 ++++++++++++++-------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index c3c47600..552217c2 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -51,90 +51,90 @@ To configure per-route load balancing for an application that has not yet been p ### Change Load Balancing Algorithm of an Existing Route -To change the per-route `loadbalancing` option of an existing route, you can use the cli command, `update-route`. +To change the per-route `loadbalancing` option of an existing route, you can use the cli command, `update-route`. For example, to change an app route's algorithm from `least-connection` to `round-robin`, you can run the `update-route` command: - ```console - cf update-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin - ``` + ```console + cf update-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin + ``` Alternatively, it is also possible to update the per-route load balancing option via the `/v3/routes` API. Run the `PATCH` request to the targeted API endpoint: - ```console - cf curl /v3/routes/GUID -X PATCH -H "Content-type: application/json" \ - -d '{ - "options": { - "loadbalancing": "round-robin" - } - }' - ``` + ```console + cf curl /v3/routes/GUID -X PATCH -H "Content-type: application/json" \ + -d '{ + "options": { + "loadbalancing": "round-robin" + } + }' + ``` - Where `GUID` is the unique identifier for the route. + Where `GUID` is the unique identifier for the route. ### Create a Route with a specific Load Balancing Algorithm -To create a route with a per-route `loadbalancing` option, you can use the cli command `create-route`. +To create a route with a per-route `loadbalancing` option, you can use the cli command `create-route`. For example: - ```console - cf create-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin - ``` + ```console + cf create-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin + ``` Alternatively, it is also possible to create a route with a per-route load balancing option via the `/v3/routes` API: - ```console - cf curl /v3/routes -X POST -H "Content-type: application/json" \ - -d '{ - "host": "MY-HOST", - "path": "MY-PATH", - ... - "options": { - "loadbalancing": "round-robin" - } - }' - ``` + ```console + cf curl /v3/routes -X POST -H "Content-type: application/json" \ + -d '{ + "host": "MY-HOST", + "path": "MY-PATH", + ... + "options": { + "loadbalancing": "round-robin" + } + }' + ``` ### Map a Route to an Existing App with specific Load Balancing Algorithm -To create and map a new route to an existing application with the per-route `loadbalancing` option, you can use the cli command `map-route`. +To create and map a new route to an existing application with the per-route `loadbalancing` option, you can use the cli command `map-route`. For example: - ```console - cf map-route MY-APP EXAMPLE.COM --hostname MY-HOST --option loadbalancing=round-robin - ``` + ```console + cf map-route MY-APP EXAMPLE.COM --hostname MY-HOST --option loadbalancing=round-robin + ```

        -The command map-route supports the --option flag only for new routes. +The command map-route supports the --option flag only for new routes. To update an existing route, the command update-route must be used as described before.

        ### Retrieve Route Options To read route options, you can query the route using the `route` command: - ```console - cf route EXAMPLE.COM --hostname MY-HOST - ``` + ```console + cf route EXAMPLE.COM --hostname MY-HOST + ``` The response lists the chosen `loadbalancing` algorithm option, e.g. `least-connection`: - ```console - options: {loadbalancing=least-connection} - ``` + ```console + options: {loadbalancing=least-connection} + ``` Alternatively, you can query the `routes` API endpoint for a route: - ```console - cf curl /v3/routes/?hosts=MY-HOST - ``` + ```console + cf curl /v3/routes/?hosts=MY-HOST + ``` - Where `MY-HOST` is the host attribute of the route. The response lists the chosen `loadbalancing` algorithm option as well: + Where `MY-HOST` is the host attribute of the route. The response lists the chosen `loadbalancing` algorithm option as well: - ```console - "options": {"loadbalancing": "least-connection"} - ``` + ```console + "options": {"loadbalancing": "least-connection"} + ``` To retrieve all the routes with the corresponding options in a space of an organization, you can use the `routes` command. From f3269144bc4d0db1b9b249c784fe4ab04439bec7 Mon Sep 17 00:00:00 2001 From: Shwetha Gururaj Date: Tue, 18 Feb 2025 11:50:18 -0500 Subject: [PATCH 081/132] Include revision command info --- revisions.html.md.erb | 64 +++++++++++++++++++++++++++++++------------ 1 file changed, 47 insertions(+), 17 deletions(-) diff --git a/revisions.html.md.erb b/revisions.html.md.erb index 20cabf51..b321aef2 100644 --- a/revisions.html.md.erb +++ b/revisions.html.md.erb @@ -63,43 +63,66 @@ This section describes how to use CAPI endpoints for viewing revisions. To list revisions for an app: -1. Retrieve the GUID of the app by running: - +1. Using the `revisions` command: + ``` - cf app APP-NAME --guid + cf revisions APP-NAME ``` Where `APP-NAME` is the name of your app. -1. Run: +1. Using the `curl` command + + 1. Retrieve the GUID of the app by running: - ``` - cf curl /v3/apps/GUID/revisions - ``` - Where `GUID` is the GUID you retrieved in an earlier step. + ``` + cf app APP-NAME --guid + ``` + Where `APP-NAME` is the name of your app. + + 1. Run: + + ``` + cf curl /v3/apps/GUID/revisions + ``` + Where `GUID` is the GUID you retrieved in an earlier step. ### List deployed revisions for an app Deployed revisions are revisions linked to started processes in an app. To list deployed revisions: -1. Retrieve the GUID of the app by running: - +1. Using the `revision` command: ``` - cf app APP-NAME --guid + cf revision APP-NAME ``` Where `APP-NAME` is the name of your app. -1. Run: +1. Using the `curl` command + 1. Retrieve the GUID of the app by running: - ``` - cf curl /v3/apps/GUID/revisions/deployed - ``` - Where `GUID` is the GUID you retrieved in an earlier step. + ``` + cf app APP-NAME --guid + ``` + Where `APP-NAME` is the name of your app. + + 1. Run: + + ``` + cf curl /v3/apps/GUID/revisions/deployed + ``` + Where `GUID` is the GUID you retrieved in an earlier step. ### Retrieve a revision To retrieve a revision: -1. Run: +1. Using the `revision` command: + ``` + cf revision APP-NAME --version VERSION + ``` + Where `APP-NAME` is the name of your APP and `VERSION` is the revision version. + +1. Using the `curl` command + 1. Run: ``` cf curl /v3/revisions/GUID @@ -111,6 +134,13 @@ To retrieve a revision: To roll back to a previous revision: +1. Using the `rollback` command: + ``` + cf rollback APP-NAME --version VERSION + ``` + Where `APP-NAME` is the name of your APP and `VERSION` is the revision version you want to rollback to. + + 1. Retrieve the GUID of the app by running: ``` From fb70756ad8c5dffe7485f880ef09de01fc6bb56d Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Tue, 18 Feb 2025 11:07:05 -0800 Subject: [PATCH 082/132] reduce console code snippets indent to 0 spaces --- custom-per-route-options.html.md.erb | 89 ++++++++++++++-------------- 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 552217c2..3e85feb2 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -55,47 +55,46 @@ To change the per-route `loadbalancing` option of an existing route, you can use For example, to change an app route's algorithm from `least-connection` to `round-robin`, you can run the `update-route` command: - ```console - cf update-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin - ``` +```console +cf update-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin +``` Alternatively, it is also possible to update the per-route load balancing option via the `/v3/routes` API. Run the `PATCH` request to the targeted API endpoint: - ```console - cf curl /v3/routes/GUID -X PATCH -H "Content-type: application/json" \ - -d '{ - "options": { - "loadbalancing": "round-robin" - } - }' - ``` - - Where `GUID` is the unique identifier for the route. +```console +cf curl /v3/routes/GUID -X PATCH -H "Content-type: application/json" \ + -d '{ + "options": { + "loadbalancing": "round-robin" + } + }' +``` +Where `GUID` is the unique identifier for the route. ### Create a Route with a specific Load Balancing Algorithm To create a route with a per-route `loadbalancing` option, you can use the cli command `create-route`. For example: - ```console - cf create-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin - ``` +```console +cf create-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin +``` Alternatively, it is also possible to create a route with a per-route load balancing option via the `/v3/routes` API: - ```console - cf curl /v3/routes -X POST -H "Content-type: application/json" \ - -d '{ - "host": "MY-HOST", - "path": "MY-PATH", - ... - "options": { - "loadbalancing": "round-robin" - } - }' - ``` +```console +cf curl /v3/routes -X POST -H "Content-type: application/json" \ + -d '{ + "host": "MY-HOST", + "path": "MY-PATH", + ... + "options": { + "loadbalancing": "round-robin" + } + }' +``` ### Map a Route to an Existing App with specific Load Balancing Algorithm @@ -103,9 +102,9 @@ To create and map a new route to an existing application with the per-route `loa For example: - ```console - cf map-route MY-APP EXAMPLE.COM --hostname MY-HOST --option loadbalancing=round-robin - ``` +```console +cf map-route MY-APP EXAMPLE.COM --hostname MY-HOST --option loadbalancing=round-robin +```

        The command map-route supports the --option flag only for new routes. @@ -115,26 +114,26 @@ To update an existing route, the command update-route must be used To read route options, you can query the route using the `route` command: - ```console - cf route EXAMPLE.COM --hostname MY-HOST - ``` +```console +cf route EXAMPLE.COM --hostname MY-HOST +``` - The response lists the chosen `loadbalancing` algorithm option, e.g. `least-connection`: + The response lists the chosen `loadbalancing` algorithm option, e.g. `least-connection`: - ```console - options: {loadbalancing=least-connection} - ``` +```console +options: {loadbalancing=least-connection} +``` - Alternatively, you can query the `routes` API endpoint for a route: + Alternatively, you can query the `routes` API endpoint for a route: - ```console - cf curl /v3/routes/?hosts=MY-HOST - ``` +```console +cf curl /v3/routes/?hosts=MY-HOST +``` - Where `MY-HOST` is the host attribute of the route. The response lists the chosen `loadbalancing` algorithm option as well: +Where `MY-HOST` is the host attribute of the route. The response lists the chosen `loadbalancing` algorithm option as well: - ```console - "options": {"loadbalancing": "least-connection"} - ``` +```console + "options": {"loadbalancing": "least-connection"} +``` To retrieve all the routes with the corresponding options in a space of an organization, you can use the `routes` command. From 5ff2287bba76ffa0c6d39bd4471b6f7eb40b2fcd Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Tue, 18 Feb 2025 13:43:24 -0800 Subject: [PATCH 083/132] PR #546 --- revisions.html.md.erb | 88 +++++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 41 deletions(-) diff --git a/revisions.html.md.erb b/revisions.html.md.erb index b321aef2..b844b552 100644 --- a/revisions.html.md.erb +++ b/revisions.html.md.erb @@ -63,14 +63,14 @@ This section describes how to use CAPI endpoints for viewing revisions. To list revisions for an app: -1. Using the `revisions` command: +* Using the `revisions` command: ``` cf revisions APP-NAME ``` Where `APP-NAME` is the name of your app. -1. Using the `curl` command +* Using the `curl` command 1. Retrieve the GUID of the app by running: @@ -90,13 +90,15 @@ To list revisions for an app: Deployed revisions are revisions linked to started processes in an app. To list deployed revisions: -1. Using the `revision` command: +* Using the `revision` command: + ``` cf revision APP-NAME ``` Where `APP-NAME` is the name of your app. -1. Using the `curl` command +* Using the `curl` command + 1. Retrieve the GUID of the app by running: ``` @@ -115,13 +117,15 @@ Deployed revisions are revisions linked to started processes in an app. To list To retrieve a revision: -1. Using the `revision` command: +* Using the `revision` command: + ``` cf revision APP-NAME --version VERSION ``` Where `APP-NAME` is the name of your APP and `VERSION` is the revision version. -1. Using the `curl` command +* Using the `curl` command: + 1. Run: ``` @@ -134,46 +138,48 @@ To retrieve a revision: To roll back to a previous revision: -1. Using the `rollback` command: +* Using the `rollback` command: + ``` cf rollback APP-NAME --version VERSION ``` Where `APP-NAME` is the name of your APP and `VERSION` is the revision version you want to rollback to. - -1. Retrieve the GUID of the app by running: - - ``` - cf app APP-NAME --guid - ``` - Where `APP-NAME` is the name of your app. - -1. Retrieve the GUID of the revision. See [Retrieve a revision](#get). - -1. Create a deployment using CAPI by running: - - ``` - cf curl v3/deployments \ - -X POST \ - -d '{ - "revision": { - "guid": "REVISION-GUID" - }, - "relationships": { - "app": { - "data": { - "guid": "APP-GUID" - } - } - } - }' - ``` - - Where: -

          -
        • REVISION-GUID is the GUID of the revision.
        • -
        • APP-GUID is the GUID of the app.
        • -
        +* Using pre-v7 cf CLI commands: + + 1. Retrieve the GUID of the app: + + ``` + cf app APP-NAME --guid + ``` + Where `APP-NAME` is the name of your app. + + 1. Retrieve the GUID of the revision. See [Retrieve a revision](#get). + + 1. Create a deployment using CAPI by running: + + ``` + cf curl v3/deployments \ + -X POST \ + -d '{ + "revision": { + "guid": "REVISION-GUID" + }, + "relationships": { + "app": { + "data": { + "guid": "APP-GUID" + } + } + } + }' + ``` + + Where: +
          +
        • REVISION-GUID is the GUID of the revision.
        • +
        • APP-GUID is the GUID of the app.
        • +
        ## Add metadata to a revision From b497af45e677966631d9be79e0248ffe2801a634 Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Tue, 18 Feb 2025 13:57:59 -0800 Subject: [PATCH 084/132] PR #546 2 --- revisions.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/revisions.html.md.erb b/revisions.html.md.erb index b844b552..ecf5f9ae 100644 --- a/revisions.html.md.erb +++ b/revisions.html.md.erb @@ -145,7 +145,7 @@ To roll back to a previous revision: ``` Where `APP-NAME` is the name of your APP and `VERSION` is the revision version you want to rollback to. -* Using pre-v7 cf CLI commands: +* Using `curl` command: 1. Retrieve the GUID of the app: From d25d8b4924f2094b9e63fb9842c96096e009f92a Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Mon, 24 Feb 2025 13:56:55 -0800 Subject: [PATCH 085/132] formatting --- revisions.html.md.erb | 52 +++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/revisions.html.md.erb b/revisions.html.md.erb index ecf5f9ae..5dd68625 100644 --- a/revisions.html.md.erb +++ b/revisions.html.md.erb @@ -149,37 +149,37 @@ To roll back to a previous revision: 1. Retrieve the GUID of the app: - ``` - cf app APP-NAME --guid - ``` - Where `APP-NAME` is the name of your app. + ``` + cf app APP-NAME --guid + ``` + Where `APP-NAME` is the name of your app. 1. Retrieve the GUID of the revision. See [Retrieve a revision](#get). 1. Create a deployment using CAPI by running: - ``` - cf curl v3/deployments \ - -X POST \ - -d '{ - "revision": { - "guid": "REVISION-GUID" - }, - "relationships": { - "app": { - "data": { - "guid": "APP-GUID" - } - } - } - }' - ``` - - Where: -
          -
        • REVISION-GUID is the GUID of the revision.
        • -
        • APP-GUID is the GUID of the app.
        • -
        + ``` + cf curl v3/deployments \ + -X POST \ + -d '{ + "revision": { + "guid": "REVISION-GUID" + }, + "relationships": { + "app": { + "data": { + "guid": "APP-GUID" + } + } + } + }' + ``` + + Where: +
          +
        • REVISION-GUID is the GUID of the revision.
        • +
        • APP-GUID is the GUID of the app.
        • +
        ## Add metadata to a revision From 721905b311d03778bbf26b874496040cd6f6b0b3 Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Mon, 24 Feb 2025 15:19:19 -0800 Subject: [PATCH 086/132] TNZ-20879 WIP --- deploy-apps/rolling-deploy.html.md.erb | 16 ++-- revisions.html.md.erb | 123 +++++++++++++------------ 2 files changed, 71 insertions(+), 68 deletions(-) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index b0ca72c3..b8fe9c87 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -3,10 +3,9 @@ title: Configuring app deployments owner: CAPI --- -You can use Cloud Foundry Command Line Interface (cf CLI) commands -or the Cloud Foundry API (CAPI) to push your apps to <%= vars.app_runtime_first %> using a deployment. +This page describes how to use the Cloud Foundry Command Line Interface (cf CLI) or API (CAPI) to push apps to <%= vars.app_runtime_first %> using rolling deployment or canary deployment strategies, which update apps safely and avoid downtime. -For information about the traditional method for addressing app downtime while pushing app updates, +For information about the older method for avoiding app downtime while pushing app updates, see [Using blue-green deployment to reduce downtime and risk](./blue-green.html). For more information about CAPI, see the @@ -31,10 +30,11 @@ Or for canary deployments: Cloud Foundry provides two different strategies for deployments: -1. Rolling deployments bring up one or more web processes (as defined by `max-in-flight`) at a time. After those instances report healthy and routable, the deployment brings down an equivalent number instances of the old revision. The deployment repeats this process until all instances have been replaced, and finally replaces all old non-web processes with new processes before finishing. -2. Canary deployments bring up a single web process of the new revision, then pause indefinitely. This gives time for app operators or developers to evaluate the health of a new revision. After evaluating the effects, app operators can choose to either `cancel` or `continue` the deployment. When the deployment is continued, the canary deployment proceeds in a way similar to a rolling deployment. +* A **Rolling** deployment brings up one or more web processes for the new app version, with the number set by `max-in-flight`. After those instances report as healthy and routable, it brings down the same number of instances of the old version. The deployment repeats this process to replace all web process instances and then updates all old non-web processes. +* A **Canary** deployment brings up a limited number of web processes for the new app version, defaulting to 1, then pauses indefinitely to let app operators or developers evaluate the health of a new version. After evaluating the effects, app operators can choose to either `cancel` or `continue` the deployment. When the deployment is continued, the canary deployment proceeds in a way similar to a rolling deployment. + * To gradually increase instance counts and check app health in multiple steps, the latest cf CLI v8 supports an `--instance-steps` option that sets a series of increasing instance counts for canary deployments. -The following sections describe these deployment strategies and their limitations in detail. +The following sections describe these deployment strategies and their limitations, and how `cf revisions` and `cf revision` commands track deployments. ### Rolling Deployments @@ -328,7 +328,7 @@ output. For more information about this command, see [How Deployment Strategies Work](#how-deployment-strategies-work). -### Cancel a Deployment +### Cancel a deployment To stop the deployment of an app that you pushed: @@ -361,7 +361,7 @@ original state as quickly as possible and does not guarantee zero downtime.
        It is important to note that changes to environment variables and service bindings are not reverted.

        -### Continue a Canary Deployment +### Continue a canary deployment To finish a canary deployment after the deployment has paused and the canary instance has been validated: diff --git a/revisions.html.md.erb b/revisions.html.md.erb index 5dd68625..6e69c8d2 100644 --- a/revisions.html.md.erb +++ b/revisions.html.md.erb @@ -6,7 +6,10 @@ owner: CAPI A revision represents code and configuration used by an app at a specific time. It is a Cloud Foundry API (CAPI) object that can contain references to a droplet, a custom start command, and environment variables. The most recent revision for a running app represents code and configuration running in <%= vars.platform_name %>. App revisions do not include any tasks run on the app. -For additional information about app revisions, see [Revisions](http://v3-apidocs.cloudfoundry.org/version/release-candidate/#revisions) in the Cloud Foundry API (CAPI) documentation. +For additional information about app revisions, see: + +* [] +* [Revisions](http://v3-apidocs.cloudfoundry.org/version/release-candidate/#revisions) in the Cloud Foundry API (CAPI) documentation.

        CAPI v3 is the recommended API version for revisions. While revisions work with CAPI v2, there are several inconsistencies. For example, revision descriptions for apps with multiple processes can be inaccurate because CAPI v2 does not support apps with multiple processes. Additionally, pushing an app for the first time with revisions in CAPI v2 creates two revisions.

        @@ -64,27 +67,27 @@ This section describes how to use CAPI endpoints for viewing revisions. To list revisions for an app: * Using the `revisions` command: - - ``` - cf revisions APP-NAME - ``` - Where `APP-NAME` is the name of your app. -* Using the `curl` command - - 1. Retrieve the GUID of the app by running: + ``` + cf revisions APP-NAME + ``` + Where `APP-NAME` is the name of your app. + +* Using the `curl` command: - ``` - cf app APP-NAME --guid - ``` - Where `APP-NAME` is the name of your app. + 1. Retrieve the GUID of the app by running: - 1. Run: + ``` + cf app APP-NAME --guid + ``` + Where `APP-NAME` is the name of your app. - ``` - cf curl /v3/apps/GUID/revisions - ``` - Where `GUID` is the GUID you retrieved in an earlier step. + 1. Run: + + ``` + cf curl /v3/apps/GUID/revisions + ``` + Where `GUID` is the GUID you retrieved in an earlier step. ### List deployed revisions for an app @@ -92,26 +95,26 @@ Deployed revisions are revisions linked to started processes in an app. To list * Using the `revision` command: - ``` - cf revision APP-NAME - ``` - Where `APP-NAME` is the name of your app. + ``` + cf revision APP-NAME + ``` + Where `APP-NAME` is the name of your app. * Using the `curl` command - 1. Retrieve the GUID of the app by running: + 1. Retrieve the GUID of the app by running: - ``` - cf app APP-NAME --guid - ``` - Where `APP-NAME` is the name of your app. + ``` + cf app APP-NAME --guid + ``` + Where `APP-NAME` is the name of your app. - 1. Run: + 1. Run: - ``` - cf curl /v3/apps/GUID/revisions/deployed - ``` - Where `GUID` is the GUID you retrieved in an earlier step. + ``` + cf curl /v3/apps/GUID/revisions/deployed + ``` + Where `GUID` is the GUID you retrieved in an earlier step. ### Retrieve a revision @@ -119,19 +122,19 @@ To retrieve a revision: * Using the `revision` command: - ``` - cf revision APP-NAME --version VERSION - ``` - Where `APP-NAME` is the name of your APP and `VERSION` is the revision version. + ``` + cf revision APP-NAME --version VERSION + ``` + Where `APP-NAME` is the name of your APP and `VERSION` is the revision version. * Using the `curl` command: - 1. Run: + 1. Run: - ``` - cf curl /v3/revisions/GUID - ``` - Where `GUID` is the GUID of the revision. + ``` + cf curl /v3/revisions/GUID + ``` + Where `GUID` is the GUID of the revision. ## Roll back to a previous revision @@ -140,23 +143,23 @@ To roll back to a previous revision: * Using the `rollback` command: - ``` - cf rollback APP-NAME --version VERSION - ``` - Where `APP-NAME` is the name of your APP and `VERSION` is the revision version you want to rollback to. + ``` + cf rollback APP-NAME --version VERSION + ``` + Where `APP-NAME` is the name of your APP and `VERSION` is the revision version you want to rollback to. * Using `curl` command: - 1. Retrieve the GUID of the app: + 1. Retrieve the GUID of the app: - ``` - cf app APP-NAME --guid - ``` - Where `APP-NAME` is the name of your app. + ``` + cf app APP-NAME --guid + ``` + Where `APP-NAME` is the name of your app. - 1. Retrieve the GUID of the revision. See [Retrieve a revision](#get). + 1. Retrieve the GUID of the revision. See [Retrieve a revision](#get). - 1. Create a deployment using CAPI by running: + 1. Create a deployment using CAPI by running: ``` cf curl v3/deployments \ @@ -198,14 +201,14 @@ To deactivate revisions for an app: 1. Retrieve the GUID of the app by running: - ``` - cf app APP-NAME --guid - ``` - Where `APP-NAME` is the name of your app. + ``` + cf app APP-NAME --guid + ``` + Where `APP-NAME` is the name of your app. 1. Run: - ``` - cf curl /v3/apps/GUID/features/revisions -X PATCH -d '{ "enabled": false }' - ``` - Where `GUID` is the GUID you retrieved in an earlier step. + ``` + cf curl /v3/apps/GUID/features/revisions -X PATCH -d '{ "enabled": false }' + ``` + Where `GUID` is the GUID you retrieved in an earlier step. From d2534a1905cdf82a9f408f1b66aa72fd6599a949 Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Thu, 27 Feb 2025 15:07:57 -0800 Subject: [PATCH 087/132] TNZ-20879 TNZ-21024 TNZ-20880 + canary step weights and cf revision info --- deploy-apps/rolling-deploy.html.md.erb | 37 +++++++++++++++++++------- push.html.md.erb | 2 +- revisions.html.md.erb | 36 ++++++++++++++----------- 3 files changed, 50 insertions(+), 25 deletions(-) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index b8fe9c87..72dbfe87 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -30,13 +30,15 @@ Or for canary deployments: Cloud Foundry provides two different strategies for deployments: -* A **Rolling** deployment brings up one or more web processes for the new app version, with the number set by `max-in-flight`. After those instances report as healthy and routable, it brings down the same number of instances of the old version. The deployment repeats this process to replace all web process instances and then updates all old non-web processes. -* A **Canary** deployment brings up a limited number of web processes for the new app version, defaulting to 1, then pauses indefinitely to let app operators or developers evaluate the health of a new version. After evaluating the effects, app operators can choose to either `cancel` or `continue` the deployment. When the deployment is continued, the canary deployment proceeds in a way similar to a rolling deployment. - * To gradually increase instance counts and check app health in multiple steps, the latest cf CLI v8 supports an `--instance-steps` option that sets a series of increasing instance counts for canary deployments. +* A **Rolling** deployment brings up one or more web processes for the new app version, with the number set by `max-in-flight`, which defaults to 1. After those instances report as healthy and routable, it brings down the same number of instances of the old version. The deployment repeats this process to replace all web process instances and then updates all old non-web processes. +* A **Canary** deployment brings up one or more web processes for the new app version, defaulting to one. It then pauses to let app operators or developers evaluate the health of a new version instances. App operators can then choose to either `cancel` or `continue` the deployment. When the deployment is continued, the canary deployment proceeds in the same way as a rolling deployment. + * To gradually increase instance counts and check app health in multiple steps, the latest cf CLI v8 supports an `--instance-steps` option that sets a series of increasing instance counts. -The following sections describe these deployment strategies and their limitations, and how `cf revisions` and `cf revision` commands track deployments. +Each rolling or canary deployment increments the `revision` count for the new app deployment, as listed by the `cf revisions` command described in [] described in xxyx -### Rolling Deployments +The following sections describe the rolling and canary deployment strategies and their limitations. + +### Rolling Deployments This section describes pushing an app with the rolling deployment strategy. @@ -58,9 +60,9 @@ background, updating deployments as follows: 3. Restarts all non-web processes of the app. 4. Sets the deployment to `DEPLOYED`. -### Canary Deployments +### Canary Deployments -This section describes pushing an app with the canary deployment strategy. +This section describes pushing an app with the default canary deployment strategy, without specifying specific step weights as described in [Canary Deployments with Step Weights](#canary-step). 1. The `cf push APP-NAME --strategy canary` command: 1. Stages the updated app package. @@ -77,7 +79,7 @@ background, updating deployments as follows: 2. Sets the deployment to `PAUSED`. 1. After validating that the canary instance is running as expected, execute the command `cf continue-deployment APP-NAME`: - * Changes the deployment reason to `DEPLOYING` and resumes in a way similar to a that of a rolling deployment. + * Changes the deployment reason to `DEPLOYING` and resumes following the same process as a rolling deployment. 2. After the command changes the status of the deployment, the `cc_deployment_updater` BOSH job runs in the background, updating deployments as follows: @@ -88,6 +90,23 @@ background, updating deployments as follows: 3. Restarts all non-web processes of the app. 4. Sets the deployment to `DEPLOYED`. +### Canary Deployments with Step Weights + +By default, as described in [Canary Deployments](#canary), when you push an app with the canary deployment strategy, the process pauses after it deploys one canary instance, and you manually continue as described in [Continue a canary deployment](#continue) to update the remaining instances to the full-scale deployment. + +To run a canary deployment more gradually, you can pass a series of step weights to the `--instance-steps` option of `cf push`. + - The series specifies increasing numbers of canary instances to deploy, to let you manually continue after each step. + - Separate step weights with commas and without spaces, for example `5,10,20`. + - Continuing after the last canary step proceeds to the full-scale deployment. + - As with the default canary deployment process, a rolling deployment strategy updates instances to the new instance count at each step. + +For example, to update gradually in four steps, running 5, 10, and 20 canary instances before replacing all running instances of an app: + + ``` + cf push APP-NAME --strategy canary --instance-steps 5,10,20 + ``` + + ### Limitations The following table describes the limitations when using these deployments. @@ -380,7 +399,7 @@ To finish a canary deployment after the deployment has paused and the canary ins Where `DEPLOYMENT-GUID` is the GUID of the deployment that you recorded after following the CAPI procedure in [Deploy an app](#deploy). -This continues the rolling deployment of the app. +This continues the deployment of the app, following the same process as a rolling deployment. ### Restart an app diff --git a/push.html.md.erb b/push.html.md.erb index 2bd2e256..8e7940c6 100644 --- a/push.html.md.erb +++ b/push.html.md.erb @@ -24,7 +24,7 @@ These topics contain the procedures for deploying apps with `cf push`: * [Running cf push sub-step commands](push-sub-commands.html) -* [Configuring canary app deployments](./deploy-apps/rolling-deploy.html#canary-deployment-process) +* [Configuring canary app deployments](./deploy-apps/rolling-deploy.html#canary) * [Configuring rolling app deployments](./deploy-apps/rolling-deploy.html) diff --git a/revisions.html.md.erb b/revisions.html.md.erb index 6e69c8d2..cc8cb15d 100644 --- a/revisions.html.md.erb +++ b/revisions.html.md.erb @@ -6,33 +6,36 @@ owner: CAPI A revision represents code and configuration used by an app at a specific time. It is a Cloud Foundry API (CAPI) object that can contain references to a droplet, a custom start command, and environment variables. The most recent revision for a running app represents code and configuration running in <%= vars.platform_name %>. App revisions do not include any tasks run on the app. -For additional information about app revisions, see: - -* [] -* [Revisions](http://v3-apidocs.cloudfoundry.org/version/release-candidate/#revisions) in the Cloud Foundry API (CAPI) documentation. +For additional information about app revisions, see [Revisions](http://v3-apidocs.cloudfoundry.org/version/release-candidate/#revisions) in the Cloud Foundry API (CAPI) documentation.

        CAPI v3 is the recommended API version for revisions. While revisions work with CAPI v2, there are several inconsistencies. For example, revision descriptions for apps with multiple processes can be inaccurate because CAPI v2 does not support apps with multiple processes. Additionally, pushing an app for the first time with revisions in CAPI v2 creates two revisions.

        -

        -The app revisions API is experimental, and future releases might have breaking changes.

        -## Revisions use cases +## Overview + +Every <%= vars.platform_name %> app has a name. +When you first deploy an app, <%= vars.platform_name %> gives it the revision version number `1`. +When you re-deploy the app under the same name, for example as an update, <%= vars.platform_name %> increments its version number and saves the old version. + +This saved application history is used by the `revisions` and `revision` CAPI endpoints and cf CLI commands to let you: -Some use cases for revisions include: +* **View revisions for an app:** To help you understand how your app has changed over time. -* **Viewing revisions for an app:** This can help you understand how your app has changed over time. +* **Roll back to a previous revision:** To deploy a version of the app that you had running previously without needing to track that previous state yourself or have multiple apps running. When roll back an app, the specified revision deploys as the new current version of your app. -* **Rolling back to a previous revision:** This allows you to deploy a version of the app that you had running previously without needing to track that previous state yourself or have multiple apps running. When you create a deployment and reference a revision, the revision deploys as the current version of your app. +> **Note** The `cf revision` command takes a `--version` flag to specify a version number, but the command's output lists the same number as its `revision`. -### Events that trigger revisions +### When current app revision changes -Revisions are generated through these events: +The app's revision version number increments when: * A new droplet is deployed for an app. -* An app is deployed with new environment variables. +* An app is deployed with `--strategy rolling` or `--strategy canary` as described in [Configuring app deployments](deploy-apps.html). +* An app is deployed with a new environment variables. * An app is deployed with a new or changed custom start command. * An app rolls back to a prior revision. + - In this case, the newly-running version is identical to the specified old version. By default, CAPI retains a maximum of 100 revisions per app. @@ -89,9 +92,9 @@ To list revisions for an app: ``` Where `GUID` is the GUID you retrieved in an earlier step. -### List deployed revisions for an app +### List current revision for an app -Deployed revisions are revisions linked to started processes in an app. To list deployed revisions: +The current revision of an app is its currently-deployed revision, linked to started processes. To list an app's current revision: * Using the `revision` command: @@ -116,6 +119,9 @@ Deployed revisions are revisions linked to started processes in an app. To list ``` Where `GUID` is the GUID you retrieved in an earlier step. + When the current app is still deploying or is in a `stopped` state, the command output states, `It is not possible to show which revision is currently deployed.` + + ### Retrieve a revision To retrieve a revision: From c57bedc16add9af2a4b624a7334800af842b2928 Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Thu, 27 Feb 2025 15:31:10 -0800 Subject: [PATCH 088/132] TNZ-20879 TNZ-21024 TNZ-20880 + canary step weights and cf revision info 2 --- revisions.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/revisions.html.md.erb b/revisions.html.md.erb index cc8cb15d..fbd8f14f 100644 --- a/revisions.html.md.erb +++ b/revisions.html.md.erb @@ -31,7 +31,7 @@ This saved application history is used by the `revisions` and `revision` CAPI en The app's revision version number increments when: * A new droplet is deployed for an app. -* An app is deployed with `--strategy rolling` or `--strategy canary` as described in [Configuring app deployments](deploy-apps.html). +* An app is deployed with `--strategy rolling` or `--strategy canary` as described in [Configuring app deployments](./deploy-apps/rolling-deploy.html). * An app is deployed with a new environment variables. * An app is deployed with a new or changed custom start command. * An app rolls back to a prior revision. From 6ad9965610a05f2e0a0bdd8ae15aa6b9010ea8cb Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Thu, 27 Feb 2025 15:39:12 -0800 Subject: [PATCH 089/132] TNZ-20879 TNZ-21024 TNZ-20880 + canary step weights and cf revision info 3 --- deploy-apps/rolling-deploy.html.md.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index 72dbfe87..61f9f65d 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -95,6 +95,7 @@ background, updating deployments as follows: By default, as described in [Canary Deployments](#canary), when you push an app with the canary deployment strategy, the process pauses after it deploys one canary instance, and you manually continue as described in [Continue a canary deployment](#continue) to update the remaining instances to the full-scale deployment. To run a canary deployment more gradually, you can pass a series of step weights to the `--instance-steps` option of `cf push`. + - The series specifies increasing numbers of canary instances to deploy, to let you manually continue after each step. - Separate step weights with commas and without spaces, for example `5,10,20`. - Continuing after the last canary step proceeds to the full-scale deployment. From 0ed20d8c32502040353d8e71ef9eac5e6c963c1b Mon Sep 17 00:00:00 2001 From: Alexander Lais Date: Wed, 12 Mar 2025 15:14:16 +0100 Subject: [PATCH 090/132] fix(per-route-lb): correct indentation for app manifest snippet --- custom-per-route-options.html.md.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index 3e85feb2..b1ef488a 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -37,8 +37,8 @@ To configure per-route load balancing for an application that has not yet been p - name: MY-APP routes: - route: MY-HOST.EXAMPLE.COM - options: - loadbalancing: least-connection + options: + loadbalancing: least-connection ``` Where `MY-APP` is the name of your app and `MY-HOST.EXAMPLE.COM` is the route you want to map to your app. From b24a36a76622a18c8fb516b1620f5ca1dd5a3ca9 Mon Sep 17 00:00:00 2001 From: Amelia Downs Date: Tue, 18 Mar 2025 17:03:21 +0000 Subject: [PATCH 091/132] add new options for how to route to canaries --- deploy-apps/rolling-deploy.html.md.erb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index 61f9f65d..aaaf3262 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -164,7 +164,7 @@ The following table describes the limitations when using these deployments. - Evaluating the canary instance + Evaluating the canary instance option 1 Because the current processes share the same route, the best way to validate that traffic is reaching the canary instance is by looking at the logs. If app revision logging is enabled, the logs for all instances will be tagged with process_id and revision_version values. e.g. APP/REV/4/PROC/WEB/1 @@ -173,6 +173,19 @@ The following table describes the limitations when using these deployments. Retrieve the logs by running the cf CLI command cf logs APP_NAME. + + Evaluating the canary instance option 2 + + This method only works with routing-release XYZ or higher. +
        +
        + Get the canary process guid via `cf curl /v3/deployments?status_values=ACTIVE?app_guid=$(cf app APP_NAME --guid)`. + Add the `X-CF-PROCESS-INSTANCE:` header to traffic + to the app. Optionally, to send traffic to one specific canary instance, + add an index: + `X-CF-PROCESS-INSTANCE::`. + + From 60df71e16d0f51f4c07b6f1c88d6cd193579f518 Mon Sep 17 00:00:00 2001 From: Amelia Downs Date: Tue, 18 Mar 2025 17:38:10 +0000 Subject: [PATCH 092/132] use code tags not backtics --- deploy-apps/rolling-deploy.html.md.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index aaaf3262..8f1bee62 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -179,11 +179,11 @@ The following table describes the limitations when using these deployments. This method only works with routing-release XYZ or higher.

        - Get the canary process guid via `cf curl /v3/deployments?status_values=ACTIVE?app_guid=$(cf app APP_NAME --guid)`. - Add the `X-CF-PROCESS-INSTANCE:` header to traffic + Get the canary process guid via cf curl /v3/deployments?status_values=ACTIVE?app_guid=$(cf app APP_NAME --guid). + Add the X-CF-PROCESS-INSTANCE: header to traffic to the app. Optionally, to send traffic to one specific canary instance, add an index: - `X-CF-PROCESS-INSTANCE::`. + X-CF-PROCESS-INSTANCE::. From 7b7be2f343f82d16b6444547aa38ad5bd473db36 Mon Sep 17 00:00:00 2001 From: Amelia Downs Date: Tue, 18 Mar 2025 17:47:09 +0000 Subject: [PATCH 093/132] fix query param bug --- deploy-apps/rolling-deploy.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index 8f1bee62..83112204 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -179,7 +179,7 @@ The following table describes the limitations when using these deployments. This method only works with routing-release XYZ or higher.

        - Get the canary process guid via cf curl /v3/deployments?status_values=ACTIVE?app_guid=$(cf app APP_NAME --guid). + Get the canary process guid via cf curl /v3/deployments?status_values=ACTIVE&app_guid=$(cf app APP_NAME --guid). Add the X-CF-PROCESS-INSTANCE: header to traffic to the app. Optionally, to send traffic to one specific canary instance, add an index: From 61116c4174faa773833eb59e72189a67a61f626a Mon Sep 17 00:00:00 2001 From: Amelia Downs Date: Tue, 18 Mar 2025 17:56:23 +0000 Subject: [PATCH 094/132] add more X-Cf-Process-Instance info to routing docs --- deploy-apps/routes-domains.html.md.erb | 67 ++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 4 deletions(-) diff --git a/deploy-apps/routes-domains.html.md.erb b/deploy-apps/routes-domains.html.md.erb index 2724dc4c..4a157854 100644 --- a/deploy-apps/routes-domains.html.md.erb +++ b/deploy-apps/routes-domains.html.md.erb @@ -553,10 +553,6 @@ $ cf delete-route tcp.<%= vars.private_app_domain %> --port 60000 Users can route HTTP requests to a specific app instance using the header `X-Cf-App-Instance`. -

        -Use of the X-Cf-App-Instance header is available only for users on the Diego architecture. -

        - The format of the header is `X-Cf-App-Instance: APP_GUID:APP_INDEX`. `APP_GUID` is an internal identifier for your app. @@ -605,6 +601,69 @@ These are the possible error responses: +### Routing requests to a specific process instance + +Since routing-release version XYZ, users can route HTTP requests to a specific +process instance using the header `X-Cf-Process-Instance`. + +The format of the header is `X-Cf-Process-Instance: PROCESS_GUID:PROCESS_INDEX` or `X-Cf-Process-Instance: PROCESS_GUID`. + +`PROCESS_GUID` is an internal identifier for a specific app process. +Use `cf curl /v3/apps/$(cf APP-NAME --guid)/processes` command to discover the `PROCESS_GUID`s related to your app. + +`PROCESS_INDEX`, for example, `0`,`1`, `2`, or `3`, is an identifier for a particular process instance. Use the CLI command `cf app APP-NAME` to get statistics on each +instance of a particular app process. + +
        +$ cf app example-app
        +
        + +The following example shows a request made to instance `9` of an process with GUID `5cdc7595-2e9b-4f62-8d5a-a86b92f2df0e` and mapped to route +`example-app.<%= vars.private_app_domain %>`. + +
        +$ curl example-app.<%= vars.private_app_domain %> -H "X-Cf-Process-Instance: 5cdc7595-2e9b-4f62-8d5a-a86b92f2df0e:9"
        +
        + +The following example shows a request made a process with GUID `5cdc7595-2e9b-4f62-8d5a-a86b92f2df0e` and mapped to route +`example-app.<%= vars.private_app_domain %>`. + +
        +$ curl example-app.<%= vars.private_app_domain %> -H "X-Cf-Process-Instance: 5cdc7595-2e9b-4f62-8d5a-a86b92f2df0e"
        +
        + +If the `X-Cf-Process-Instance` header is set to an invalid value, Gorouter returns a `400` status code and the response from Gorouter contains a +`X-Cf-Routererror` header with more information about the error. + +These are the possible error responses: + + + + + + + + + + + + + + + + + + + + + +
        X-Cf-Routererror valueReason for error + Response body
        invalid_cf_process_instance_headerThe value provided for X-Cf-Process-Instance was an incorrectly formatted GUID.None
        unknown_routeThe value provided for X-Cf-Process-Instance is a correctly formatted GUID, but no backend is found with that GUID and index for the route + requested.400 Bad Request: Requested process instance ('1') with guid ('aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa') does not exist for route + ('example-route.cf.com')
        unknown_routeThe value provided for X-Cf-Process-Instance is a correctly formatted GUID but no backend is found with that GUID for the route + requested.400 Bad Request: Requested process instance with guid ('aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa') does not exist for route + ('example-route.cf.com')
        + ## Domains From cbff0a693f8e07e3b687c87e271f5f4819fba0c8 Mon Sep 17 00:00:00 2001 From: Amelia Downs Date: Tue, 18 Mar 2025 19:27:25 +0000 Subject: [PATCH 095/132] explain multuple x-cf-X-headers --- deploy-apps/routes-domains.html.md.erb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deploy-apps/routes-domains.html.md.erb b/deploy-apps/routes-domains.html.md.erb index 4a157854..339c6711 100644 --- a/deploy-apps/routes-domains.html.md.erb +++ b/deploy-apps/routes-domains.html.md.erb @@ -665,6 +665,9 @@ These are the possible error responses: +If the `X-Cf-App-Instance` header and the `X-Cf-Process-Instance` header are +present on the same request, then the `X-Cf-App-Instance` takes presidence. + ## Domains The term domain here differs from its common use and is specific to <%= vars.app_runtime_abbr %>. From cc995d4a5d9cd967dc3efc8a00299a7e0628dd72 Mon Sep 17 00:00:00 2001 From: corporatemax Date: Fri, 14 Mar 2025 13:40:31 +0100 Subject: [PATCH 096/132] add section for syslog-drain-url protocols fix command format and reformulate certificate combinations add hint for certificate troubleshooting with openssl fix typo style edits for consistency within the docs make CA necessary Capitalize Syslog Agent throughout file remove Diego Cell --- services/log-management.html.md.erb | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/services/log-management.html.md.erb b/services/log-management.html.md.erb index 2809490a..cb62d88d 100644 --- a/services/log-management.html.md.erb +++ b/services/log-management.html.md.erb @@ -68,7 +68,7 @@ You can create a syslog drain service and bind apps to it using Cloud Foundry Co
      • SYSLOG-DRAIN-URL is the syslog URL from Step 1: Configure the Log Management Service.
      - By default, the syslog agent forwards only application logs to a syslog server. To have the application [container metrics](../../loggregator/container-metrics.html) like CPU, memory, or disk usage forwarded as well, use the `drain-data` parameter to specify if only logs (default), only container metrics, only traces ([timers](https://github.com/cloudfoundry/loggregator-api/blob/master/README.md#timer) from the Loggregator v2 API specification), or all of them are forwarded by the syslog drain. Add the `drain-data` parameter to the `SYSLOG-DRAIN-URL`. + By default, the Syslog Agent forwards only application logs to a syslog server. To have the application [container metrics](../../loggregator/container-metrics.html) like CPU, memory, or disk usage forwarded as well, use the `drain-data` parameter to specify if only logs (default), only container metrics, only traces ([timers](https://github.com/cloudfoundry/loggregator-api/blob/master/README.md#timer) from the Loggregator v2 API specification), or all of them are forwarded by the syslog drain. Add the `drain-data` parameter to the `SYSLOG-DRAIN-URL`.
           $ cf create-user-provided-service DRAIN-NAME -l SYSLOG-URL?drain-data=DRAIN-DATA-VALUE
      @@ -124,6 +124,22 @@ You can create a syslog drain service and bind apps to it using Cloud Foundry Co
           $ cf create-user-provided-service DRAIN-NAME -l SYSLOG-URL -p '{"ca":"-----BEGIN CERTIFICATE-----\nMIIH...-----END CERTIFICATE-----", "cert":"-----BEGIN CERTIFICATE-----\nMIIH...-----END CERTIFICATE-----","key":"-----BEGIN PRIVATE KEY-----\nMIIE...-----END PRIVATE KEY-----"}'
           
      + When setting up your syslog drain, it is important to choose the correct scheme for your SYSLOG-URL: + + * Use the syslog-tls scheme for endpoints that require TLS or mTLS. + * Use the syslog scheme for endpoints that do not require TLS. + * Use the https scheme when shipping logs to an HTTPS endpoint. + + If you need to use TLS or mTLS, ensure that you provide the necessary CA certificate. Additionally to the CA certificate for mTLS configuration, both the client certificate and the key must be provided. + + Ensure that certificates and keys are PEM-encoded as specified in RFC-1422. They should be provided as string values, with new lines represented by the `\n` character, and must not have trailing new lines. You can convert a PEM-encoded certificate string to a processable format using the following command: + +
      +    $ awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' cert.pem | sed 's/\\n$//' | tr -d '\n'
      +    
      + + The `cf create-user-provided-service` command accepts any JSON payload without validating the certificates or credentials while creating the syslog drain. There is no error message for wrong certificates or credentials in the cf CLI; you can only validate in your target log service if your syslog drain was configured correctly. To troubleshoot your certificates, you can use the openssl command line tool. + For more information, see [User-provided service instances](./user-provided.html). 2. To bind an app to the service instance, do one of these: From 44229b20e268d287847b87bb175a5d4396a3b923 Mon Sep 17 00:00:00 2001 From: Amelia Downs Date: Thu, 20 Mar 2025 16:06:02 -0400 Subject: [PATCH 097/132] update routing release version --- deploy-apps/rolling-deploy.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index 83112204..c174ce9f 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -176,7 +176,7 @@ The following table describes the limitations when using these deployments. Evaluating the canary instance option 2 - This method only works with routing-release XYZ or higher. + This method only works with routing-release 0.332.0 or higher.

      Get the canary process guid via cf curl /v3/deployments?status_values=ACTIVE&app_guid=$(cf app APP_NAME --guid). From be9b341c188b8e34decb67da66ad03b9e1fc6177 Mon Sep 17 00:00:00 2001 From: Amelia Downs Date: Thu, 20 Mar 2025 16:06:28 -0400 Subject: [PATCH 098/132] update routing release version --- deploy-apps/routes-domains.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy-apps/routes-domains.html.md.erb b/deploy-apps/routes-domains.html.md.erb index 339c6711..c0e231c4 100644 --- a/deploy-apps/routes-domains.html.md.erb +++ b/deploy-apps/routes-domains.html.md.erb @@ -603,7 +603,7 @@ These are the possible error responses: ### Routing requests to a specific process instance -Since routing-release version XYZ, users can route HTTP requests to a specific +Since routing-release version 0.332.0, users can route HTTP requests to a specific process instance using the header `X-Cf-Process-Instance`. The format of the header is `X-Cf-Process-Instance: PROCESS_GUID:PROCESS_INDEX` or `X-Cf-Process-Instance: PROCESS_GUID`. From 2e95370c988d8f089725d70c72d264a86f0ad94e Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Thu, 20 Mar 2025 15:18:58 -0700 Subject: [PATCH 099/132] Update Canary Step docs with more detailed example --- deploy-apps/rolling-deploy.html.md.erb | 79 +++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 1 deletion(-) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index 61f9f65d..b4ca78da 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -97,16 +97,93 @@ By default, as described in [Canary Deployments](#canary), when you push an app To run a canary deployment more gradually, you can pass a series of step weights to the `--instance-steps` option of `cf push`. - The series specifies increasing numbers of canary instances to deploy, to let you manually continue after each step. + - Each value represents a **percentage** or **weight** of the web process's instances to be rolled out as canary instances. - Separate step weights with commas and without spaces, for example `5,10,20`. + - For each canary instance created after the first, a pre-deployment instance will be torn down. + - Canary deployments use one extra instance than is normally allocated throughout the deployment process, until the target number of instances has been reached. - Continuing after the last canary step proceeds to the full-scale deployment. - As with the default canary deployment process, a rolling deployment strategy updates instances to the new instance count at each step. -For example, to update gradually in four steps, running 5, 10, and 20 canary instances before replacing all running instances of an app: +For example, to update gradually in four steps, running 5, 10, and 20 percent of an app's instances as canary instances before replacing all running instances of an app: ``` cf push APP-NAME --strategy canary --instance-steps 5,10,20 ``` +#### Detailed Example + +Steps are configured as a percentage of instances rather than an explicit instance value. This allows the deployment definition to be independent of the number of instances a process has. + +**Cloud Controller will match a step weight to the nearest non-zero instance number, rounding down.** + +For example, take an application with 10 instances and the following step configuration: + +``` +cf push APP-NAME --strategy canary --instance-steps 1,20,45,80,100 +``` + +This will result in the following deployment plan: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      StepStep WeightOriginal InstancesCanary InstancesActual Weighting
      Pre-deployn/a1000
      11%1019%
      220%9218%
      345%6545%
      480%3872%
      5100%010100%
      Post-deployn/a010100%
      + +A Step Weight of **100** allows app operators to use the `cancel-deployment` command even after all instances have been replaced. ### Limitations From 84bb8996c3db52d8ed5bcb1843bcf7d96bed0475 Mon Sep 17 00:00:00 2001 From: Anita Flegg Date: Fri, 21 Mar 2025 07:31:42 -0700 Subject: [PATCH 100/132] various wording and punctuation clarifications --- deploy-apps/rolling-deploy.html.md.erb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index b4ca78da..6882e60f 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -30,11 +30,11 @@ Or for canary deployments: Cloud Foundry provides two different strategies for deployments: -* A **Rolling** deployment brings up one or more web processes for the new app version, with the number set by `max-in-flight`, which defaults to 1. After those instances report as healthy and routable, it brings down the same number of instances of the old version. The deployment repeats this process to replace all web process instances and then updates all old non-web processes. +* A **Rolling** deployment brings up one or more web processes for the new app version, with the number set by `max-in-flight`, which defaults to 1. After those instances report as healthy and routable, it brings down the same number of instances of the old version. The deployment repeats this process to replace all web process instances, and then updates all old non-web processes. * A **Canary** deployment brings up one or more web processes for the new app version, defaulting to one. It then pauses to let app operators or developers evaluate the health of a new version instances. App operators can then choose to either `cancel` or `continue` the deployment. When the deployment is continued, the canary deployment proceeds in the same way as a rolling deployment. * To gradually increase instance counts and check app health in multiple steps, the latest cf CLI v8 supports an `--instance-steps` option that sets a series of increasing instance counts. -Each rolling or canary deployment increments the `revision` count for the new app deployment, as listed by the `cf revisions` command described in [] described in xxyx +Each rolling or canary deployment increments the `revision` count for the new app deployment, as listed by the `cf revisions` command described in [] described in xxyx. The following sections describe the rolling and canary deployment strategies and their limitations. @@ -97,9 +97,9 @@ By default, as described in [Canary Deployments](#canary), when you push an app To run a canary deployment more gradually, you can pass a series of step weights to the `--instance-steps` option of `cf push`. - The series specifies increasing numbers of canary instances to deploy, to let you manually continue after each step. - - Each value represents a **percentage** or **weight** of the web process's instances to be rolled out as canary instances. + - Each value represents a **percentage** or **weight** of the web process's instances of the web process to be rolled out as canary instances. - Separate step weights with commas and without spaces, for example `5,10,20`. - - For each canary instance created after the first, a pre-deployment instance will be torn down. + - For each canary instance created after the first, a pre-deployment instance is torn down. - Canary deployments use one extra instance than is normally allocated throughout the deployment process, until the target number of instances has been reached. - Continuing after the last canary step proceeds to the full-scale deployment. - As with the default canary deployment process, a rolling deployment strategy updates instances to the new instance count at each step. @@ -112,9 +112,9 @@ For example, to update gradually in four steps, running 5, 10, and 20 percent of #### Detailed Example -Steps are configured as a percentage of instances rather than an explicit instance value. This allows the deployment definition to be independent of the number of instances a process has. +Steps are configured as a percentage of instances rather than as an explicit instance value. This allows the deployment definition to be independent of the number of instances used by a process. -**Cloud Controller will match a step weight to the nearest non-zero instance number, rounding down.** +**Cloud Controller matches a step weight to the nearest non-zero instance number, rounding down.** For example, take an application with 10 instances and the following step configuration: @@ -122,7 +122,7 @@ For example, take an application with 10 instances and the following step config cf push APP-NAME --strategy canary --instance-steps 1,20,45,80,100 ``` -This will result in the following deployment plan: +This results in the following deployment plan: @@ -183,7 +183,7 @@ This will result in the following deployment plan:
      -A Step Weight of **100** allows app operators to use the `cancel-deployment` command even after all instances have been replaced. +A **Step Weight** of `100` allows app operators to use the `cancel-deployment` command even after all instances have been replaced. ### Limitations From 301f28a119adfdca39445f37c75a0e0f7642852e Mon Sep 17 00:00:00 2001 From: Sven Krieger <37476281+svkrieger@users.noreply.github.com> Date: Fri, 21 Mar 2025 11:21:55 +0100 Subject: [PATCH 101/132] Add file-based service binding information to dev docs --- deploy-apps/environment-variable.html.md.erb | 26 +++- deploy-apps/large-app-deploy.html.md.erb | 2 + deploy-apps/manifest-attributes.html.md.erb | 5 +- services/_using-vol-services.html.md.erb | 2 + services/application-binding.html.md.erb | 147 +++++++++++++++++-- services/managing-services.html.md.erb | 12 +- services/user-provided.html.md.erb | 2 +- 7 files changed, 172 insertions(+), 24 deletions(-) diff --git a/deploy-apps/environment-variable.html.md.erb b/deploy-apps/environment-variable.html.md.erb index 8c7b52ff..9da2c351 100644 --- a/deploy-apps/environment-variable.html.md.erb +++ b/deploy-apps/environment-variable.html.md.erb @@ -15,7 +15,7 @@ Environment variables are the means <%= vars.app_runtime_abbr %> uses to communi For information about setting your own app-specific environment variables, see the [Environment variable](./manifest.html#env-block) in _Deploying with app manifests_.

      -Do not use user-provided environment variables for security-sensitive information such as credentials. They might unintentionally show up in cf CLI output and Cloud Controller logs. Use user-provided service instances instead. The system-provided environment variable VCAP_SERVICES is properly redacted for user roles such as Space Supporter and in Cloud Controller log files.

      +Do not use user-provided environment variables for security-sensitive information such as credentials. They might unintentionally show up in cf CLI output and Cloud Controller logs. Use user-provided service instances instead. Credentials which are provided to the app via service bindings are redacted for user roles such as Space Supporter and in Cloud Controller log files.

      The maximum size of an environment variable is 130 KB. This limit applies also to <%= vars.app_runtime_abbr %> system environment variables such as VCAP_SERVICES and VCAP_APPLICATION.

      @@ -25,10 +25,15 @@ The maximum size of an environment variable is 130 KB. This limit applies a Using the Cloud Foundry Command Line Interface (cf CLI), you can run the `cf env` command to view the <%= vars.app_runtime_abbr %> environment variables for your app. The `cf env` command displays the following environment variables: -* The `VCAP_APPLICATION` and `VCAP_SERVICES` variables provided in the container environment - +* The `VCAP_APPLICATION` variable, which contains app metadata * The user-provided variables set using the `cf set-env` command +There are 3 possible ways of providing service binding data to apps, see [Credential Delivery Methods](../services/application-binding.html#credential-delivery-methods). Depending on the chosen method there will be one of the following environment variables: + +* [VCAP_SERVICES](#VCAP-SERVICES) +* [SERVICE_BINDING_ROOT](#SERVICE-BINDING-ROOT) (experimental) +* [VCAP_SERVICES_FILE_PATH](#VCAP-SERVICES-FILE-PATH) (experimental) + For more information about the `cf env` command, see [env](http://cli.cloudfoundry.org/en-US/cf/env.html) in the cf CLI documentation. For more information about the `cf set-env` command, see [set-env](http://cli.cloudfoundry.org/en-US/cf/set-env.html) in the cf CLI documentation. The following example demonstrates the environment variables `cf env` displays: @@ -100,12 +105,14 @@ The following table lists the system variables available to your application con | `PATH` | x | x | x | | `PORT` | x | | | | `PWD` | x | x | x | +| `SERVICE_BINDING_ROOT` | x | x | x | | `TMPDIR` | x | | x | | `USER` | x | x | x | | `VCAP_APP_HOST` | x | | | | `VCAP_APP_PORT` | x | | | | `VCAP_APPLICATION` | x | x | x | | `VCAP_SERVICES` | x | x | x | +| `VCAP_SERVICES_FILE_PATH` | x | x | x | ### CF_INSTANCE_ADDR @@ -222,6 +229,12 @@ The present working directory where the buildpack that processed the app ran. For example: `PWD=/home/vcap/app` +### SERVICE_BINDING_ROOT (experimental) + +The root directory location, which contains the service binding information. This needs to be enabled by an app feature flag. See [Service Binding K8s](../services/application-binding.html#service-binding-k8s) for information on how to enable and how service binding data is stored in this directory. + +For example: `SERVICE_BINDING_ROOT=/etc/cf-service-bindings` + ### TMPDIR The directory location where temporary and staging files are stored. @@ -270,6 +283,8 @@ This environment variable contains the associated attributes for a deployed app. For bindable services, <%= vars.app_runtime_abbr %> adds connection details to the `VCAP_SERVICES` environment variable when you restart your app, after binding a service instance to your app. For more information about bindable services, see [Services overview](../services/index.html). +This is the default [Credential Delivery Method](../services/application-binding.html#credential-delivery-methods). + <%= vars.app_runtime_abbr %> returns the results as a JSON document that contains an object for each service for which one or more instances are bound to the app. The service object contains a child object for each instance of the service that is bound to the app. The following table defines the attributes that describe a bound service. The key for each service in the JSON document is the same as the value of the "label" attribute. @@ -341,6 +356,11 @@ VCAP_SERVICES= } ~~~ +### VCAP_SERVICES_FILE_PATH (experimental) + +The path to the file containing the service binding information in JSON format. This needs to be enabled by an app feature flag. See [File-based VCAP services](../services/application-binding.html#file-based-vcap-services) for more information. + +For example: `VCAP_SERVICES_FILE_PATH=/etc/cf-service-bindings/vcap_services` ## Environment variable groups diff --git a/deploy-apps/large-app-deploy.html.md.erb b/deploy-apps/large-app-deploy.html.md.erb index ac7de665..ca3f91f9 100644 --- a/deploy-apps/large-app-deploy.html.md.erb +++ b/deploy-apps/large-app-deploy.html.md.erb @@ -26,6 +26,8 @@ To deploy large apps to <%= vars.app_runtime_abbr %>, ensure that: * The size of each environment variable for your app does not exceed 130 KB. This includes <%= vars.app_runtime_abbr %> system environment variables such as `VCAP_SERVICES` and `VCAP_APPLICATION`. For more information, see [<%= vars.app_runtime_abbr %> environment variables](environment-variable.html). +* If VCAP_SERVICES does get too large either because of too many service bindings or too much data provided by the services, check out the other two [Credential Delivery Methods](../services/application-binding.html#credential-delivery-methods) which have a limit of 1 MB. + * You push only the files that are necessary for your app. To meet this requirement, push only the directory for your app, and remove unneeded files or use the `.cfignore` file to specify excluded files. For more information about specifying excluded files, see [Ignore unnecessary files when pushing](prepare-to-deploy.html#exclude) in _Considerations for Designing and Running an App in the Cloud_. * You configure Cloud Foundry Command Line Interface (cf CLI) staging, startup, and timeout settings to override settings in the manifest, as necessary: diff --git a/deploy-apps/manifest-attributes.html.md.erb b/deploy-apps/manifest-attributes.html.md.erb index 55ef625f..f44961e6 100644 --- a/deploy-apps/manifest-attributes.html.md.erb +++ b/deploy-apps/manifest-attributes.html.md.erb @@ -695,7 +695,7 @@ For example:
      • You must name variables with alphanumeric characters and underscores. Non-conforming variable names might cause unpredictable behavior.
      • -
      • Do not use user-provided environment variables for security sensitive information such as credentials, because they might unintentionally show up in cf CLI output and Cloud Controller logs. Use user-provided service instances instead. The system-provided environment variable VCAP_SERVICES is properly redacted for user roles such as Space Supporter and in Cloud Controller log files.
      • +
      • Do not use user-provided environment variables for security sensitive information such as credentials, because they might unintentionally show up in cf CLI output and Cloud Controller logs. Use user-provided service instances instead. Credentials which are provided to the app via service bindings are redacted for user roles such as Space Supporter and in Cloud Controller log files.
      @@ -776,8 +776,7 @@ For example: - instance_XYZ ``` -You can bind an app to a service instance by setting the `VCAP_SERVICES` environment variable. For more information, see [Bind a -service](../services/application-binding.html#bind) in _Delivering Service Credentials to an App_. +For more information, see [Bind a service](../services/application-binding.html#bind) in _Delivering Service Credentials to an App_. ## Deprecated app manifest features diff --git a/services/_using-vol-services.html.md.erb b/services/_using-vol-services.html.md.erb index 7470ac76..2ebcaa62 100644 --- a/services/_using-vol-services.html.md.erb +++ b/services/_using-vol-services.html.md.erb @@ -133,6 +133,8 @@ To access the volume service from your app, you must know which file path to use You can view the file path in the details of the service binding, which are available from the `VCAP_SERVICES` environment variable. See [VCAP_SERVICES](../deploy-apps/environment-variable.html#view-env). +Check [Credential Delivery Methods](./application-binding.html#credential-delivery-methods) on how to retrieve the volume mount information if you chose to use file-based service bindings. + To access the volume service from your app: 1. View environment variables for your app. Run: diff --git a/services/application-binding.html.md.erb b/services/application-binding.html.md.erb index 158e821c..c7d325d4 100644 --- a/services/application-binding.html.md.erb +++ b/services/application-binding.html.md.erb @@ -9,7 +9,9 @@ You can bind your apps to service instances for the purpose of generating creden ## Bind a service instance -Binding a service instance to your app triggers credentials to be provisioned for the service instance and delivered to the app runtime in the [VCAP_SERVICES](../deploy-apps/environment-variable.html) environment variable. For details about consuming these credentials with your app, see [Using bound service instances](#use). +Binding a service instance to your app triggers credentials to be provisioned for the service instance and delivered to the app runtime. CloudFoundry offers 3 different methods to deliver those credentials to the app. + +For details about the different delivery methods and consumption of these credentials with your app, see [Credential Delivery Methods](#credential-delivery-methods). Not all services support binding, as some services deliver value to users directly without integration with an app. In many cases, binding credentials are unique to an app, and another app bound to the same service instance receives different credentials, but this depends on the service. @@ -25,6 +27,140 @@ $ cf restart my-app

      You must restart or in some cases re-push your app for changes to be applied to the VCAP_SERVICES environment variable and for the app to recognize these changes.

      +### Credential Delivery Methods + +After your service instance is created and bound to your app, the credentials together with some metadata are available in the app container and can be consumed by your app. +There are the following three delivery methods, which are mutually exclusive. The developer can choose which one to use and needs to adjust the consumption in the app accordingly. +For details about consuming credentials specific to your development framework, see the Service Binding section in the documentation for your framework's [buildpack](../../buildpacks/index.html). + +#### Default VCAP_SERVICES environment variable + +By default credentials and additional metadata for all bound service instances are stored in the VCAP_SERVICES environment variable. + +There are two methods developers can use to have their apps consume binding credentials. + +* **Parse the JSON yourself:** See the documentation for [VCAP_SERVICES](../deploy-apps/environment-variable.html#VCAP-SERVICES). Helper libraries are available for some frameworks. +* **Auto-configuration:** Some buildpacks create a service connection for you by creating additional environment variables, updating config files, or passing system parameters to the JVM. + +For checking the binding data manually app devlopers can use `cf env`. See [View Env](../deploy-apps/environment-variable.html#view-env). + +

      +The maximum size of content of the VCAP_SERVICES environment variable is 130 KB. If you want to bind more services to the app or the services you want to bind provide lots of data, you can use one of the other methods.

      + +#### File-based VCAP services (experimental) + +This delivery method is used when the app feature [file-based-vcap-services](https://v3-apidocs.cloudfoundry.org/index.html#app-features) is enabled. +The environment variable [VCAP_SERVICES_FILE_PATH](../deploy-apps/environment-variable.html#VCAP-SERVICES-FILE-PATH) will be made available in the app container and contains the path to a file containing the same content as the VCAP_SERVICES environment variable above. + +The binding data can be viewed like this: + +~~~ +cf ssh -c 'cat $VCAP_SERVICES_FILE_PATH' +~~~ + +

      +The vcap_services file content cannot exceed 1 MB, otherwise an `IncompatibleBindings` error is raised.

      + +#### Service Binding K8s (experimental) + +This delivery method is used when the app feature [service-binding-k8s](https://v3-apidocs.cloudfoundry.org/index.html#app-features) is enabled. +The environment variable [SERVICE_BINDING_ROOT](../deploy-apps/environment-variable.html#SERVICE-BINDING-ROOT) will be made available in the app container and contains the path to the root folder of a file structure containing binding information. +This method is fully compatible with the specification on [servicebinding.io](https://servicebinding.io/), which is used by Kubernetes as well. + +The binding data can be viewed like this: + +~~~ +cf ssh -c 'find $SERVICE_BINDING_ROOT -type f -exec bash -c "echo {}: \$(cat {})" \;' +~~~ + +

      +The bytesize of all files and their content combined cannot exceed 1 MB, otherwise an `IncompatibleBindings` error is raised.

      + +Here are some examples outlining the transformation of VCAP_SERVICES to the file structure: + +Nested structures inside their value will be serialized as JSON objects. The same applies if the value is a list. + +~~~ +VCAP_SERVICES= { + "foo": [ + { + "name": "foo", + "credentials": { + "simple": "value", + "deeply": { + "nested": "value" + }, + "list": ["v", "a", "l", "u", "e"] + } + } + ] +} + +Service Binding Files: + foo/name: foo + foo/simple: value + foo/deeply: {"nested":"value"} + foo/list: ["v","a","l","u","e"] +~~~ + +Existing credential keys can be overwritten by other attributes, that are [VCAP_SERVICES](../deploy-apps/environment-variable.html#VCAP-SERVICES) attributes plus type and provider. The full list of reserved file names is: binding-guid, binding-name, instance-guid, instance-name, name, label, tags, plan, syslog-drain-url, volume-mounts, type, and provider. Overwriting an existing key does not result in an error. + +~~~ +VCAP_SERVICES= { + "foo": [ + { + "name": "foo", + "credentials": { + "name": "user", + "secret": "password" + } + } + ] +} + +Service Binding Files: + foo/name: foo + foo/secret: password +~~~ + +Empty lists or null values are omitted, i.e. no file will be created. + +~~~ +VCAP_SERVICES= { + "foo": [ + { + "name": "foo", + "binding_guid": "45436ca8-0a7c-45e3-9439-ca1b44db7a2b", + "syslog_drain_url": null, + "volume_mounts": [] + } + ] +} + +Service Binding Files: + foo/name: foo + foo/binding-guid: 45436ca8-0a7c-45e3-9439-ca1b44db7a2b +~~~ + +Binding names and keys resulting in filenames must match [a-z0-9\-.]{1,253}. Invalid binding names and keys will result in IncompatibleBindings error. VCAP_SERVICES attributes are transformed to comply to this schema, i.e. underscores are replaced by hyphens, so that e.g. VCAP_SERVICES attribute binding_guid becomes file name binding-guid. + +~~~ +VCAP_SERVICES= { + "foo": [ + { + "name": "foo", + "binding_guid": "45436ca8-0a7c-45e3-9439-ca1b44db7a2b", + "instance_guid": "83745ca8-0a7c-45e3-9439-ca1b44db7a2b" + } + ] +} + +Service Binding Files: + foo/name: foo + foo/binding-guid: 45436ca8-0a7c-45e3-9439-ca1b44db7a2b + foo/instance-guid: 83745ca8-0a7c-45e3-9439-ca1b44db7a2b +~~~ + ### Arbitrary parameters Some services support additional configuration parameters with the bind request. These parameters are passed in a valid JSON object containing service-specific configuration parameters, provided either in-line or in a file. For a list of supported configuration parameters, see documentation for the particular service offering. @@ -102,15 +238,6 @@ The provided name is available in the `name` and `binding_name` properties in th } ~~~ -### Using bound service instances - -After your service instance is created and bound to your app, you must configure the app to dynamically fetch the credentials for your service instance. The [VCAP_SERVICES](../deploy-apps/environment-variable.html#VCAP-SERVICES) environment variable contains credentials and additional metadata for all bound service instances. There are two methods developers can use to have their apps consume binding credentials. - -* **Parse the JSON yourself:** See the documentation for [VCAP_SERVICES](../deploy-apps/environment-variable.html#VCAP-SERVICES). Helper libraries are available for some frameworks. -* **Auto-configuration:** Some buildpacks create a service connection for you by creating additional environment variables, updating config files, or passing system parameters to the JVM. - -For details about consuming credentials specific to your development framework, see the Service Binding section in the documentation for your framework's [buildpack](../../buildpacks/index.html). - ## Update service credentials This section describes how to update service instance credentials. diff --git a/services/managing-services.html.md.erb b/services/managing-services.html.md.erb index 127dd4ac..be0ea4a9 100644 --- a/services/managing-services.html.md.erb +++ b/services/managing-services.html.md.erb @@ -82,7 +82,7 @@ OK ### Instance tags _Instance tags require cf CLI v6.12.1+_ -Some services provide a list of tags that Cloud Foundry delivers in the [VCAP_SERVICES environment variable](../deploy-apps/environment-variable.html#VCAP-SERVICES). These tags provide developers with a more generic way for apps to parse `VCAP_SERVICES` for credentials. Developers might provide their own tags when creating a service instance by including the `-t` flag followed by a comma-separated list of tags. +Some services provide a list of tags that Cloud Foundry delivers to the app when the service is bound. These are included in the [VCAP_SERVICES environment variable](../deploy-apps/environment-variable.html#VCAP-SERVICES) or the file system epending on the chosen [Credential Delivery Method](./application-binding.html#credential-delivery-methods). These tags provide developers with a more generic way for apps to parse the service binding data for credentials. Developers might provide their own tags when creating a service instance by including the `-t` flag followed by a comma-separated list of tags. Example providing a comma-separated list of tags: @@ -151,7 +151,7 @@ Not all services support binding, as some services deliver value to users direct Depending on the service, binding a service instance to your app might deliver credentials for the service instance to the app. See [Delivering service credentials to an app](application-binding.html) for more information. Binding a service instance to an app can trigger app logs to be streamed to the service instance. See [Streaming app logs to log management services](log-management.html). -You must restart, or in some cases, re-push your app for changes to be applied to the VCAP_SERVICES environment variable and for the app to recognize these changes. +You must restart, or in some cases, re-push your app, so that new or changed binding data is delivered in the VCAP_SERVICES environment variable or the file system depending on the chosen [Credential Delivery Method](./application-binding.html#credential-delivery-methods).
       $ cf bind-service my-app mydb
      @@ -222,9 +222,9 @@ Binding service my-db to app rails-sample in org console / space development as
       
       ### Unbind a service instance from an app
       
      -Unbinding a service instance from an app removes the credentials created for your app from the [VCAP_SERVICES](../deploy-apps/environment-variable.html) environment variable.
      +Unbinding a service instance from an app removes the credentials from the VCAP_SERVICES environment variable or the file system depending on the chosen [Credential Delivery Method](./application-binding.html#credential-delivery-methods).
       
      -You must restart or in some cases re-push your app for changes to be applied to the VCAP_SERVICES environment variable and for the app to recognize these changes.
      +You must restart or in some cases re-push your app for changes to be applied.
       
       
       $ cf unbind-service my-app mydb
      @@ -252,7 +252,7 @@ OK
       
       ## Rename a service instance
       
      -You can change the name given to a service instance. Upon restarting any bound apps, the name of the instance changes in the [VCAP_SERVICES](../deploy-apps/environment-variable.html) environment variable. If your app depends on the instance name for discovering credentials, changing the name might break your app's use of the service instance.
      +You can change the name given to a service instance. Upon restarting any bound apps, the name of the instance changes in the [VCAP_SERVICES](../deploy-apps/environment-variable.html) environment variable or the file system depending on the chosen [Credential Delivery Method](./application-binding.html#credential-delivery-methods). If your app depends on the instance name for discovering credentials, changing the name might break your app's use of the service instance.
       
       
       $ cf rename-service mydb mydb1
      @@ -294,8 +294,6 @@ Updating service instance mydb as user@example.com...
       ###  Instance tags
       _Instance tags require cf CLI v6.12.1+_
       
      -Some services provide a list of tags that Cloud Foundry delivers in the [VCAP_SERVICES environment variable](../deploy-apps/environment-variable.html#VCAP-SERVICES). These tags provide developers with a more generic way for apps to parse `VCAP_SERVICES` for credentials. Developers can provide their own tags when creating a service instance by including a comma-separated list of tags with the `-t` flag.
      -
       
       $ cf update-service my-db -t "staging, web"
       
      diff --git a/services/user-provided.html.md.erb b/services/user-provided.html.md.erb
      index c2112265..e76fb545 100644
      --- a/services/user-provided.html.md.erb
      +++ b/services/user-provided.html.md.erb
      @@ -21,7 +21,7 @@ The alias for [cf create-user-provided-service](http://cli.cloudfoundry.org/en-U
       
       Suppose a developer obtains a URL, port, user name, and password for communicating with an Oracle database managed outside of Cloud Foundry. The developer can manually create custom environment variables to configure their app with these credentials (of course you never hard code these credentials in your app!).
       
      -User-provided service instances allow developers to configure their apps with these using the familiar [App binding](application-binding.html) operation and the same app runtime environment variable used by Cloud Foundry to deliver credentials for Marketplace services ([VCAP_SERVICES](../deploy-apps/environment-variable.html#VCAP-SERVICES)).
      +User-provided service instances allow developers to configure their apps with these using the familiar [App binding](application-binding.html) operation and the same [Credential Delivery Methods](./application-binding.html#credential-delivery-methods) used by Cloud Foundry to deliver credentials for Marketplace services.
       
       
       cf cups SERVICE_INSTANCE -p '{"username":"admin","password":"pa55woRD"}'
      
      From ec9823a05170ef923174edabbc58a0de5eaf505e Mon Sep 17 00:00:00 2001
      From: Sven Krieger <37476281+svkrieger@users.noreply.github.com>
      Date: Thu, 27 Mar 2025 12:59:00 +0100
      Subject: [PATCH 102/132] Fix typos, format, phrasing
      
      ---
       services/application-binding.html.md.erb | 34 ++++++++++++------------
       services/managing-services.html.md.erb   |  2 +-
       services/user-provided.html.md.erb       |  2 +-
       3 files changed, 19 insertions(+), 19 deletions(-)
      
      diff --git a/services/application-binding.html.md.erb b/services/application-binding.html.md.erb
      index c7d325d4..223539c6 100644
      --- a/services/application-binding.html.md.erb
      +++ b/services/application-binding.html.md.erb
      @@ -42,7 +42,7 @@ There are two methods developers can use to have their apps consume binding cred
       * **Parse the JSON yourself:** See the documentation for [VCAP_SERVICES](../deploy-apps/environment-variable.html#VCAP-SERVICES). Helper libraries are available for some frameworks.
       * **Auto-configuration:** Some buildpacks create a service connection for you by creating additional environment variables, updating config files, or passing system parameters to the JVM.
       
      -For checking the binding data manually app devlopers can use `cf env`. See [View Env](../deploy-apps/environment-variable.html#view-env).
      +For checking the binding data manually app developers can use `cf env`. See [View Env](../deploy-apps/environment-variable.html#view-env).
       
       

      The maximum size of content of the VCAP_SERVICES environment variable is 130 KB. If you want to bind more services to the app or the services you want to bind provide lots of data, you can use one of the other methods.

      @@ -54,12 +54,12 @@ The environment variable [VCAP_SERVICES_FILE_PATH](../deploy-apps/environment-va The binding data can be viewed like this: -~~~ +``` cf ssh -c 'cat $VCAP_SERVICES_FILE_PATH' -~~~ +```

      -The vcap_services file content cannot exceed 1 MB, otherwise an `IncompatibleBindings` error is raised.

      +The vcap_services file content cannot exceed 1 MB, otherwise an IncompatibleBindings error is raised.

      #### Service Binding K8s (experimental) @@ -69,18 +69,18 @@ This method is fully compatible with the specification on [servicebinding.io](ht The binding data can be viewed like this: -~~~ +``` cf ssh -c 'find $SERVICE_BINDING_ROOT -type f -exec bash -c "echo {}: \$(cat {})" \;' -~~~ +```

      -The bytesize of all files and their content combined cannot exceed 1 MB, otherwise an `IncompatibleBindings` error is raised.

      +The bytesize of all files and their content combined cannot exceed 1 MB, otherwise an IncompatibleBindings error is raised.

      Here are some examples outlining the transformation of VCAP_SERVICES to the file structure: Nested structures inside their value will be serialized as JSON objects. The same applies if the value is a list. -~~~ +``` VCAP_SERVICES= { "foo": [ { @@ -101,11 +101,11 @@ Service Binding Files: foo/simple: value foo/deeply: {"nested":"value"} foo/list: ["v","a","l","u","e"] -~~~ +``` Existing credential keys can be overwritten by other attributes, that are [VCAP_SERVICES](../deploy-apps/environment-variable.html#VCAP-SERVICES) attributes plus type and provider. The full list of reserved file names is: binding-guid, binding-name, instance-guid, instance-name, name, label, tags, plan, syslog-drain-url, volume-mounts, type, and provider. Overwriting an existing key does not result in an error. -~~~ +``` VCAP_SERVICES= { "foo": [ { @@ -121,11 +121,11 @@ VCAP_SERVICES= { Service Binding Files: foo/name: foo foo/secret: password -~~~ +``` Empty lists or null values are omitted, i.e. no file will be created. -~~~ +``` VCAP_SERVICES= { "foo": [ { @@ -140,11 +140,11 @@ VCAP_SERVICES= { Service Binding Files: foo/name: foo foo/binding-guid: 45436ca8-0a7c-45e3-9439-ca1b44db7a2b -~~~ +``` Binding names and keys resulting in filenames must match [a-z0-9\-.]{1,253}. Invalid binding names and keys will result in IncompatibleBindings error. VCAP_SERVICES attributes are transformed to comply to this schema, i.e. underscores are replaced by hyphens, so that e.g. VCAP_SERVICES attribute binding_guid becomes file name binding-guid. -~~~ +``` VCAP_SERVICES= { "foo": [ { @@ -159,7 +159,7 @@ Service Binding Files: foo/name: foo foo/binding-guid: 45436ca8-0a7c-45e3-9439-ca1b44db7a2b foo/instance-guid: 83745ca8-0a7c-45e3-9439-ca1b44db7a2b -~~~ +``` ### Arbitrary parameters @@ -226,7 +226,7 @@ OK The provided name is available in the `name` and `binding_name` properties in the [VCAP_SERVICES](../deploy-apps/environment-variable.html) environment variable: -~~~ +``` "VCAP_SERVICES": { "service-name": [ { @@ -236,7 +236,7 @@ The provided name is available in the `name` and `binding_name` properties in th } ] } -~~~ +``` ## Update service credentials diff --git a/services/managing-services.html.md.erb b/services/managing-services.html.md.erb index be0ea4a9..d074470c 100644 --- a/services/managing-services.html.md.erb +++ b/services/managing-services.html.md.erb @@ -82,7 +82,7 @@ OK ### Instance tags _Instance tags require cf CLI v6.12.1+_ -Some services provide a list of tags that Cloud Foundry delivers to the app when the service is bound. These are included in the [VCAP_SERVICES environment variable](../deploy-apps/environment-variable.html#VCAP-SERVICES) or the file system epending on the chosen [Credential Delivery Method](./application-binding.html#credential-delivery-methods). These tags provide developers with a more generic way for apps to parse the service binding data for credentials. Developers might provide their own tags when creating a service instance by including the `-t` flag followed by a comma-separated list of tags. +Some services provide a list of tags that Cloud Foundry delivers to the app when the service is bound. These are included in the [VCAP_SERVICES environment variable](../deploy-apps/environment-variable.html#VCAP-SERVICES) or the file system depending on the chosen [Credential Delivery Method](./application-binding.html#credential-delivery-methods). These tags provide developers with a more generic way for apps to parse the service binding data for credentials. Developers might provide their own tags when creating a service instance by including the `-t` flag followed by a comma-separated list of tags. Example providing a comma-separated list of tags: diff --git a/services/user-provided.html.md.erb b/services/user-provided.html.md.erb index e76fb545..dacb6e3a 100644 --- a/services/user-provided.html.md.erb +++ b/services/user-provided.html.md.erb @@ -21,7 +21,7 @@ The alias for [cf create-user-provided-service](http://cli.cloudfoundry.org/en-U Suppose a developer obtains a URL, port, user name, and password for communicating with an Oracle database managed outside of Cloud Foundry. The developer can manually create custom environment variables to configure their app with these credentials (of course you never hard code these credentials in your app!). -User-provided service instances allow developers to configure their apps with these using the familiar [App binding](application-binding.html) operation and the same [Credential Delivery Methods](./application-binding.html#credential-delivery-methods) used by Cloud Foundry to deliver credentials for Marketplace services. +User-provided service instances allow developers to inject credentials into the app container using the familiar [App binding](application-binding.html) operation and the same [Credential Delivery Methods](./application-binding.html#credential-delivery-methods) used by Cloud Foundry to deliver credentials for Marketplace services.
       cf cups SERVICE_INSTANCE -p '{"username":"admin","password":"pa55woRD"}'
      
      From 92475ebeb87dbfbfbc51a7d77419561afa3827bf Mon Sep 17 00:00:00 2001
      From: anita-flegg 
      Date: Thu, 27 Mar 2025 12:41:40 -0700
      Subject: [PATCH 103/132] style edits for recent PRs
      
      ---
       deploy-apps/environment-variable.html.md.erb |  6 +++---
       deploy-apps/large-app-deploy.html.md.erb     |  2 +-
       deploy-apps/manifest-attributes.html.md.erb  |  2 +-
       services/_using-vol-services.html.md.erb     |  2 +-
       services/application-binding.html.md.erb     | 14 +++++++-------
       services/managing-services.html.md.erb       |  8 ++++----
       6 files changed, 17 insertions(+), 17 deletions(-)
      
      diff --git a/deploy-apps/environment-variable.html.md.erb b/deploy-apps/environment-variable.html.md.erb
      index 9da2c351..66737356 100644
      --- a/deploy-apps/environment-variable.html.md.erb
      +++ b/deploy-apps/environment-variable.html.md.erb
      @@ -15,7 +15,7 @@ Environment variables are the means <%= vars.app_runtime_abbr %> uses to communi
       For information about setting your own app-specific environment variables, see the [Environment variable](./manifest.html#env-block) in _Deploying with app manifests_.
       
       

      -Do not use user-provided environment variables for security-sensitive information such as credentials. They might unintentionally show up in cf CLI output and Cloud Controller logs. Use user-provided service instances instead. Credentials which are provided to the app via service bindings are redacted for user roles such as Space Supporter and in Cloud Controller log files.

      +Do not use user-provided environment variables for security-sensitive information such as credentials. They might unintentionally show up in cf CLI output and Cloud Controller logs. Use user-provided service instances instead. Credentials that are provided to the app through service bindings are redacted for user roles such as Space Supporter and in Cloud Controller log files.

      The maximum size of an environment variable is 130 KB. This limit applies also to <%= vars.app_runtime_abbr %> system environment variables such as VCAP_SERVICES and VCAP_APPLICATION.

      @@ -231,7 +231,7 @@ For example: `PWD=/home/vcap/app` ### SERVICE_BINDING_ROOT (experimental) -The root directory location, which contains the service binding information. This needs to be enabled by an app feature flag. See [Service Binding K8s](../services/application-binding.html#service-binding-k8s) for information on how to enable and how service binding data is stored in this directory. +The root directory location, which contains the service binding information. This must be enabled by an app feature flag. See [Service Binding K8s](../services/application-binding.html#service-binding-k8s) for information about how to enable this, and how service binding data is stored in this directory. For example: `SERVICE_BINDING_ROOT=/etc/cf-service-bindings` @@ -358,7 +358,7 @@ VCAP_SERVICES= ### VCAP_SERVICES_FILE_PATH (experimental) -The path to the file containing the service binding information in JSON format. This needs to be enabled by an app feature flag. See [File-based VCAP services](../services/application-binding.html#file-based-vcap-services) for more information. +This is the path to the file containing the service binding information in JSON format. It must be enabled by an app feature flag. See [File-based VCAP services](../services/application-binding.html#file-based-vcap-services) for more information. For example: `VCAP_SERVICES_FILE_PATH=/etc/cf-service-bindings/vcap_services` diff --git a/deploy-apps/large-app-deploy.html.md.erb b/deploy-apps/large-app-deploy.html.md.erb index ca3f91f9..e9290868 100644 --- a/deploy-apps/large-app-deploy.html.md.erb +++ b/deploy-apps/large-app-deploy.html.md.erb @@ -26,7 +26,7 @@ To deploy large apps to <%= vars.app_runtime_abbr %>, ensure that: * The size of each environment variable for your app does not exceed 130 KB. This includes <%= vars.app_runtime_abbr %> system environment variables such as `VCAP_SERVICES` and `VCAP_APPLICATION`. For more information, see [<%= vars.app_runtime_abbr %> environment variables](environment-variable.html). -* If VCAP_SERVICES does get too large either because of too many service bindings or too much data provided by the services, check out the other two [Credential Delivery Methods](../services/application-binding.html#credential-delivery-methods) which have a limit of 1 MB. +* If VCAP_SERVICES gets too large, either because of too many service bindings or too much data provided by the services, review the other two [Credential Delivery Methods](../services/application-binding.html#credential-delivery-methods); both of these have a limit of 1 MB. * You push only the files that are necessary for your app. To meet this requirement, push only the directory for your app, and remove unneeded files or use the `.cfignore` file to specify excluded files. For more information about specifying excluded files, see [Ignore unnecessary files when pushing](prepare-to-deploy.html#exclude) in _Considerations for Designing and Running an App in the Cloud_. diff --git a/deploy-apps/manifest-attributes.html.md.erb b/deploy-apps/manifest-attributes.html.md.erb index f44961e6..60518331 100644 --- a/deploy-apps/manifest-attributes.html.md.erb +++ b/deploy-apps/manifest-attributes.html.md.erb @@ -695,7 +695,7 @@ For example:
      • You must name variables with alphanumeric characters and underscores. Non-conforming variable names might cause unpredictable behavior.
      • -
      • Do not use user-provided environment variables for security sensitive information such as credentials, because they might unintentionally show up in cf CLI output and Cloud Controller logs. Use user-provided service instances instead. Credentials which are provided to the app via service bindings are redacted for user roles such as Space Supporter and in Cloud Controller log files.
      • +
      • Do not use user-provided environment variables for security sensitive information such as credentials, because they might unintentionally show up in cf CLI output and Cloud Controller logs. Use user-provided service instances instead. Credentials that are provided to the app through service bindings are redacted for user roles such as Space Supporter and in Cloud Controller log files.
      diff --git a/services/_using-vol-services.html.md.erb b/services/_using-vol-services.html.md.erb index 2ebcaa62..50af4505 100644 --- a/services/_using-vol-services.html.md.erb +++ b/services/_using-vol-services.html.md.erb @@ -133,7 +133,7 @@ To access the volume service from your app, you must know which file path to use You can view the file path in the details of the service binding, which are available from the `VCAP_SERVICES` environment variable. See [VCAP_SERVICES](../deploy-apps/environment-variable.html#view-env). -Check [Credential Delivery Methods](./application-binding.html#credential-delivery-methods) on how to retrieve the volume mount information if you chose to use file-based service bindings. +See [Credential Delivery Methods](./application-binding.html#credential-delivery-methods) for information about how to retrieve the volume mount information if you use file-based service bindings. To access the volume service from your app: diff --git a/services/application-binding.html.md.erb b/services/application-binding.html.md.erb index 223539c6..ba33e327 100644 --- a/services/application-binding.html.md.erb +++ b/services/application-binding.html.md.erb @@ -29,13 +29,13 @@ You must restart or in some cases re-push your app for changes to be applied to ### Credential Delivery Methods -After your service instance is created and bound to your app, the credentials together with some metadata are available in the app container and can be consumed by your app. -There are the following three delivery methods, which are mutually exclusive. The developer can choose which one to use and needs to adjust the consumption in the app accordingly. +After your service instance is created and bound to your app, the credentials, along with some metadata, are available in the app container and can be consumed by your app. +There are three delivery methods, which are mutually exclusive. The developer can choose which one to use and then must adjust the consumption in the app accordingly. For details about consuming credentials specific to your development framework, see the Service Binding section in the documentation for your framework's [buildpack](../../buildpacks/index.html). #### Default VCAP_SERVICES environment variable -By default credentials and additional metadata for all bound service instances are stored in the VCAP_SERVICES environment variable. +By default, credentials and additional metadata for all bound service instances are stored in the VCAP_SERVICES environment variable. There are two methods developers can use to have their apps consume binding credentials. @@ -64,7 +64,7 @@ The vcap_services file content cannot exceed 1 MB, otherwise an Incompatib #### Service Binding K8s (experimental) This delivery method is used when the app feature [service-binding-k8s](https://v3-apidocs.cloudfoundry.org/index.html#app-features) is enabled. -The environment variable [SERVICE_BINDING_ROOT](../deploy-apps/environment-variable.html#SERVICE-BINDING-ROOT) will be made available in the app container and contains the path to the root folder of a file structure containing binding information. +The environment variable [SERVICE_BINDING_ROOT](../deploy-apps/environment-variable.html#SERVICE-BINDING-ROOT) is made available in the app container. It contains the path to the root folder of a file structure containing binding information. This method is fully compatible with the specification on [servicebinding.io](https://servicebinding.io/), which is used by Kubernetes as well. The binding data can be viewed like this: @@ -103,7 +103,7 @@ Service Binding Files: foo/list: ["v","a","l","u","e"] ``` -Existing credential keys can be overwritten by other attributes, that are [VCAP_SERVICES](../deploy-apps/environment-variable.html#VCAP-SERVICES) attributes plus type and provider. The full list of reserved file names is: binding-guid, binding-name, instance-guid, instance-name, name, label, tags, plan, syslog-drain-url, volume-mounts, type, and provider. Overwriting an existing key does not result in an error. +Existing credential keys can be overwritten by other attributes -- [VCAP_SERVICES](../deploy-apps/environment-variable.html#VCAP-SERVICES) attributes plus type and provider. The full list of reserved file names is: binding-guid, binding-name, instance-guid, instance-name, name, label, tags, plan, syslog-drain-url, volume-mounts, type, and provider. Overwriting an existing key does not result in an error. ``` VCAP_SERVICES= { @@ -123,7 +123,7 @@ Service Binding Files: foo/secret: password ``` -Empty lists or null values are omitted, i.e. no file will be created. +Empty lists or null values are omitted; that is, no file will be created. ``` VCAP_SERVICES= { @@ -142,7 +142,7 @@ Service Binding Files: foo/binding-guid: 45436ca8-0a7c-45e3-9439-ca1b44db7a2b ``` -Binding names and keys resulting in filenames must match [a-z0-9\-.]{1,253}. Invalid binding names and keys will result in IncompatibleBindings error. VCAP_SERVICES attributes are transformed to comply to this schema, i.e. underscores are replaced by hyphens, so that e.g. VCAP_SERVICES attribute binding_guid becomes file name binding-guid. +Binding names and keys resulting in filenames must match [a-z0-9\-.]{1,253}. Invalid binding names and keys result in IncompatibleBindings error. VCAP_SERVICES attributes are transformed to comply with this schema; that is, underscores are replaced by hyphens, so that, for example, `VCAP_SERVICES attribute binding_guid` becomes file name `binding-guid`. ``` VCAP_SERVICES= { diff --git a/services/managing-services.html.md.erb b/services/managing-services.html.md.erb index d074470c..83b01300 100644 --- a/services/managing-services.html.md.erb +++ b/services/managing-services.html.md.erb @@ -82,7 +82,7 @@ OK ### Instance tags _Instance tags require cf CLI v6.12.1+_ -Some services provide a list of tags that Cloud Foundry delivers to the app when the service is bound. These are included in the [VCAP_SERVICES environment variable](../deploy-apps/environment-variable.html#VCAP-SERVICES) or the file system depending on the chosen [Credential Delivery Method](./application-binding.html#credential-delivery-methods). These tags provide developers with a more generic way for apps to parse the service binding data for credentials. Developers might provide their own tags when creating a service instance by including the `-t` flag followed by a comma-separated list of tags. +Some services provide a list of tags that Cloud Foundry delivers to the app when the service is bound. These are included in the [VCAP_SERVICES environment variable](../deploy-apps/environment-variable.html#VCAP-SERVICES) or the file system, depending on the chosen [Credential Delivery Method](./application-binding.html#credential-delivery-methods). These tags provide developers with a more generic way for apps to parse the service binding data for credentials. Developers might provide their own tags when creating a service instance by including the `-t` flag followed by a comma-separated list of tags. Example providing a comma-separated list of tags: @@ -151,7 +151,7 @@ Not all services support binding, as some services deliver value to users direct Depending on the service, binding a service instance to your app might deliver credentials for the service instance to the app. See [Delivering service credentials to an app](application-binding.html) for more information. Binding a service instance to an app can trigger app logs to be streamed to the service instance. See [Streaming app logs to log management services](log-management.html). -You must restart, or in some cases, re-push your app, so that new or changed binding data is delivered in the VCAP_SERVICES environment variable or the file system depending on the chosen [Credential Delivery Method](./application-binding.html#credential-delivery-methods). +You must restart, or in some cases re-push, your app so that new or changed binding data is delivered in the VCAP_SERVICES environment variable or the file system, depending on the chosen [Credential Delivery Method](./application-binding.html#credential-delivery-methods).
       $ cf bind-service my-app mydb
      @@ -222,9 +222,9 @@ Binding service my-db to app rails-sample in org console / space development as
       
       ### Unbind a service instance from an app
       
      -Unbinding a service instance from an app removes the credentials from the VCAP_SERVICES environment variable or the file system depending on the chosen [Credential Delivery Method](./application-binding.html#credential-delivery-methods).
      +Unbinding a service instance from an app removes the credentials from the VCAP_SERVICES environment variable or the file system, depending on the chosen [Credential Delivery Method](./application-binding.html#credential-delivery-methods).
       
      -You must restart or in some cases re-push your app for changes to be applied.
      +You must restart, or in some cases re-push, your app for changes to be applied.
       
       
       $ cf unbind-service my-app mydb
      
      From c909981241f272ef00809764bbad0b3b3efbac9a Mon Sep 17 00:00:00 2001
      From: anita-flegg 
      Date: Thu, 27 Mar 2025 13:00:53 -0700
      Subject: [PATCH 104/132] try to fix broken list
      
      ---
       services/log-management.html.md.erb | 13 +++++++------
       1 file changed, 7 insertions(+), 6 deletions(-)
      
      diff --git a/services/log-management.html.md.erb b/services/log-management.html.md.erb
      index cb62d88d..241e12b6 100644
      --- a/services/log-management.html.md.erb
      +++ b/services/log-management.html.md.erb
      @@ -125,15 +125,16 @@ You can create a syslog drain service and bind apps to it using Cloud Foundry Co
           
      When setting up your syslog drain, it is important to choose the correct scheme for your SYSLOG-URL: - - * Use the syslog-tls scheme for endpoints that require TLS or mTLS. - * Use the syslog scheme for endpoints that do not require TLS. - * Use the https scheme when shipping logs to an HTTPS endpoint. +
        +
      • Use the syslog-tls scheme for endpoints that require TLS or mTLS.
      • +
      • Use the syslog scheme for endpoints that do not require TLS.
      • +
      • Use the https scheme when shipping logs to an HTTPS endpoint.
      • +
      If you need to use TLS or mTLS, ensure that you provide the necessary CA certificate. Additionally to the CA certificate for mTLS configuration, both the client certificate and the key must be provided. Ensure that certificates and keys are PEM-encoded as specified in RFC-1422. They should be provided as string values, with new lines represented by the `\n` character, and must not have trailing new lines. You can convert a PEM-encoded certificate string to a processable format using the following command: - +
           $ awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' cert.pem | sed 's/\\n$//' | tr -d '\n'
           
      @@ -142,7 +143,7 @@ You can create a syslog drain service and bind apps to it using Cloud Foundry Co For more information, see [User-provided service instances](./user-provided.html). -2. To bind an app to the service instance, do one of these: +1. To bind an app to the service instance, do one of these: * Run `cf push` with a manifest. The services block in the manifest must specify the service instance that you want to bind. * Run `cf bind-service`: From fbf711e60b3b54c1e42d3bc70cd6f23bb1fff353 Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Thu, 27 Mar 2025 13:39:13 -0700 Subject: [PATCH 105/132] try to fix broken list(2) --- services/log-management.html.md.erb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/services/log-management.html.md.erb b/services/log-management.html.md.erb index 241e12b6..451b3b8e 100644 --- a/services/log-management.html.md.erb +++ b/services/log-management.html.md.erb @@ -125,11 +125,11 @@ You can create a syslog drain service and bind apps to it using Cloud Foundry Co
      When setting up your syslog drain, it is important to choose the correct scheme for your SYSLOG-URL: -
        -
      • Use the syslog-tls scheme for endpoints that require TLS or mTLS.
      • -
      • Use the syslog scheme for endpoints that do not require TLS.
      • -
      • Use the https scheme when shipping logs to an HTTPS endpoint.
      • -
      +
        +
      • Use the syslog-tls scheme for endpoints that require TLS or mTLS.
      • +
      • Use the syslog scheme for endpoints that do not require TLS.
      • +
      • Use the https scheme when shipping logs to an HTTPS endpoint.
      • +
      If you need to use TLS or mTLS, ensure that you provide the necessary CA certificate. Additionally to the CA certificate for mTLS configuration, both the client certificate and the key must be provided. From 42401ea97afff241aa4e4d2631070f0989ce7966 Mon Sep 17 00:00:00 2001 From: Amelia Downs Date: Mon, 31 Mar 2025 11:57:20 -0400 Subject: [PATCH 106/132] Fix CLI command --host to --hostname --- custom-per-route-options.html.md.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom-per-route-options.html.md.erb b/custom-per-route-options.html.md.erb index b1ef488a..706878b0 100644 --- a/custom-per-route-options.html.md.erb +++ b/custom-per-route-options.html.md.erb @@ -56,7 +56,7 @@ To change the per-route `loadbalancing` option of an existing route, you can use For example, to change an app route's algorithm from `least-connection` to `round-robin`, you can run the `update-route` command: ```console -cf update-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin +cf update-route EXAMPLE.COM --hostname MY-HOST --option loadbalancing=round-robin ``` Alternatively, it is also possible to update the per-route load balancing option via the `/v3/routes` API. @@ -79,7 +79,7 @@ To create a route with a per-route `loadbalancing` option, you can use the cli c For example: ```console -cf create-route EXAMPLE.COM --host MY-HOST --option loadbalancing=round-robin +cf create-route EXAMPLE.COM --hostname MY-HOST --option loadbalancing=round-robin ``` Alternatively, it is also possible to create a route with a per-route load balancing option via the `/v3/routes` API: From d7c7e281fb4353fe6e8885abac3506218ba96696 Mon Sep 17 00:00:00 2001 From: Seth Boyles Date: Tue, 1 Apr 2025 11:23:01 -0700 Subject: [PATCH 107/132] update link to revisions --- deploy-apps/rolling-deploy.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index 6882e60f..46a9202b 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -34,7 +34,7 @@ Cloud Foundry provides two different strategies for deployments: * A **Canary** deployment brings up one or more web processes for the new app version, defaulting to one. It then pauses to let app operators or developers evaluate the health of a new version instances. App operators can then choose to either `cancel` or `continue` the deployment. When the deployment is continued, the canary deployment proceeds in the same way as a rolling deployment. * To gradually increase instance counts and check app health in multiple steps, the latest cf CLI v8 supports an `--instance-steps` option that sets a series of increasing instance counts. -Each rolling or canary deployment increments the `revision` count for the new app deployment, as listed by the `cf revisions` command described in [] described in xxyx. +Each rolling or canary deployment increments the `revision` count for the new app deployment, as listed by the `cf revisions` command described in [App Revisions Overview](../revisions.html). The following sections describe the rolling and canary deployment strategies and their limitations. From 81fdb880e6ce8446ba8d6e1ed51bf81a4f3ab37e Mon Sep 17 00:00:00 2001 From: Beyhan Veli Date: Thu, 3 Apr 2025 16:15:26 +0200 Subject: [PATCH 108/132] Note the importance of credentials delivery change --- services/application-binding.html.md.erb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/application-binding.html.md.erb b/services/application-binding.html.md.erb index ba33e327..182b4bfc 100644 --- a/services/application-binding.html.md.erb +++ b/services/application-binding.html.md.erb @@ -33,6 +33,11 @@ After your service instance is created and bound to your app, the credentials, a There are three delivery methods, which are mutually exclusive. The developer can choose which one to use and then must adjust the consumption in the app accordingly. For details about consuming credentials specific to your development framework, see the Service Binding section in the documentation for your framework's [buildpack](../../buildpacks/index.html). +

      +If the application is unable to consume the credentials through the selected delivery method, it may cause downtime for the application. This is because the application won't be able to connect to the services it is bound to. +

      + + #### Default VCAP_SERVICES environment variable By default, credentials and additional metadata for all bound service instances are stored in the VCAP_SERVICES environment variable. From d94afc1d571a9a339ca95de975d8d5d7ee57f993 Mon Sep 17 00:00:00 2001 From: Peter Burkholder Date: Tue, 8 Apr 2025 15:53:50 -0400 Subject: [PATCH 109/132] Use a .zip file for a buildpack --- deploy-apps/manifest-attributes.html.md.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy-apps/manifest-attributes.html.md.erb b/deploy-apps/manifest-attributes.html.md.erb index 60518331..3ca57e61 100644 --- a/deploy-apps/manifest-attributes.html.md.erb +++ b/deploy-apps/manifest-attributes.html.md.erb @@ -123,7 +123,9 @@ You can refer to a buildpack by name in a manifest or a command-line option. The * **Custom buildpacks:** If your app requires a custom buildpack, you can use the `buildpacks` attribute to specify it in a number of ways: * By name: `BUILDPACK`. - * By GitHub URL: `https://github.com/cloudfoundry/java-buildpack.git`. + * By GitHub URL: + * For the source code repo: `https://github.com/cloudfoundry/java-buildpack.git` or + * For a fully-packaged asset: `https://github.com/cloudfoundry/java-buildpack/releases/download/v4.76.0/java-buildpack-v4.76.0.zip` * By GitHub URL with a branch or tag: `https://github.com/cloudfoundry/java-buildpack.git#v3.3.0` for the `v3.3.0` tag. ``` From 9758633949dad12109da3f44e31f3bc2d3037a44 Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Fri, 11 Apr 2025 10:03:57 -0700 Subject: [PATCH 110/132] try again to fix formatting problem(2) --- deploy-apps/routes-domains.html.md.erb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/deploy-apps/routes-domains.html.md.erb b/deploy-apps/routes-domains.html.md.erb index c0e231c4..60b988d4 100644 --- a/deploy-apps/routes-domains.html.md.erb +++ b/deploy-apps/routes-domains.html.md.erb @@ -112,8 +112,8 @@ In <%= vars.app_runtime_abbr %>, a host name is the label that indicates a subdo [cf create-route](https://cli.cloudfoundry.org/en-US/cf/create-route.html) command as shown in this example:
      -$ cf create-route <%= vars.app_domain %> --hostname example-app
      -Creating route example-app.<%= vars.app_domain %> for org example-org / space example-space as username@example.com...
      +$ cf create-route shared-domain.example.com --hostname example-app
      +Creating route example-app.shared-domain.example.com for org example-org / space example-space as username@example.com...
       OK
       
      @@ -122,11 +122,11 @@ The cf CLI v7 create-route command does not require the space as an This command instructs <%= vars.app_runtime_abbr %> to only route requests to apps mapped to this route for these URLs: -* `http://example-app.<%= vars.app_domain %>` - -* `https://example-app.<%= vars.app_domain %>` - -* Any path under either of the these URLs, such as `http://example-app.<%= vars.app_domain %>/bar` +
        +
      • http://example-app.<%= vars.app_domain %>
      • +
      • https://example-app.<%= vars.app_domain %>
      • +
      • Any path under either of the these URLs, such as http://example-app.<%= vars.app_domain %>/bar
      • +
      #### Create an HTTP route without host name From 24a49bc6525c86aa971247db61a55a9f5bf12b4c Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Fri, 11 Apr 2025 10:22:57 -0700 Subject: [PATCH 111/132] try again to fix formatting problem(3) --- deploy-apps/routes-domains.html.md.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deploy-apps/routes-domains.html.md.erb b/deploy-apps/routes-domains.html.md.erb index 60b988d4..a8e7e8b9 100644 --- a/deploy-apps/routes-domains.html.md.erb +++ b/deploy-apps/routes-domains.html.md.erb @@ -128,6 +128,8 @@ This command instructs <%= vars.app_runtime_abbr %> to only route requests to ap
    • Any path under either of the these URLs, such as http://example-app.<%= vars.app_domain %>/bar
    +

    + #### Create an HTTP route without host name This approach creates a route with the same address as the domain itself and is permitted for private domains only. For more information, see [Private From c3597e812b2ea7debde3c5ed9e7e21ebfcafcb88 Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Fri, 11 Apr 2025 10:37:13 -0700 Subject: [PATCH 112/132] try again to fix formatting problem(4) --- deploy-apps/routes-domains.html.md.erb | 42 ++++++++++++++------------ 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/deploy-apps/routes-domains.html.md.erb b/deploy-apps/routes-domains.html.md.erb index a8e7e8b9..eafc7857 100644 --- a/deploy-apps/routes-domains.html.md.erb +++ b/deploy-apps/routes-domains.html.md.erb @@ -77,10 +77,13 @@ Apps running on Windows cells cannot use internal, container-to-container routes To create an internal route: 1. Use the [cf map-route](#map-internal-route) command with an [internal domain](#internal-domains). For example: -
    -    $ cf map-route app apps.internal --hostname app
    -  
    + +
    +      $ cf map-route app apps.internal --hostname app
    +    
    + * After an internal route is mapped to an app, the route resolves to IP addresses of the app instances. The IP addresses are visible in the application container: +
             $ cf ssh app
             vcap@1234:~$ host app.apps.internal
    @@ -88,13 +91,15 @@ To create an internal route:
             app.apps.internal has address 10.255.49.7
             app.apps.internal has address 10.255.49.77
            
    + * To resolve individual instances, prepend the index to the internal route. +
           vcap@1234:~$ host 1.app.apps.internal
           1.app.apps.internal has address 10.255.49.7
           
    -1. Create a network policy that allows your apps to communicate with each other. By default, apps cannot communicate over the container network. For more +2. Create a network policy that allows your apps to communicate with each other. By default, apps cannot communicate over the container network. For more information, see [Configuring container-to-container networking](cf-networking.html) and the [Cloud Foundry CLI reference guide](https://cli.cloudfoundry.org/en-US/cf/add-network-policy.html). ### Create a route @@ -146,11 +151,9 @@ OK If DNS is configured correctly, this command instructs <%= vars.app_runtime_abbr %> to route requests to apps mapped to this route from these URLs: -* `http://<%= vars.private_app_domain %>` - -* `https://<%= vars.private_app_domain %>` - -* Any path under either of these URLs, such as `http://<%= vars.private_app_domain %>/foo` + * `http://<%= vars.private_app_domain %>` + * `https://<%= vars.private_app_domain %>` + * Any path under either of these URLs, such as `http://<%= vars.private_app_domain %>/foo` If there are no other routes for the domain, requests to any subdomain, such as `http://foo.<%= vars.private_app_domain %>`, fail. @@ -165,11 +168,9 @@ OK If DNS is configured for this subdomain, this command instructs <%= vars.app_runtime_abbr %> to route requests to apps mapped to this route from these URLs: -* `http://foo.<%= vars.private_app_domain %>` - -* `https://foo.<%= vars.private_app_domain %>` - -* Any path under either of these URLs, such as `http://foo.<%= vars.private_app_domain %>/foo` + * `http://foo.<%= vars.private_app_domain %>` + * `https://foo.<%= vars.private_app_domain %>` + * Any path under either of these URLs, such as `http://foo.<%= vars.private_app_domain %>/foo` #### Create an HTTP route with wildcard host name @@ -212,11 +213,9 @@ The developer can then map the new routes to different apps by following the pro If the developer maps the first route with path `products` to the `products` app, the second route with path `orders` to the `orders` app, and the last route to the `storefront` app. After this: -* <%= vars.app_runtime_abbr %> routes requests to `http://store.<%= vars.app_domain %>/products` to the `products` app. - -* <%= vars.app_runtime_abbr %> routes requests to `http://store.<%= vars.app_domain %>/orders` to the `orders` app. - -* <%= vars.app_runtime_abbr %> routes requests to `http://store.<%= vars.app_domain %>` to the `storefront` app. + * <%= vars.app_runtime_abbr %> routes requests to `http://store.<%= vars.app_domain %>/products` to the `products` app. + * <%= vars.app_runtime_abbr %> routes requests to `http://store.<%= vars.app_domain %>/orders` to the `orders` app. + * <%= vars.app_runtime_abbr %> routes requests to `http://store.<%= vars.app_domain %>` to the `storefront` app. <%= vars.app_runtime_abbr %> attempts to match routes with a path, and then attempts to match host and domain. @@ -462,7 +461,8 @@ $ cf unmap-route tcp-app <%= vars.tcp_app_domain %> --port 60000 ### Share a route with another space -To follow the procedure in this section, you must use cf CLI v8.5.0 or later. To download cf CLI v8.5.0 or later, see the Cloud Foundry CLI repository on GitHub. +

    +To follow the procedure in this section, you must use cf CLI v8.5.0 or later. To download cf CLI v8.5.0 or later, see the Cloud Foundry CLI repository on GitHub.

    You can share a route with another space using the `cf share-route` command. To move an app to another space, you can share routes with that space to prevent downtime during the transition. Rather than deleting the route in the original space and re-creating the route in the new space, you can share the route with the new space and map it to the app running in that space. @@ -493,6 +493,8 @@ To share a route with another space: cf share-route example.com --hostname example-app --path example-path -s other-space -o other-org +

    + ### Transfer ownership of a route to another space

    From 1b6da3f7e9e9611dbc8c01125200966a2496e830 Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Fri, 11 Apr 2025 11:09:54 -0700 Subject: [PATCH 113/132] change all

     to md snippets
    
    ---
     deploy-apps/routes-domains.html.md.erb | 178 ++++++++++++-------------
     1 file changed, 88 insertions(+), 90 deletions(-)
    
    diff --git a/deploy-apps/routes-domains.html.md.erb b/deploy-apps/routes-domains.html.md.erb
    index eafc7857..020fd8a9 100644
    --- a/deploy-apps/routes-domains.html.md.erb
    +++ b/deploy-apps/routes-domains.html.md.erb
    @@ -78,26 +78,26 @@ To create an internal route:
     
     1. Use the [cf map-route](#map-internal-route) command with an [internal domain](#internal-domains). For example:
     
    -    
    +    ```console
           $ cf map-route app apps.internal --hostname app
    -    
    + ``` * After an internal route is mapped to an app, the route resolves to IP addresses of the app instances. The IP addresses are visible in the application container: -
    +      ```console
             $ cf ssh app
             vcap@1234:~$ host app.apps.internal
             app.apps.internal has address 10.255.169.200
             app.apps.internal has address 10.255.49.7
             app.apps.internal has address 10.255.49.77
    -       
    + ``` * To resolve individual instances, prepend the index to the internal route. -
    +      ```console
           vcap@1234:~$ host 1.app.apps.internal
           1.app.apps.internal has address 10.255.49.7
    -      
    + ``` 2. Create a network policy that allows your apps to communicate with each other. By default, apps cannot communicate over the container network. For more information, see [Configuring container-to-container networking](cf-networking.html) and the [Cloud Foundry CLI reference guide](https://cli.cloudfoundry.org/en-US/cf/add-network-policy.html). @@ -116,11 +116,11 @@ In <%= vars.app_runtime_abbr %>, a host name is the label that indicates a subdo `<%= vars.app_domain %>`, a developer can create the route `example-app.<%= vars.app_domain %>` by specifying the host name `example-app` with the [cf create-route](https://cli.cloudfoundry.org/en-US/cf/create-route.html) command as shown in this example: -
    +```console
     $ cf create-route shared-domain.example.com --hostname example-app
     Creating route example-app.shared-domain.example.com for org example-org / space example-space as username@example.com...
     OK
    -
    +```

    The cf CLI v7 create-route command does not require the space as an argument. It uses the space you are targeting.

    @@ -143,11 +143,11 @@ Domains](#private-domains) . A developer can create a route from the domain `<%= vars.private_app_domain %>` with no host name with the [cf create-route](https://cli.cloudfoundry.org/en-US/cf/create-route.html) command: -
    +```console
     $ cf create-route <%= vars.private_app_domain %>
     Creating route <%= vars.private_app_domain %> for org example-org / space example-space as username@example.com...
     OK
    -
    +``` If DNS is configured correctly, this command instructs <%= vars.app_runtime_abbr %> to route requests to apps mapped to this route from these URLs: @@ -160,11 +160,11 @@ If there are no other routes for the domain, requests to any subdomain, such as A developer can also create routes for subdomains with no host names. The following command creates a route from the subdomain `foo.<%= vars.private_app_domain %>`: -
    +```console
     $ cf create-route foo.<%= vars.private_app_domain %>
     Creating route foo.<%= vars.private_app_domain %> for org example-org / space example-space as username@example.com...
     OK
    -
    +``` If DNS is configured for this subdomain, this command instructs <%= vars.app_runtime_abbr %> to route requests to apps mapped to this route from these URLs: @@ -178,11 +178,11 @@ An app mapped to a wildcard route acts as a fallback app for route requests if t A developer can create a wildcard route from the domain `foo.<%= vars.app_domain %>` by running: -
    +```console
     $ cf create-route foo.<%= vars.app_domain %> --hostname '*'
     Creating route *.foo.<%= vars.app_domain %> for org example-org / space example-space as username@example.com...
     OK
    -
    +``` If a client sends a request to `http://app.foo.<%= vars.app_domain %>` by accident, attempting to reach `example-app.foo.<%= vars.app_domain %>`, <%= vars.app_runtime_abbr %> routes the request to the app mapped to the route `*.foo.<%= vars.app_domain %>`. @@ -193,21 +193,21 @@ Developers can use paths to route requests for the same host name and domain to A developer can create three routes using the same host name and domain in the space `example-space` by running: -
    +```console
     $ cf create-route <%= vars.app_domain %> --hostname store --path products
     Creating route store.<%= vars.app_domain %>/products for org example-org / space example-space as username@example.com...
     OK
    -
    -
    +```
    +```console
     $ cf create-route <%= vars.app_domain %> --hostname store --path orders
     Creating route store.<%= vars.app_domain %>/orders for org example-org / space example-space as username@example.com...
     OK
    -
    -
    +```
    +```console
     $ cf create-route <%= vars.app_domain %> --hostname store
     Creating route store.<%= vars.app_domain %> for org example-org / space example-space as username@example.com...
     OK
    -
    +``` The developer can then map the new routes to different apps by following the procedure in [Map a route to your app](#map-route). @@ -232,29 +232,29 @@ A developer can create a TCP route for `<%= vars.tcp_app_domain %>` on an arbitr * An arbitrary (random) port is the default. The `--random port` flag is not supported. -
    +  ```console
       $ cf create-route example-space <%= vars.tcp_app_domain %> --random-port
       Creating route <%= vars.tcp_app_domain %> for org example-org / space example-space as user@example.com...
       OK
       Route <%= vars.tcp_app_domain %>:60034 has been created
    -  
    + ``` In this example, <%= vars.app_runtime_abbr %> routes requests to `<%= vars.tcp_app_domain %>:60034` to apps mapped to this route. To request a specific port, a developer can use the `--port` flag, so long as the port is not reserved for another space. To create a TCP route for `<%= vars.tcp_app_domain %>` on port 60035, run: -
    +```console
     $ cf create-route example-space <%= vars.tcp_app_domain %> --port 60035
     Creating route <%= vars.tcp_app_domain %>:60035 for org example-org / space example-space as user@example.com...
     OK
    -
    +``` ### List routes Developers can list routes for the current space with the [cf routes](https://cli.cloudfoundry.org/en-US/cf/routes.html) command. A route is uniquely identified by the combination of host name, domain, port, and path. -
    +```console
     $ cf routes
     Getting routes as user@<%= vars.private_app_domain %> ...
     
    @@ -265,7 +265,7 @@ example-space   store         <%= vars.app_domain %>		     /products   	      pr
     example-space   store         <%= vars.app_domain %>		     /orders     	      orders
     example-space   store         <%= vars.app_domain %>                	          storefront
     example-space		              <%= vars.app_domain %>	60000 			       tcp    tcp-app
    -
    +``` Developers can only see routes in spaces where they are a member. Note that cf CLI v7 removes the port and path columns from the output. @@ -275,7 +275,7 @@ Note that cf CLI v7 removes the port and path columns Developers can view a route and its destinations within the current space with the cf route command. A route is uniquely identified by the combination of a host name, domain, port, and path. Note that the `cf route` command is available in cf CLI v8 only. -
    +```console
     $ cf route <%= vars.app_domain %> --hostname example-app
     Showing route example-app.<%= vars.app_domain %> in org o / space example-space as admin...
     
    @@ -288,7 +288,7 @@ protocol:   http
     Destinations:
             app      process   port   protocol
             mystore  web       8080   http1
    -
    +``` Developers can only view a route within a space where they are a member. @@ -299,12 +299,12 @@ check-route](https://cli.cloudfoundry.org/en-US/cf/check-route.html) command. To find out if a route with the host name `store` and the domain `<%= vars.app_domain %>` and the path `products` exists, run: -
    +```console
     $ cf check-route <%= vars.app_domain %> --hostname store --path /products
     Checking for route...
     OK
     Route store.<%= vars.app_domain %>/products does exist
    -
    +``` ### Map a route to your app @@ -345,45 +345,45 @@ For these routes and apps: The following commands map the routes in the table to their respective apps. Developers use host name, domain, and path to uniquely identify a route to which to map their apps. -
    +```console
     $ cf map-route products <%= vars.app_domain %> --hostname store --path products
     $ cf map-route orders <%= vars.app_domain %> --hostname store --path orders
     $ cf map-route storefront <%= vars.app_domain %> --hostname store
     $ cf map-route tcp-app <%= vars.tcp_app_domain %> --port 60000
    -
    +``` The following command maps the wildcard route `*.foo.<%= vars.app_domain %>` to the app `myfallbackapp`. -
    +```console
     $ cf map-route myfallbackapp foo.<%= vars.app_domain %> --hostname '*'
    -
    +``` In cf CLI v8, the following command maps the route `h2app.<%= vars.app_domain %>` as an HTTP/2 route to the HTTP/2 app `h2app`. -
    +```console
     $ cf map-route h2app <%= vars.app_domain %> --hostname h2app --destination-protocol http2
    -
    +``` #### Map a route with app push Developers can map a route to their app with the `cf push` command. As of cf CLI v7, the best way to do this is by using the `routes` property in the manifest. -
    +```console
     $ cf push example-app
    -
    +``` To customize the route during `push`, specify the domain using the `-d` flag and the host name with the `--hostname` flag. The following command creates the `foo.<%= vars.private_app_domain %>` route for `example-app`: -
    +```console
     $ cf push example-app -d <%= vars.private_app_domain %> --hostname foo
    -
    +``` To map a TCP route during `push`, specify a TCP domain and request a random port using `--random-route`. To specify a port, push the app without a route, then create and map the route manually by following the procedure in [Create a TCP route with a port](#create-route-w-port). -
    +```console
     $ cf push tcp-app -d <%= vars.tcp_app_domain %> --random-route
    -
    +``` #### Map a route using app manifest @@ -439,9 +439,9 @@ You can map an internal route to any app. This internal route allows your app to This example creates a `foo.apps.internal` internal route for `example-app`: -
    +```console
     $ cf map-route example-app apps.internal --hostname foo
    -
    +``` ### Unmap a route @@ -449,15 +449,15 @@ Developers can remove a route from an app using the `cf unmap-route` command. Th To unmap an HTTP route from an app, identify the route using the host name, domain, and path: -
    +```console
     $ cf unmap-route tcp-app <%= vars.private_app_domain %> --hostname example-app --path mypath
    -
    +``` To unmap a TCP route from an app, identify the route using the domain and port: -
    +```console
     $ cf unmap-route tcp-app <%= vars.tcp_app_domain %> --port 60000
    -
    +``` ### Share a route with another space @@ -489,11 +489,9 @@ To share a route with another space: The following example command shares the route `example-app.example.com/example-path` with the `other-space` space in the `other-org` org: -
    +      ```console
           cf share-route example.com --hostname example-app --path example-path -s other-space -o other-org
    -      
    - -

    + ``` ### Transfer ownership of a route to another space @@ -533,9 +531,9 @@ To move a route: The following example command moves the route `example-app.example.com/example-path` with the `other-space` space in the `other-org` org: -
    +      ```console
            cf move-route example.com --hostname example-app --path example-path -s other-space -o other-org
    -      
    + ``` ### Delete a route @@ -543,15 +541,15 @@ Developers can delete a route from a space using the `cf delete-route` command. To delete a HTTP route, identify the route using the host name, domain, and path: -
    +```console
     $ cf delete-route <%= vars.private_app_domain %> --hostname example-app --path mypath
    -
    +``` To delete a TCP route, identify the route using the domain and port. -
    +```console
     $ cf delete-route tcp.<%= vars.private_app_domain %> --port 60000
    -
    +``` ### Routing requests to a specific app instance @@ -562,23 +560,23 @@ The format of the header is `X-Cf-App-Instance: APP_GUID:APP_INDEX`. `APP_GUID` is an internal identifier for your app. Use the `cf APP-NAME --guid` command to discover the `APP_GUID` for your app. -
    +```console
     $ cf app example-app --guid
    -
    +``` `APP_INDEX`, for example, `0`,`1`, `2`, or `3`, is an identifier for a particular app instance. Use the CLI command `cf app APP-NAME` to get statistics on each instance of a particular app. -
    +```console
     $ cf app example-app
    -
    +``` The following example shows a request made to instance `9` of an app with GUID `5cdc7595-2e9b-4f62-8d5a-a86b92f2df0e` and mapped to route `example-app.<%= vars.private_app_domain %>`. -
    +```console
     $ curl example-app.<%= vars.private_app_domain %> -H "X-Cf-App-Instance: 5cdc7595-2e9b-4f62-8d5a-a86b92f2df0e:9"
    -
    +``` If the `X-Cf-App-Instance` header is set to an invalid value, Gorouter returns a `400` status code and the response from Gorouter contains a `X-Cf-Routererror` header with more information about the error. Before the routing release v0.197.0, Gorouter returned a `404` error. @@ -618,23 +616,23 @@ Use `cf curl /v3/apps/$(cf APP-NAME --guid)/processes` command to discover the ` `PROCESS_INDEX`, for example, `0`,`1`, `2`, or `3`, is an identifier for a particular process instance. Use the CLI command `cf app APP-NAME` to get statistics on each instance of a particular app process. -
    +```console
     $ cf app example-app
    -
    +``` The following example shows a request made to instance `9` of an process with GUID `5cdc7595-2e9b-4f62-8d5a-a86b92f2df0e` and mapped to route `example-app.<%= vars.private_app_domain %>`. -
    +```console
     $ curl example-app.<%= vars.private_app_domain %> -H "X-Cf-Process-Instance: 5cdc7595-2e9b-4f62-8d5a-a86b92f2df0e:9"
    -
    +``` The following example shows a request made a process with GUID `5cdc7595-2e9b-4f62-8d5a-a86b92f2df0e` and mapped to route `example-app.<%= vars.private_app_domain %>`. -
    +```console
     $ curl example-app.<%= vars.private_app_domain %> -H "X-Cf-Process-Instance: 5cdc7595-2e9b-4f62-8d5a-a86b92f2df0e"
    -
    +``` If the `X-Cf-Process-Instance` header is set to an invalid value, Gorouter returns a `400` status code and the response from Gorouter contains a `X-Cf-Routererror` header with more information about the error. @@ -683,14 +681,14 @@ Domains indicate to a developer that requests for any route created from the dom When creating a route, developers select from domains available to them. Use the `cf domains` command to view a list of available domains for the targeted org: -
    +```console
     $ cf domains
     Getting domains in org example-org as user@example.com... OK
     name                          status   type
     <%= vars.app_domain %>        shared
     <%= vars.tcp_app_domain %>    shared   tcp
     <%= vars.private_app_domain %>         owned
    -
    +``` This example displays three available domains: a shared HTTP domain `<%= vars.app_domain %>`, a shared TCP domain `<%= vars.tcp_app_domain %>`, and a private domain `<%= vars.private_app_domain %>`. For more information, see [Shared domains](#shared-domains) and [Private domains](#private-domains). @@ -715,33 +713,33 @@ Shared domains are HTTP by default, but can be configured to be TCP when associa #### Create a shared domain Admins can create an HTTP shared domain with the `cf create-shared-domain` command: -
    +```console
     $ cf create-shared-domain <%= vars.app_domain %>
    -
    +``` To create a TCP shared domain, first discover the name of the TCP router group.

    cf CLI v7 does not support TCP routing or creating shared domains with router groups.

    -
    +```console
     $ cf router-groups
     Getting router groups as admin ...
     name          type
     default-tcp   tcp
    -
    +``` Then create the shared domain using the `--router-group` option to associate the domain with the TCP router group. -
    +```console
     $ cf create-shared-domain <%= vars.tcp_app_domain %> --router-group default-tcp
    -
    +``` #### Delete a shared domain Admins can delete a shared domain from <%= vars.app_runtime_abbr %> with the `cf delete-shared-domain` command: -
    +```console
     $ cf delete-shared-domain example.com
    -
    +``` #### Internal domain @@ -749,9 +747,9 @@ The internal domain is a special type of shared domain used for app communicatio Admins can configure multiple internal domains. Add a custom internal domain name to the `internal_domains` property on the `bosh-dns-adapter` job. Then create an internal domain using the `--internal` option: -
    +```console
     $ cf create-shared-domain <%= vars.app_domain %> --internal
    -
    +``` The `--router-group` option is not used with internal domains. @@ -769,34 +767,34 @@ Private domains can be HTTP or HTTPS only. TCP routing is supported for shared d Org managers can create a private domain by running: -
    +```console
     $ cf create-private-domain example-org <%= vars.private_app_domain %>
    -
    +``` Org managers can create a private domain for a subdomain by running: -
    +```console
     $ cf create-private-domain example-org foo.<%= vars.private_app_domain %>
    -
    +``` #### Sharing a private domain with one or more orgs Org managers can grant or revoke access to a private domain to other orgs if they have permissions for these orgs. As of cf CLI v7, `cf unshare-private-domain` command provides a warning and requires confirmation before it proceeds. -
    +```console
     $ cf share-private-domain test-org <%= vars.private_app_domain %>
     
     $ cf unshare-private-domain test-org <%= vars.private_app_domain %>
    -
    +``` #### Delete a private domain Org managers can delete a domain from <%= vars.app_runtime_abbr %> with the `cf delete-domain` command: -
    +```console
     $ cf delete-private-domain <%= vars.private_app_domain %>
    -
    +```

    cf CLI v7 renames the delete-domain command to delete-private-domain.

    From 8239f0a4af67a4a4c54eb2a7f5a1bbd2ad0eb7b1 Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Fri, 11 Apr 2025 13:11:32 -0700 Subject: [PATCH 114/132] fix snippet formatting +

    --- deploy-apps/routes-domains.html.md.erb | 53 +++++++++++++------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/deploy-apps/routes-domains.html.md.erb b/deploy-apps/routes-domains.html.md.erb index 020fd8a9..0bf4b988 100644 --- a/deploy-apps/routes-domains.html.md.erb +++ b/deploy-apps/routes-domains.html.md.erb @@ -84,20 +84,20 @@ To create an internal route: * After an internal route is mapped to an app, the route resolves to IP addresses of the app instances. The IP addresses are visible in the application container: - ```console - $ cf ssh app - vcap@1234:~$ host app.apps.internal - app.apps.internal has address 10.255.169.200 - app.apps.internal has address 10.255.49.7 - app.apps.internal has address 10.255.49.77 - ``` + ```console + $ cf ssh app + vcap@1234:~$ host app.apps.internal + app.apps.internal has address 10.255.169.200 + app.apps.internal has address 10.255.49.7 + app.apps.internal has address 10.255.49.77 + ``` * To resolve individual instances, prepend the index to the internal route. - ```console - vcap@1234:~$ host 1.app.apps.internal - 1.app.apps.internal has address 10.255.49.7 - ``` + ```console + vcap@1234:~$ host 1.app.apps.internal + 1.app.apps.internal has address 10.255.49.7 + ``` 2. Create a network policy that allows your apps to communicate with each other. By default, apps cannot communicate over the container network. For more information, see [Configuring container-to-container networking](cf-networking.html) and the [Cloud Foundry CLI reference guide](https://cli.cloudfoundry.org/en-US/cf/add-network-policy.html). @@ -133,9 +133,8 @@ This command instructs <%= vars.app_runtime_abbr %> to only route requests to ap
  • Any path under either of the these URLs, such as http://example-app.<%= vars.app_domain %>/bar
  • -

    -#### Create an HTTP route without host name +

    Create an HTTP route without host name

    This approach creates a route with the same address as the domain itself and is permitted for private domains only. For more information, see [Private Domains](#private-domains) . @@ -172,7 +171,7 @@ If DNS is configured for this subdomain, this command instructs <%= vars.app_run * `https://foo.<%= vars.private_app_domain %>` * Any path under either of these URLs, such as `http://foo.<%= vars.private_app_domain %>/foo` -#### Create an HTTP route with wildcard host name +

    Create an HTTP route with wildcard host name

    An app mapped to a wildcard route acts as a fallback app for route requests if the requested route does not exist. To create a wildcard route, use an asterisk for the host name. @@ -187,7 +186,7 @@ OK If a client sends a request to `http://app.foo.<%= vars.app_domain %>` by accident, attempting to reach `example-app.foo.<%= vars.app_domain %>`, <%= vars.app_runtime_abbr %> routes the request to the app mapped to the route `*.foo.<%= vars.app_domain %>`. -#### Create an HTTP route with a path +

    Create an HTTP route with a path

    Developers can use paths to route requests for the same host name and domain to different apps. @@ -226,7 +225,7 @@ If the developer maps the first route with path `products` to the `products` app
    -#### Create a TCP route with a port +

    Create a TCP route with a port

    A developer can create a TCP route for `<%= vars.tcp_app_domain %>` on an arbitrary port. This is the default in the v7 version of the cf CLI. @@ -316,7 +315,7 @@ You can create and reserve routes for later use by following the procedure in [M Changes to route mappings are run asynchronously. On startup, an app becomes accessible at its route within a few seconds. Similarly, upon mapping a new route to a running app, the app becomes accessible at this route within a few seconds of the CLI exiting. -#### Manually map a route +

    Manually map a route

    For these routes and apps: @@ -364,7 +363,7 @@ In cf CLI v8, the following command maps the route `h2app.<%= vars.app_domain %> $ cf map-route h2app <%= vars.app_domain %> --hostname h2app --destination-protocol http2 ``` -#### Map a route with app push +

    Map a route with app push

    Developers can map a route to their app with the `cf push` command. As of cf CLI v7, the best way to do this is by using the `routes` property in the manifest. @@ -385,17 +384,17 @@ To map a TCP route during `push`, specify a TCP domain and request a random port $ cf push tcp-app -d <%= vars.tcp_app_domain %> --random-route ``` -#### Map a route using app manifest +

    Map a route using app manifest

    Developers can map a route to their app with a manifest by editing the `route` attribute to specify the host, domain, port, and path components of the route. For more information, see [Deploying with app manifests](../deploy-apps/manifest.html#routes). -#### Map a route to multiple apps +

    Map a route to multiple apps

    <%= partial 'routing_conflict' %> For more information about troubleshooting this problem, see [Routing conflict](troubleshoot-app-health.html#routing-conflict) in _Troubleshooting app deployment and health_. -#### Map multiple routes to one app +

    Map multiple routes to one app

    You can have multiple routes to an app, but those routes cannot have different context paths. @@ -433,7 +432,7 @@ These routes are _not_ valid for a single app: -#### Map an internal route to an app +

    Map an internal route to an app

    You can map an internal route to any app. This internal route allows your app to communicate with other apps without leaving the platform. After it is mapped, this route becomes available to all other apps on the platform. @@ -710,7 +709,7 @@ When using shared domains, you cannot have routes with the same host name and do Shared domains are HTTP by default, but can be configured to be TCP when associated with the TCP router group. -#### Create a shared domain +

    Create a shared domain

    Admins can create an HTTP shared domain with the `cf create-shared-domain` command: ```console @@ -733,7 +732,7 @@ Then create the shared domain using the `--router-group` option to associate the $ cf create-shared-domain <%= vars.tcp_app_domain %> --router-group default-tcp ``` -#### Delete a shared domain +

    Delete a shared domain

    Admins can delete a shared domain from <%= vars.app_runtime_abbr %> with the `cf delete-shared-domain` command: @@ -741,7 +740,7 @@ Admins can delete a shared domain from <%= vars.app_runtime_abbr %> with the `cf $ cf delete-shared-domain example.com ``` -#### Internal domain +

    Internal domain

    The internal domain is a special type of shared domain used for app communication internal to the platform. When you activate service discovery, the internal domain `apps.internal` becomes available for route mapping. @@ -763,7 +762,7 @@ When using private domains, you can have routes with the same host name and doma Private domains can be HTTP or HTTPS only. TCP routing is supported for shared domains only. -#### Create a private domain +

    Create a private domain

    Org managers can create a private domain by running: @@ -777,7 +776,7 @@ Org managers can create a private domain for a subdomain by running: $ cf create-private-domain example-org foo.<%= vars.private_app_domain %> ``` -#### Sharing a private domain with one or more orgs +

    Sharing a private domain with one or more orgs

    Org managers can grant or revoke access to a private domain to other orgs if they have permissions for these orgs. As of cf CLI v7, `cf unshare-private-domain` command provides a warning and requires confirmation before it proceeds. From 82b914ffca2cd05cecc6009466b04e7738c915aa Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Tue, 15 Apr 2025 06:41:51 -0700 Subject: [PATCH 115/132] page formatting fixes --- deploy-apps/routes-domains.html.md.erb | 30 +++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/deploy-apps/routes-domains.html.md.erb b/deploy-apps/routes-domains.html.md.erb index 0bf4b988..d80435ba 100644 --- a/deploy-apps/routes-domains.html.md.erb +++ b/deploy-apps/routes-domains.html.md.erb @@ -82,22 +82,22 @@ To create an internal route: $ cf map-route app apps.internal --hostname app ``` - * After an internal route is mapped to an app, the route resolves to IP addresses of the app instances. The IP addresses are visible in the application container: + * After an internal route is mapped to an app, the route resolves to IP addresses of the app instances. The IP addresses are visible in the application container: - ```console - $ cf ssh app - vcap@1234:~$ host app.apps.internal - app.apps.internal has address 10.255.169.200 - app.apps.internal has address 10.255.49.7 - app.apps.internal has address 10.255.49.77 - ``` + ```console + $ cf ssh app + vcap@1234:~$ host app.apps.internal + app.apps.internal has address 10.255.169.200 + app.apps.internal has address 10.255.49.7 + app.apps.internal has address 10.255.49.77 + ``` - * To resolve individual instances, prepend the index to the internal route. + * To resolve individual instances, prepend the index to the internal route. - ```console - vcap@1234:~$ host 1.app.apps.internal - 1.app.apps.internal has address 10.255.49.7 - ``` + ```console + vcap@1234:~$ host 1.app.apps.internal + 1.app.apps.internal has address 10.255.49.7 + ``` 2. Create a network policy that allows your apps to communicate with each other. By default, apps cannot communicate over the container network. For more information, see [Configuring container-to-container networking](cf-networking.html) and the [Cloud Foundry CLI reference guide](https://cli.cloudfoundry.org/en-US/cf/add-network-policy.html). @@ -136,8 +136,8 @@ This command instructs <%= vars.app_runtime_abbr %> to only route requests to ap

    Create an HTTP route without host name

    -This approach creates a route with the same address as the domain itself and is permitted for private domains only. For more information, see [Private -Domains](#private-domains) . +

    This approach creates a route with the same address as the domain itself and is permitted for private domains only. For more information, see +Private Domains.

    A developer can create a route from the domain `<%= vars.private_app_domain %>` with no host name with the [cf create-route](https://cli.cloudfoundry.org/en-US/cf/create-route.html) command: From e92ff28a8456fb785e709e81af2b3f741dd68c31 Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Tue, 15 Apr 2025 08:40:18 -0700 Subject: [PATCH 116/132] page formatting fixes(2) --- deploy-apps/routes-domains.html.md.erb | 61 +++++++++++++------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/deploy-apps/routes-domains.html.md.erb b/deploy-apps/routes-domains.html.md.erb index d80435ba..8f05b560 100644 --- a/deploy-apps/routes-domains.html.md.erb +++ b/deploy-apps/routes-domains.html.md.erb @@ -82,24 +82,26 @@ To create an internal route: $ cf map-route app apps.internal --hostname app ``` - * After an internal route is mapped to an app, the route resolves to IP addresses of the app instances. The IP addresses are visible in the application container: +
    • After an internal route is mapped to an app, the route resolves to IP addresses of the app instances. The IP addresses are visible in the application container: - ```console - $ cf ssh app - vcap@1234:~$ host app.apps.internal - app.apps.internal has address 10.255.169.200 - app.apps.internal has address 10.255.49.7 - app.apps.internal has address 10.255.49.77 - ``` +
      
      +    $ cf ssh app
      +    vcap@1234:~$ host app.apps.internal
      +    app.apps.internal has address 10.255.169.200
      +    app.apps.internal has address 10.255.49.7
      +    app.apps.internal has address 10.255.49.77
      +      
    • - * To resolve individual instances, prepend the index to the internal route. +
    • To resolve individual instances, prepend the index to the internal route. - ```console - vcap@1234:~$ host 1.app.apps.internal - 1.app.apps.internal has address 10.255.49.7 - ``` +
      
      +    vcap@1234:~$ host 1.app.apps.internal
      +    1.app.apps.internal has address 10.255.49.7
      +      
    • +
    -2. Create a network policy that allows your apps to communicate with each other. By default, apps cannot communicate over the container network. For more + +1. Create a network policy that allows your apps to communicate with each other. By default, apps cannot communicate over the container network. For more information, see [Configuring container-to-container networking](cf-networking.html) and the [Cloud Foundry CLI reference guide](https://cli.cloudfoundry.org/en-US/cf/add-network-policy.html). ### Create a route @@ -122,8 +124,8 @@ Creating route example-app.shared-domain.example.com for org example-org / space OK ``` -

    -The cf CLI v7 create-route command does not require the space as an argument. It uses the space you are targeting.

    +
    +The cf CLI v7 create-route command does not require the space as an argument. It uses the space you are targeting.
    This command instructs <%= vars.app_runtime_abbr %> to only route requests to apps mapped to this route for these URLs: @@ -415,7 +417,7 @@ These routes are valid for a single app: -These routes are _not_ valid for a single app: +These routes are not valid for a single app: @@ -460,8 +462,8 @@ $ cf unmap-route tcp-app <%= vars.tcp_app_domain %> --port 60000 ### Share a route with another space -

    -To follow the procedure in this section, you must use cf CLI v8.5.0 or later. To download cf CLI v8.5.0 or later, see the Cloud Foundry CLI repository on GitHub.

    +
    +To follow the procedure in this section, you must use cf CLI v8.5.0 or later. To download cf CLI v8.5.0 or later, see the Cloud Foundry CLI repository on GitHub.
    You can share a route with another space using the `cf share-route` command. To move an app to another space, you can share routes with that space to prevent downtime during the transition. Rather than deleting the route in the original space and re-creating the route in the new space, you can share the route with the new space and map it to the app running in that space. @@ -494,9 +496,8 @@ To share a route with another space: ### Transfer ownership of a route to another space -

    -To follow the procedure in this section, you must use cf CLI v8.5.0 or later. To download cf CLI v8.5.0 or later, see the Cloud Foundry CLI repository on GitHub. -

    +
    +To follow the procedure in this section, you must use cf CLI v8.5.0 or later. To download cf CLI v8.5.0 or later, see the Cloud Foundry CLI repository on GitHub.
    After sharing a route with another space, you can transfer ownership of the route to that space using the cf move-route command. You can use this command if you are unable to maintain or delete a shared route within the space with which it was shared. For information about sharing routes across spaces, see [Share a route with another space](#share-route). @@ -718,8 +719,8 @@ $ cf create-shared-domain <%= vars.app_domain %> To create a TCP shared domain, first discover the name of the TCP router group. -

    -cf CLI v7 does not support TCP routing or creating shared domains with router groups.

    +
    +cf CLI v7 does not support TCP routing or creating shared domains with router groups.
    ```console $ cf router-groups @@ -795,8 +796,8 @@ Org managers can delete a domain from <%= vars.app_runtime_abbr %> with the `cf $ cf delete-private-domain <%= vars.private_app_domain %> ``` -

    -cf CLI v7 renames the delete-domain command to delete-private-domain.

    +
    +cf CLI v7 renames the delete-domain command to delete-private-domain.
    ### Requirements for parent and child domains @@ -892,8 +893,8 @@ If you use a wildcard as the subdomain name, then your DNS provider can route fr To use your root domain for apps on <%= vars.app_runtime_abbr %>, you can use custom DNS record types like ALIAS and ANAME, if your DNS provider offers them, or you can use subdomain redirection. -

    -Root domains are also called zone apex domains.

    +
    +Root domains are also called zone apex domains.
    If your DNS provider supports using an ALIAS or ANAME record, configure your root domain with your DNS provider to point at a shared domain in <%= vars.app_runtime_abbr %>. @@ -915,10 +916,10 @@ If your DNS provider supports using an ALIAS or ANAME record, configure your roo If your DNS provider does not support ANAME or ALIAS records, you can use subdomain redirection, also known as domain forwarding, to redirect requests for your root domain to a subdomain configured as a CNAME. -

    +

    If you use domain forwarding, SSL requests to the root domain might fail if the SSL certificate matches only the subdomain. For more information about SSL certificates, see -the Cloud Foundry documentation.

    +the Cloud Foundry documentation.
    Configure the root domain to point at a subdomain such as `www`, and configure the subdomain as a CNAME record pointing at a shared domain in <%= vars.app_runtime_abbr %>. From a78efa8bef8d309e697122644f5edffbc05f4d5c Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Tue, 15 Apr 2025 11:00:09 -0700 Subject: [PATCH 117/132] page formatting fixes(3) - more html conversions --- deploy-apps/routes-domains.html.md.erb | 43 ++++++++++++++------------ 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/deploy-apps/routes-domains.html.md.erb b/deploy-apps/routes-domains.html.md.erb index 8f05b560..642c5818 100644 --- a/deploy-apps/routes-domains.html.md.erb +++ b/deploy-apps/routes-domains.html.md.erb @@ -138,40 +138,44 @@ This command instructs <%= vars.app_runtime_abbr %> to only route requests to ap

    Create an HTTP route without host name

    -

    This approach creates a route with the same address as the domain itself and is permitted for private domains only. For more information, see -Private Domains.

    +This approach creates a route with the same address as the domain itself and is permitted for private domains only. For more information, see +Private Domains. -A developer can create a route from the domain `<%= vars.private_app_domain %>` with no host name with the -[cf create-route](https://cli.cloudfoundry.org/en-US/cf/create-route.html) command: +A developer can create a route from the domain <%= vars.private_app_domain %> with no host name with the +cf create-route command: -```console +
    +
     $ cf create-route <%= vars.private_app_domain %>
     Creating route <%= vars.private_app_domain %> for org example-org / space example-space as username@example.com...
     OK
    -```
    +
    If DNS is configured correctly, this command instructs <%= vars.app_runtime_abbr %> to route requests to apps mapped to this route from these URLs: +
      +
    • http://<%= vars.private_app_domain %>
    • +
    • https://<%= vars.private_app_domain %>
    • +
    • Any path under either of these URLs, such as `http://<%= vars.private_app_domain %>/foo
    • +
    - * `http://<%= vars.private_app_domain %>` - * `https://<%= vars.private_app_domain %>` - * Any path under either of these URLs, such as `http://<%= vars.private_app_domain %>/foo` - -If there are no other routes for the domain, requests to any subdomain, such as `http://foo.<%= vars.private_app_domain %>`, fail. +If there are no other routes for the domain, requests to any subdomain, such as http://foo.<%= vars.private_app_domain %>, fail. A developer can also create routes for subdomains with no host names. The following command creates a route from the subdomain -`foo.<%= vars.private_app_domain %>`: +foo.<%= vars.private_app_domain %>: -```console +
    +
     $ cf create-route foo.<%= vars.private_app_domain %>
     Creating route foo.<%= vars.private_app_domain %> for org example-org / space example-space as username@example.com...
     OK
    -```
    -
    -If DNS is configured for this subdomain, this command instructs <%= vars.app_runtime_abbr %> to route requests to apps mapped to this route from these URLs:
    +
    - * `http://foo.<%= vars.private_app_domain %>` - * `https://foo.<%= vars.private_app_domain %>` - * Any path under either of these URLs, such as `http://foo.<%= vars.private_app_domain %>/foo` +If DNS is configured for this subdomain, this command instructs <%=vars.app_runtime_abbr %> to route requests to apps mapped to this route from these URLs: +
      +
    • http://foo.<%= vars.private_app_domain %>
    • +
    • https://foo.<%= vars.private_app_domain %>
    • +
    • Any path under either of these URLs, such as http://foo.<%= vars.private_app_domain %>/foo
    • +

    Create an HTTP route with wildcard host name

    @@ -221,6 +225,7 @@ If the developer maps the first route with path `products` to the `products` app <%= vars.app_runtime_abbr %> attempts to match routes with a path, and then attempts to match host and domain.
    +Notes:
    • Routes with the same domain and host name but different paths can only be created in the same space. Private domains do not have this limitation.
    • <%= vars.app_runtime_abbr %> does not route requests for context paths to the root context of an app. Apps must serve requests on the context path.
    • From 7b63a3cc18163b1c2e76387e647b4a59fc816377 Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Tue, 15 Apr 2025 12:38:44 -0700 Subject: [PATCH 118/132] fix code snippets --- deploy-apps/routes-domains.html.md.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy-apps/routes-domains.html.md.erb b/deploy-apps/routes-domains.html.md.erb index 642c5818..0d038c67 100644 --- a/deploy-apps/routes-domains.html.md.erb +++ b/deploy-apps/routes-domains.html.md.erb @@ -140,11 +140,11 @@ This command instructs <%= vars.app_runtime_abbr %> to only route requests to ap This approach creates a route with the same address as the domain itself and is permitted for private domains only. For more information, see Private Domains. - +
      A developer can create a route from the domain <%= vars.private_app_domain %> with no host name with the cf create-route command: -
      +
       
       $ cf create-route <%= vars.private_app_domain %>
       Creating route <%= vars.private_app_domain %> for org example-org / space example-space as username@example.com...
      @@ -163,7 +163,7 @@ If there are no other routes for the domain, requests to any subdomain, such as
       A developer can also create routes for subdomains with no host names. The following command creates a route from the subdomain
       foo.<%= vars.private_app_domain %>:
       
      -
      +
       
       $ cf create-route foo.<%= vars.private_app_domain %>
       Creating route foo.<%= vars.private_app_domain %> for org example-org / space example-space as username@example.com...
      @@ -180,7 +180,7 @@ If DNS is configured for this subdomain, this command instructs <%=vars.app_runt
       

      Create an HTTP route with wildcard host name

      An app mapped to a wildcard route acts as a fallback app for route requests if the requested route does not exist. To create a wildcard route, use an asterisk for the host name. - +
      A developer can create a wildcard route from the domain `foo.<%= vars.app_domain %>` by running: ```console From 467e7c731406c13e14c8d0cd78d0489c3049632a Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Tue, 15 Apr 2025 13:59:51 -0700 Subject: [PATCH 119/132] convert another problem section to html --- deploy-apps/routes-domains.html.md.erb | 38 +++++++++++++++----------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/deploy-apps/routes-domains.html.md.erb b/deploy-apps/routes-domains.html.md.erb index 0d038c67..abaef7a7 100644 --- a/deploy-apps/routes-domains.html.md.erb +++ b/deploy-apps/routes-domains.html.md.erb @@ -183,44 +183,50 @@ An app mapped to a wildcard route acts as a fallback app for route requests if t
      A developer can create a wildcard route from the domain `foo.<%= vars.app_domain %>` by running: -```console +
      
       $ cf create-route foo.<%= vars.app_domain %> --hostname '*'
       Creating route *.foo.<%= vars.app_domain %> for org example-org / space example-space as username@example.com...
       OK
      -```
      +
      -If a client sends a request to `http://app.foo.<%= vars.app_domain %>` by accident, attempting to reach `example-app.foo.<%= vars.app_domain %>`, -<%= vars.app_runtime_abbr %> routes the request to the app mapped to the route `*.foo.<%= vars.app_domain %>`. +If a client sends a request to http://app.foo.<%= vars.app_domain %> by accident, attempting to reach example-app.foo.<%= vars.app_domain %>, +<%= vars.app_runtime_abbr %> routes the request to the app mapped to the route *.foo.<%= vars.app_domain %>.

      Create an HTTP route with a path

      Developers can use paths to route requests for the same host name and domain to different apps. - +
      A developer can create three routes using the same host name and domain in the space `example-space` by running: +
      -```console +
      
       $ cf create-route <%= vars.app_domain %> --hostname store --path products
       Creating route store.<%= vars.app_domain %>/products for org example-org / space example-space as username@example.com...
       OK
      -```
      -```console
      +
      + +
      
       $ cf create-route <%= vars.app_domain %> --hostname store --path orders
       Creating route store.<%= vars.app_domain %>/orders for org example-org / space example-space as username@example.com...
       OK
      -```
      -```console
      +
      + +
      
       $ cf create-route <%= vars.app_domain %> --hostname store
       Creating route store.<%= vars.app_domain %> for org example-org / space example-space as username@example.com...
       OK
      -```
      +
      -The developer can then map the new routes to different apps by following the procedure in [Map a route to your app](#map-route). +The developer can then map the new routes to different apps by following the procedure in +Map a route to your app. -If the developer maps the first route with path `products` to the `products` app, the second route with path `orders` to the `orders` app, and the last route to the `storefront` app. After this: +If the developer maps the first route with path products to the products app, the second route with path orders to the orders app, and the last route to the storefront app. After this: - * <%= vars.app_runtime_abbr %> routes requests to `http://store.<%= vars.app_domain %>/products` to the `products` app. - * <%= vars.app_runtime_abbr %> routes requests to `http://store.<%= vars.app_domain %>/orders` to the `orders` app. - * <%= vars.app_runtime_abbr %> routes requests to `http://store.<%= vars.app_domain %>` to the `storefront` app. +
        +
      • <%= vars.app_runtime_abbr %> routes requests to http://store.<%= vars.app_domain %>/products to the products app.
      • +
      • <%= vars.app_runtime_abbr %> routes requests to http://store.<%= vars.app_domain %>/orders to the orders app.
      • +
      • <%= vars.app_runtime_abbr %> routes requests to http://store.<%= vars.app_domain %> to the storefront app.
      • +
      <%= vars.app_runtime_abbr %> attempts to match routes with a path, and then attempts to match host and domain. From 2222eb45201288844c2013ab41b3366f737be70a Mon Sep 17 00:00:00 2001 From: Shaine Thielke Date: Fri, 2 May 2025 14:38:16 -0600 Subject: [PATCH 120/132] updates for TNZ-20879 and TNZ-21036 --- ...rolling-deploy.html.md.erb => rolling-deploy.html.md} | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) rename deploy-apps/{rolling-deploy.html.md.erb => rolling-deploy.html.md} (97%) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md similarity index 97% rename from deploy-apps/rolling-deploy.html.md.erb rename to deploy-apps/rolling-deploy.html.md index 8730b4ab..1fad2ea2 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md @@ -96,7 +96,8 @@ By default, as described in [Canary Deployments](#canary), when you push an app To run a canary deployment more gradually, you can pass a series of step weights to the `--instance-steps` option of `cf push`. - - The series specifies increasing numbers of canary instances to deploy, to let you manually continue after each step. + - The series specifies increasing numbers of canary instances to deploy. + - The deployment will pause after each step, allowing you to manually [continue](#continue) the deployment and proceed to the next step, or [cancel](#cancel) the deployment. - Each value represents a **percentage** or **weight** of the web process's instances of the web process to be rolled out as canary instances. - Separate step weights with commas and without spaces, for example `5,10,20`. - For each canary instance created after the first, a pre-deployment instance is torn down. @@ -185,6 +186,12 @@ This results in the following deployment plan: A **Step Weight** of `100` allows app operators to use the `cancel-deployment` command even after all instances have been replaced. +### Testing Canary Deployments + +To test an in-progress canary deployment, you can route HTTP requests to the canary process, or to an individual canary instance using the [`X-Cf-Process-Instance` header](https://docs.cloudfoundry.org/concepts/http-routing.html#-http-headers-for-process-instance-routing). + +Alternatively, you can use [session affinity](https://docs.cloudfoundry.org/concepts/http-routing.html#sessions) force a particular client to persistently make requests to a canary instance. + ### Limitations The following table describes the limitations when using these deployments. From 8b26d2248c362be72200f92230ca5e8abb926019 Mon Sep 17 00:00:00 2001 From: Shaine Thielke Date: Fri, 2 May 2025 14:38:48 -0600 Subject: [PATCH 121/132] updates for TNZ-20879 and TNZ-21036 --- .../{rolling-deploy.html.md => rolling-deploy.html.md.erb} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename deploy-apps/{rolling-deploy.html.md => rolling-deploy.html.md.erb} (100%) diff --git a/deploy-apps/rolling-deploy.html.md b/deploy-apps/rolling-deploy.html.md.erb similarity index 100% rename from deploy-apps/rolling-deploy.html.md rename to deploy-apps/rolling-deploy.html.md.erb From 60f8343f4092129b816a947f7691a2fcd3dc6bb0 Mon Sep 17 00:00:00 2001 From: Paul Spinrad Date: Tue, 6 May 2025 15:31:14 -0700 Subject: [PATCH 122/132] PR #556 local links --- deploy-apps/rolling-deploy.html.md.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index 1fad2ea2..e71ba637 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -188,9 +188,9 @@ A **Step Weight** of `100` allows app operators to use the `cancel-deployment` c ### Testing Canary Deployments -To test an in-progress canary deployment, you can route HTTP requests to the canary process, or to an individual canary instance using the [`X-Cf-Process-Instance` header](https://docs.cloudfoundry.org/concepts/http-routing.html#-http-headers-for-process-instance-routing). +To test an in-progress canary deployment, you can route HTTP requests to the canary process, or to an individual canary instance using the `X-Cf-Process-Instance` header, as described in [HTTP headers for process instance routing](../../concepts/http-routing.html#process-instance-routing). -Alternatively, you can use [session affinity](https://docs.cloudfoundry.org/concepts/http-routing.html#sessions) force a particular client to persistently make requests to a canary instance. +Alternatively, you can use session affinity to force a particular client to persistently make requests to a canary instance as described in [Session affinity](../../concepts/http-routing.html#sessions). ### Limitations From 8f8d5a68dd2aae962f80a0a9cdbdd3dd34c10865 Mon Sep 17 00:00:00 2001 From: Shaine Thielke Date: Fri, 9 May 2025 10:01:46 -0600 Subject: [PATCH 123/132] minor revision docs edits to disambiguate cf revisions and cf revision --- revisions.html.md.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/revisions.html.md.erb b/revisions.html.md.erb index fbd8f14f..1039042f 100644 --- a/revisions.html.md.erb +++ b/revisions.html.md.erb @@ -65,9 +65,9 @@ Operators can configure <%= vars.platform_name %> to retain more droplets if nec This section describes how to use CAPI endpoints for viewing revisions. -### List revisions for an app +### List revision history for an app -To list revisions for an app: +To list both current and stopped revisions for an app: * Using the `revisions` command: @@ -92,9 +92,9 @@ To list revisions for an app: ``` Where `GUID` is the GUID you retrieved in an earlier step. -### List current revision for an app +### Get an app's current revision(s) -The current revision of an app is its currently-deployed revision, linked to started processes. To list an app's current revision: +The current revision(s) of an app is its currently-deployed, running revision(s), linked to started processes. There may be multiple currently running revisions during an active canary or rolling deployment. To list an app's current revision(s): * Using the `revision` command: From 499eee44f8697be30db8f27a15d755141feb8e77 Mon Sep 17 00:00:00 2001 From: Anita Flegg Date: Fri, 9 May 2025 09:11:11 -0700 Subject: [PATCH 124/132] grammar and readability change --- revisions.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/revisions.html.md.erb b/revisions.html.md.erb index 1039042f..9f467ffa 100644 --- a/revisions.html.md.erb +++ b/revisions.html.md.erb @@ -94,7 +94,7 @@ To list both current and stopped revisions for an app: ### Get an app's current revision(s) -The current revision(s) of an app is its currently-deployed, running revision(s), linked to started processes. There may be multiple currently running revisions during an active canary or rolling deployment. To list an app's current revision(s): +The current revision of an app is its currently-deployed, running revision, linked to started processes. There may be multiple currently running revisions during an active canary or rolling deployment. To list an app's current revision(s): * Using the `revision` command: From 45fc6563bcee035dd416e2277d0c3404f00f0d99 Mon Sep 17 00:00:00 2001 From: Philipp Thun Date: Mon, 2 Jun 2025 13:58:15 +0200 Subject: [PATCH 125/132] Add features to list of manifest attributes --- deploy-apps/manifest-attributes.html.md.erb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/deploy-apps/manifest-attributes.html.md.erb b/deploy-apps/manifest-attributes.html.md.erb index 3ca57e61..ab9be927 100644 --- a/deploy-apps/manifest-attributes.html.md.erb +++ b/deploy-apps/manifest-attributes.html.md.erb @@ -237,6 +237,22 @@ The manifest attribute `docker.username` is optional. If it is used, the passwor

      Using the docker attribute with the buildpacks or path attributes causes an error.

      +### features + +App features can be set via the manifest attribute `features`. The attribute value is a key-value mapping of app feature names to boolean values indicating whether the feature is enabled or not. If omitted, a feature is enabled or disabled based on its default value (e.g. `revisions` are enabled by default, the `ssh` status depends on the foundation's configuration). + +For example: + +``` +--- + ... + features: + ssh: true + revisions: true + service-binding-k8s: false + file-based-vcap-services: false +``` + ### health-check-type The `health-check-type` attribute sets the `health_check_type` flag to either `port`, `process` or `http`. If you do not provide a `health-check-type` attribute, the default is `port`. From 25334084d0e74d047c3b1871f00cec3d8f97224f Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Mon, 2 Jun 2025 05:45:58 -0700 Subject: [PATCH 126/132] edit addition, PR 559 --- deploy-apps/manifest-attributes.html.md.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy-apps/manifest-attributes.html.md.erb b/deploy-apps/manifest-attributes.html.md.erb index ab9be927..db1f6a4e 100644 --- a/deploy-apps/manifest-attributes.html.md.erb +++ b/deploy-apps/manifest-attributes.html.md.erb @@ -123,8 +123,8 @@ You can refer to a buildpack by name in a manifest or a command-line option. The * **Custom buildpacks:** If your app requires a custom buildpack, you can use the `buildpacks` attribute to specify it in a number of ways: * By name: `BUILDPACK`. - * By GitHub URL: - * For the source code repo: `https://github.com/cloudfoundry/java-buildpack.git` or + * By GitHub URL: + * For the source code repo: `https://github.com/cloudfoundry/java-buildpack.git` or * For a fully-packaged asset: `https://github.com/cloudfoundry/java-buildpack/releases/download/v4.76.0/java-buildpack-v4.76.0.zip` * By GitHub URL with a branch or tag: `https://github.com/cloudfoundry/java-buildpack.git#v3.3.0` for the `v3.3.0` tag. @@ -239,7 +239,7 @@ Using the docker attribute with the buildpacks or features -App features can be set via the manifest attribute `features`. The attribute value is a key-value mapping of app feature names to boolean values indicating whether the feature is enabled or not. If omitted, a feature is enabled or disabled based on its default value (e.g. `revisions` are enabled by default, the `ssh` status depends on the foundation's configuration). +App features can be set using the manifest attribute `features`. The attribute value is a key-value mapping of app feature names to Boolean values indicating whether the feature is enabled or not. If omitted, a feature is enabled or disabled based on its default value (e.g. `revisions` is enabled by default, and the `ssh` status depends on the configuration of the foundation). For example: From 5e16aa88daab56388474d947f5cf95e69ff5149d Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Tue, 8 Jul 2025 14:34:44 -0700 Subject: [PATCH 127/132] replace/remove refs to CLI Ref Guide --- capi/client-libraries.html.md.erb | 2 +- deploy-apps/_v3-note.html.md.erb | 2 +- deploy-apps/app-ssh-overview.html.md.erb | 4 ++-- deploy-apps/blue-green.html.md.erb | 4 ++-- deploy-apps/cf-scale.html.md.erb | 2 +- deploy-apps/deploy-app.html.md.erb | 2 +- deploy-apps/environment-variable.html.md.erb | 3 ++- deploy-apps/healthchecks.html.md.erb | 11 ++++----- deploy-apps/routes-domains.html.md.erb | 25 ++++++++++---------- deploy-apps/ssh-apps.html.md.erb | 17 ++++++------- deploy-apps/ssh-services.html.md.erb | 8 +++---- deploy-apps/streaming-logs.html.md.erb | 4 ++-- services/route-binding.html.md.erb | 4 ++-- services/user-provided.html.md.erb | 4 ++-- using-tasks.html.md.erb | 4 ++-- 15 files changed, 47 insertions(+), 49 deletions(-) diff --git a/capi/client-libraries.html.md.erb b/capi/client-libraries.html.md.erb index 21d2454a..a0622456 100644 --- a/capi/client-libraries.html.md.erb +++ b/capi/client-libraries.html.md.erb @@ -26,7 +26,7 @@ While you can develop apps that use CAPI by calling it directly as in the API do <%= vars.app_runtime_abbr %> supports the following clients for CAPI: * [Java](https://github.com/cloudfoundry/cf-java-client) -* [Scripting](http://cli.cloudfoundry.org/en-US/cf/curl.html) with the Cloud Foundry Command Line Interface (cf CLI) +* Scripting: enter `cf help curl` ### Experimental diff --git a/deploy-apps/_v3-note.html.md.erb b/deploy-apps/_v3-note.html.md.erb index 31e5e807..f63163ec 100644 --- a/deploy-apps/_v3-note.html.md.erb +++ b/deploy-apps/_v3-note.html.md.erb @@ -4,7 +4,7 @@ This attribute is available with CAPI V3 only. To push a manifest that uses this

    diff --git a/deploy-apps/app-ssh-overview.html.md.erb b/deploy-apps/app-ssh-overview.html.md.erb index b25a2b25..f322ceec 100644 --- a/deploy-apps/app-ssh-overview.html.md.erb +++ b/deploy-apps/app-ssh-overview.html.md.erb @@ -32,11 +32,11 @@ for spaces, and for apps as described in the table:
    - + - +
    Space manager Spacecf CLI allow-space-ssh and disallow-space-ssh commandscf CLI cf allow-space-ssh and cf disallow-space-ssh commands
    Space developer Appcf CLI enable-ssh and disable-ssh commandscf CLI enable-ssh and disable-ssh commands
    diff --git a/deploy-apps/blue-green.html.md.erb b/deploy-apps/blue-green.html.md.erb index 72453524..b911ead3 100644 --- a/deploy-apps/blue-green.html.md.erb +++ b/deploy-apps/blue-green.html.md.erb @@ -76,7 +76,7 @@ The router now also sends any traffic for `demo-time-temp.example.com` to Green. Now that both apps are up and running, switch the router so all incoming requests go to both the Green app and the Blue app. -Use the [cf map-route](http://cli.cloudfoundry.org/en-US/cf/map-route.html) command to map the original URL route (`demo-time.example.com`) to the Green app. +Use the `cf map-route` command to map the original URL route (`demo-time.example.com`) to the Green app.
     $ cf map-route Green example.com -n demo-time
    @@ -93,7 +93,7 @@ After the `cf map-route` command :
     ### Step 4: Unmap route to Blue
     
     After you verify that Green is running as expected, stop routing requests to Blue
    -using the [cf unmap-route](http://cli.cloudfoundry.org/en-US/cf/unmap-route.html) command:
    +using the `cf unmap-route` command:
     
     
     $ cf unmap-route Blue example.com -n demo-time
    diff --git a/deploy-apps/cf-scale.html.md.erb b/deploy-apps/cf-scale.html.md.erb
    index 831b629a..66f2311e 100644
    --- a/deploy-apps/cf-scale.html.md.erb
    +++ b/deploy-apps/cf-scale.html.md.erb
    @@ -11,7 +11,7 @@ For many apps, increasing the available disk space or memory can improve overall
     Similarly, running additional instances of an app can allow the app to handle increases in user load and concurrent requests.
     These adjustments are called "scaling" an app.
     
    -Use [cf scale](http://cli.cloudfoundry.org/en-US/cf/scale.html) to scale your app up or down to meet changes in traffic
    +Use `cf scale` to scale your app up or down to meet changes in traffic
     or demand.
     
     <%=vars.autoscaler_note_dev_guide%>
    diff --git a/deploy-apps/deploy-app.html.md.erb b/deploy-apps/deploy-app.html.md.erb
    index eed81df5..9b366211 100644
    --- a/deploy-apps/deploy-app.html.md.erb
    +++ b/deploy-apps/deploy-app.html.md.erb
    @@ -238,7 +238,7 @@ To specify custom options when pushing an app with `cf push`, you can include th
     For information about how app settings change from push to push, including how command-line options, manifests, and commands like `cf scale` interact, see
     [Deploying with App Manifests](manifest.html).
     
    -For a full list of `cf push` options, see the [Cloud Foundry CLI reference guide](https://cli.cloudfoundry.org/en-US/cf/push.html).
    +For a full list of `cf push` options, enter `cf push --help`.
     
     ###  Configure app services (optional)
     
    diff --git a/deploy-apps/environment-variable.html.md.erb b/deploy-apps/environment-variable.html.md.erb
    index 66737356..d2a854bb 100644
    --- a/deploy-apps/environment-variable.html.md.erb
    +++ b/deploy-apps/environment-variable.html.md.erb
    @@ -34,7 +34,8 @@ There are 3 possible ways of providing service binding data to apps, see [Creden
     * [SERVICE_BINDING_ROOT](#SERVICE-BINDING-ROOT) (experimental)
     * [VCAP_SERVICES_FILE_PATH](#VCAP-SERVICES-FILE-PATH) (experimental)
     
    -For more information about the `cf env` command, see [env](http://cli.cloudfoundry.org/en-US/cf/env.html) in the cf CLI documentation. For more information about the `cf set-env` command, see [set-env](http://cli.cloudfoundry.org/en-US/cf/set-env.html) in the cf CLI documentation.
    +For more information about the `cf env` command, enter `cf env --help`.
    +For more information about the `cf set-env` command, enter `cf set-env --help`. The following example demonstrates the environment variables `cf env` displays: diff --git a/deploy-apps/healthchecks.html.md.erb b/deploy-apps/healthchecks.html.md.erb index b4ce37b4..28b634af 100644 --- a/deploy-apps/healthchecks.html.md.erb +++ b/deploy-apps/healthchecks.html.md.erb @@ -66,8 +66,7 @@ types are `port`, `process`, and `http`. For more information, see [Health check * `LIVENESS-HEALTH-CHECK-TIMEOUT` is the amount of time allowed to elapse between starting an app and the first healthy response. For more information, see [Health check timeouts](#health_check_timeout). -For more information about the `cf push` command, see -[push](http://cli.cloudfoundry.org/en-US/cf/push.html) in the Cloud Foundry CLI Reference Guide. +For more information about the `cf push` command, enter `cf push --help`.

    The health check configuration that you provide with @@ -90,12 +89,10 @@ Where: * `CUSTOM-HTTP-ENDPOINT` is the custom HTTP endpoint that you want to add to the health check. By default, an `http` health check uses `/` as its endpoint unless you specify a custom endpoint. For more information, see [Health check HTTP endpoints](#health_check_uri). -You can also change the health check invocation timeout for -an app, use cf set-health-check. This option also requires restarting the app. For more information, see Apps in the Cloud Foundry CLI Reference Guide. +You can also change the health check invocation timeout for an app, use `cf set-health-check`. +This option also requires restarting the app. For more information, enter `cf set-health-check --help`. -For more information about the `cf set-health-check` command, see -[set-health-check](http://cli.cloudfoundry.org/en-US/cf/set-health-check.html) in -the Cloud Foundry CLI Reference Guide. +For more information about the `cf set-health-check` command, enter `cf set-health-check --help`.

    After you set the health check configuration of a deployed diff --git a/deploy-apps/routes-domains.html.md.erb b/deploy-apps/routes-domains.html.md.erb index abaef7a7..e00a60b8 100644 --- a/deploy-apps/routes-domains.html.md.erb +++ b/deploy-apps/routes-domains.html.md.erb @@ -10,8 +10,8 @@ For more information about routing capabilities in <%= vars.app_runtime_abbr %>, ## Routes -The <%= vars.app_runtime_abbr %> Gorouter routes requests to apps by associating an app with an address, known as a route. This is known as a _mapping_. Use -the cf CLI [cf map-route](https://cli.cloudfoundry.org/en-US/cf/map-route.html) command to associate an app and route. +The <%= vars.app_runtime_abbr %> Gorouter routes requests to apps by associating an app with an address, known as a route. This is known as a _mapping_. +Use the `cf CLI cf map-route` command to associate an app and route. The routing tier compares each request with a list of all the routes mapped to apps and attempts to find the best match. For example, the Gorouter makes the following matches for the two routes `example-app.<%= vars.app_domain %>` and `example-app.<%= vars.app_domain %>/products`: @@ -101,22 +101,22 @@ To create an internal route: -1. Create a network policy that allows your apps to communicate with each other. By default, apps cannot communicate over the container network. For more -information, see [Configuring container-to-container networking](cf-networking.html) and the [Cloud Foundry CLI reference guide](https://cli.cloudfoundry.org/en-US/cf/add-network-policy.html). +2. Create a network policy that allows your apps to communicate with each other. By default, apps cannot communicate over the container network. For more information, see [Configuring container-to-container networking](cf-networking.html), or enter `cf add-network-policy --help`. ### Create a route When a developer creates a route using the cf CLI, <%= vars.app_runtime_abbr %> determines whether the route is an HTTP or a TCP route based on the domain. To create a HTTP route, a developer must choose an HTTP domain. To create a TCP route, a developer must choose a TCP domain. -Domains in <%= vars.app_runtime_abbr %> provide a namespace from which to create routes. To list available domains for a targeted organization, use the [cf domains](https://cli.cloudfoundry.org/en-US/cf/domains.html) command. For more information about domains, see [Domains](#domains). +Domains in <%= vars.app_runtime_abbr %> provide a namespace from which to create routes. To list available domains for a targeted organization, use the `cf domains` command. For more information about domains, see [Domains](#domains). The following sections describe how developers can create HTTP and TCP routes for different use cases. #### Create an HTTP route with host name -In <%= vars.app_runtime_abbr %>, a host name is the label that indicates a subdomain of the domain associated with the route. Given a domain +In <%= vars.app_runtime_abbr %>, a host name is the label that indicates a subdomain of the domain associated with the route. +Given a domain `<%= vars.app_domain %>`, a developer can create the route `example-app.<%= vars.app_domain %>` by specifying the host name `example-app` with the -[cf create-route](https://cli.cloudfoundry.org/en-US/cf/create-route.html) command as shown in this example: +`cf create-route` command as shown in this example: ```console $ cf create-route shared-domain.example.com --hostname example-app @@ -141,8 +141,7 @@ This command instructs <%= vars.app_runtime_abbr %> to only route requests to ap This approach creates a route with the same address as the domain itself and is permitted for private domains only. For more information, see Private Domains.
    -A developer can create a route from the domain <%= vars.private_app_domain %> with no host name with the -cf create-route command: +A developer can create a route from the domain <%= vars.private_app_domain %> with no host name with the cf create-route command:

     
    @@ -264,7 +263,7 @@ OK
     
     ###  List routes
     
    -Developers can list routes for the current space with the [cf routes](https://cli.cloudfoundry.org/en-US/cf/routes.html) command. A route is uniquely identified by the combination of host name, domain, port, and path.
    +Developers can list routes for the current space with the `cf routes` command. A route is uniquely identified by the combination of host name, domain, port, and path.
     
     ```console
     $ cf routes
    @@ -306,8 +305,8 @@ Developers can only view a route within a space where they are a member.
     
     ###  Check routes
     
    -Developers cannot create a route that is already taken. To find out if a route is available, developers can use the [cf
    -check-route](https://cli.cloudfoundry.org/en-US/cf/check-route.html) command.
    +Developers cannot create a route that is already taken. To find out if a route is available, developers can use the
    +`cf check-route` command.
     
     To find out if a route with the host name `store` and the domain `<%= vars.app_domain %>` and the path `products` exists, run:
     
    @@ -320,7 +319,7 @@ Route store.<%= vars.app_domain %>/products does exist
     
     ###  Map a route to your app
     
    -For an app to receive requests to a route, developers must map the route to the app with the [cf map-route](https://cli.cloudfoundry.org/en-US/cf/map-route.html) command. If the route does not already exist, this command creates it.
    +For an app to receive requests to a route, developers must map the route to the app with the `cf map-route` command. If the route does not already exist, this command creates it.
     
     Any app that is not routed to port 80 or port 443 must be explicitly mapped using the cf map-route command. Otherwise, the route is mapped to port 443.
     
    diff --git a/deploy-apps/ssh-apps.html.md.erb b/deploy-apps/ssh-apps.html.md.erb
    index a3081e3e..7738c9b8 100644
    --- a/deploy-apps/ssh-apps.html.md.erb
    +++ b/deploy-apps/ssh-apps.html.md.erb
    @@ -7,7 +7,8 @@ owner: Diego
     The Cloud Foundry Command Line Interface (cf CLI) lets you securely log in to remote host virtual machines (VMs) running <%= vars.app_runtime_full %> (<%= vars.app_runtime_abbr %>) app instances. The commands that activate SSH access to apps, and activate, deactivate, and verify permissions for such access are described here.
     
     

    -The cf ssh command in cf CLI v7+ include the all_proxy environment variable, which allows you to specify a proxy server to activate proxying for all requests. For more information, see ssh in the Cloud Foundry CLI Reference Guide and Use SOCKS5 with cf v3-ssh in Using the cf CLI with a proxy server.

    +The cf ssh command in cf CLI v7+ includes the all_proxy environment variable, which allows you to specify a proxy server to activate proxying for all requests. For more information, see Use SOCKS5 with cf v3-ssh in Using the cf CLI with a proxy server. +For command details, enter cf ssh --help

    The cf CLI looks up the `app_ssh_oauth_client` identifier in the Cloud Controller `/v2/info` endpoint, and uses this identifier to query the UAA server for an SSH authorization code. On the target VM side, the SSH proxy contacts the Cloud Controller through the `app_ssh_endpoint` listed in `/v2/info` to confirm permission for SSH access. @@ -58,24 +59,24 @@ You must restart your app after enabling SSH access. ### Configuring SSH access at the app level -[cf enable-ssh](http://cli.cloudfoundry.org/en-US/cf/enable-ssh.html) activates SSH access to all instances of an app: +`cf enable-ssh` activates SSH access to all instances of an app:
     $ cf enable-ssh MY-AWESOME-APP
     
    -[cf disable-ssh](http://cli.cloudfoundry.org/en-US/cf/disable-ssh.html) deactivates SSH access to all instances of an app: +`cf disable-ssh` deactivates SSH access to all instances of an app:
     $ cf disable-ssh MY-AWESOME-APP
     
    ### Configuring SSH access at the space level -[cf allow-space-ssh](http://cli.cloudfoundry.org/en-US/cf/allow-space-ssh.html) allows SSH access into all apps in a space: +`cf allow-space-ssh` allows SSH access into all apps in a space:
     $ cf allow-space-ssh SPACE-NAME
     
    -[cf disallow-space-ssh](http://cli.cloudfoundry.org/en-US/cf/disallow-space-ssh.html) disallows SSH access into all apps in a space: +`cf disallow-space-ssh` disallows SSH access into all apps in a space:
     $ cf disallow-space-ssh SPACE-NAME
     
    @@ -83,12 +84,12 @@ $ cf disallow-space-ssh SPACE-NAME ## Verify SSH permissions -[cf ssh-enabled](http://cli.cloudfoundry.org/en-US/cf/ssh-enabled.html) verifies whether an app is accessible with SSH: +`cf ssh-enabled` verifies whether an app is accessible with SSH:
    $ cf ssh-enabled MY-AWESOME-APP
     ssh support is disabled for 'MY-AWESOME-APP'
     
    -[cf space-ssh-allowed](http://cli.cloudfoundry.org/en-US/cf/space-ssh-allowed.html) verifies whether all apps running within a space are accessible with SSH: +`cf space-ssh-allowed` verifies whether all apps running within a space are accessible with SSH:
     $ cf space-ssh-allowed SPACE-NAME
     ssh support is enabled in space 'SPACE-NAME'
    @@ -106,7 +107,7 @@ $ cf ssh MY-AWESOME-APP
     
     ###  Common cf SSH flags
     
    -You can tailor [cf ssh](http://cli.cloudfoundry.org/en-US/cf/ssh.html) commands with the following flags, most of which mimic flags for the UNIX or Linux `ssh` command. Run the `cf ssh --help` command for more details.
    +You can tailor `cf ssh` commands with the following flags, most of which mimic flags for the UNIX or Linux `ssh` command. Run the `cf ssh --help` command for more details.
     
     * The `-i` flag targets a specific instance of an app. To log in to the VM container hosting the third instance, `index=2`,  of MY-AWESOME-APP, run:
     
    diff --git a/deploy-apps/ssh-services.html.md.erb b/deploy-apps/ssh-services.html.md.erb
    index 7c04bd33..e38efb1c 100644
    --- a/deploy-apps/ssh-services.html.md.erb
    +++ b/deploy-apps/ssh-services.html.md.erb
    @@ -28,7 +28,7 @@ The procedure in this topic requires use of a service key, and not all services
         <%=vars.ssh_marketplace_output %>
         
    -1. Create your service instance. As part of the [create-service](http://cli.cloudfoundry.org/en-US/cf/create-service.html) command, indicate the service name, the service plan, and the name you choose for your service instance. +1. Create your service instance. As part of the `cf create-service` command, indicate the service name, the service plan, and the name you choose for your service instance.
         $ cf create-service <%=vars.ssh_service %> <%=vars.ssh_service_plan %> MY-DB
    @@ -57,13 +57,13 @@ To activate SSH access to your app, SSH access must also be activated for both t
     
     To establish SSH access to your service instance, you must create a service key that contains critical information for configuring your SSH tunnel.
     
    -1. Create a service key for your service instance using the [cf create-service-key](http://cli.cloudfoundry.org/en-US/cf/create-service-key.html) command.
    +1. Create a service key for your service instance using the `cf create-service-key` command.
     
         ```console
         cf create-service-key MY-DB EXTERNAL-ACCESS-KEY
         ```
     
    -1. Retrieve your new service key using the [cf service-key](http://cli.cloudfoundry.org/en-US/cf/service-key.html) command.
    +2. Retrieve your new service key using the `cf service-key` command.
     
         ```console
         cf service-key MY-DB EXTERNAL-ACCESS-KEY
    @@ -80,7 +80,7 @@ To establish SSH access to your service instance, you must create a service key
     
     ##  Configure your SSH tunnel
     
    -Configure an SSH tunnel to your service instance using [cf ssh](http://cli.cloudfoundry.org/en-US/cf/ssh.html). Tailor the following example command with information from your service key.
    +Configure an SSH tunnel to your service instance using the `cf ssh` command. Tailor the following example command with information from your service key.
     
    $ cf ssh -L 63306:<%= vars.ssh_service_host %>:3306 YOUR-HOST-APP
    * You can use any available local port for port forwarding; for example, `63306`. diff --git a/deploy-apps/streaming-logs.html.md.erb b/deploy-apps/streaming-logs.html.md.erb index 77e4e455..dcaa465b 100644 --- a/deploy-apps/streaming-logs.html.md.erb +++ b/deploy-apps/streaming-logs.html.md.erb @@ -141,7 +141,7 @@ For example: 2016-06-14T14:16:11.49-0700 [SSH/0] OUT Successful remote access by 192.0.2.33:7856
    -For more information about the `cf ssh` command, see the [Cloud Foundry CLI reference guide](https://cli.cloudfoundry.org/en-US/cf/ssh.html). +For more information about the `cf ssh` command, enter `cf ssh --help`. ### CELL @@ -164,7 +164,7 @@ debugging because it might affect app performance. ## Viewing Logs -To view logs, run the `cf logs` command. You can tail, dump, or filter log output. For more information about the `cf logs` command, see the [Cloud Foundry CLI reference guide](https://cli.cloudfoundry.org/en-US/cf/logs.html). +To view logs, run the `cf logs` command. You can tail, dump, or filter log output. For more information about the `cf logs` command, enter `cf logs --help`. ### Tailing logs diff --git a/services/route-binding.html.md.erb b/services/route-binding.html.md.erb index 93ca748c..3a8279d2 100644 --- a/services/route-binding.html.md.erb +++ b/services/route-binding.html.md.erb @@ -24,7 +24,7 @@ You must install the Cloud Foundry Command Line Interface (cf CLI) to bind a rou

    Gorouter rejects WebSocket requests for routes that are bound to route services. These requests return a 503 error and a X-Cf-Routererror route_service_unsupported header.

    -Run [cf bind-route-service](http://cli.cloudfoundry.org/en-US/cf/bind-route-service.html) to bind a route from an app to a service instance. +Run `cf bind-route-service` to bind a route from an app to a service instance. The following example binds the route from `my-app.<%=vars.app_domain%>` to the service instance `my-route-service`. @@ -64,7 +64,7 @@ OK You must install the Cloud Foundry Command Line Interface (cf CLI) to bind a route to a service instance. For more information, see [Installing the cf CLI](../../cf-cli/install-go-cli.html). -Run the [cf unbind-route-service](http://cli.cloudfoundry.org/en-US/cf/unbind-route-service.html) command to unbind a route from an app to a service instance. +Run the `cf unbind-route-service` command to unbind a route from an app to a service instance. This example removes the route from `my-app.<%=vars.app_domain%>` to the service instance `my-route-service`. diff --git a/services/user-provided.html.md.erb b/services/user-provided.html.md.erb index dacb6e3a..050538d7 100644 --- a/services/user-provided.html.md.erb +++ b/services/user-provided.html.md.erb @@ -15,7 +15,7 @@ After creation, user-provided service instances behave like service instances cr ## Create a user-provided service instance -The alias for [cf create-user-provided-service](http://cli.cloudfoundry.org/en-US/cf/create-user-provided-service.html) is `cf cups`. +The alias for the `cf create-user-provided-service` command is `cf cups`. ### Deliver service credentials to an app @@ -77,7 +77,7 @@ For more information, see [Managing app requests with route services](./route-bi ## Update a user-provided service instance -You can use [cf update-user-provided-service](http://cli.cloudfoundry.org/en-US/cf/update-user-provided-service.html) to update the attributes of an instance of a user-provided service. New credentials overwrite old credentials, and parameters that are not provided are deleted. +You can use `cf update-user-provided-service` to update the attributes of an instance of a user-provided service. New credentials overwrite old credentials, and parameters that are not provided are deleted. The alias for `update-user-provided-service` is `uups`. Bound apps can access the new configuration after restart. You can use rolling restarts to avoid any app downtime. diff --git a/using-tasks.html.md.erb b/using-tasks.html.md.erb index c98ba97c..486469dc 100644 --- a/using-tasks.html.md.erb +++ b/using-tasks.html.md.erb @@ -64,8 +64,8 @@ more information, see the [Cloud Foundry API documentation](http://v3-apidocs.cl Admins can set the default memory, disk usage and log rate quotas for tasks on a global level. -Tasks use the same memory, disk usage, and log rate limit defaults as apps, unless you customize them using the `cf run-task` command. For more information -about the `cf run-task` command, see the [Cloud Foundry CLI reference guide](https://cli.cloudfoundry.org/en-US/v8/run-task.html). +Tasks use the same memory, disk usage, and log rate limit defaults as apps, unless you customize them using the `cf run-task` command. +For more information about the `cf run-task` command, enter `cf help run-task`. <% if vars.platform_code == 'PCF' %> <%= partial "/pcf/core/tasks_rec_alloc_pcf" %> From 3ac293e1a5261305f660e8d9a0a54ef59278f4cb Mon Sep 17 00:00:00 2001 From: Anita Flegg Date: Tue, 15 Jul 2025 08:47:11 -0700 Subject: [PATCH 128/132] Add blank lines before code snippets to fix formatting (I hope) --- deploy-apps/_c2c_oss_overlay.html.md.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deploy-apps/_c2c_oss_overlay.html.md.erb b/deploy-apps/_c2c_oss_overlay.html.md.erb index 840f118a..aa61e26c 100644 --- a/deploy-apps/_c2c_oss_overlay.html.md.erb +++ b/deploy-apps/_c2c_oss_overlay.html.md.erb @@ -80,6 +80,7 @@ Max supported number of Diego Cells = (A/B) - C ``` Here is an example using the default values: + ``` network = ["10.255.0.0/16"] subnet_prefix_length = 24 @@ -92,6 +93,7 @@ Max supported number of Diego Cells = (65,536/256) - 1 = 255 ``` Here is an example using other values: + ``` network = ["10.255.0.0/20", "10.255.96.0/21"] subnet_prefix_length = 24 From 71493a42f80889246c4145514163c6f318bbc115 Mon Sep 17 00:00:00 2001 From: BG Date: Thu, 21 Aug 2025 12:03:27 +0200 Subject: [PATCH 129/132] [deploy-apps] Add warning note to step-weight example --- deploy-apps/rolling-deploy.html.md.erb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/deploy-apps/rolling-deploy.html.md.erb b/deploy-apps/rolling-deploy.html.md.erb index e71ba637..28f030aa 100644 --- a/deploy-apps/rolling-deploy.html.md.erb +++ b/deploy-apps/rolling-deploy.html.md.erb @@ -186,6 +186,12 @@ This results in the following deployment plan: A **Step Weight** of `100` allows app operators to use the `cancel-deployment` command even after all instances have been replaced. +

    +The cancel command is designed to revert the app to its +original state as quickly as possible and does not guarantee zero downtime. +
    It is important to note that changes +to environment variables and service bindings are not reverted.

    + ### Testing Canary Deployments To test an in-progress canary deployment, you can route HTTP requests to the canary process, or to an individual canary instance using the `X-Cf-Process-Instance` header, as described in [HTTP headers for process instance routing](../../concepts/http-routing.html#process-instance-routing). From e05d4235dcba6f74d1c51aebb9f0fba1697d7054 Mon Sep 17 00:00:00 2001 From: Anita Flegg Date: Fri, 29 Aug 2025 08:06:54 -0700 Subject: [PATCH 130/132] Remove release number - does not apply --- deploy-apps/stacks.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy-apps/stacks.html.md.erb b/deploy-apps/stacks.html.md.erb index 5134216a..c1afa39c 100644 --- a/deploy-apps/stacks.html.md.erb +++ b/deploy-apps/stacks.html.md.erb @@ -27,7 +27,7 @@ Docker apps do not use stacks.

    ## Available stacks -<%= vars.product_short %> <%= vars.current_major_version ? "v#{vars.current_major_version}" : "" %> 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). +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). 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). From f470473543e1c2ab5b7110cb0d6fd140a1526a6d Mon Sep 17 00:00:00 2001 From: Anita Flegg Date: Fri, 29 Aug 2025 08:37:16 -0700 Subject: [PATCH 131/132] remove version variable - not relevant --- deploy-apps/windows-stacks.html.md.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy-apps/windows-stacks.html.md.erb b/deploy-apps/windows-stacks.html.md.erb index 42c51fb0..eed02d9d 100644 --- a/deploy-apps/windows-stacks.html.md.erb +++ b/deploy-apps/windows-stacks.html.md.erb @@ -24,8 +24,8 @@ Docker apps do not use stacks.

    ## Available stacks -If you push your <%= vars.windows_runtime_abbr %> <%= vars.current_major_version ? "v#{vars.current_major_version}" : "" %> app to a Windows stack, you must use `windows`. -The `windows2016` stack is not supported on <%= vars.windows_runtime_abbr %>. +If you push your Cloud Foundry app to a Windows stack, you must use `windows`. +The `windows2016` stack is not supported on Cloud Foundry. ## Restaging apps on a new stack From f12c0ebe901d5062062dfcd343d76c17d8e29bce Mon Sep 17 00:00:00 2001 From: anita-flegg Date: Mon, 15 Sep 2025 14:17:30 -0700 Subject: [PATCH 132/132] remove unnecessary conditional stmt --- deploy-apps/deploy-app.html.md.erb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/deploy-apps/deploy-app.html.md.erb b/deploy-apps/deploy-app.html.md.erb index 9b366211..520fe880 100644 --- a/deploy-apps/deploy-app.html.md.erb +++ b/deploy-apps/deploy-app.html.md.erb @@ -188,13 +188,8 @@ You can configure the `cf push` command to run custom initialization tasks for These tasks run after <%= vars.app_runtime_abbr %> loads the app droplet but before it starts the app to allow the initialization script to access the app language runtime environment. For example, your script can map values from `$VCAP_SERVICES` into other environment variables or a config file that the app uses.
    -The following notes include important information about configuring app initialization when you use certain buildpacks: +See the following important information about configuring app initialization when you use certain buildpacks:
      -
    • Java: Initialization scripts for the Java buildpack require additional configuration. - <% if vars.platform_code != 'CF' %> For more information, see - How to Modify the Application Container Environment prior to Application Execution in the VMware Tanzu Knowledge Base. - <% end %> -
    • PHP: <%= vars.app_runtime_abbr %> does not support initialization scripts for the PHP buildpack versions prior to v4.3.18. If you use one of these buildpack versions, your app hosts the .profile script's contents. This means that any app staged using the affected buildpack versions can leak credentials placed in the .profile script. @@ -206,7 +201,7 @@ To run initialization tasks: 1. Create a `.profile` script that contains the initialization tasks. -1. Save the `.profile` script to the directory where you run the `cf push` command. +2. Save the `.profile` script to the directory where you run the `cf push` command. The following example `.profile` file uses `bash` to set a value for the environment variable `LANG`: