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:

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.

AdapterTransformerLiberatorConnectsConnectsConnects
With Discovery’s peer discovery, providing DataSources connect outwards to requesting DataSources

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.

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:

  1. Remove add-peer items.

    List configuration files containing add-peer
    $ grep -RIl --include='*.conf' 'add-peer'
  2. Remove peer-thread-pool-size (if present).

    List configuration files containing peer-thread-pool-size
    $ grep -RIl --include='*.conf' 'peer-thread-pool-size'
  3. Examine the add-data-service configuration items in your deployment, and rename any service-name options that are not unique.

    List configuration files containing add-data-service
    $ grep -RIl --include='*.conf' 'add-data-service'
  4. For each configured data service in your deployment, follow the steps below:

    1. 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
    2. 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:

  1. Deactivate the TransformerToLiberatorConnection and TransformerToLiberatorConnectionSSL blades:

    $ ./dfw deactivate TransformerToLiberatorConnection
    $ ./dfw deactivate TransformerToLiberatorConnectionSSL
  2. Remove peer-thread-pool-size configuration (if present):

    List configuration files containing peer-thread-pool-size
    $ grep -RIl --include='*.conf' 'peer-thread-pool-size' active_blades global_config/overrides
  3. If a deployed adapter provides a configuration blade for Discovery deployments, activate it.

    List available blades in your deployment
    $ ./dfw versions
  4. 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:

DeploymentFramework-versionactive_blades blade_name../kits/blade_name/Latestglobal_configoverrides blade_name etcConfiguration overridesLiberator etcConfiguration overridesTransformer etcConfiguration overrideskits blade_nameLatest./blade_name-version blade_name-versionDataSource etcCore configurationLiberator etcCore configurationTransformer etcCore configuration
Location of configuration files for a deployed adapter

Follow the steps below:

  1. Remove add-peer items from the adapter’s configuration files.

    List configuration files containing add-peer
    $ grep -RIl --include='*.conf' 'add-peer' active_blades global_config/overrides
  2. Remove peer-thread-pool-size from the adapter’s configuration (if present).

    List configuration files containing peer-thread-pool-size
    $ grep -RIl --include='*.conf' 'peer-thread-pool-size' active_blades global_config/overrides
  3. Examine the add-data-service configuration items in the adapter’s configuration. Rename any service-name options that are not unique. Data services in Liberator and Transformer, for example, should not share the same service-name, for example.

    List configuration files containing add-data-service
    $ grep -RIl --include='*.conf' 'add-data-service' active_blades global_config/overrides
  4. For each configured data service in the adapter’s configuration, follow the steps below:

    1. 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
    2. 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)
Example 1. Manual reconfiguration of an adapter for peer-discovery

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:

DeploymentFramework-versionkitsTradeAdapterLatest./TradeAdapter-versionTradeAdapter-versionDataSourceetc datasource.confCore configuration fileLiberatoretc rttpd.confCore configuration fileTransformeretc transformer.confCore configuration file

All three configuration files above require changes, illustrated in DIFF format below:

kits/TradeAdapter/Latest/Liberator/etc/rttpd.conf
- 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.
kits/TradeAdapter/Latest/Transformer/etc/transformer.conf
- 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
kits/TradeAdapter/Latest/etc/datasource.conf
- 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: