Managing Service Instances

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 Web Services Apps Manager.

Creating an Instance

Target the correct org and space:

$ cf target -o myorg -s development

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

$ 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 foundations, orgs, or spaces. For more information on the configuration parameters used to enable peer replication, see Enabling Peer Replication.

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

$ cf create-service p-service-registry standard service-registry

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

$ cf create-service p-service-registry standard service-registry -c '{"count": 3}'

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
Showing info of service service-registry in org myorg / space development as user...

name:            service-registry
service:         p-service-registry
bound apps:
tags:

[...]

Showing status of last operation from service service-registry...

status:    create succeeded

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

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 foundations, orgs, or spaces. For more information on the configuration parameters used to enable peer replication, see Enabling Peer Replication.

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}'

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
Showing info of service service-registry in org myorg / space development as user...

name:            service-registry
service:         p-service-registry
bound apps:
tags:

[...]

Showing status of last operation from service service-registry...

status:    update succeeded

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

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