diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..7bab1667 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +# Normalise all text files to LF in the repo and working directory. +* text=auto eol=lf + +# Bash scripts must use LF so they run correctly in Git Bash/WSL. +*.sh text eol=lf +*.inc.sh text eol=lf \ No newline at end of file diff --git a/README.md b/README.md index c182b1e1..78cc35b4 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,11 @@ # Guide for Developers Pushing Apps to Cloud Foundry -This is a guide for developers on deploying and troubleshooting apps running in Cloud Foundry. +This is a guide for developers on deploying and troubleshooting apps running in Tanzu Elastic Application Runtime (EAR). -This is one of several repositories that go into a complete documentation set. +This is one of several repositories that go into a complete documentation set; this branch is used only for Tanzu Elastic Application Runtime. -The contents here are structured as a topic repository intended to be compiled -into a larger document with -[Bookbinder](http://github.com/cloudfoundry-incubator/bookbinder). - -See the [docs-book-cloudfoundry](http://github.com/cloudfoundry/docs-book-cloudfoundry) -repository for the complete list of open source documentation repositories, as well as information about the publishing process. +See the [docs book repo](https://github.gwd.broadcom.net/TNZ/docs-book-application-service) +for the full TOC and the index files used to organize the book. docs-dev-guide/deploy-apps subdirectory: Develop and Manage Apps @@ -22,5 +18,19 @@ docs-dev-guide/services subdirectory: Custom Services Create and publish free or metered services for Cloud Foundry apps. - -This repository used to contain the subdirectory docs-dev-guide/cf-cli, documenting the Cloud Foundry Command Line Interface (cf CLI). The content from this subdirectory has been moved to its own repository, [docs-cf-cli](http://github.com/cloudfoundry/docs-cf-cli). +## Branch map + +| Branch | EART version | Doc Link | +|---------|------------------|---------------| +| 11.0 | EART 11.0 | [EART v11.0 staging](https://author-techdocs2-prod.adobecqms.net/us/en/vmware-tanzu/platform/elastic-application-runtime/11-0/eart/runtime-rn.html) +| tcf-104 | EART 10.4 | [EART v10.4](https://techdocs.broadcom.com/us/en/vmware-tanzu/platform/elastic-application-runtime/10-4/eart/runtime-rn.html) +| tcf-103 | EART 10.3 | [EART v10.3](https://techdocs.broadcom.com/us/en/vmware-tanzu/platform/elastic-application-runtime/10-3/eart/concepts-overview.html) | +| tcf-102 | TPCF 10.2 | [TPCF v10.2](https://techdocs.broadcom.com/us/en/vmware-tanzu/platform/elastic-application-runtime/10-2/eart/concepts-overview.html) | +| tcf-10 | TPCF 10.0 | archived PDF | +| 6.0 | TAS 6.0 (EOGS) | archived PDF | +| 5.0 | TAS 5.0 (EOGS) | archived PDF | +| 4.0 | TAS v4.0 (EOGS) | archived PDF | +| 3.0 | TAS v3.0 (EOGS) | archived PDF | +| 2.13 | TAS v2.13 (EOGS) | archived PDF | +| 2.12 | TAS v2.12 (EOGS) | archived PDF | +| 2.11 | TAS v2.11 (EOGS) | archived PDF | \ No newline at end of file diff --git a/egress-policies.html.md.erb b/archive/egress-policies.html.md.erb similarity index 100% rename from egress-policies.html.md.erb rename to archive/egress-policies.html.md.erb diff --git a/capi/client-libraries.html.md.erb b/capi/client-libraries.html.md.erb index f51ba076..1561810c 100644 --- a/capi/client-libraries.html.md.erb +++ b/capi/client-libraries.html.md.erb @@ -4,11 +4,7 @@ owner: CAPI --- Here is a list of the client libraries you can use with the Cloud Foundry API (CAPI) -<% if vars.platform_code == "CF" %> -. -<% else %> - for <%= vars.app_runtime_first %>. -<% end %> +for <%= vars.app_runtime_first %>. ## CAPI overview @@ -17,6 +13,11 @@ platform. You can use it to manage orgs, spaces, and apps, which includes user r <%= vars.capi_link %> +
CAPI v2 Deprecation and End of Life
+
CAPI v2 endpoints are deprecated in both Open Source Cloud Foundry since 2021 and <%= vars.app_runtime_abbr %> in version 6.0 and forward. Given that these endpoints are deprecated, new development should use the v3 endpoints.
+Open Source Cloud Foundry has plans to end of life the v2 endpoints following this RFC: https://github.com/cloudfoundry/community/blob/main/toc/rfc/rfc-0032-cfapiv2-eol.md
+<%= vars.app_runtime_abbr %> does not have plans to end support for the V2 endpoints in the current LTS releases.
- 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_enable.html.md.erb b/deploy-apps/_c2c_oss_enable.html.md.erb index 701f1b73..a68eba21 100644 --- a/deploy-apps/_c2c_oss_enable.html.md.erb +++ b/deploy-apps/_c2c_oss_enable.html.md.erb @@ -8,7 +8,7 @@ Container networking has properties you can configure to change the default beha The following table has a list of properties and instructions for editing them. -For more information about container networking configuration, see [Configuration Information for Operators](https://github.com/cloudfoundry/cf-networking-release/blob/develop/docs/configuration.md). +For more information about container networking configuration, see [Configuration Information for Operators](https://github.com/cloudfoundry/cf-networking-release/blob/develop/docs/06-c2c.md).-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/_routing_conflict.html.md.erb b/deploy-apps/_routing_conflict.html.md.erb index e26a1c08..61970449 100644 --- a/deploy-apps/_routing_conflict.html.md.erb +++ b/deploy-apps/_routing_conflict.html.md.erb @@ -1,3 +1,3 @@ -<%=vars.product_short%> allows multiple apps, or versions of the same app, to be mapped to the same route. This feature activates blue-green deployment. For more information see [Using blue-green deployment to reduce downtime and risk](./blue-green.html). +<%=vars.app_runtime_abbr%> allows multiple apps, or versions of the same app, to be mapped to the same route. This feature activates blue-green deployment. For more information see [Using blue-green deployment to reduce downtime and risk](./blue-green.html). -Routing multiple apps to the same route might cause undesirable behavior in some situations by routing incoming requests randomly to one of the apps on the shared route. \ No newline at end of file +Routing multiple apps to the same route might cause undesirable behavior in some situations by routing incoming requests randomly to one of the apps on the shared route. diff --git a/deploy-apps/_v3-note.html.md.erb b/deploy-apps/_v3-note.html.md.erb index cb7001d1..6d9bbcaf 100644 --- a/deploy-apps/_v3-note.html.md.erb +++ b/deploy-apps/_v3-note.html.md.erb @@ -1,11 +1,8 @@-
cf v3-push APP-NAME. See v3-push - Cloud Foundry CLI for information about this function.cf push APP-NAME+
cf push --help+
containers.graceful_shutdown_interval_in_seconds on the replacement jobs.
-<% end %>
+
+To change the timeout period on the <%= vars.app_runtime_abbr %> tile or IST tile, go to the Advanced Settings tab and edit the "app graceful shutdown period" property.
+
This might increase the time it takes to drain Diego Cells, which causes increased deployment time.
<%= 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/app-ssh-overview.html.md.erb b/deploy-apps/app-ssh-overview.html.md.erb index b25a2b25..7ff163b5 100644 --- a/deploy-apps/app-ssh-overview.html.md.erb +++ b/deploy-apps/app-ssh-overview.html.md.erb @@ -6,8 +6,6 @@ owner: Diego If you need to troubleshoot an instance of an application, you can gain SSH access to the app using the SSH proxy and daemon. For example, one of the app instances might be unresponsive, or the log output from the app is inconsistent or incomplete. You can SSH into the individual VM to troubleshoot the problem instance. -<%= vars.mutual_tls_ssh %> - ## About SSH access @@ -32,11 +30,11 @@ for spaces, and for apps as described in the table:cf allow-space-ssh and cf disallow-space-ssh commandscf enable-ssh and cf disable-ssh commands-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.
+If your app uses a relational database, blue-green deployment can lead to discrepancies between your green and blue databases during an update. To maximize data integrity, configure a single database for backward and forward compatibility. ## Blue-green deployment with Cloud Foundry example @@ -37,11 +36,13 @@ the server. ### Step 1: Push an app -Use the Cloud Foundry Command Line Interface (cf CLI) to push the app. +Use the Tanzu cf CLI to push the app. Name the app "Blue" with the subdomain "demo-time."-$ cf push Blue -n demo-time +$ cf create-route example.com --hostname demo-time +$ cf push Blue +$ cf map-route Blue example.com --hostname demo-timeAs shown in the graphic: @@ -49,7 +50,7 @@ As shown in the graphic: * Blue is now running on Cloud Foundry. * The Cloud Foundry Router sends all traffic for `demo-time.example.com` traffic to Blue. - + ### Step 2: Update app and push @@ -58,14 +59,16 @@ Now make a change to the app. 1. Run `cf push` again, but use the name "Green" for the app and provide a different subdomain to create a temporary route:
-$ cf push Green -n demo-time-temp +$ cf create-route example.com --hostname demo-time-temp +$ cf push Green +$ cf map-route Green example.com --hostname demo-time-tempAfter this push: * Two instances of the app are now running on Cloud Foundry: the original Blue and the updated Green. * The Cloud Foundry Router continues sending all traffic for `demo-time.example.com` to Blue. -The router now also sends any traffic for `demo-time-temp.example.com` to Green. +The router also sends any traffic for `demo-time-temp.example.com` to Green.  @@ -73,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 @@ -90,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 @@ -107,12 +110,10 @@ Now all traffic for `demo-time.example.com` is sent to Green. ### Step 5: Remove temporary route to Green -You can now use `cf unmap-route` to remove the route `demo-time-temp.example.com` from Green. You can delete the route using `cf delete-route` or reserved it for later use. You can also decommission Blue, or keep it in case you need to roll back your changes. +You can now use `cf unmap-route` to remove the route `demo-time-temp.example.com` from Green. You can delete the route using `cf delete-route` or reserve it for later use. You can also decommission Blue, or keep it in case you need to roll back your changes.  -## Implementation +## Alternative -Cloud Foundry community members have written a plug-in to automate blue-green deployment: - -* [BlueGreenDeploy](https://github.com/bluemixgaragelondon/cf-blue-green-deploy): cf-blue-green-deploy is a plug-in, written in Go, for the Cloud Foundry Command Line Interface (cf CLI) that automates a few steps involved in zero-downtime deployments. +Cloud Foundry offers an alternative way to deploy new versions of an app with zero downtime using the `cf push` command with the rolling deployment strategy. For more information, see [Deploying apps with zero downtime](./rolling-deploy.html#rolling). diff --git a/deploy-apps/cf-networking.html.md.erb b/deploy-apps/cf-networking.html.md.erb index da54173c..2fea6bf3 100644 --- a/deploy-apps/cf-networking.html.md.erb +++ b/deploy-apps/cf-networking.html.md.erb @@ -4,54 +4,40 @@ 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). +The container-to-container networking feature 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 %> -<% if vars.platform_code == "CF" %> -<%= partial 'c2c_oss_enable' %> -<% end %> - -<% if vars.platform_code == "CF" %> -<%= partial 'c2c_oss_overlay' %> -<% else %> <%= partial "/pcf/core/c2c_overlay" %> -<% end %> - -<% if vars.platform_code == "CF" %> -<%= partial 'c2c_oss_logging' %> -<% end %> ## Create and manage networking policies -This section describes how to create and edit container-to-container networking policies using the Cloud Foundry Command Line Interface (cf CLI). +This section describes how to create and edit container-to-container networking policies using the Tanzu cf CLI. <%= vars.app_man_network %> ### Prerequisites -Ensure that you are using cf CLI v6.42 or later: +Ensure that you are using Tanzu cf CLI v10 or later:$ cf version-For more information about updating the cf CLI, see [Installing the cf CLI](../../cf-cli/install-go-cli.html). +For more information about updating the cf CLI, see [Upgrading to Tanzu cf CLI v10](https://techdocs.broadcom.com/us/en/vmware-tanzu/platform/tanzu-cf-cli/<%= vars.tanzu_cf_cli_version %>/t-cf-cli/standalone-cf-cli-v10.html). -<% if vars.platform_code == "CF" || vars.platform_code == "PCF" %> ### Grant permissions -Cloud Foundry admins use the following UAA scopes to grant specific users or groups permissions to configure network policies: +Cloud Foundry admins use the following Tanzu UAA scopes to grant specific users or groups permissions to configure network policies:
| UAA Scope | +Tanzu UAA Scope | Suitable for… | Allows users to create policies… | Recommended use case | Explanation | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
http |
The app can provide an HTTP 200 response. |
@@ -145,7 +138,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.||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CF_STAGING_TIMEOUT |
- cf CLI environment variable + | Tanzu cf CLI environment variable
Default: 15 minutes |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CF_STARTUP_TIMEOUT |
- cf CLI environment variable + | Tanzu cf CLI environment variable
Default: 5 minutes |
Disk space allocation | Default: 1024 MB | +|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Minimum staging memory | +Default: 1024 MB | +||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Minimum staging disk space | +Default: 4096 MB | +||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Internet connection speed | Recommended minimum: 874 KB per second | diff --git a/deploy-apps/manifest-attributes.html.md.erb b/deploy-apps/manifest-attributes.html.md.erb index 14a70d93..c7448ef1 100644 --- a/deploy-apps/manifest-attributes.html.md.erb +++ b/deploy-apps/manifest-attributes.html.md.erb @@ -3,7 +3,7 @@ title: App manifest attribute reference owner: CLI --- -You can manage app properties and behavior using cf CLI commands or the app manifest (a YAML properties file). This topic describes manifest formatting and provides a list of attributes available for app manifests. You can use it with [Deploying with app manifests](manifest.html), which provides basic procedures and guidance for deploying apps with manifests. +You can manage app properties and behavior using Tanzu cf CLI commands or the app manifest (a YAML properties file). This topic describes manifest formatting and provides a list of attributes available for app manifests. You can use it with [Deploying with app manifests](manifest.html), which provides basic procedures and guidance for deploying apps with manifests. For more information about V3 manifest properties, see the [Cloud Foundry API (CAPI) V3 documentation](http://v3-apidocs.cloudfoundry.org/index.html#space-manifest). @@ -32,8 +32,7 @@ applications: ```
--no-route |
- All declared routes are ignored. In cf CLI v7, this flag no longer unbinds all existing routes associated with the app. | +All declared routes are ignored. This flag does not unbind all existing routes associated with the app. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
--random-route |
@@ -640,7 +658,6 @@ You can increase the timeout length for very large apps that require more time t
The `-t` command-line flag overrides this attribute.
| Step | +Step Weight | +Original Instances | +Canary Instances | +Actual Weighting | +
|---|---|---|---|---|
| Pre-deploy | +n/a | +10 | +0 | +0 | +
| 1 | +1% | +10 | +1 | +9% | +
| 2 | +20% | +9 | +2 | +18% | +
| 3 | +45% | +6 | +5 | +45% | +
| 4 | +80% | +3 | +8 | +72% | +
| 5 | +100% | +0 | +10 | +100% | +
| Post-deploy | +n/a | +0 | +10 | +100% | +
+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.
| Limitation | +Description | +
|---|---|
| Multiple app versions | +During 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 migrations | +Deployments 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 processes | +Deployments 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. |
+
| Quotas | +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 | +If 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 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. |
+
| 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 Tanzu cf CLI command cf logs APP_NAME.
+ |
+
-Caution Review the limitations of this feature before running the command. For more information, see Limitations.
-* **For cf CLI v7, run:** +To deploy an app without incurring downtime: - ``` - cf push APP-NAME --strategy rolling - ``` - Where `APP-NAME` is the name that you want to give your app. +Run: -
- 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.
- cf push used with the --no-wait flag exits as soon as one instance is healthy.
-
+Tanzu cf CLI 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.
+
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.- Important - This command is experimental and unsupported. Upgrade to cf CLI v7 (Upgrading to cf CLI v7) or or cf CLI v8 (Upgrading to cf CLI v8). -
+2. Create an empty app by running the following `curl` command with `POST /v3/apps`.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.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.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.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.- Important - This command is experimental and unsupported. Upgrade to cf CLI v7 (Upgrading to cf CLI v7) or or cf CLI v8 (Upgrading to cf CLI v8). + 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.-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.
+original state as quickly as possible and does not guarantee zero downtime. +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.- Important - This command is experimental and unsupported. Upgrade to cf CLI v7 (Upgrading to cf CLI v7) or or cf CLI v8 (Upgrading to cf CLI v8). + 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.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.- 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 of when using rolling deployments. - -| Limitation | -Description | -
|---|---|
| App manifests | -The cf v3-zdt-push command does not support providing an app manifest with the
- -f flag. If you have a manifest.yml file in your app directory, it is
- ignored. This limitation only applies to cf CLI v6. |
-
| SSH to app instances | -Pushing updates to your app with a cf v3-zdt-push command causes the new web process
- and app GUID to mismatch. cf ssh does not handle this scenario. You must use the
- cf v3-ssh command instead. This limitation only applies to cf CLI v6. |
-
| Multiple app versions | -During 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 migrations | -Deployments 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 processes | -Rolling 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. |
-
| 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. | -
| Simultaneous apps when interrupting a push | -If 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 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. |
-
status.value |
- status.reason |
- Description | + +|
|---|---|---|---|
| status.value | +status.reason | +Description | +|
ACTIVE |
DEPLOYING |
The deployment is deploying. | |
ACTIVE |
+ PAUSED |
+ The deployment is paused waiting for the user to continue with the deployment. Used only for canary Deployments. | +|
ACTIVE |
CANCELLING |
@@ -417,7 +610,7 @@ properties:
||
FINALIZED |
DEPLOYED |
- The deployment was deployed. | +The deployment is complete. |
FINALIZED |
@@ -427,8 +620,8 @@ properties:
|||
FINALIZED |
SUPERSEDED |
- The 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. |
| The deployment was created incorrectly by the system. |
- $ 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...
- OK
-
-
-
- Important
- The cf CLI v7 create-route command does not require the space as an argument. It uses the space you are targeting.
+$ 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...
+OK
+
-* **cf CLI v6**
-
- $ cf create-route example-space <%= vars.app_domain %> --hostname example-app
- Creating route example-app.<%= vars.app_domain %> for org example-org / space example-space as username@example.com...
- OK
-
+
+The Tanzu cf CLI create-route command does not require the space as an argument. It uses the space you are targeting.
- $ 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
-
-* **cf CLI v6**
-
- $ cf create-route example-space <%= vars.private_app_domain %>
- Creating route <%= vars.private_app_domain %> for org example-org / space example-space as username@example.com...
- OK
-
+
+$ 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:
@@ -171,18 +152,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 %>`:
-* **cf CLI v7**
-
- $ 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
-
-* **cf CLI v6**
-
- $ cf create-route example-space foo.<%= vars.private_app_domain %>
- Creating route foo.<%= vars.private_app_domain %> for org example-org / space example-space as username@example.com...
- OK
-
+
+$ 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:
@@ -198,18 +172,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:
-* **cf CLI v7**
-
- $ 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
-
-* **cf CLI v6**
-
- $ cf create-route example-space foo.<%= vars.app_domain %> --hostname '*'
- Creating route *.foo.<%= vars.app_domain %> for org example-org / space example-space as username@example.com...
- OK
-
+
+$ 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 %>`.
@@ -220,43 +187,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:
-* **cf CLI v7**
-
- $ 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
-
-
- $ 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
-
-
- $ 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
-
-
-* **cf CLI v6**
- - Important - To create a route without a path using cf CLI v6, you must run the commands in this order: Create the route without a path, and then create any routes with a path. If you do not need a route without a path, then this sequence is not required.
- -
- $ cf create-route example-space <%= vars.app_domain %> --hostname store
- Creating route store.<%= vars.app_domain %> for org example-org / space example-space as username@example.com...
- OK
-
-
- $ cf create-route example-space <%= 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
-
-
- $ cf create-route example-space <%= 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
-
+
+$ 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
+
+
+$ 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
+
+
+$ 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).
@@ -271,7 +216,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.
- $ 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 -- -* **cf CLI v7** - An arbitrary (random) port is the default. The `--random port` flag is not supported. +A developer can create a TCP route for `<%= vars.tcp_app_domain %>` on an arbitrary port. +An arbitrary (random) port is the default. The `--random port` flag is not supported in Tanzu cf CLI v10+.
$ cf create-route example-space <%= vars.tcp_app_domain %> --random-port @@ -313,28 +247,27 @@ 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.$ cf routes Getting routes as user@<%= vars.private_app_domain %> ... -space host domain port path type apps -example-space example-app <%= vars.app_domain %> example-app -example-space example-app <%= vars.private_app_domain %> example-app -example-space store <%= vars.app_domain %> /products products -example-space store <%= vars.app_domain %> /orders orders -example-space store <%= vars.app_domain %> storefront -example-space <%= vars.app_domain %> 60000 tcp tcp-app +space host domain type apps +example-space example-app <%= vars.app_domain %> example-app +example-space example-app <%= vars.private_app_domain %> example-app +example-space store <%= vars.app_domain %> products +example-space store <%= vars.app_domain %> orders +example-space store <%= vars.app_domain %> storefront +example-space <%= vars.app_domain %> tcp tcp-appDevelopers can only see routes in spaces where they are a member. -Note that cf CLI v7 removes theportandpathcolumns from the output. + ### View a route Developers can view a route and its destinations within the current space with thecf routecommand. 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.$ cf route <%= vars.app_domain %> --hostname example-app @@ -355,32 +288,20 @@ 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: -* **cf CLI v7**: - --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`. +The following command maps the route `h2app.<%= vars.app_domain %>` as an HTTP/2 route to the HTTP/2 app `h2app`.- $ cf check-route <%= vars.app_domain %> --hostname store --path /products - Checking for route... - OK - Route store.<%= vars.app_domain %>/products does exist -- -* **cf CLI v6**: - -- $ cf check-route store <%= vars.app_domain %> --path /products - Checking for route... - OK - Route store.<%= vars.app_domain %>/products does exist -++$ 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 -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 port80or port443must be explicitly mapped using thecf map-routecommand. Otherwise, the route is mapped to port443. @@ -430,19 +351,16 @@ The following command maps the wildcard route `*.foo.<%= vars.app_domain %>` to $ cf map-route myfallbackapp foo.<%= vars.app_domain %> --hostname '*'-$ cf map-route h2app <%= vars.app_domain %> --hostname h2app --destination-protocol http2 +$ cf map-route h2app <%= vars.app_domain %> --hostname h2app --app-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. The `-d` flag is no longer supported. - -**For cf CLI v6 only:** -If a domain or host name is not specified, then a route is created using the app name and the default shared domain. For more information, see [Shared domains](#shared-domains). The following command pushes the app `example-app`, creating the route `example-app.<%= vars.app_domain %>` from the default shared domain `<%= vars.app_domain %>`. If the route has not already been created in another space, this command also maps it to the app. +The best way to do this is by using the `routes` property in the manifest.$ cf push example-app @@ -536,8 +454,6 @@ $ 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. - 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. To share a route with another space: @@ -548,7 +464,7 @@ To share a route with another space: cf enable-feature-flag route_sharing ``` -1. Run: +2. Run: ``` cf share-route DOMAIN --hostname HOSTNAME --path PATH -s SPACE -o ORG @@ -572,11 +488,7 @@ 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.
- -After sharing a route with another space, you can transfer ownership of the route to that space using the
+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). To move a route: @@ -637,7 +549,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`.cf move-routecommand. 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.-Important Use of the
@@ -672,7 +583,7 @@ These are the possible error responses:X-Cf-App-Instanceheader is available only for users on the Diego architecture.
| X-Cf-Routererror value | -Reason for error + | Reason for error | Response body | ||
|---|---|---|---|---|---|
| cf CLI command | +Tanzu cf CLI command | Purpose |
|---|---|---|
cf ssh-code |
- App SSH access without cf CLI using non-cf SSH tools like ssh, scp, and sftp |
+ App SSH access without Tanzu cf CLI using non-cf SSH tools like ssh, scp, and sftp |
$ 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@@ -84,12 +82,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' @@ -107,7 +105,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: @@ -123,7 +121,7 @@ You can tailor [cf ssh](http://cli.cloudfoundry.org/en-US/cf/ssh.html) commands * The `-N` flag skips returning a command prompt on the remote machine. This sets up local port forwarding if you do not need to run commands on the host VM. -* The `--process` flag in cf CLI v7 allows you to SSH into the container for a specific process running as part of your app. +* The `--process` flag allows you to SSH into the container for a specific process running as part of your app. * The `--request-pseudo-tty` and `--force-pseudo-tty ` flags allow you run an SSH session in pseudo-tty mode rather than generate terminal line output. @@ -146,15 +144,14 @@ environment variables, as described in _<%= vars.app_runtime_abbr %> Environment Variables_. -## App SSH access without cf CLI +## App SSH access without Tanzu 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. 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). +password, use a one-time SSH authorization code generated by `cf ssh-code`. * [Access app SSH using process GUID](#process-guid) * [Access app sSH using app GUID](#app-guid) @@ -349,11 +346,7 @@ The SSH proxy has these SSH security configuration by default:
-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.
-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.
@@ -29,7 +24,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. +2. 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
@@ -58,13 +53,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
@@ -81,7 +76,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 `cf ssh`. 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/stacks.html.md.erb b/deploy-apps/stacks.html.md.erb
index 51ab9b52..6d034d2e 100644
--- a/deploy-apps/stacks.html.md.erb
+++ b/deploy-apps/stacks.html.md.erb
@@ -12,32 +12,41 @@ You can restage apps on a new stack. Here is a description of stacks and lists o
To restage a Windows app on a new Windows stack, see [Changing Windows stacks](./windows-stacks.html).
-<% if vars.platform_code == "CF" || vars.platform_code == "PCF" %>
-You can also use the Stack Auditor plug-in for the Cloud Foundry Command Line Interface (cf CLI) when changing stacks. See [Using the Stack Auditor plug-in](../../adminguide/stack-auditor.html).
-<% else %>
-<% end %>
+You can also use the Stack Auditor plug-in for the Tanzu cf CLI when changing stacks. See [Using the Stack Auditor plug-in](../../adminguide/stack-auditor.html).
+
## Overview
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.
## 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).
+<%= vars.app_runtime_abbr %> <%= vars.current_major_version ? "v#{vars.current_major_version}" : "" %> includes support for `cflinuxfs4`, which is derived from Ubuntu 22.04 LTS (Jammy Jellyfish). For more information, see [GitHub cflinuxfs4 stack receipt](https://github.com/cloudfoundry/cflinuxfs4/blob/main/receipt.cflinuxfs4.x86_64).
+
+You can also build your own custom stack. For more information, see [Adding a Custom Stack](../../running/custom-stack.html).
+
+## Stack states
-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).
+Operators can assign a lifecycle state to each stack. The state affects what operations you can perform with that stack:
-<%= vars.custom_stack %>
+| State | What it means for developers |
+|--------------|------------------------------|
+| `ACTIVE` | The stack is fully available. You can push new apps and restage existing apps. |
+| `DEPRECATED` | The stack is still usable, but a warning is shown during `cf push` and `cf restage`. Plan to migrate your apps soon. |
+| `RESTRICTED` | You cannot push new apps using this stack. Existing apps can still be restarted and scaled. |
+| `DISABLED` | You cannot stage or restage any app using this stack. Existing apps continue to run and can be restarted and scaled. |
+When a stack has a state other than `ACTIVE`, operators typically provide a **reason** message with migration guidance. This reason is shown in `cf stacks`, `cf stack STACK_NAME`, and in any warning or error messages during `cf push` or `cf restage`.
-## Restaging apps on a new stack
+If you encounter a restricted or disabled stack, contact your CF operator for migration instructions, or see the reason message provided in the stack details.
-For security, stacks receive regular updates to address Common Vulnerabilities and Exposures ([CVEs](http://www.ubuntu.com/usn/)). Apps pick up on these stack changes through new releases of <%= vars.product_short %>. However, if your app links statically to a library provided in the rootfs, you might have to manually restage it to pick up the changes.
+## Restaging apps on a new stack
+
+For security, stacks receive regular updates to address Common Vulnerabilities and Exposures ([CVEs](http://www.ubuntu.com/usn/)). Apps pick up on these stack changes through new releases of <%= vars.app_runtime_abbr %>. However, if your app links statically to a library provided in the rootfs, you might have to manually restage it to pick up the changes.
It can be difficult to know what libraries an app statically links to, and it depends on the languages you are using. One example is an app that uses a Ruby or Python binary, and links out to part of the C standard library. If the C library requires an update, you might need to recompile the app and restage it.
@@ -47,41 +56,64 @@ To restage an app on a new stack:
$ cf stacks
- Getting stacks in org MY-ORG / space development as developer@example.com...
- OK
+ Getting stacks in org MY-ORG / space development as developer@example.com...
- name description
- cflinuxfs3 Cloud Foundry Linux-based filesystem (Ubuntu 18.04)
- cflinuxfs4 Cloud Foundry Linux-based filesystem (Ubuntu 22.04)
+ name description state
+ cflinuxfs4 Cloud Foundry Linux-based filesystem (Ubuntu 22.04) ACTIVE
+ cflinuxfs3 Cloud Foundry Linux-based filesystem (Ubuntu 18.04) DEPRECATED
-2. To change your stack and restage your app, run:
+ The `state` column shows the current lifecycle state of each stack. For stacks in a `DEPRECATED`, `RESTRICTED`, or `DISABLED` state, contact your operator or run `cf stack STACK_NAME` to view the reason and migration instructions.
+
+1. To view details and any operator-provided reason for a specific stack, run:
- ```
+
+ cf stack STACK_NAME
+
+
+ Example output for a deprecated stack:
+
+
+ $ cf stack cflinuxfs3
+ Getting info for stack cflinuxfs3 as developer@example.com...
+
+ name: cflinuxfs3
+ description: Cloud Foundry Linux-based filesystem (Ubuntu 18.04)
+ state: DEPRECATED
+ reason: This stack is based on Ubuntu 18.04, which is no longer supported.
+ Please migrate your applications to 'cflinuxfs4'.
+ For more information, see: https://docs.example.com/migrate-stacks.
+
+
+ The `reason` field is shown only when the state is not `ACTIVE`.
+
+1. To change your stack and restage your app, run:
+
+
cf push MY-APP -s STACK-NAME
- ```
+
Where:
- - MY-APP is the name of the app.
- - STACK-NAME is the name of the new stack.
+ - `MY-APP` is the name of the app.
+ - `STACK-NAME` is the name of the new stack.
For example, to restage your app on the stack `cflinuxfs4`, run `cf push MY-APP -s cflinuxfs4`:
-
- $ cf push MY-APP -s cflinuxfs4
- Using stack cflinuxfs4...
- OK
- Creating app MY-APP in org MY-ORG / space development as developer@example.com...
- OK
- ...
- requested state: started
- instances: 1/1
- usage: 1G x 1 instances
- urls: MY-APP.cfapps.io
- last uploaded: Wed Apr 8 23:40:57 UTC 2015
- state since cpu memory disk
- \#0 running 2015-04-08 04:41:54 PM 0.0% 57.3M of 1G 128.8M of 1G
-
+
+ $ cf push MY-APP -s cflinuxfs4
+ Using stack cflinuxfs4...
+ OK
+ Creating app MY-APP in org MY-ORG / space development as developer@example.com...
+ OK
+ ...
+ requested state: started
+ instances: 1/1
+ usage: 1G x 1 instances
+ urls: MY-APP.cfapps.io
+ last uploaded: Wed 17 Jul 22:57:04 UTC 2024
+ state since cpu memory disk logging cpu entitlement details
+ #0 running 2024-07-17T22:57:22Z 0.3% 49.5M of 1G 130.2M of 1G 0B/s of 16K/s 2.4%
+
## Stacks API
diff --git a/deploy-apps/start-restart-restage.html.md.erb b/deploy-apps/start-restart-restage.html.md.erb
index d253dd29..3f2275bb 100644
--- a/deploy-apps/start-restart-restage.html.md.erb
+++ b/deploy-apps/start-restart-restage.html.md.erb
@@ -3,7 +3,7 @@ title: Starting, restarting, and restaging your apps
owner: CLI
---
-You can start, restart, and restage apps in Cloud Foundry, using the cf CLI or the app manifest (attributes in a YAML file).
+You can start, restart, and restage apps using the Tanzu cf CLI or the app manifest (attributes in a YAML file).
##Start your app
@@ -16,7 +16,7 @@ For more information about pushing apps, see [Pushing an app](deploy-app.html).
Cloud Foundry determines the start command for your app from one of these three sources:
-* The `-c` command-line option in the Cloud Foundry Command Line Interface (cf CLI). For example:
+* The `-c` command-line option in the Tanzu cf CLI. For example:
$ cf push YOUR-APP -c "node YOUR-APP.js"
@@ -44,7 +44,7 @@ To force Cloud Foundry to use the buildpack start command, specify a start comma
You can specify a null start command in one of two ways.
-* Using the `-c` command-line option in the cf CLI:
+* Using the `-c` command-line option in the Tanzu cf CLI:
$ cf push YOUR-APP -c "null"
@@ -71,7 +71,7 @@ To restart your app, run:
Restarting your app stops your app and restarts it with the already compiled droplet. A droplet is a tarball that includes:
* stack
-* [buildpack](../../buildpacks/index.html)
+* [buildpack](../../commercial-buildpacks/using-buildpacks.html)
* app source code
The Diego [cell](../../concepts/architecture/index.html#diego-cell) unpacks, compiles, and runs a droplet on a container.
diff --git a/deploy-apps/stop-delete.html.md.erb b/deploy-apps/stop-delete.html.md.erb
index 74a9986f..cb43319b 100644
--- a/deploy-apps/stop-delete.html.md.erb
+++ b/deploy-apps/stop-delete.html.md.erb
@@ -4,9 +4,9 @@ owner: CLI
---
-You can stop and delete your apps using Cloud Foundry CLI commands.
+You can stop and delete your apps using Tanzu cf CLI commands.
-To run the commands shown here, you must first install the Cloud Foundry Command Line Interface (cf CLI). See the [Cloud Foundry Command Line Interface](../../cf-cli/index.html) topics for more information.
+To run the commands shown here, you must first install the Tanzu cf CLI. See the [Using the Tanzu cf CLI](https://techdocs.broadcom.com/us/en/vmware-tanzu/platform/tanzu-cf-cli/<%= vars.tanzu_cf_cli_version %>/t-cf-cli/index.html) topics for more information.
## Stop and start an app
@@ -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.
@@ -49,14 +48,13 @@ Example:
## Delete an app with no services
-To delete an app with no services, run `cf delete -r APP-NAME`. Replace `APP-NAME` with the name of the app. The `-r` option instructs the cf CLI to removes routes associated with the app.
+To delete an app with no services, run `cf delete -r APP-NAME`. Replace `APP-NAME` with the name of the app. The `-r` option instructs the Tanzu cf CLI to removes routes associated with the app.
Example:
$ cf delete -r my-example-app
-Important
-Starting in cf CLI v7, -r no longer deletes routes when the route is mapped to more than one app.
+Note that the -r option 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/deploy-apps/streaming-logs.html.md.erb b/deploy-apps/streaming-logs.html.md.erb
index 75f95173..a16d7f16 100644
--- a/deploy-apps/streaming-logs.html.md.erb
+++ b/deploy-apps/streaming-logs.html.md.erb
@@ -10,7 +10,7 @@ owner: PCF Metrics
<% end %>
-Loggregator, the <%= vars.app_runtime_full %> (<%= vars.app_runtime_abbr %>) component responsible for logging, provides a stream of log output from your app and from <%= vars.app_runtime_abbr %> system components that interact with your app during updates and execution.
+Loggregator, the <%= vars.app_runtime_full %> component responsible for logging, provides a stream of log output from your app and from <%= vars.app_runtime_abbr %> system components that interact with your app during updates and execution.
## Overview
@@ -19,10 +19,6 @@ By default, Loggregator streams logs to your terminal. To persist more than the
<%= vars.app_runtime_abbr %> gathers and stores logs in a best-effort manner. If a client cannot consume log entries quickly enough, the Loggregator buffer might need to overwrite some lines before the client has consumed them. A syslog drain or a command-line interface (CLI) tail can usually keep up with the flow of app logs.
-<%= vars.app_runtime_abbr %> gathers and stores logs in a best-effort manner. If a client cannot consume log entries
-quickly enough, the Loggregator buffer might need to overwrite some lines before the client has consumed them. A syslog
-drain or a CLI tail can usually keep up with the flow of app logs.
-
## Contents of a log entry
Every log entry contains four fields:
@@ -111,6 +107,18 @@ 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 ++ +
+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. For example: @@ -121,7 +129,7 @@ For example: ### SSH -The Diego Cell emits `SSH` logs when a user accesses an application container through SSH by using the Cloud Foundry Command Line Interface (cf CLI) `cf ssh` command. +The Diego Cell emits `SSH` logs when a user accesses an application container through SSH by using the Tanzu cf CLI `cf ssh` command. For example: @@ -129,7 +137,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 @@ -152,7 +160,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/deploy-apps/troubleshoot-app-health.html.md.erb b/deploy-apps/troubleshoot-app-health.html.md.erb index 62ad1fef..12f5de37 100644 --- a/deploy-apps/troubleshoot-app-health.html.md.erb +++ b/deploy-apps/troubleshoot-app-health.html.md.erb @@ -57,10 +57,10 @@ If <%= vars.app_runtime_abbr %> cannot identify an appropriate buildpack for you You can view what buildpacks are available with the `cf buildpacks` command. -If you see a buildpack that you believe supports your app, see the [buildpack documentation](../../buildpacks/index.html) for details about how that buildpack +If you see a buildpack that you believe supports your app, see [Using Classic Buildpacks in Cloud Foundry](../../commercial-buildpacks/using-buildpacks.html) for details about how that buildpack detects apps it supports. -If you do not see a buildpack for your app, you might still be able to push your app with a [custom buildpack](../../buildpacks/custom.html) using `cf push -b` +If you do not see a buildpack for your app, you might still be able to push your app with a [custom buildpack](../../commercial-buildpacks/custom.html) using `cf push -b` with a path to your buildpack. ### App deploy fails @@ -79,8 +79,6 @@ Common reasons deploying an app fails include: <%= vars.app_runtime_abbr %> requires that each app that you deploy has a unique URL. Otherwise, the new app URL collides with an existing app URL and <%= vars.app_runtime_abbr %> cannot deploy the app. You can resolve this issue by running `cf push` with either of the following flags to create a unique URL: -* `-n` to assign a different HOST name for the app. - * `--random-route` to create a URL that includes the app name and random words. Using this option might create a long URL, depending on the number of words that the app name includes. ### App fails to start @@ -112,7 +110,7 @@ the port on which your app listens, use the `PORT` environment variable. For exa ``` listen_here = ENV['PORT'] ``` - For more examples specific to your app framework, see the appropriate [buildpack documentation](../../buildpacks/index.html) for your app's language. + For more examples specific to your app framework, see [Using Classic Buildpacks in Cloud Foundry](../../commercial-buildpacks/using-buildpacks.html) for your app's language. * **Ensure that your app adheres to the principles described in [Twelve-Factor App](http://12factor.net) and [Prepare to deploy an app](prepare-to-deploy.html).** These texts explain how to prevent situations where your app builds locally but fails to build in the cloud. @@ -212,13 +210,9 @@ 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.
-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.
CF_TRACE is a local environment variable that modifies the behavior of the Tanzu 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
@@ -254,16 +247,15 @@ After adding Zipkin HTTP headers to app logs, developers can run `cf logs APP-NA
## Use troubleshooting commands
-You can investigate app deployment and health using the cf CLI.
+You can investigate app deployment and health using the Tanzu cf CLI.
-Some cf CLI commands return connection credentials. Remove credentials and other sensitive information from command output before you post the output a public forum.
+Some Tanzu cf CLI commands return connection credentials. Remove credentials and other sensitive information from command output before you post the output a public forum.
* `cf apps`: Returns a list of the apps deployed to the current space with deployment options, including the name, current state, number of instances, and URLs of each app.
* `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.
-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.
+User-specific rate limiting is only enforced when both general rate limiting and user rate limiting features are enabled on the platform. +
+ + +## Setting User Rate Limits + +An operator can override the general rate limit for a user, and the user rate limit is applied immediately. For example: + +``` +cf set-rate-limit Alice --request-limit 1000 +``` + +An operator can override the general limit for a user by providing an origin flag. For example: + +``` +cf set-rate-limit tom@broadcom.com --request-limit 2000 --origin ldap +``` + +An operator can override the general limit for a client. For example: + +``` +cf set-rate-limit 9037f189-2309-4bf6-a81d-7e981c34d2c7 --client --request-limit=10000 +``` + +If general rate limiting or user rate limiting is disabled, a warning is displayed when trying to set the rate limit, but the user rate limit is still applied. See the following example output: + +```console +cf set-rate-limit Alice --request-limit 1000 +WARNING: Rate limiting is currently disabled. It must be enabled before rate limiting is applied. +``` + +## Remove (unset) existing user rate limits + +An operator can remove an existing user rate limit. For example: + +``` +cf unset-rate-limit Alice +cf unset-rate-limit 9037f189-2309-4bf6-a81d-7e981c34d2c7 --client-id +cf unset-rate-limit tom@broadcom.com --origin ldap +``` + +## Show rate limits + +Users can retrieve the general rate limit and their user rate limit. Operators can retrieve the rate limits for any user. For example: + +```console +cf user Alice + +Showing information of user Alice as admin... + +username: Alice +request rate limit: + enabled: true + general limit: 2000 + user custom limiting enabled: true + user custom limit: 10000000 + reset interval: 60 +origin: uaa + +``` + +## Command reference + +### set-rate-limit + +Sets a custom rate limit for the Cloud Foundry API for a specific user or client, overriding the general platform rate limit. + +**Usage:** +``` +cf set-rate-limit USERNAME --request-limit LIMIT [OPTIONS] +``` + +**Parameters:** +- `USERNAME`: Username, email address, or client GUID + +**Options:** +- `--request-limit`: Rate limit for API requests +- `--origin`: Indicates the identity provider to be used for authentication +- `--client`: Set rate limit for a client-id of a (non-user) service account + +**Examples:** + +Set a rate limit for a user: +``` +cf set-rate-limit Alice --request-limit 1000 +``` + +Set a rate limit for a user with specific origin: +``` +cf set-rate-limit tom@broadcom.com --request-limit 2000 --origin ldap +``` + +Set a rate limit for a client: +``` +cf set-rate-limit 9037f189-2309-4bf6-a81d-7e981c34d2c7 --client --request-limit 10000 +``` + +### unset-rate-limit + +Removes any custom rate limit for a user or client, reverting them to the general platform rate limit. + +**Usage:** +``` +cf unset-rate-limit USERNAME [OPTIONS] +``` + +**Parameters:** +- `USERNAME`: Username, email address, or client GUID + +**Options:** +- `--origin`: Indicates the identity provider to be used for authentication +- `--client`: Unset rate limit for a client-id of a (non-user) service account + +**Examples:** + +Unset custom rate limit for a user: +``` +cf unset-rate-limit Alice +``` + +Unset custom rate limit for a client: +``` +cf unset-rate-limit 9037f189-2309-4bf6-a81d-7e981c34d2c7 --client +``` + +Unset custom rate limit for a user with specific origin: +``` +cf unset-rate-limit tom@broadcom.com --origin ldap +``` + ++After unsetting a custom rate limit, the user or client will use the general platform rate limit if rate limiting is enabled. +
+ +### user + +Displays user information, including their rate limit settings. + +**Usage:** +``` +cf user USERNAME [OPTIONS] +``` + +**Parameters:** +- `USERNAME`: Username, email address, or client GUID + +**Options:** +- `--origin`: Indicates the identity provider to be used for authentication +- `--client`: Interpret USERNAME as a client-id for a (non-user) service account + +**Examples:** + +Show user information including rate limits: +``` +cf user Alice +``` + +Show client information including rate limits: +``` +cf user 9e8f3a67-71bd-4068-a907-8ee00185679c --client +``` + +**Performance Implications** + +User rate limiting has been evaluated for performance. Existing authenticated CAPI calls require a database call, and the per-user rate limiting introduces a second call from the application to the db. The cost of the per-user rate limit is equal to or less than 0.35, this means the per-user rate limits are unlikely to affect performance. + +## Related Topics + +- [Tanzu cf CLI documentation](https://techdocs.broadcom.com/us/en/vmware-tanzu/platform/tanzu-cf-cli/<%= vars.tanzu_cf_cli_version %>/t-cf-cli/standalone-index.html) - Tanzu cf CLI usage +- [App Developer Controls](../../operating/config-app-dev-controls.html) - Platform-wide rate limiting configuration + +For more information about any command, use `cf-Note Docker apps do not use stacks.
## Available stacks @@ -70,9 +67,9 @@ To restage an app on a new stack: instances: 1/1 usage: 1G x 1 instances urls: MY-APP.cfapps.io - last uploaded: Wed Apr 8 23:40:57 UTC 2015 - state since cpu memory disk - \#0 running 2015-04-08 04:41:54 PM 0.0% 57.3M of 1G 128.8M of 1G + last uploaded: Wed 17 Jul 22:57:04 UTC 2024 + state since cpu memory disk logging cpu entitlement details + \#0 running 2024-07-17T22:57:22Z 0.3% 49.5M of 1G 130.2M of 1G 0B/s of 16K/s 2.4% ## Stacks API diff --git a/http2-protocol.html.md.erb b/http2-protocol.html.md.erb index 4c310893..ca140f7a 100644 --- a/http2-protocol.html.md.erb +++ b/http2-protocol.html.md.erb @@ -40,9 +40,7 @@ If your <%= vars.app_runtime_abbr %> deployment is configured to support HTTP/2, then all traffic coming in to <%= vars.app_runtime_abbr %> supports HTTP/2. The traffic is forwarded as HTTP/1.1 before it reaches your app unless configured otherwise. -<% if vars.platform_code != 'CF' %> -For more information, see [Configuring HTTP/2 support](https://docs.vmware.com/en/VMware-Tanzu-Application-Service/<%= vars.current_major_version %>/tas-for-vms/supporting-http2.html). -<% end %> +For more information, see [Configuring HTTP/2 support](../adminguide/supporting-http2.html). To serve gRPC traffic, your app must use HTTP/2 for all network hops. Configure your route to send HTTP/2 traffic to your app. @@ -64,13 +62,13 @@ You do not need to make changes to existing apps to support HTTP/2. For information about pushing an HTTP/1.1 app that serves HTTP/2 traffic, see [Push an HTTP/1.1 App that Serves HTTP/2](#http1-app). There are multiple ways to push an app with end-to-end HTTP/2. -You can push the app using either the app manifest or the Cloud Foundry Command Line Interface (cf CLI). +You can push the app using either the app manifest or the Tanzu cf CLI. You can also use either method to push an app that serves gRPC traffic. To push an app with end-to-end HTTP/2, see: - [Push an app with end-to-end HTTP/2 using the app manifest](#e2e-manifest) -- [Push an app with end-to-end HTTP/2 using the cf CLI](#e2e-cli) +- [Push an app with end-to-end HTTP/2 using the Tanzu cf CLI](#e2e-cli) - [Push a gRPC app](#grpc-app) ### Push an HTTP/1.1 app that serves HTTP/2 @@ -92,7 +90,6 @@ 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.
- Important
To issue this request, you must use a version of curl that supports HTTP/2.
-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 hostname and must be specified in the manifest. -To push an app that serves HTTP/2 traffic using the cf CLI (v6 only): +To push an app that serves HTTP/2 traffic using the Tanzu cf CLI: 1. Use an app that supports serving HTTP/2 traffic with prior knowledge. For example, you can use the HTTP/2 test app from [Cloud Foundry Acceptance Tests](https://github.com/cloudfoundry/cf-acceptance-tests/tree/main/assets/http2) on GitHub. @@ -158,10 +154,10 @@ For example, you can use the HTTP/2 test app from [Cloud Foundry Acceptance Test cf push --no-route ``` -2. You can map a route with destination protocol `http2` by running: +2. You can map a route by running: ``` - cf map-route MY-APP EXAMPLE.COM --hostname host --destination-protocol http2 + cf map-route MY-APP EXAMPLE.COM ``` Where `MY-APP` is the name of your app and `EXAMPLE.COM` is the route you want to map to your app. @@ -184,8 +180,8 @@ To push an app that serves gRPC traffic: 1. Use an app that supports serving gRPC traffic. For example, you can use the gRPC test app from [Cloud Foundry Acceptance Tests](https://github.com/cloudfoundry/cf-acceptance-tests/tree/main/assets/grpc) on GitHub. -1. Push the app with HTTP/2 activated using either the app manifest or the cf CLI. -See [Push an app with end-to-end HTTP/2 using the app manifest](#e2e-manifest) or [Push an app with end-to-end HTTP/2 using the cf CLI](#e2e-cli). +1. Push the app with HTTP/2 activated using either the app manifest or the Tanzu cf CLI. +See [Push an app with end-to-end HTTP/2 using the app manifest](#e2e-manifest) or [Push an app with end-to-end HTTP/2 using the Tanzu cf CLI](#e2e-cli). 1. Send a gRPC request to the app using `grpcurl` by running the following command. For more information, see [grpcurl](https://github.com/fullstorydev/grpcurl). diff --git a/images/about-deploy/app_push_flow_diagram.png b/images/about-deploy/app_push_flow_diagram.png deleted file mode 100644 index aea03a09..00000000 Binary files a/images/about-deploy/app_push_flow_diagram.png and /dev/null differ diff --git a/images/cloudflare/minimal_manifest.png b/images/cloudflare/minimal_manifest.png deleted file mode 100755 index 6c13180e..00000000 Binary files a/images/cloudflare/minimal_manifest.png and /dev/null differ diff --git a/images/cloudflare/minimal_manifest_v6.png b/images/cloudflare/minimal_manifest_v6.png deleted file mode 100755 index b01fd7df..00000000 Binary files a/images/cloudflare/minimal_manifest_v6.png and /dev/null differ diff --git a/images/cloudflare/minimal_manifest_v6_edit1.png b/images/cloudflare/minimal_manifest_v6_edit1.png deleted file mode 100755 index 91b7e731..00000000 Binary files a/images/cloudflare/minimal_manifest_v6_edit1.png and /dev/null differ diff --git a/images/orgs-and-spaces/CF-Arch.png b/images/orgs-and-spaces/CF-Arch.png deleted file mode 100644 index 170d32ca..00000000 Binary files a/images/orgs-and-spaces/CF-Arch.png and /dev/null differ diff --git a/images/self-service.png b/images/self-service.png deleted file mode 100755 index 7fa8db16..00000000 Binary files a/images/self-service.png and /dev/null differ diff --git a/images/third-party-logs/logentries-02.png b/images/third-party-logs/logentries-02.png deleted file mode 100755 index dbd7c3b3..00000000 Binary files a/images/third-party-logs/logentries-02.png and /dev/null differ diff --git a/images/third-party-logs/logentries-03.png b/images/third-party-logs/logentries-03.png deleted file mode 100755 index b09fc877..00000000 Binary files a/images/third-party-logs/logentries-03.png and /dev/null differ diff --git a/images/third-party-logs/logentries-04.png b/images/third-party-logs/logentries-04.png deleted file mode 100755 index 7f5ca8de..00000000 Binary files a/images/third-party-logs/logentries-04.png and /dev/null differ diff --git a/images/third-party-logs/logentries-05.png b/images/third-party-logs/logentries-05.png deleted file mode 100755 index d1652ea0..00000000 Binary files a/images/third-party-logs/logentries-05.png and /dev/null differ diff --git a/images/third-party-logs/logentries-08.png b/images/third-party-logs/logentries-08.png deleted file mode 100755 index 2827a873..00000000 Binary files a/images/third-party-logs/logentries-08.png and /dev/null differ diff --git a/images/third-party-logs/logentries-09.png b/images/third-party-logs/logentries-09.png deleted file mode 100755 index bc4a4211..00000000 Binary files a/images/third-party-logs/logentries-09.png and /dev/null differ diff --git a/images/third-party-logs/papertrail-02.png b/images/third-party-logs/papertrail-02.png deleted file mode 100755 index da7bb565..00000000 Binary files a/images/third-party-logs/papertrail-02.png and /dev/null differ diff --git a/images/third-party-logs/papertrail-03.png b/images/third-party-logs/papertrail-03.png deleted file mode 100755 index 63764eeb..00000000 Binary files a/images/third-party-logs/papertrail-03.png and /dev/null differ diff --git a/images/third-party-logs/splunkstorm-02.png b/images/third-party-logs/splunkstorm-02.png deleted file mode 100755 index 7b7e3036..00000000 Binary files a/images/third-party-logs/splunkstorm-02.png and /dev/null differ diff --git a/index.html.md.erb b/index.html.md.erb index 0f6fcf06..1fc8cba2 100644 --- a/index.html.md.erb +++ b/index.html.md.erb @@ -25,34 +25,37 @@ If you do these things, you are a <%= vars.app_runtime_abbr %> **developer**, a * [Considerations for designing and running an app in the cloud](deploy-apps/prepare-to-deploy.html) * **cf push:** How to use `cf push` and troubleshoot when running `cf push`. - * [Pushing your app using Cloud Foundry CLI (cf push)](deploy-apps/deploy-app.html) + * [Pushing your app using Tanzu cf 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 your app with Docker](deploy-apps/push-docker.html) + * [Using shared Registry Credentials for Docker apps](deploy-apps/registry-credentials.html) * [Deploying your large apps](deploy-apps/large-app-deploy.html) * [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) - * [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) * **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) -* **Managing Apps with the cf CLI:** How to manage apps through the Cloud Foundry Command Line Interface (cf CLI). +* **Managing Apps with the Tanzu cf CLI:** How to manage apps through the Tanzu cf CLI. * [Running tasks in your apps](using-tasks.html) - * [Scaling an app Using cf scale](deploy-apps/cf-scale.html) + * [Scaling an app using cf scale](deploy-apps/cf-scale.html) + * [Setting user rate limits with the Tanzu cf CLI](deploy-apps/user-rate-limits.html.md.erb) * [Using app health checks](deploy-apps/healthchecks.html) * [Cloud Foundry API app revisions](revisions.html) * [Configuring container-to-container networking](deploy-apps/cf-networking.html) * **Managing Services:** How to use software services from your apps. * [Services overview](services/index.html) - * [Managing service instances with the cf CLI](services/managing-services.html) + * [Managing service instances with the Tanzu cf CLI](services/managing-services.html) * [Sharing service instances](services/sharing-instances.html) * [Delivering service credentials to an app](services/application-binding.html) * [Managing service keys](services/service-keys.html) diff --git a/managing-apps-index.html.md.erb b/managing-apps-index.html.md.erb index 0a57fe80..7f79ce6a 100644 --- a/managing-apps-index.html.md.erb +++ b/managing-apps-index.html.md.erb @@ -1,9 +1,7 @@ ---- -title: Managing Apps with the cf CLI -owner: ---- +# Managing Apps with the Tanzu cf CLI -These topics contain information about managing apps with the Cloud Foundry Command Line Interface (cf CLI): + +These topics contain information about managing apps with the Tanzu cf CLI:
- 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.
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.
diff --git a/push-sub-commands.html.md.erb b/push-sub-commands.html.md.erb
index 3fe87273..887bac9e 100644
--- a/push-sub-commands.html.md.erb
+++ b/push-sub-commands.html.md.erb
@@ -4,7 +4,7 @@ owner: CAPI
---
-The Cloud Foundry Command Line Interface (cf CLI) includes commands that provide detailed control over app pushes. When you use these commands, you can follow only some steps of the `cf push` procedure or you can perform specific actions between the steps that are normally part of running `cf push`.
+The Tanzu cf CLI includes commands that provide detailed control over app pushes. When you use these commands, you can follow only some steps of the `cf push` procedure or you can perform specific actions between the steps that are normally part of running `cf push`.
Here are some example use cases for the sub-step commands:
@@ -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.
@@ -20,71 +21,68 @@ 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.
-| Resource | -Description | -Command | -
|---|---|---|
| App | -The top-level resource that represents an app and its configuration. - For more information, see Apps in the CAPI documentation. |
-
-
|
-
| Package | -The source code that makes up an app. - For more information, see Packages in the CAPI documentation. |
-
-
|
-
| Build | -Staging the app. Creating a build combines a Package with a Buildpack and builds it into an executable resource. - For more information, see Builds in the CAPI documentation. |
-
-
|
-
| Droplet | -An executable resource that results from a Build. - For more information, see Droplet in the CAPI documentation. |
-
-
|
-
| Manifest | -A file used when pushing your app to apply bulk configuration to an app and its underlying processes. - For more information, see Space Manifest in the CAPI documentation. |
-
-
|
-
| Resource | +Description | +Commands | +
| App | +The top-level resource that represents an app and its configuration. + For more information, see Apps in the CAPI documentation. |
+
+
|
+
| Package | +The source code that makes up an app. + For more information, see Packages in the CAPI documentation. |
+
+
|
+
| Build | +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. |
+
+
|
+
| Droplet | +An executable resource that results from a Build. + For more information, see Droplet in the CAPI documentation. |
+
+
|
+
| Manifest | +A file used when pushing your app to apply bulk configuration to an app and its underlying processes. + For more information, see Space Manifest in the CAPI documentation. |
+
+
|
+
Uploading and creating bits package for app APP-NAME in org test / space test as admin...
@@ -132,31 +116,18 @@ This example workflow describes how to push an app using sub-step commands inste
OK
-2. Stage the package you created:
- * If you are using cf CLI v7, run:
-
- ```
- cf stage-package APP-NAME --package-guid PACKAGE-GUID
- ```
+1. Stage the package you created:
- Where:
- APP-NAME is the name of your app.PACKAGE-GUID is the package GUID you recorded in an earlier step.APP-NAME is the name of your app.PACKAGE-GUID is the package GUID you recorded in an earlier step.APP-NAME is the name of your app.PACKAGE-GUID is the package GUID you recorded in an earlier step.
Staging package for APP-NAME in org test / space test as admin...
@@ -168,60 +139,33 @@ This example workflow describes how to push an app using sub-step commands inste
4. Assign the droplet to your app:
- * If you are using cf CLI v7, run:
-
- ```
- cf set-droplet APP-NAME -d DROPLET-GUID
- ```
- Where:
- APP-NAME is the name of your app.DROPLET-GUID is the droplet GUID you recorded in an earlier step.APP-NAME is the name of your app.DROPLET-GUID is the droplet GUID you recorded in an earlier step.APP-NAME is the name of your app.DROPLET-GUID is the droplet GUID you recorded in an earlier step.APP-NAME is the name of your app.PREVIOUS-DROPLET-GUID is the droplet GUID you recorded in an earlier step.APP-NAME is the name of your app.PREVIOUS-DROPLET-GUID is the droplet GUID you recorded in an earlier step.APP-NAME is the name of your app.PREVIOUS-DROPLET-GUID is the droplet GUID you recorded in an earlier step.-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 +## Overview -Some use cases for revisions include: +Every <%= vars.app_runtime_abbr %> app has a name. +When you first deploy an app, <%= vars.app_runtime_abbr %> gives it the revision version number `1`. +When you re-deploy the app under the same name, for example as an update, <%= vars.app_runtime_abbr %> increments its version number and saves the old version. -* **Viewing revisions for an app:** This can help you understand how your app has changed over time. +This saved application history is used by the `revisions` and `revision` CAPI endpoints and Tanzu cf CLI commands to let you: -* **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. +* **View revisions for an app:** To help you understand how your app has changed over time. -### Events that trigger revisions +* **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. -Revisions are generated through these events: +> **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`. -* A new droplet is created for an app. -* An app's environment variables are changed. -* The custom start command for an app is added or changed. +### When current app revision changes + +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/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. + - 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. @@ -49,79 +54,116 @@ Each revision includes a description of what changed in your app at the time the ### Droplet storage considerations -By default, <%= vars.platform_name %> retains the five most recent staged droplets in its droplets bucket. This means that you can roll back to revisions as long as they are using one of those five droplets. Not all revisions include a change in droplet. +By default, <%= vars.app_runtime_abbr %> retains the five most recent staged droplets in its droplets bucket. This means that you can roll back to revisions as long as they are using one of those five droplets. Not all revisions include a change in droplet. -<% if vars.platform_code == "CF" || vars.platform_code == "PCF" %> -Operators can configure <%= vars.platform_name %> to retain more droplets if necessary using the <%= vars.droplet_config %> -<% end %> +Operators can configure <%= vars.app_runtime_abbr %> to retain more droplets if necessary using the <%= vars.droplet_config %> ## View revisions 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: -1. Retrieve the GUID of the app by running: +* Using the `revisions` command: - ``` - cf app APP-NAME --guid - ``` - Where `APP-NAME` is the name of your app. + ``` + cf revisions APP-NAME + ``` + Where `APP-NAME` is the name of your app. -1. Run: +* Using the `curl` command: - ``` - cf curl /v3/apps/GUID/revisions - ``` - Where `GUID` is the GUID you retrieved in an earlier step. + 1. Retrieve the GUID of the app by running: -### List deployed revisions for an app + ``` + cf app APP-NAME --guid + ``` + Where `APP-NAME` is the name of your app. -Deployed revisions are revisions linked to started processes in an app. To list deployed revisions: + 1. Run: -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. +### Get an app's current revision(s) -1. Run: +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: + + ``` + 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: + + ``` + 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. + + 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.` - ``` - 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: +* 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. + +* Using the `curl` command: - ``` - cf curl /v3/revisions/GUID - ``` - Where `GUID` is the GUID of the revision. + 1. Run: + + ``` + cf curl /v3/revisions/GUID + ``` + Where `GUID` is the GUID of the revision. ## Roll back to a previous revision To roll back to a previous revision: -1. Retrieve the GUID of the app by running: +* 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. + +* Using `curl` command: - ``` - cf app APP-NAME --guid - ``` - Where `APP-NAME` is the name of your app. + 1. Retrieve the GUID of the app: -1. Retrieve the GUID of the revision. See [Retrieve a revision](#get). + ``` + cf app APP-NAME --guid + ``` + Where `APP-NAME` is the name of your app. -1. Create a deployment using CAPI by running: + 1. Retrieve the GUID of the revision. See [Retrieve a revision](#get). + + 1. Create a deployment using CAPI by running: ``` cf curl v3/deployments \ @@ -148,12 +190,7 @@ To roll back to a previous revision: ## Add metadata to a revision -<% if vars.platform_code == "CF" || vars.platform_code == "PCF" %> - To add metadata to a revision, see [Add metadata to an object](../adminguide/metadata.html). -<% else %> -To add metadata to a revision, see [Cloud Foundry documentation](https://docs.cloudfoundry.org/adminguide/metadata.html). -<% end %> ## Deactivate revisions for an app @@ -163,14 +200,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. diff --git a/routing-index.html.md.erb b/routing-index.html.md.erb index e7e898d9..37e392d9 100644 --- a/routing-index.html.md.erb +++ b/routing-index.html.md.erb @@ -7,6 +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) diff --git a/services-index.html.md.erb b/services-index.html.md.erb index 40ce600a..7f2d4885 100644 --- a/services-index.html.md.erb +++ b/services-index.html.md.erb @@ -30,4 +30,4 @@ These topics contain information about managing service instances:
-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.
mapfs by managing permissions on the NFS server.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-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.
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.
-Note NFS is not available on Windows systems.
### Create an NFS volume service @@ -251,26 +246,18 @@ 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.
NFS-PROTOCOL is the NFS protocol you want to use. For example, to use NFSv4, set the version to 4.1. Valid values are 3, 4.0, 4.1 or 4.2. If you do not specify a version, the protocol version used is negotiated between client and server at mount time. This usually causes the latest available version to be used.
- 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.
+ <%= vars.app_runtime_abbr %> versions shipping with nfs-volume versions v7.1.45 - v7.1.47 or v5.0.55 - 5.0.58 as listed in the <%= vars.segment_runtime_full %> Release notes 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.
- 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.
- This has been mitigated by adding auto-correction logic to the nfsdriver process available with nfs-volume >= v7.1.48.
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.
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.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).
-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 @@ -56,7 +55,7 @@ services: - test-mysql-01 ``` -The following excerpt from an app manifest binds a service instance called `db-test` with arbitrary parameters to the app on push. Arbitrary parameters used in this example are available in cf CLI 7.0 and later. +The following excerpt from an app manifest binds a service instance called `db-test` with arbitrary parameters to the app on push. ``` services: @@ -65,7 +64,7 @@ services: schema: customschema ``` -The following excerpt from the `cf push` command and response demonstrates that the cf CLI reads the manifest and binds the service instance to an app called `test-msg-app`. +The following excerpt from the `cf push` command and response demonstrates that the Tanzu cf CLI reads the manifest and binds the service instance to an app called `test-msg-app`.$ cf push @@ -110,7 +109,7 @@ After your service instance is created and bound to your app, you must configure * **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). +For details about consuming credentials specific to your development framework, see the Service Binding section in the documentation for your framework's [buildpack](../../commercial-buildpacks/using-buildpacks.html). ## Update service credentials @@ -142,29 +141,29 @@ To update your service credentials: To update your service credentials without experiencing app downtime: - 1. Start a blue-green update of the app. For more information, see [Using blue-green deployment to reduce downtime and risk](../deploy-apps/blue-green.html). Push the "Green" version of the app with the `--no-start` parameter to prevent the app from starting right away: +1. Start a blue-green update of the app. For more information, see [Using blue-green deployment to reduce downtime and risk](../deploy-apps/blue-green.html). Push the "Green" version of the app with the `--no-start` parameter to prevent the app from starting right away: -- $ cf push YOUR-APP --no-start -++ $ cf push YOUR-APP --no-start +- 1. Bind the service instances to the newly-deployed "Green" app by running: +1. Bind the service instances to the newly-deployed "Green" app by running: -- $ cf bind-service YOUR-APP YOUR-SERVICE-INSTANCE -++ $ cf bind-service YOUR-APP YOUR-SERVICE-INSTANCE +- 1. Start the "Green" app with `cf start`: +1. Start the "Green" app with `cf start`: -- $ cf start YOUR-APP -++ $ cf start YOUR-APP +- 1. Unbind the service instances from the `Blue` app: +1. Unbind the service instances from the `Blue` app: -- $ cf unbind-service YOUR-APP YOUR-SERVICE-INSTANCE -++ $ cf unbind-service YOUR-APP YOUR-SERVICE-INSTANCE +## Unbind a service instance @@ -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..3383a6b6 100644 --- a/services/fluentd.html.md.erb +++ b/services/fluentd.html.md.erb @@ -11,7 +11,7 @@ Amazon S3. This topic explains how to integrate Fluentd with Cloud Foundry apps. ## Step 1: Create a Cloud Foundry syslog drain for Fluentd -1. In Cloud Foundry, create a syslog drain user-provided service instance as +1. Create a syslog drain user-provided service instance as described in [Using third-party log management services](./log-management.html). 1. Choose one or more apps whose logs you want to drain to Fluentd @@ -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.
-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 @@ -29,7 +28,7 @@ Cloud Foundry allows users to provision credentials needed to interface with a s Service instance credentials can be delivered to apps running on Cloud Foundry in an environment variable. For more information, see [Delivering service credentials to an app](./application-binding.html). -For information about binding to a specific app development framework, see [Buildpacks](../../buildpacks/index.html). +For information about binding to a specific app development framework, see [Using Classic Buildpacks in Cloud Foundry](../../commercial-buildpacks/using-buildpacks.html). ### Service keys @@ -38,13 +37,12 @@ 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.
## Outbound IP addresses -To allow an app to communicate with a service external to <%= vars.product_short %>, you might need to configure the service to accept connections from your app based on its outbound IP address. +To allow an app to communicate with a service external to <%= vars.app_runtime_abbr %>, you might need to configure the service to accept connections from your app based on its outbound IP address. In your external service configuration, you must do one of the following: @@ -66,15 +64,14 @@ To learn how Marketplace services (and user-provided service instances) can be u ## Migrate a database schema -If your app relies on a relational database, you must apply schema changes periodically. To perform database schema migrations on Cloud Foundry-managed services, run a database migration task with the Cloud Foundry Command Line Interface (cf CLI) tool. +If your app relies on a relational database, you must apply schema changes periodically. To perform database schema migrations on Cloud Foundry-managed services, run a database migration task with the Tanzu cf CLI tool. 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.
+For information about downloading, installing, and uninstalling the Tanzu cf CLI, see Tanzu cf CLI documentation. -To do a database schema migration with cf CLI: +To do a database schema migration with Tanzu cf CLI: 1. Push the app:$ cf push APP-NAME@@ -82,10 +79,9 @@ 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.
$ cf run-task APP-NAME --command "bin/rails db:migrate" --name TASK-NAME
Creating task for app APP-NAME in org jdoe-org / space development as jdoe@pivotal.io...
diff --git a/services/integrate-splunk.html.md.erb b/services/integrate-splunk.html.md.erb
index b4d0a90a..1ae8789f 100644
--- a/services/integrate-splunk.html.md.erb
+++ b/services/integrate-splunk.html.md.erb
@@ -8,9 +8,9 @@ owner: PCF Metrics
You can follow the steps here to integrate Cloud Foundry with Splunk Enterprise for logging.
-## Step 1. Create a Cloud Foundry syslog drain for Splunk
+## Step 1. Create a syslog drain for Splunk
-In Cloud Foundry, create a syslog drain user-provided service instance as
+Create a syslog drain user-provided service instance as
described in [Using third-party log management services](./log-management.html).
Choose one or more apps whose logs you want to drain to Splunk
diff --git a/services/log-management-thirdparty-svc.html.md.erb b/services/log-management-thirdparty-svc.html.md.erb
index 9a97c353..a30d1e08 100644
--- a/services/log-management-thirdparty-svc.html.md.erb
+++ b/services/log-management-thirdparty-svc.html.md.erb
@@ -62,7 +62,7 @@ From your Papertrail account:
1. After the system is recorded, the URL, with the port, is displayed. Record the URL and port for later use.
- 
+ 
1. Create the log drain service in Cloud Foundry.
@@ -112,7 +112,7 @@ From your Splunk Storm account:

-5. Using the cf CLI, create the log drain service in Cloud Foundry using the TCP host and port you recorded. Then you bind the service to an app and restage the app using the syntax shown here. After a short delay, the logs begin to flow.
+5. Using the Tanzu cf CLI, create the log drain service in Cloud Foundry using the TCP host and port you recorded. Then you bind the service to an app and restage the app using the syntax shown here. After a short delay, the logs begin to flow.
$ cf cups my-logs -l syslog://HOST:PORT
@@ -164,7 +164,7 @@ In your SumoLogic account:

-6. Using the cf CLI, create the log drain service in Cloud Foundry using the source URL you just recorded. Then you bind the service to an app and restage the app using the syntax shown here. After a short delay, the logs begin to flow.
+6. Using the Tanzu cf CLI, create the log drain service in Cloud Foundry using the source URL you just recorded. Then you bind the service to an app and restage the app using the syntax shown here. After a short delay, the logs begin to flow.
$ cf cups my-logs -l HTTPS-SOURCE-URL
@@ -188,7 +188,7 @@ In your Sematext account:
1. Click the [Create App / Logsene App](https://apps.sematext.com/logsene-reports/registerApplication.do) menu item. Enter a name and click **Add Application** to create the Logsene App.
-2. Using the cf CLI, create the log drain service using the source URL displayed. Then you bind the service to an app and restage the app using the syntax shown here. After a short delay, the logs begin to flow. The logs appear in the [Logsene UI](https://apps.sematext.com/users-web/services.do#logsene).
+2. Using the Tanzu cf CLI, create the log drain service using the source URL displayed. Then you bind the service to an app and restage the app using the syntax shown here. After a short delay, the logs begin to flow. The logs appear in the [Logsene UI](https://apps.sematext.com/users-web/services.do#logsene).
$ cf cups logsene-log-drain -l https://logsene-cf-receiver.sematext.com/YOUR_LOGSENE_TOKEN
diff --git a/services/log-management.html.md.erb b/services/log-management.html.md.erb
index 4232e6a7..045eb8a6 100644
--- a/services/log-management.html.md.erb
+++ b/services/log-management.html.md.erb
@@ -54,7 +54,7 @@ Because http drains are slow and resource intensive, we recommend using syslog d
### Step 2: Create and bind a user-provided service instance
-You can create a syslog drain service and bind apps to it using Cloud Foundry Command Line Interface (cf CLI) commands.
+You can create a syslog drain service and bind apps to it using Tanzu cf CLI commands.
1. To create the service instance, run `cf create-user-provided-service` (or `cf cups`) with the `-l` flag.
diff --git a/services/managing-services.html.md.erb b/services/managing-services.html.md.erb
index 765c5c9c..75713ce9 100644
--- a/services/managing-services.html.md.erb
+++ b/services/managing-services.html.md.erb
@@ -1,13 +1,13 @@
---
-title: Managing service instances with the cf CLI
+title: Managing service instances with the Tanzu cf CLI
owner: Core Services
---
-You can manage life cycle operations for service instances using the Cloud Foundry CLI (cf CLI). This includes creating, updating, and deleting service instances. For information about other service management operations, see [Services overview](./index.html). <%= vars.custom_services %>
+You can manage life cycle operations for service instances using the Tanzu cf CLI. This includes creating, updating, and deleting service instances. For information about other service management operations, see [Services overview](./index.html). <%= vars.custom_services %>
-To run the commands in this topic, you must first install the Cloud Foundry Command Line Interface (cf CLI). See the [Cloud Foundry Command Line Interface](../../cf-cli/index.html) topics for more information.
+To run the commands in this topic, you must first install the Tanzu cf CLI. See the [Using the Tanzu cf CLI](https://techdocs.broadcom.com/us/en/vmware-tanzu/platform/tanzu-cf-cli/<%= vars.tanzu_cf_cli_version %>/t-cf-cli/index.html) topics for more information.
## List Marketplace services
@@ -53,12 +53,12 @@ OK
User-provided service instances provide a way for developers to bind apps with services that are not available in their Cloud Foundry Marketplace. For more information, see User-provided service instances.
+The cf create-service command uses CAPI V3 and creates asynchronous jobs. To wait for the create operation to complete before continuing, use the --wait flag. For more information, see the cf create-service reference.
+
When multiple brokers provide two or more services with the same name, you must specify the broker by including the -b BROKER flag in the cf create-service command.
### Arbitrary parameters
-Arbitrary parameters require cf CLI v6.12.1+ or higher.
-
Some services support providing additional configuration parameters with the provision request. Pass these parameters 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 the documentation for the particular service offering.
Example providing service-specific configuration parameters in-line:
@@ -80,7 +80,6 @@ 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.
@@ -103,6 +102,8 @@ cf services
The output from running this command includes any bound apps and the state of the last requested operation for the service instance.
+To improve performance when you have many service instances, use --no-apps to skip retrieving bound app information. Use --wait to wait for any in-progress operation to complete. For more information, see the cf services reference.
+
$ cf services
Getting services in org my-org / space test as user@example.com...
@@ -120,13 +121,16 @@ Details include dashboard urls, if applicable, and operation start and last upda
$ cf service mydb
-service instance: mydb
-service: p-mysql
+name: mydb
+guid: abcd1234-ef56-7890-abcd-ef1234567890
+type: managed
+broker tags:
+offering: p-mysql
plan: 100mb
description: mysql databases on demand
-documentation url:
-dashboard: https://p-mysql.example.com/manage/instances/abcd-ef12-3456
-service broker: mysql-broker
+documentation:
+dashboard url: https://p-mysql.example.com/manage/instances/abcd-ef12-3456
+broker: mysql-broker
This service is not shared.
@@ -164,7 +168,7 @@ $ cf restart my-app
#### Binding with app manifest
-As an alternative to binding a service instance to an app after pushing an app, you can use the app manifest to bind the service instance during push. As of cf CLI v6.12.1, [Arbitrary parameters](#arbitrary-params-binding) are not supported in app manifests. Using the manifest to bind service instances to routes is also not supported.
+As an alternative to binding a service instance to an app after pushing an app, you can use the app manifest to bind the service instance during push. [Arbitrary parameters](#arbitrary-params-binding) are not supported in app manifests. Using the manifest to bind service instances to routes is also not supported.
This excerpt from an app manifest binds a service instance called `test-mysql-01` to the app on push.
@@ -201,8 +205,6 @@ Restaging your app is not required.
### Arbitrary parameters
-_Arbitrary parameters require cf CLI v6.12.1+_
-
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.
@@ -263,7 +265,6 @@ OK
## Update a service instance
### Changing a service plan
-_Changing a plan requires cf CLI v6.7+ and cf-release v192+. CLI v7 or v8 is recommended._
By updating the service plan for an instance, you can change the service instance to other service plans. Though the platform and CLI now support this feature, services must implement support for it. Further, a service might support updating between some plans but not others. For example, a service might support updating a plan where only a logical change is required, but not where data migration is necessary. In either case, users can expect to see a meaningful error when plan update is not supported.
@@ -275,8 +276,6 @@ OK
### Arbitrary parameters
-_Arbitrary parameters require cf CLI v6.12.1+_
-
Some services support additional configuration parameters with the update 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.
@@ -292,7 +291,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.
@@ -305,11 +303,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+.
-
-
Some service brokers support upgrading service instances to the latest version of a service plan. For example, a broker might want to provide a way for users of the service to upgrade the underlying operating system that their service instances run on.
To upgrade your service instances:
@@ -325,22 +318,28 @@ To upgrade your service instances:
otherdb p-mysql medium create succeeded mysql-broker no
-2. Upgrade the service instance using the `--upgrade` flag:
+2. Upgrade the service instance by running:
```console
- cf update-service SERVICE-INSTANCE-NAME --upgrade
+ cf upgrade-service SERVICE-INSTANCE-NAME
```
For example:
- $ cf update-service mydb --upgrade
- You are about to update mydb.
+ $ cf upgrade-service mydb
+ You are about to upgrade mydb.
Warning: This operation might run long and block further operations on the service until complete.
- Really update service mydb? [yN]: y
+ Really upgrade service mydb? [yN]: y
OK
+ To skip the confirmation prompt, use the `--force` flag:
+
+ ```console
+ cf upgrade-service mydb --force
+ ```
+
## Delete a service instance
diff --git a/services/metrics.html.md.erb b/services/metrics.html.md.erb
index d12ba85e..d01e8fb1 100644
--- a/services/metrics.html.md.erb
+++ b/services/metrics.html.md.erb
@@ -3,7 +3,7 @@ title: Using metrics with drain logs
owner: PCF Metrics
---
-Here are instructions for using metrics to filter and report draining logs from Cloud Foundry. It also describes how to detect and diagnose system problems based on dropped metrics.
+Here are instructions for using metrics to filter and report draining logs. It also describes how to detect and diagnose system problems based on dropped metrics.
## How app logs are collected
diff --git a/services/oms-nozzle.html.md.erb b/services/oms-nozzle.html.md.erb
index 6f2db6e3..6ce84213 100644
--- a/services/oms-nozzle.html.md.erb
+++ b/services/oms-nozzle.html.md.erb
@@ -7,7 +7,7 @@ Here are instructions for integrating your <%= vars.app_runtime_first %> apps wi
Operations Management Suite (OMS) Log Analytics is a monitoring service for Microsoft Azure. The OMS Log Analytics Firehose Nozzle is a <%= vars.app_runtime_abbr %> component that forwards metrics from the Loggregator Firehose to OMS Log Analytics.
-This topic assumes you are using the latest version of the Cloud Foundry Command Line Interface (cf CLI) and a working <%= vars.app_runtime_abbr %> deployment on Azure.
+This topic assumes you are using the latest version of the Tanzu cf CLI and a working <%= vars.app_runtime_abbr %> deployment on Azure.
## Step 1: Create an OMS workspace in Azure
@@ -31,8 +31,8 @@ To deploy the OMS Log Analytics Firehose nozzle to <%= vars.app_runtime_abbr %>:
YOUR-USERNAME is your <%= vars.app_runtime_abbr %> user name.SKIP_SSL_VALIDATION: TRUE-OR-FALSETRUE to allow insecure connections to the UAA and the Traffic Controller. To block insecure connections to the UAA and Traffic Controller, set this value to FALSE.TRUE to allow insecure connections to the Tanzu UAA and the Traffic Controller. To block insecure connections to the Tanzu UAA and Traffic Controller, set this value to FALSE.LOG_LEVEL: INFO
-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.
-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 @@ -64,9 +62,9 @@ OK ## Unbind a route from a service instance -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). +You must install the Tanzu cf CLI to bind a route to a service instance. For more information, see [Tanzu cf CLI documentation](https://techdocs.broadcom.com/us/en/vmware-tanzu/platform/tanzu-cf-cli/<%= vars.tanzu_cf_cli_version %>/t-cf-cli/standalone-index.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/service-keys.html.md.erb b/services/service-keys.html.md.erb index fd41c5bd..c0088a8d 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 @@ -84,7 +83,7 @@ OK After obtaining these credentials, you can use a local CLI or utility to connect to the service instance, configure an app running outside the platform to connect to the service instance, or create a user-provided service instance so that apps in another space can connect to the service instance. How you configure these credentials depends on what local client, app, or entity is used to access your service instance. -For more information about configuring credentials with a user-provided service instance, see [User-provided service instances](http://docs.cloudfoundry.org/devguide/services/user-provided.html). +For more information about configuring credentials with a user-provided service instance, see [User-provided service instances](./user-provided.html). ## Delete a service key diff --git a/services/sharing-instances.html.md.erb b/services/sharing-instances.html.md.erb index 45ce8165..7402aca3 100644 --- a/services/sharing-instances.html.md.erb +++ b/services/sharing-instances.html.md.erb @@ -48,8 +48,7 @@ $ cf enable-feature-flag service_instance_sharing You can share a service instance from one space to another if you have the Space Developer role in both spaces. -To share a service instance to another space, run the following Cloud -Foundry Command Line Interface (cf CLI) command: +To share a service instance to another space, run the following Tanzu cf CLI command:$ cf share-service SERVICE-INSTANCE -s OTHER-SPACE [-o OTHER-ORG] @@ -66,7 +65,7 @@ you cannot share that service instance. ## Get information about service instance sharing -To get information about service instance sharing on the originating space, run the following cf CLI command from that originating space: +To get information about service instance sharing on the originating space, run the following Tanzu cf CLI command from that originating space: ``` cf service SERVICE-INSTANCE-NAME @@ -146,7 +145,6 @@ In this case, no information about other spaces is exposed. ## Unsharing a service instance+ +### 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 +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: +-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
You can unshare a service instance if you have the Space Developer role in the @@ -155,7 +153,7 @@ space where this service instance was shared from. Developers cannot delete or rename a service instance until it is unshared from all spaces. -To unshare a service instance, run the following cf CLI command: +To unshare a service instance, run the following Tanzu cf CLI command:cf service SERVICE-INSTANCEcommand to find out how many bindings exist in the spaces the service instance is shared into.$ cf unshare-service SERVICE-INSTANCE -s OTHER-SPACE [-o OTHER-ORG] [-f] @@ -201,7 +199,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.-To create a service instance in interactive mode, use the `-p` option with a comma-separated list of parameter names. The Cloud Foundry Command Line Interface (cf CLI) prompts you for each parameter value. +To create a service instance in interactive mode, use the `-p` option with a comma-separated list of parameter names. The Tanzu cf CLI prompts you for each parameter value.-Caution This script was tested on macOS Sierra 10.12.4 and Ubuntu 14.04.5. Use the script at your own risk.
``` diff --git a/services/user-provided.html.md.erb b/services/user-provided.html.md.erb index 9b71471f..dde0d48d 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 `cf create-user-provided-service` is `cf cups`. ### Deliver service credentials to an app @@ -27,7 +27,7 @@ User-provided service instances allow developers to configure their apps with th cf cups SERVICE_INSTANCE -p '{"username":"admin","password":"pa55woRD"}'$ cf cups my-user-provided-route-service -p "host, port" @@ -46,6 +46,10 @@ 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). +-### 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: @@ -377,3 +341,124 @@ To view the web URL and logs for the app: "crash_count"=>1, "crash_timestamp"=>1555544935367052708, "version"=>"50892dcb-274d-4cf6-b944-3eda1e000283"}+RFC-5424 is used to establish connections over HTTP/HTTPS. RFC-6587 is used for TCP based communication over syslog/syslog-tls drains. +
+ Create the user-provided service instance, specifying the URL of the service with the `-l` option.@@ -65,7 +69,6 @@ OK-Important When creating the user-provided service, the route service URL you specify must be "https."
@@ -74,12 +77,11 @@ 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. 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.
diff --git a/services/using-vol-services.html.md.erb b/services/using-vol-services.html.md.erb index 3cf99daf..12a0b755 100644 --- a/services/using-vol-services.html.md.erb +++ b/services/using-vol-services.html.md.erb @@ -3,12 +3,5 @@ title: Using an external file system (volume services) owner: Core Services --- -<% if vars.platform_code == "PCF" || vars.platform_code == "CF" %> <%= partial 'using-vol-services' %> - -<% else %> - -<%= vars.vol_services_not_available %> - -<% end %> diff --git a/sidecars.html.md.erb b/sidecars.html.md.erb index c47dc658..e8146b68 100644 --- a/sidecars.html.md.erb +++ b/sidecars.html.md.erb @@ -9,8 +9,8 @@ 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.
+Use Tanzu cf CLI starting with Tanzu Platform for Cloud Foundry 10.2. +See Tanzu cf CLI documentation. <%= vars.capi_sidecar_req %> @@ -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](../commercial-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/sidecar-buildpacks.html). +For more information, see [Sidecar buildpacks](../commercial-buildpacks/sidecar-buildpacks.html). ### Packaging binaries @@ -108,7 +108,7 @@ Where: * `SIDECAR-BINARY` is your sidecar binary. -For more information about packaging assets with your Java app, see [Cloud Foundry documentation](https://docs.cloudfoundry.org/buildpacks/java/java-tips.html). +For more information about packaging assets with your Java app, see [Cloud Foundry documentation](../commercial-buildpacks/java/java-tips.html). ## Push an app with a sidecar using an app manifest @@ -130,18 +130,11 @@ Before you can push an app with a sidecar with an app manifest, you must have: To push an app with a sidecar: 1. Create an app or use an existing app. To create an app: - * If you are using cf CLI v7, run: - ``` - cf create-app APP-NAME - ``` - Where `APP-NAME` is the name you give your app. - * If you are using cf CLI v6, run: - - ``` - cf v3-create-app APP-NAME - ``` - Where `APP-NAME` is the name you give your app. + ``` + cf create-app APP-NAME + ``` + Where `APP-NAME` is the name you give your app. 1. Create a manifest file in the root directory of your app, such as `manifest.yml`. Otherwise, use an existing manifest file for your app. For more information, see [Deploying with app manifests](./deploy-apps/manifest.html). @@ -177,39 +170,24 @@ To push an app with a sidecar: ``` 1. To apply the manifest file to your app: - * If you are using cf CLI v7, run: - - ``` - cf apply-manifest -f PATH-TO-MANIFEST - ``` - Where `PATH-TO-MANIFEST` is the path to your manifest file. - * If you are using cf CLI v6, run: - ``` - cf v3-apply-manifest -f PATH-TO-MANIFEST - ``` - Where `PATH-TO-MANIFEST` is the path to your manifest file. + ``` + cf apply-manifest -f PATH-TO-MANIFEST + ``` + Where `PATH-TO-MANIFEST` is the path to your manifest file. 1. To push your app: - * If you are using cf CLI v7, run: - ``` - cf push APP-NAME - ``` - Where `APP-NAME` is the name of your app. - * If you are using cf CLI v6, run: - - ``` - cf v3-push APP-NAME - ``` - Where `APP-NAME` is the name of your app. + ``` + cf push APP-NAME + ``` + Where `APP-NAME` is the name of your app. ## Sidecar tutorial 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
### About the sample app @@ -255,48 +233,34 @@ To push the app and sidecar: 1. To create the app: - * If you are using cf CLI v7, run: - - ``` - cf create-app sidecar-dependent-app - ``` - * If you are using cf CLI v6, run: - ``` - cf v3-create-app sidecar-dependent-app - ``` + ``` + cf create-app sidecar-dependent-app + ``` 1. Go to the `sidecar-dependent-app` directory. 1. Open and review the `manifest.yml` file. Under `sidecars`, the sidecar is specified with a name, process type, and start command. Under `env`, an environment variable defines the port on which the app and sidecar communicate. 1. To apply the manifest to the app: - * If you are using cf CLI v7, run: - ``` - cf apply-manifest - ``` - * If you are using cf CLI v6, run: - - ``` - cf v3-apply-manifest - ``` + ``` + cf apply-manifest + ``` 1. To push the app: - * If you are using cf CLI v7, run: - ``` - cf push sidecar-dependent-app - ``` - * If you are using cf CLI v6, run: + ``` + cf push sidecar-dependent-app + ``` - ``` - cf v3-push sidecar-dependent-app - ``` +After you push the app, you can further explore it as described in the sections below: -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). +- [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 the processes running in the container +### View processes running in the app container via SSH To view the app and sidecar process running in the container: @@ -339,7 +303,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)sidecar-dependent-java-appandpush_java_app_with_binary_sidecar.shin the samples repository. When pushing a Java app, follow the requirements listed in Requirements for Java apps.
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.-Note You cannot SSH into the container running a task.
### Task logging and execution history @@ -66,115 +65,25 @@ 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). +about the `cf run-task` command, enter `cf run-task --help`. -<% if vars.platform_code == 'PCF' %> <%= partial "/pcf/core/tasks_rec_alloc_pcf" %> -<% else %> -<%= partial 'tasks_rec_alloc_oss' %> -<% end %> ## Run a task on an app -You can use the Cloud Foundry Command Line Interface (cf CLI) to run a task in the context of an app. - -cf push -i 0 and then run the task. You can run the app later by scaling up its instance count.APP-NAME is the name of your app.TASK is the task you want to run.TASK-NAME is the name you want to give the task.- cf run-task example-app "bin/rails db:migrate" --name example-task -- - When the task runs successfully, you see an output similar to the following example: -
- Creating task for app example-app in org example-org / space development as admin@example.org... - OK - Task 1 has been submitted successfully for execution. -- -
- 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: - - ``` - cf logs APP-NAME --recent - ``` - Where `APP-NAME` is the name of your app. -
- 2017-01-03T15:58:06.57-0800 [APP/TASK/my-task/0]OUT Creating container
- 2017-01-03T15:58:08.45-0800 [APP/TASK/my-task/0]OUT Successfully created container
- 2017-01-03T15:58:13.32-0800 [APP/TASK/my-task/0]OUT D, [2017-01-03T23:58:13.322258 #7] DEBUG -- : (15.9ms) CREATE TABLE "schema_migrations" ("version" character varying PRIMARY KEY)
- 2017-01-03T15:58:13.33-0800 [APP/TASK/my-task/0]OUT D, [2017-01-03T23:58:13.337723 #7] DEBUG -- : (11.9ms) CREATE TABLE "ar_internal_metadata" ("key" character varying PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
- 2017-01-03T15:58:13.34-0800 [APP/TASK/my-task/0]OUT D, [2017-01-03T23:58:13.340234 #7] DEBUG -- : (1.6ms) SELECT pg_try_advisory_lock(3720865444824511725);
- 2017-01-03T15:58:13.35-0800 [APP/TASK/my-task/0]OUT D, [2017-01-03T23:58:13.351853 #7] DEBUG -- : ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
- 2017-01-03T15:58:13.35-0800 [APP/TASK/my-task/0]OUT I, [2017-01-03T23:58:13.357294 #7] INFO -- : Migrating to Createtopics (20161118225627)
- 2017-01-03T15:58:13.35-0800 [APP/TASK/my-task/0]OUT D, [2017-01-03T23:58:13.359565 #7] DEBUG -- : (0.5ms) BEGIN
- 2017-01-03T15:58:13.35-0800 [APP/TASK/my-task/0]OUT == 20161118225627 Createtopics: migrating ===================================
- 2017-01-03T15:58:13.50-0800 [APP/TASK/my-task/0]OUT Exit status 0
- 2017-01-03T15:58:13.56-0800 [APP/TASK/my-task/0]OUT Destroying container
- 2017-01-03T15:58:15.65-0800 [APP/TASK/my-task/0]OUT Successfully destroyed container
-
- If a task fails, you see logs similar to the following example:
- - 2016-12-14T11:09:26.09-0800 [APP/TASK/my-task/0]OUT Creating container - 2016-12-14T11:09:28.43-0800 [APP/TASK/my-task/0]OUT Successfully created container - 2016-12-14T11:09:28.85-0800 [APP/TASK/my-task/0]ERR bash: bin/rails: command not found - 2016-12-14T11:09:28.85-0800 [APP/TASK/my-task/0]OUT Exit status 127 - 2016-12-14T11:09:28.89-0800 [APP/TASK/my-task/0]OUT Destroying container - 2016-12-14T11:09:30.50-0800 [APP/TASK/my-task/0]OUT Successfully destroyed container -- If your task name is unique, you can `grep` the output of the `cf logs` command for the task name to view task-specific logs. - -### Run a task on an app with cf CLI v7 - -To run a task on an app with cf CLI v7: +You can use the Tanzu cf CLI to run a task in the context of an app. 1. Configure your v3 API manifest with a task as a process type. For more information, see the [Cloud Foundry API documentation](https://v3-apidocs.cloudfoundry.org/version/3.78.0/index.html#the-app-manifest-specification). -1. In a terminal, push your app by running: +2. In a terminal, push your app by running: ``` cf push APP-NAME --task ``` Where `APP-NAME` is the name of your app. -1. Run your task on the deployed app by running: +3. Run your task on the deployed app by running: ``` cf run-task APP-NAME --name TASK-NAME @@ -187,7 +96,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.
-Important
-This topic is no longer in use. Commands with v3- prefixes do not exist in cf CLI v7 or v8. Because these commands are experimental, they are not guaranteed to be available or compatible in subsequent cf CLI releases, and they are not guaranteed to be compatible with this version of <%= vars.app_runtime_first %>. <%= vars.company_name %> recommends upgrading to cf CLI v8. For more information, see Upgrading to cf CLI v8.