Cloud Foundry Documentation
- General Information
- Contribute to Cloud Foundry documentation
- Cloud Foundry concepts
- Cloud Foundry overview
- Security and networking
- Cloud Foundry security
- Container security in Cloud Foundry
- Container-to-container networking
- Identity-aware routing
- Orgs, spaces, roles, and permissions in Cloud Foundry
- Managing Roles
- Planning orgs and spaces in Cloud Foundry
- App Security Groups in Cloud Foundry
- Cloud Foundry app SSH components and processes
- High availability
- How Cloud Foundry manages apps
- Cloud Foundry components
- Cloud Foundry Command Line Interface (cf CLI)
-
- Information for Operators
- Deploying Cloud Foundry
- Administering Cloud Foundry
- Managing the runtime
- User accounts and communications
- Routing
- Enabling IPv6 for hosted apps
- Distributed tracing
- Enabling Zipkin tracing
- Enabling W3C tracing
- Supporting WebSockets
- Configuring load balancer health checks for CF routers
- Troubleshooting slow requests
- Troubleshooting router error responses
- Securing incoming traffic
- Configuring trusted system certificates for apps
- Bulletin Board System data store encryption
- Enabling and configuring TCP routing
- Configuring HTTP/2 support
- Isolation segments
- Delayed jobs in Cloud Foundry
- Managing apps and their stacks
- Running and Troubleshooting Cloud Foundry
- Cloud Foundry logging
- Configuring system logging
- Configuring Diego for upgrades
- Audit Events
- UAA audit requirements
- Usage events and billing
- Configuring SSH access for Cloud Foundry
- Configuring Diego Cell disk cleanup scheduling
- Configuring Health Monitor Notifications
- Adding a custom stack
- Monitoring and testing Diego components
- Troubleshooting Cloud Foundry
- UAA performance
- UAA performance metrics
- Scaling Cloud Controller
- Cloud Controller Multi-Process Mode (Puma)
- Scaling Cloud Controller (cf-for-k8s)
- Logging and metrics in Cloud Foundry
- Logging and metrics architecture
- Installing the Loggregator plug-in for cf CLI
- Security event logging
- App logging in Cloud Foundry
- Limiting your app log rate in Cloud Foundry
- Cloud Foundry component metrics
- Container metrics
- Loggregator guide for Cloud Foundry operators
- Logging and metrics in Cloud Foundry
- Configuring the OpenTelemetry Collector
- Deploying a nozzle to your Cloud Foundry Loggregator Firehose
- BOSH Documentation
- BOSH Backup and Restore (BBR)
- Information for developers
- Developing and managing apps
- How to push your app with Cloud Foundry CLI (cf push)
- Pushing your app using Cloud Foundry CLI (cf push)
- Deploying with app manifests
- App manifest attribute reference
- Deploying an app with Docker
- Deploying your large apps
- Starting, restarting, and restaging apps
- Pushing an app with multiple processes
- Running cf push sub-step commands
- Configuring app deployments
- Pushing apps with sidecar processes
- Using blue-green deployment to reduce downtime
- Troubleshooting app deployment and health
- SSH for apps and services
- Routes and domains
- Managing services
- Provisioning and integrating service instances
- Managing service instances
- Sharing service instances
- Delivering service credentials to an app
- Managing service keys
- Configuring Play Framework service connections
- Using an external file system (volume services)
- User-provided service instances
- Manage app requests with route services
- Streaming app logs
- Managing apps with the cf CLI
- Cloud Foundry environment variables
- Available Cloud Controller API client libraries
- Designing and running your app in the cloud
- Cloud Foundry API app revisions
- How to push your app with Cloud Foundry CLI (cf push)
- Cloud Foundry Buildpacks
- Cloud Native Buildpacks
- Classic Buildpacks
- What are classic buildpacks?
- Binary buildpack
- Go buildpack
- Hosted Web Core buildpack
- Java buildpack
- .NET Core buildpack
- NGINX buildpack
- Node.js buildpack
- Using PHP buildpack with runtimes
- Python buildpack
- R buildpack
- Ruby buildpack
- Staticfile buildpacks
- Creating custom buildpacks
- Information for Managed Service Authors
- Services in Cloud Foundry
- Service Broker API
- Managing service brokers in Cloud Foundry
- Managing access to service plans
- Binding credentials in Cloud Foundry
- CredHub
- Dashboard Single Sign-on
- Service instance sharing in Cloud Foundry
- Service broker examples
- App log streaming in Cloud Foundry
- Offering Route Services in Cloud Foundry
- Supporting multiple CF instances
- User Account and Authentication
- API Reference
- UAA API
- CAPI API
User-provided service instances
Page last updated:
User-provided service instances allow you to use services that are not available in the Marketplace with their apps running on Cloud Foundry.
You can use user-provided service instances to deliver service credentials to an app, or to trigger streaming of app logs to a syslog-compatible consumer. These two functions can be used individually or both at the same time.
After creation, user-provided service instances behave like service instances created through the Marketplace. See Managing service instances and App binding for details about listing, renaming, deleting, binding, and unbinding service instances.
Create a user-provided service instance
The alias for the cf create-user-provided-service command is cf cups.
Deliver service credentials to an app
Suppose a developer obtains a URL, port, user name, and password for communicating with an Oracle database managed outside of Cloud Foundry. The developer can manually create custom environment variables to configure their app with these credentials (of course you never hard code these credentials in your app!).
User-provided service instances allow developers to inject credentials into the app container using the familiar App binding operation and the same Credential Delivery Methods used by Cloud Foundry to deliver credentials for Marketplace services.
cf cups SERVICE_INSTANCE -p '{"username":"admin","password":"pa55woRD"}'
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.
$ cf cups my-user-provided-route-service -p "host, port" host> rdb.local port> 5432 Creating user provided service my-user-provided-route-service in org my-org / space my-space as [email protected]... OK
After creating the user-provided service instance, to deliver the credentials to one or more apps, see App binding.
Stream app logs to a service
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 and RFC 6587.
Important 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.
cf cups SERVICE_INSTANCE -l syslog-tls://example.log-aggregator.com:6514
To stream app logs to the service, bind the user-provided service instance to your app.
Proxy app requests to a route service
User-provided service instances allow developers to proxy app requests to route services for preprocessing. To create a user-provided service instance for a route service, specify the URL for the route service using the -r option.
$ cf create-user-provided-service my-user-provided-route-service -r https://my-route-service.example.com Creating user provided service my-user-provided-route-service in org my-org / space my-space as [email protected]... OK
Important When creating the user-provided service, the route service URL you specify must be “https.”
To proxy requests to the user-provided route service, you must bind the service instance to the route. For more information, see Managing app requests with route services.
Update a user-provided service instance
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 in Rolling App Deployments.
Caution If you are rotating credentials, the old credentials must be active until the restart is finished.
Create a pull request or raise an issue on the source for this page in GitHub