Updating an Instance

Page last updated:

You can update settings on a Service Registry service instance using the Cloud Foundry Command Line Interface tool (cf CLI). The cf update-service command can be given a -c flag with a JSON object containing parameters used to configure the service instance.

To update a Service Registry service instance’s settings, target the org and space of the service instance:

$ cf target -o myorg -s development

API endpoint:   https://api.run.pivotal.io (API version: 2.61.0)
User:           username@example.com
Org:            myorg
Space:          development

Then run cf update-service SERVICE_NAME -c '{ "PARAMETER": "VALUE" }', where SERVICE_NAME is the name of the service instance, PARAMETER is a supported parameter, and VALUE is the value for the parameter. For information about supported parameters, see the next section.

Configuration Parameters

General parameters accepted for the Service Registry are listed below.

Parameter Function Example
count The number of nodes to provision '{"count": 3}'
upgrade Whether to upgrade the instance '{"upgrade": true}'

A Service Registry service instance can also be configured to replicate its registry with peer Service Registry service instances in other organizations, spaces, or Pivotal Cloud Foundry (PCF) deployments. For more information on the configuration parameters used to enable peer replication, see the Enabling Peer Replication topic.

To update a service instance and set the count of nodes for running in high-availability mode, run:

$ cf update-service service-registry -c '{"count": 3}'
Updating service instance service-registry as username@example.com...

Update in progress. Use 'cf services' or 'cf service service-registry' to check operation status.

As the command output suggests, you can use the cf services or cf service commands to check the status of the service instance. When the update is complete, the cf service command will give a status of update succeeded:

$ cf service service-registry

Service instance: service-registry
Service: p-service-registry
Bound apps: agency,company
Plan: standard
Description: Service Registry for Spring Cloud Applications
Documentation url: http://docs.pivotal.io/spring-cloud-services/
Dashboard: https://spring-cloud-service-broker.cfapps.io/dashboard/p-service-registry/01460799-7ba8-4775-ba63-5b3f6c350d6c

Last Operation
Status: update succeeded
Started: 2016-09-09T17:54:52Z
Updated: 2016-09-09T17:57:02Z

The service instance is now updated and ready to be used. For information about registering an application with a Service Registry service instance or calling an application which has been registered with a Service Registry service instance, see the Writing Client Applications topic.

Was this helpful?
What can we do to improve?
View the source for this page in GitHub