LATEST VERSION: 1.3 - CHANGELOG
Spring Cloud Services v1.3

Creating an Instance

Page last updated:

You can create a Service Registry service instance using either the Cloud Foundry Command Line Interface tool (cf CLI) or Pivotal Cloud Foundry® Apps Manager.

Note: Service Registry service instances can run in a high-availability mode, with an arbitrary number of replicated nodes, and can replicate service registrations with peers in other PCF spaces, organizations, or deployments. These behaviors can only be configured through use of the cf CLI. (After creating a service instance using Apps Manager, you can use the cf CLI to configure the instance. See the Updating an Instance topic.)

Using the cf CLI

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

Using Apps Manager

Log into Apps Manager as a Space Developer. In the Marketplace, select Service Registry.

Marketplace

Select the desired plan for the new service instance.

Select plan

Provide a name for the service instance (for example, “service-registry”). Click the Add button.

Instance name

In the Services list, click the listing for the new service instance.

Service successfully added

Click the Manage link.

Manage link

It may take a few minutes to provision the service instance; while it is being provisioned, you will see a “The service instance is initializing” message. When the instance is ready, its dashboard will load automatically.

Dashboard more

For information about registering an application 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