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 = "tibcosoftwareinc.jdbc.oracle.OracleDriver"
set SPOTFIREDB_URL = "jdbc:tibcosoftwareinc:oracle://<server>:<port>;SID=<SID>"
#set SPOTFIREDB_URL = "jdbc:tibcosoftwareinc:oracle://<server>:<port>;ServiceName=<pdborcl.example.com>"
#set SPOTFIREDB_DRIVER = "tibcosoftwareinc.jdbc.sqlserver.SQLServerDriver"
#set SPOTFIREDB_URL = "jdbc:tibcosoftwareinc: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
- Editing and running a basic configuration script
To use the simple-config.txt file to set up Spotfire database authentication and user directory, you must modify the script so that it works in your environment. - Script language
You can create a script that runs multiple commands.
- Editing and running a basic configuration script
To use the simple-config.txt file to set up Spotfire database authentication and user directory, you must modify the script so that it works in your environment. - Script language
You can create a script that runs multiple commands.
Parent topic: Initial configuration