Capability registration

To make themselves discoverable through the Discovery Endpoint, the various microservices of a Content Delivery environment must register themselves with the Discovery Service as Capabilities. You can do this by configuring the microservice to automatically register itself, or you can use a Java tool called the Discovery Registration Tool to perform the registration manually.

A Content Delivery environment has a number of different features it can expose to clients and APIs in the form of microservices. In the context of the Discovery Service, these features are referred to as Capabilities. Through the Discovery Endpoint, a client can discover if a certain Capability is present on the Content Delivery environment, and if so, where the client can access its endpoint(s).

To make this work, each Content Delivery microservice must register itself as a Capability with the Discovery Service. You can do this in the following ways:
Automatic registration

To register a Capability automatically, run the installation script for the feature (installService.ps1, start.ps1 or start.sh) with the switch --auto-register. This automatically registers your microservice with the Discovery Service.

Manual registration with the registration tool

To register a Capability manually, run the Discovery registration tool (an executable JAR file called discovery-registration.jar) with the update command in the same directory as a properly configured Storage Layer configuration file (cd_storage_conf.xml). This can be any such file, except the one of the Discovery Service microservice itself. Refer to the installation instructions for each microservice to learn how to manually register that microservice.

Either of these two methods updates the Discovery Service database, making the information available to the Discovery Service automatically. No restart of the Discovery Service is required.

Once your Capabilities are registered (automatically or with the tool), you can use the tool (in the same location as cd_storage_conf.xml, as mentioned above) in several ways:
Reading Capabilities
You can use the tool to read back which Capabilities are registered by running this command:
java -jar discovery-registration.jar read
Updating and removing Capabilities
You can also update and remove registered Capabilities by running this command:
java -jar discovery-registration.jar sync

This updates all registered Capabilities that are listed in cd_storage_conf.xml, and removes all registered Capabilities that are not listed in cd_storage_conf.xml. (To stop the tool from prompting you to confirm the removal of Capabilities, replace sync with forceSync.)