Deploying Discovery

This section describes in abstract how to deploy Discovery and connect components to it.

Requirements

This is the first stage in migrating a Caplin Platform deployment to Discovery:

  • Deploy Discovery server

  • Connect DataSources to Discovery

  • Migrate to Discovery licensing

  • Migrate to peer discovery

  • Migrate to scalable data services

For information on Discovery’s software, operating system, and network requirements, see Discovery requirements.

You require a Discovery licence. If you don’t have one, please contact your Caplin account manager.

DataSource applications require Discovery to be available at a fixed network location: either a static IP address or hostname.

Deploying Discovery

To deploy Discovery, follow the steps below:

  1. Unzip the Discovery ZIP to a directory:

    $ unzip -qoa Discovery-version.zip
    Discovery-versionconfiglibsqlstaticDiscovery-server-version.jarreadme.txtdiscovery.sh
  2. In the config/application.properties file, set a cluster name unique to this deployment of the Caplin Platform. Discovery servers with like cluster names automatically cluster together.

    hazelcast.cluster-name=caplin-platform
  3. If this Discovery is part of a cluster of two Discovery servers (recommended in production), then, in the config/application.properties file, list the network locations of the cluster nodes and disable Hazelcast multicast node discovery:

    hazelcast.tcp-ip.member-list=<hostname_or_IP>[,…]
    hazelcast.multicast.enabled=false

    Do not load balance connections to a Discovery cluster. Allow DataSource clients free access to connect to both nodes.

  4. Configure a connection to a relational database server. If you are deploying this Discovery server as part of a cluster, configure all nodes in the cluster to connect to the same database.

    Discovery is configured by default to connect to an example HyperSQL Database (HSQLDB) server in Discovery’s sql/ directory. Do not use HyperSQL in production deployments.
    1. In your relational database server, create a user and database for Discovery:

      Example: Creating a user and database in MariaDB
      CREATE DATABASE discovery;
      CREATE USER 'discovery'@'%' IDENTIFIED BY 'password1234';
      GRANT ALL PRIVILEGES ON discovery.* TO 'discovery'@'%';

      Always start the relational database before starting Discovery.

    2. In Discovery’s config/application.properties file, comment out the default database connectivity options for the example HSQLDB database and add connectivity options for your database:

      Example: configuring a connection to MariaDB
      spring.datasource.driverClassName=org.mariadb.jdbc.Driver
      spring.datasource.url=jdbc:mariadb://192.168.1.200:3306/discovery
      spring.datasource.username=discovery
      spring.datasource.password=password1234
    3. Add the jar file for your database’s JDBC driver to Discovery’s lib/ directory:

      Discovery-versionlib mariadb-java-client-version.jar
      Example: Adding a JDBC driver for MariaDB
  5. Add your Discovery licence to the Discovery deployment directory and reference it in config/application.properties.

    Discovery-version discovery.lic
    config/application.properties
    license.file.path=discovery.lic

    For more information, see Discovery licensing.

If this is a production deployment, deploy a second Discovery server configured with the same hazelcast/cluster-name.

To start Discovery, see Starting and stopping Discovery.

Next steps

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