Spring Cloud Services v1.3

Updating an Instance

Page last updated:

You can update settings on a Config Server 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 Config Server service instance’s settings, target the org and space of the service instance:

$ cf target -o myorg -s development

API endpoint: (API version: 2.43.0)
User:           user
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 the parameters used to configure a Git configuration source, see the Configuring with Git topic.

General parameters accepted for the Config Server are listed below.

Parameter Function Example
count The number of nodes to provision: 1 by default, more for running in high-availability mode '{"count": 3}'
upgrade Whether to upgrade the instance '{"upgrade": true}'

To update a service instance, setting Git configuration sources, run:

$ cf update-service config-server -c '{"git": { "uri": "", "repos": { "cook": { "pattern": "cook*", "uri": "" } } } }'
Updating service instance config-server as admin...

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

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

$ cf update-service config-server -c '{"count": 3}'
Updating service instance config-server as admin...

Update in progress. Use 'cf services' or 'cf service config-server' 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 config-server

Service instance: config-server
Service: p-config-server
Bound apps:
Plan: standard
Description: Config Server for Spring Cloud Applications
Documentation url:

Last Operation
Status: update succeeded
Started: 2016-06-24T21:11:53Z
Updated: 2016-06-24T21:13:59Z

Important: The cf service and cf services commands may report an update succeeded status even if the Config Server cannot initialize using the provided settings. For example, given an invalid URI for a configuration source, the service instance may still be restarted and have an update succeeded status.

If the service instance does not appear to be functioning correctly after an update, you can visit its dashboard to double-check that the provided settings are valid and accurate. See the Using the Dashboard topic.

The service instance is now updated and ready to be used. For information about using an application to access configuration values served by a Config Server service instance, see the Writing Client Applications topic.

Create a pull request or raise an issue on the source for this page in GitHub