Services installed on TIBCO Spotfire Node Managers have their configurations centralised in the Spotfire Server database.
The configuration can be managed using CLI tools via the config.(bat|sh) command.
Creating a new configuration
When a node manager service is installed for the first time, it uses its default configuration in the Spotfire database. This will be used as the basis for any new configuration.
To create a new configuration (called a custom configuration), it must first be exported from the database. This is done via the export-service-config command.
The command must be run from the Spotfire server. To avoid custom configurations being accidentally deleted, it would be sensible to export these to a separate directory that's outside the Spotfire server installation.
In this example, a new directory D:\node_configs is created prior to exporting the default configuration. The default configuration is then exported as follows:-
config.bat export-service-configuration --capability=WEB_PLAYER --deployment-area=Production D:\node_configs\web_player -t mybootstrap_password
Note that the directory D:\node_configs\web_player was created automatically by the command, the deployment area is also specified.
Inside the web_player directory, we see the following directory structure
log4net.config is used to configure logging for the service. The other three configuration files are used to configure the Web Player service itself.
The exact contents of the default export for a service will vary depending on the service. The TIBCO Spotfire Server installation manual should be consulted for further explanation on the available service configurations and parameters.
Once the configuration files have been edited as desired, they must be imported back to the Spotfire database. This is done via the import-service-config command. This takes two arguments, a config name and a directory to import from.
The config name is merely a label to give the config. Rather than choosing an arbitrary name, it would be sensible to include a version number of the configuration, e.g. "WebPlayer_v1.0". This allows for better change control and allows easy regression to an earlier configuration.
config.bat import-service-config --config-name=WebPlayer_v1.0 D:\node_configs\web_player
This configuration is now stored in the database. The next step is to apply it.
Applying a custom configuration
In the Spotfire web console, under Nodes and Services the current configuration is shown. The default is simply known as "Default".
To change the service configuration, click on Edit and select the new service configuration from the drop down list.
Click Save and the configuration will be applied immediately, causing the web player service to restart.
If at some future point further edits are needed to the configuration, there are two ways this could be handled.
- Import the new service configuration using the import-service-config command as described previously, using a new config name (e.g. WebPlayer_1.1). Then apply this as above.
- Import the new configuration under the same name (WebPlayer_1.0). This will cause the Web Player service to show an alert in the console that a new configuration is available.
Which method to use will be left to the system administrator. One advantage of including a version number in the configuration name is that it allows easy regression to an earlier configuration. Changes between versions should be documented. Click Update service config to apply the new configuration.
Working with service configurations
To view which service configurations are available, use the list-service-configs command. This produces output such as below:
Note that the output is split between custom service configurations and default service configurations. These were described at the beginning of this article. A fresh Spotfire installation will have no custom service configurations.
To delete a service configuration, use the delete-service-config command
config.sh delete-service-config --config-name=WebPlayer_v1.0 -t bludn0cK config.sh delete-service-config --config-name=WebPlayer_v1.0 -t mybootstrap_password
To set a service configuration to a particular service (web player, automation etc), use the set-service-config command. The service ID of the service needs to be known before using this command. This can be seen in the ID field of the Nodes and Services page, or it can be obtained using the list-services command.
config.sh set-service-config --config-name=WebPlayer_v1.0 --service-id=8d830b26-5367-4d69-a0cc-b203c41ed03e -t mybootstrap_password
It may be more convenient to use the web GUI to apply service configurations, as described earlier.