Connecting DataSources to Discovery

This page describes how to connect DataSource applications to a Discovery server.

The instructions below assume you are migrating an existing deployment to Discovery. If you are preparing a deployment to a container-orchestration platform, such as Kubernetes, read this page in conjunction with Example deployment to Kubernetes.

Requirements

The instructions on this page assume that you have already completed the first stage in the migration path below:

  • Deploy Discovery server

  • Connect DataSources to Discovery

  • Migrate to Discovery licensing

  • Migrate to peer discovery

  • Migrate to scalable data services

Connecting a Liberator to a Discovery server

Requires: Liberator 7.1.25+

Deployment Framework managed configuration

Follow the steps below:

  1. Stop all Caplin Platform components:

    $ ./dfw stop
  2. In the Deployment Framework’s global_config/environment.conf file, set the following variables:

    global_config/environment.conf
    define DISCOVERY_ADDR address(1)
    define DISCOVERY_CLUSTER_NAME name (2)
    1 A space-separated list of hostnames or IP addresses of Discovery servers in your deployment. See discovery-addr.
    2 The name of the Discovery cluster in your deployment. See discovery-cluster-name.
  3. Deactivate the LiberatorJMX blade if it is enabled:

    $ .dfw deactivate LiberatorJMX
  4. Activate the LiberatorDiscovery and LiberatorSockmon configuration blades:

    $ ./dfw activate LiberatorDiscovery LiberatorSockmon
  5. In the Liberator’s rttpd.conf override file, set datasrc-local-label to a unique identifier for this Liberator:

    global_config/overrides/servers/Liberator/etc/rttpd.conf
    datasrc-local-label name
  6. In the Liberator’s rttpd.conf override file, set datasrc-interface to the host IP address

  7. If you are licensing this Liberator through Discovery, remove the licence file for this Liberator from the Deployment Framework’s global-config/licenses directory.

    For more information on licensing models in Discovery deployments, see Discovery licensing.

  8. Restart all Caplin Platform components:

    $ ./dfw start
Manual configuration

Follow the steps below:

  1. Delete rmi-registry-port and rmi-client-port configuration items:

    rmi-registry-port port
    rmi-client-port   port
  2. Add Sockmon configuration items:

    monitor-moddir                  %r/lib
    monitor-module                  sockmon
    sockmon-port                    14301
    process-usage-period            10.0
    object-monitoring-interval      15.0
    session-monitoring-interval     15.0
    
    add-monuser
        user                        admin
        pass                        admin
    end-monuser
  3. Add configuration to connect Liberator to Discovery:

    discovery-addr          address(1)
    discovery-cluster-name  name      (2)
    datasrc-local-label     label     (3)
    1 A space-separated list of the hostnames or IP addresses of Discovery servers in your deployment. See discovery-addr.
    2 The name of the Discovery cluster in your deployment. See discovery-cluster-name
    3 A unique identifier for this DataSource component. This value is displayed in the Discovery web interface and referenced by the remote-label and remote-label-regex options in data service configuration. See datasrc-local-label.

Connecting a Transformer to a Discovery server

Requires: Transformer 7.1.14+

Deployment Framework managed configuration

Follow the steps below:

  1. Stop all Caplin Platform components:

    $ ./dfw stop
  2. In the Deployment Framework’s global_config/environment.conf file, set the following variables:

    global_config/environment.conf
    define DISCOVERY_ADDR address(1)
    define DISCOVERY_CLUSTER_NAME name (2)
    1 A space-separated list of hostnames or IP addresses of Discovery servers in your deployment. See discovery-addr.
    2 The name of the Discovery cluster in your deployment. See discovery-cluster-name.
  3. In the Transformer’s transformer.conf override file, set datasrc-local-label to a unique identifier for this Transformer:

    global_config/overrides/servers/Transformer/etc/transformer.conf
    datasrc-local-label name
  4. Deactivate the TransformerJMX blade if it is enabled:

    $ .dfw deactivate TransformerJMX
  5. Activate the TransformerDiscovery and TransformerSockmon configuration blades:

    $ ./dfw activate TransformerDiscovery TransformerSockmon
  1. Remove all configuration related to Transformer clustering. With Discovery, Transformer clustering is managed by Discovery and requires no configuration. For examples of traditional Transformer clustering configuration to remove, see Setup a cluster of Transformers.

  2. If you are licensing this Transformer through Discovery, remove the licence file for this Transformer from the Deployment Framework’s global-config/licences directory.

  3. Restart all Caplin Platform components:

    $ ./dfw start
Manual configuration

Follow the steps below:

  1. Delete rmi-registry-port and rmi-client-port configuration items:

    rmi-registry-port port
    rmi-client-port   port
  2. Add Sockmon configuration items:

    monitor-moddir                  %r/lib
    monitor-module                  sockmon
    sockmon-port                    14301
    process-usage-period            10.0
    object-monitoring-interval      15.0
    session-monitoring-interval     15.0
    
    add-monuser
        user                        admin
        pass                        admin
    end-monuser
  3. Add configuration to connect Transformer to Discovery:

    discovery-addr          address(1)
    discovery-cluster-name  name      (2)
    datasrc-local-label     label     (3)
    1 A space-separated list of the hostnames or IP addresses of Discovery servers in your deployment. See discovery-addr.
    2 The name of the Discovery cluster in your deployment. See discovery-cluster-name
    3 A unique identifier for this DataSource component. This value is displayed in the Discovery web interface and referenced by the remote-label and remote-label-regex options in data service configuration. See datasrc-local-label.
  4. Remove all configuration related to Transformer clustering. With Discovery, Transformer clustering is managed by Discovery and requires no configuration. For examples of traditional Transformer clustering configuration to remove, see Setup a cluster of Transformers.

Connecting a Java DataSource to a Discovery server

Requires: A Java DataSource built with DataSource for Java 7.1.18+

Deployment Framework managed configuration

The instructions below are for a Java DataSource with no configuration blades for Discovery or JMX.

Follow the steps below:

  1. Stop all Caplin Platform components:

    $ ./dfw stop
  2. In the Deployment Framework’s global_config/environment.conf file, set the following variables:

    global_config/environment.conf
    define DISCOVERY_ADDR         address(1)
    define DISCOVERY_CLUSTER_NAME name (2)
    1 A space-separated list of hostnames or IP addresses of Discovery servers in your deployment. See discovery-addr.
    2 The name of the Discovery cluster in your deployment. See discovery-cluster-name.
  3. In the adapter’s datasource.conf override file, add the following configuration:

    global_config/overrides/<datasrc_name>/etc/datasource.conf
    discovery-addr         ${DISCOVERY_ADDR} (1)
    discovery-cluster-name ${DISCOVERY_CLUSTER_NAME} (2)
    datasrc-local-label    name (3)
    1 See discovery-addr
    2 See discovery-cluster-name
    3 A unique identifier for this DataSource component. This value is displayed in the Discovery web interface and referenced by the remote-label and remote-label-regex options in data service configuration. See datasrc-local-label.
  4. Enable the adapter’s JMX monitoring interface:

    1. Add the following configuration to the Java Adapter’s datasource.conf override file:

      global_config/overrides/<datasrc_name>/etc/datasource.conf
      # RMI registry port
      rmi-registry-port  port_number (1)
      
      # RMI client port
      rmi-client-port  port_number (2)
      
      add-monuser
          user  admin
          pass  admin
      end-monuser
      1 Set this to a free port number on the host. See rmi-registry-port.
      2 Set this to a free port number on the host. See rmi-client-port.
    2. Add the following option to the java command in the Java adapter’s bin/start-jar.sh script:

      -Djava.rmi.server.hostname=$(hostname -I | cut -d' ' -f1)

    For more information on enabling JMX in a Java adapter, see Activating JMX in a Java DataSource.

  5. Restart all Caplin Platform components:

    $ ./dfw start

Next steps

If you’re following a staged migration to Discovery, move on to the next step when you’re ready:


See also: