The sequence diagrams in this topic show you how an on-demand service sets up and maintains service instances. The diagrams indicate which tasks are undertaken by the on-demand broker (ODB) and which require interaction with the Service Adapter.
The following sequence diagram shows the workflow for registering a service broker with Cloud Foundry.
This section contains diagrams that present the workflow for the following actions:
To create a service instance, users run the cf create-service
command. For more information about this command, see Creating Service Instances.
The following sequence diagram shows the workflow for creating a service instance.
There are two ways this process can fail:
Synchronously: The Cloud Controller deletes the service according to its orphan mitigation strategy. For more information, see Orphans.
Asynchronously: This happens while BOSH deploys the service instance. The Cloud Controller does not issue a delete request.
To update a service instance, users run the cf update-service
command. For more information about this command, see Update a Service Instance.
Updates can only proceed if the existing service instance is up-to-date. ODB calls generate-manifest
on the service adapter to determine whether there are any pending changes for the instance.
Note When determining whether there are pending changes for an instance during an update, ODB ignores any configuration supplied in the update block of the manifest returned by the service adapter's generate-manifest
subcommand. For more information, see Update Block in the Cloud Foundry BOSH documentation.
If there are no pending changes, the update proceeds. The manifest from the second call to generate-manifest
is deployed.
The sequence diagram below shows the workflow for updating a service instance if there are no pending changes.
If there are pending changes, the update fails.
The sequence diagram below shows the workflow for updating a service instance if there are pending changes.
If a user runs the cf create-service
command with post-deploy errands configured for the deployment, ODB does not report success to Cloud Foundry until the deployment is created, or updated, and all post-deploy errands complete. For more information about post-deploy errands, see Service Instance Lifecycle Errands.
The following sequence diagram shows the workflow for creating or updating a service instance when post-deploy errands are configured.
ODB provides the BOSH errand recreate-all-service-instances
. This errand executes a bosh -d DEPLOYMENT-NAME recreate --fix
on each service instance (SI) managed by the broker. It is used for triggering low-level BOSH agent certificate re-installation, or for backup and restore purposes, for example in a migration between foundations.
The following sequence diagram shows the workflow for re-creating service instances.
This section contains diagrams that present the workflow for the following actions:
Upgrade All Service Instances with External Service Instances API Configured
Upgrade All Service Instances with Maintenance Information Configured
Upgrade One Service Instance with Maintenance Information Configured
ODB provides the BOSH errand upgrade-all-service-instances
. This errand upgrades all service instances managed by the broker. This is also used when a plan changes. The errand updates all instances that implement a plan with the new plan definition. For more information, see Upgrade All Service Instances.
The following sequence diagram shows the workflow for upgrading all service instances.
If the service instances API is configured, the upgrade-all-service-instances
errand connects to a different endpoint to gather the list of instances to upgrade. For more information, see Service Instances API.
The following sequence diagram shows the workflow for upgrading all service instances with external service instances API configured.
If Cloud Foundry supports maintenance information and it is supplied in the ODB configuration, the upgrade-all-service-instances
errand coordinates with Cloud Foundry to update only service instances that are outdated. If a service instance has already been upgraded successfully, then the errand has no effect on that service instance.
The following sequence diagram shows the workflow for upgrading all service instances when maintenance information is configured.
If Cloud Foundry supports maintenance information and it is supplied in the ODB configuration, you can trigger a single upgrade by running cf update-service SERVICE_NAME --upgrade
.
The following sequence diagram shows the workflow for upgrading one service instance when maintenance information is configured.
This section contains diagrams that present the workflow for the following actions:
To bind a service instance, users run the cf bind-service
command. For more information about this command, see Bind a Service Instance.
The following sequence diagram shows the workflow for creating a binding.
To unbind a service instance, users run the cf unbind-service
command. For more information about this command, see Unbind a Service Instance.
The following sequence diagram shows the workflow for unbinding a service instance.
This section contains diagrams that present the workflow for the following actions:
To delete a service instance, users run the cf delete-service
command. For more information about this command, see Delete a Service Instance.
The service adapter is not invoked in the delete service workflow.
The following sequence diagram shows the workflow for deleting service instances.
If you run the cf delete-service
command with pre-delete errands configured for the deployment, ODB does not report success to Cloud Foundry until all pre-delete errands complete and the deployment is deleted. For more information about pre-delete errands, see Service Instance Lifecycle Errands.
The following sequence diagram shows the workflow for deleting service instances with pre-delete errands configured.
ODB provides the BOSH errand delete-all-service-instances
. This errand deletes all service instances managed by the broker. For how to use this errand, see Delete All Service Instances.
The following sequence diagram shows the workflow for deleting all service instances.
ODB provides the BOSH errand delete-all-service-instances-and-deregister-broker
. This errand deletes all service instances managed by the broker and deregisters the broker from Cloud Foundry. For how to use this errand, see Delete All Service Instances and Deregister Broker.
The following sequence diagram shows the workflow for deleting all service instances and deregistering the broker.