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. Make the following changes or additions to Liberator’s rttpd.conf override file:

    global_config/overrides/servers/Liberator/etc/rttpd.conf
    datasrc-local-label       label (1)
    datasrc-public-addresses  address(2)
    1 A unique identifier for this Liberator (see datasrc-local-label).
    2 [Liberator 7.1.27+] A list of addresses at which peers and Discovery can connect to this Liberator. See datasrc-public-addresses
  6. 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.

  7. Restart all Caplin Platform components:

    $ ./dfw start
Manual configuration

Make the following changes to Liberator’s etc/rttpd.conf configuration file:

  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 enable Liberator to connect 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 Liberator (see datasrc-local-label).
  4. Add configuration to enable peers and Discovery to connect to Liberator:

    datasrc-public-addresses  address(1)
    1 [Liberator 7.1.27+] A list of addresses at which peers and Discovery can connect to this Liberator. See datasrc-public-addresses
  5. If you are licensing this Liberator through Discovery, remove the licence file for this Liberator from Liberator’s etc/ directory. For more information on licensing models in Discovery deployments, see Discovery licensing.

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. Deactivate the TransformerJMX blade if it is enabled:

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

    $ ./dfw activate TransformerDiscovery TransformerSockmon
  5. Make the following changes or additions to Transformer’s transformer.conf override file:

    global_config/overrides/servers/Transformer/etc/transformer.conf
    datasrc-local-label label (1)
    datasrc-public-addresses  address(2)
    1 A unique identifier for this Transformer (see datasrc-local-label). This value is displayed in the Discovery web interface and referenced by the remote-label and remote-label-regex options in data service configurations.
    2 [Transformer 7.1.17+] A list of addresses at which peers and Discovery can connect to this Transformer. See datasrc-public-addresses
  6. 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.

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

  8. Restart all Caplin Platform components:

    $ ./dfw start
Manual configuration

Make the following changes to Transformer’s etc/transformer.conf configuration file:

  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 Transformer. 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. Add configuration to enable Discovery and DataSource peers to connect to Transformer:

    datasrc-public-addresses  address(1)
    1 [Transformer 7.1.17+] A list of addresses at which peers and Discovery can connect to this Transformer. See datasrc-public-addresses
  5. If you are licensing this Transformer through Discovery, remove the licence file for this Transformer from Transformer’s etc/ directory. For more information on licensing models in Discovery deployments, see Discovery licensing.

  6. 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. Add configuration to enable Discovery and DataSource peers to connect to this DataSource:

    datasrc-public-addresses  address(1)
    1 [DataSource for Java 7.1.20+] A list of addresses at which peers and Discovery can connect to this DataSource. See datasrc-public-addresses
  6. Restart all Caplin Platform components:

    $ ./dfw start
Manual configuration

The instructions below are for a Java DataSource that is not packaged as a Deployment Framework kit.

Follow the steps below:

  1. Stop the adapter if it is running.

  2. In the adapter’s datasource.conf file, add the following configuration:

    datasource.conf
    discovery-addr         address(1)
    discovery-cluster-name name (2)
    datasrc-local-label    label (3)
    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 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.
  3. Enable the adapter’s JMX monitoring interface:

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

      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 startup 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.

  4. In the adapter’s datasource.conf file, add the following configuration to enable Discovery and DataSource peers to connect to this DataSource:

    datasrc-public-addresses  address(1)
    1 [DataSource for Java 7.1.20+] A list of addresses at which peers and Discovery can connect to this DataSource. See datasrc-public-addresses
  5. Restart the adapter

Next steps

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


See also: