Deploying Discovery
This section describes in abstract how to deploy Discovery and connect components to it.
For specific examples, see Example deployment to a single host and Example deployment to Kubernetes.
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:
-
Unzip the Discovery ZIP to a directory:
$ unzip -qoa Discovery-version.zip
-
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
For more information, see hazelcast.cluster-name in Discovery server configuration.
-
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
For more information, see hazelcast.tcp-ip.member-list and hazelcast.multicast.enabled in Discovery server configuration.
Do not load balance connections to a Discovery cluster. Allow DataSource clients free access to connect to both nodes.
-
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.-
In your relational database server, create a user and database for Discovery:
Example: Creating a user and database in MariaDBCREATE DATABASE discovery; CREATE USER 'discovery'@'%' IDENTIFIED BY 'password1234'; GRANT ALL PRIVILEGES ON discovery.* TO 'discovery'@'%';
Always start the relational database before starting Discovery.
-
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 MariaDBspring.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
-
Add the jar file for your database’s JDBC driver to Discovery’s
lib/
directory:Example: Adding a JDBC driver for MariaDB
-
-
Add your Discovery licence to the Discovery deployment directory and reference it in
config/application.properties
.config/application.propertieslicense.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:
-
Deploy Discovery server
-
Migrate to Discovery licensing
-
Migrate to peer discovery
-
Migrate to scalable data services