Loading Existing Configuration Files into Cluster Configuration
Loading Existing Configuration Files into Cluster Configuration
To load an existing cache.xml or gemfire.properties configuration file into a new cluster, use the --load-cluster-configuration-from-dir parameter when starting up the locator.
You can use this technique to migrate a single server's configuration into the cluster configuration service. To load an existing cache.xml file or cluster configuration into a cluster, perform the following steps:
- Make sure the locator is not currently running.
- Within the locator's working directory, create a cluster_config/cluster directory if the directory does not already exist.
- Copy the desired configuration files (cache.xml or gemfire.properties, or both) into the cluster_config/cluster directory.
- Rename the configuration files as follows:
- Rename cache.xml to cluster.xml
- Rename gemfire.properties to cluster.properties
- Start the locator in gfsh as
follows:
gfsh>start locator --name=<locator_name> --enable-cluster-configuration=true --load-cluster-configuration-from-dir=true
After successful startup, the locator should report that the "Cluster configuration service is up and running." Any servers that join this cluster and have --use-cluster-configuration set to true will pick up these configuration files.
Note: If you make any manual modifications to the cluster.xml or cluster.properties (or
group_name.xml or group_name.properties) files, you must stop the locator and then restart
the locator using the --load-cluster-configuration-from-dir parameter.
Direct file modifications are not picked up by the cluster configuration service without a
locator restart.