Migrating to peer discovery
Enable Discovery’s peer discovery in your Caplin Platform deployment to simplify peer-connectivity configuration.
To allow new instances of Transformer and adapters to be recognised by data services, follow this migration step with Configuring scalable data services.
Requirements
The instructions on this page assume that you have already completed the first three stages in the migration path below:
-
Migrate to peer discovery
-
Migrate to scalable data services
Overview
Plan to migrate all components in a deployment from add-peer
to peer discovery together. Mixed peer connectivity configuration is not supported.
In a Discovery deployment with peer discovery, DataSources that provide data initiate connections to DataSources that request data. If your current deployment follows the reverse convention, you may need to reconfigure internal firewalls to accommodate Discovery’s approach.
Connections between DataSource components created by peer-discovery are unencrypted.
To migrate a deployment to peer discovery, you may need to make significant changes to configuration. How much configuration you need to change, and where you need to change it, depends on whether your deployment’s configuration is under manual control or under the management of the Deployment Framework.
-
If your deployment’s configuration is under manual control, follow instructions in Manually configured deployments.
-
If your deployment’s configuration is managed by the Deployment Framework, follow the instructions in Deployment Framework deployments.
Manually configured deployments
Follow the instructions in this section if you manage the configuration of Liberator, Transformer, and adapters separately and manually.
The instructions in this section are also relevant for manual reconfiguration of Deployment Framework blades not yet adapted for Discovery deployments.
Follow the steps below:
-
Remove
add-peer
items.List configuration files containingadd-peer
$ grep -RIl --include='*.conf' 'add-peer'
-
Remove
peer-thread-pool-size
(if present).List configuration files containingpeer-thread-pool-size
$ grep -RIl --include='*.conf' 'peer-thread-pool-size'
-
Examine the
add-data-service
configuration items in your deployment, and rename anyservice-name
options that are not unique.List configuration files containingadd-data-service
$ grep -RIl --include='*.conf' 'add-data-service'
-
For each configured data service in your deployment, follow the steps below:
-
Identify the providing DataSource(s) of the data service:
add-data-service service-name service_name (1) … add-source-group add-priority-group remote-label label (2) end-priority-group end-source-group end-data-service
1 Data service name 2 Providing DataSource label -
Add the following configuration to the providing DataSource’s configuration file:
discovery-provide-service service_name (1)
1 Data service name (identical to the service-name
value in the corresponding data service)
-
Deployment Framework deployments
Follow the instructions in this section if your deployment is managed by the Deployment Framework.
With the exception of the TransformerToLiberatorConnection and TransformerToLiberatorConnectionSSL configuration blades, static peer connectivity configuration (add-peer
) is most likely to be found in adapter blades.
Follow the steps below:
-
Deactivate the TransformerToLiberatorConnection and TransformerToLiberatorConnectionSSL blades:
$ ./dfw deactivate TransformerToLiberatorConnection $ ./dfw deactivate TransformerToLiberatorConnectionSSL
-
Remove
peer-thread-pool-size
configuration (if present):List configuration files containingpeer-thread-pool-size
$ grep -RIl --include='*.conf' 'peer-thread-pool-size' active_blades global_config/overrides
-
If a deployed adapter provides a configuration blade for Discovery deployments, activate it.
List available blades in your deployment$ ./dfw versions
-
If a deployed adapter does not provide a configuration blade for Discovery deployments, follow the instructions in Reconfiguring an adapter blade manually.
Reconfiguring an adapter blade manually
Adapters without conditional configuration for Discovery deployments require manual reconfiguration to enable peer discovery. This is a temporary requirement until the adapter’s developers provide adaptations for Discovery deployments.
Configuration file locations for a deployed adapter (blade_name) are illustrated below for your reference:
Follow the steps below:
-
Remove
add-peer
items from the adapter’s configuration files.List configuration files containingadd-peer
$ grep -RIl --include='*.conf' 'add-peer' active_blades global_config/overrides
-
Remove
peer-thread-pool-size
from the adapter’s configuration (if present).List configuration files containingpeer-thread-pool-size
$ grep -RIl --include='*.conf' 'peer-thread-pool-size' active_blades global_config/overrides
-
Examine the
add-data-service
configuration items in the adapter’s configuration. Rename anyservice-name
options that are not unique. Data services in Liberator and Transformer, for example, should not share the sameservice-name
, for example.List configuration files containingadd-data-service
$ grep -RIl --include='*.conf' 'add-data-service' active_blades global_config/overrides
-
For each configured data service in the adapter’s configuration, follow the steps below:
-
Identify the providing DataSource(s) of the data service (
remote-label
below):add-data-service service-name service_name (1) … add-source-group add-priority-group remote-label label (2) end-priority-group end-source-group end-data-service
1 Data service name 2 Providing DataSource label -
Add the following configuration to the providing DataSource’s configuration file packaged in the adapter’s blade:
discovery-provide-service service_name (1)
1 Data service name (identical to the service-name
value in the corresponding data service)
-
Consider an adapter, TradeAdapter, that serves trade channels direct to Liberator and blotter data to Liberator via Transformer.
In this specific adapter, add-peer
and add-data-service
configuration items are included in the adapter’s core configuration files and deployed under kits/TradeAdapter/Latest
:
All three configuration files above require changes, illustrated in DIFF format below:
- add-peer
- remote-label Transformer (1)
- end-peer
- add-peer
- remote-label TradeAdapter (1)
- end-peer
add-data-service
service-name trade-channel
...
add-source-group
add-priority
remote-label TradeAdapter
end-priority
end-source-group
end-data-service
add-data-service
- service-name trade-blotter
+ service-name transformer-trade-blotter (2)
...
add-source-group
add-priority
remote-label Transformer
end-priority
end-source-group
end-data-service
1 | Remove add-peer configuration |
2 | Rename the trade-blotter service — it clashes with the name of the related data service in Transformer. |
- add-peer
- remote-label Liberator (1)
- addr 192.168.1.100
- port 15001
- end-peer
- add-peer
- remote-label TradeAdapter (1)
- end-peer
add-data-service
service-name trade-blotter
...
add-source-group
add-priority
remote-label TradeAdapter
end-priority
end-source-group
end-data-service
+ discovery-provide-service transformer-trade-blotter (2)
1 | Remove add-peer configuration |
2 | Add discovery-provide-service |
- add-peer
- remote-label Transformer (1)
- addr 192.168.1.200
- port 15002
- end-peer
- add-peer
- remote-label Liberator (1)
- addr 192.168.1.100
- port 15001
- end-peer
+ discovery-provide-service trade-channel (2)
+ discovery-provide-service trade-blotter (2)
1 | Remove add-peer configuration |
2 | Add discovery-provide-service |
Next steps
If you’re following a staged migration to Discovery, move on to the next step when you’re ready:
-
Deploy Discovery server
-
Connect DataSources to Discovery
-
Migrate to Discovery licensing
-
Migrate to peer discovery