LATEST VERSION: 2.0 - RELEASE NOTES
Spring Cloud Services v1.5

Managing Service Instances

Page last updated:

See below for information about managing Service Registry service instances using the Cloud Foundry Command Line Interface tool (cf CLI). You can also manage Service Registry service instances using Pivotal Cloud Foundry® Apps Manager.

Creating an Instance

Target the correct org and space:

$ cf target -o myorg -s development

API endpoint:   https://api.cf.wise.com (API version: 2.43.0)
User:           user
Org:            myorg
Space:          development

You can view plan details for the Config Server product by running cf marketplace -s.

$ cf marketplace
Getting services from marketplace in org myorg / space development as user...
OK

service                       plans          description
p-circuit-breaker-dashboard   standard       Circuit Breaker Dashboard for Spring Cloud Applications
p-config-server               standard       Config Server for Spring Cloud Applications
p-service-registry            standard       Service Registry for Spring Cloud Applications

TIP:  Use 'cf marketplace -s SERVICE' to view descriptions of individual plans of a given service.

$ cf marketplace -s p-service-registry
Getting service plan information for service p-service-registry as user...
OK

service plan   description     free or paid
standard       Standard Plan   free

Run cf create-service, specifying the service, plan name, and instance name. Optionally, you may add the -c flag and provide a JSON object that specifies configuration parameters.

General parameters used to configure the Service Registry 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}'

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

To create an instance with the default of a single node, run:

$ cf create-service p-service-registry standard service-registry
Creating service instance service-registry in org myorg / space development as user...
OK

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

To create an instance, specifying that three nodes should be provisioned, run:

$ cf create-service p-service-registry standard service-registry -c '{"count": 3}'
Creating service instance service-registry in org myorg / space development as user...
OK

Create 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 Service Registry instance is ready to be used, the cf service command will give a status of create succeeded:

$ cf service service-registry

Service instance: service-registry
Service: p-service-registry
Bound apps:
Tags:
Plan: standard
Description: Service Registry for Spring Cloud Applications
Documentation url: http://docs.pivotal.io/spring-cloud-services/
Dashboard: https://spring-cloud-broker.apps.wise.com/dashboard/p-service-registry/50f247f4-fcb0-43c9-863c-94e21be2051c

Last Operation
Status: create succeeded
Message:
Started: 2016-06-27T23:14:44Z
Updated:

Note: You may notice a discrepancy between the status given for a service instance by the cf CLI (e.g., by the cf service command) versus that shown on the Service Instances dashboard. The dashboard is updated frequently (close to real-time); the status retrieved by the cf CLI is not updated as frequently and may take time to match the dashboard.

Updating an Instance

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.cf.wise.com (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 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}'
force When upgrade is set to true, whether to force an upgrade of the instance, even if the instance is already at the latest available service version '{"force": true}'

A Service Registry service instance can also be configured to replicate its registry with peer Service Registry service instances in other PCF deployments, organizations, or spaces. 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 user...
OK

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:
Tags:
Plan: standard
Description: Service Registry for Spring Cloud Applications
Documentation url: http://docs.pivotal.io/spring-cloud-services/
Dashboard: https://spring-cloud-broker.apps.wise.com/dashboard/p-service-registry/57ce88c1-6bd9-4224-b855-b4600e8e0f39

Last Operation
Status: update succeeded
Message:
Started: 2016-06-28T14:09:19Z
Updated: 2016-06-28T14:12:25Z

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.

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