Update and configure definition file properties
Definitions properties configure the OpsCenter updater, which automatically downloads and updates the definition files that enable support for different releases of DataStax Enterprise.
If an update is found, a remote file named definition_files.tgz is downloaded and applied to the appropriate definitions directory.
The OpsCenter machine must have an internet connection to automatically update the definitions files. Alternatively, you can manually update definition files with an API call or manually update definition files for offline OpsCenter instances.
Definition files configuration properties
Configure the definition file properties in the opscenterd.conf file.
The location of the opscenterd.conf file depends on the type of installation:
-
Package installations:
/etc/opscenter/opscenterd.conf -
Tarball installations:
INSTALL_DIRECTORY/conf/opscenterd.conf
Enable or disable the automatic update. Set the frequency with which to check for definition file updates. Override the default download filename, directory, or port.
- [definitions] use_ssl
-
Specifies whether SSL should be used to get definition file updates. This option requires OpenSSL on the OpsCenter host. The default value is
True. - [definitions] definitions_dir
-
The file system location where definition files are stored. The default location is
/var/lib/opscenter/definitionsfor package installations andINSTALL_DIRECTORY/definitionsfor tarball installations. - [definitions] auto_update
-
Specifies whether OpsCenter should automatically attempt to periodically update the definition files. The default value is
True. - [definitions] download_host
-
The host that definition file update requests will be made to. The default host is
opscenter.datastax.com. - [definitions] download_port
-
The port used to request definition file updates on
download_host. The default port is 443. - [definitions] download_filename
-
The name of the tar file on the
download_hostthat contains definition file updates. The default name isdefinitions_files.tgz. - [definitions] hash_filename
-
The name of the hash file on the
download_hostused to determine if the definition file requires an update. The default file isversion.md5. - [definitions] sleep
-
The duration in seconds between checks to update the definition files. The default time is 3600 seconds (1 hour).
Modify the update interval
The definition files are automatically updated every hour by default.
Modify the default interval by setting the sleep option in the [definitions] section of opscenterd.conf.
The sleep interval should be specified in seconds.
For example, set the update interval to 7200 seconds (every 2 hours):
[definitions]
sleep = 7200
Disable automatic updates of definitions files
Disable the automatic update process by setting auto_update to False in the [definitions] section of opscenterd.conf:
[definitions]
auto_update = False
Manually update definition files with an API call
You can manually trigger definition updates using the OpsCenter API, whether or not automatic updates are enabled:
-
Check for definition updates, and, if any are available, download them:
curl -X GET http://my.opscenter.host:8888/rc/definition/updateThe response is
trueif an update was found and downloaded. The response isfalseif no update was found. -
restart OpsCenter to apply the updated definitions.
Manually update definition files for offline OpsCenter instances
If the OpsCenter machine does not have an internet connection, you can manually update the definitions.
-
Download the definitions tarball for your version of OpsCenter:
https://opscenter.datastax.com/definitions/6.8.39/definition_files.tgzReplace
6.8.39with your currently installed version of OpsCenter. -
If applicable, remove any existing files in the
definitionsdirectory. The default location is/var/lib/opscenter/definitionsfor package installations andinstall_directory/definitionsfor tarball installations. The location can be customized with thedefinitions_dirproperty inopscenterd.conf. -
Unpack the
definitions_filestarball into thedefinitionsdirectory. -
restart OpsCenter to apply the updated definitions.