Spotfire® Server and Environment - Installation and Administration

Scripting a configuration

For more experienced administrators, Spotfire Server includes two prepared configuration scripts that you can use to set up simple configurations. You can also create and run your own scripts.

  • The simple-config.txt file sets up Spotfire database authentication and the user directory.
  • The simple-config-ldap.txt file sets up LDAP authentication and the user directory.

These scripts are located in the <installation dir>/tomcat/spotfire-bin folder.

Example: The simple-config.txt file

The simple-config.txt file, shown below, is divided into three sections:
  • The first two lines describe how the script is executed.
  • The second section is a list of the variables that are used by the commands.
  • The rest of the script contains the commands.
# Run this script from the command-line using the following command:
# config run simple-config.txt

# Before using this script you need to set the variables below:
set SPOTFIREDB_DRIVER = "oracle.jdbc.OracleDriver"
set SPOTFIREDB_URL = "jdbc:oracle:thin:@<server>:<port>:<SID>"
#set SPOTFIREDB_URL = "jdbc:oracle:thin:@//<host>[:<port>]/<service_name>"
#set SPOTFIREDB_DRIVER = "jdbc:sqlserver.SQLServerDriver"
#set SPOTFIREDB_URL = "jdbc:sqlserver://<server>:<port>;DatabaseName=<database name>"
#set SPOTFIREDB_DRIVER = "org.postgresql.Driver"
#set SPOTFIREDB_URL = "jdbc:postgresql://<server>:<port>/<database name>"
set SPOTFIREDB_USERNAME = "<db username>"
set SPOTFIREDB_PASSWORD = "<db password>"
set CONFIG_TOOL_PASSWORD = "<config tool password>"
set ADMIN_USERNAME = "<admin username>"
set ADMIN_PASSWORD = "<admin password>"

echo Creating the database connection configuration
bootstrap --no-prompt --driver-class="${SPOTFIREDB_DRIVER}" --database-url=\ "${SPOTFIREDB_URL}" \
  --username="${SPOTFIREDB_USERNAME}" --password="${SPOTFIREDB_PASSWORD}" --tool-password="${CONFIG_TOOL_PASSWORD}"
echo

echo Creating the default configuration
create-default-config
echo

echo Importing the configuration
import-config --tool-password="${CONFIG_TOOL_PASSWORD}" --comment=\ "First config"
echo

echo Creating the '${ADMIN_USERNAME}' user to become administrator
create-user --tool-password="${CONFIG_TOOL_PASSWORD}" --username=\ "${ADMIN_USERNAME}" --password="${ADMIN_PASSWORD}"
echo

echo Promoting the user '${ADMIN_USERNAME}' to administrator
promote-admin --tool-password="${CONFIG_TOOL_PASSWORD}" --username=\ "${ADMIN_USERNAME}"
echo