Jump to content
  • Spotfire® Scripted and Silent Installation


    Introduction

    A common requirement in the field is to provide an end-to-end installation process that can proceed without human interaction.  The following sections provide examples and utilities to provide scripted installation and upgrade.

    The scripts provided show a simple installation:

    • SQL Server Database using Username/Password
    • Spotfire Database Authentication

    However, the same techniques can be applied to more complex cases such as Kerberos setup or Unix TSS installation.

    NOTE: The silent installation script parameters changed slightly in Spotfire version 7.13.  The page has been updated based on scripts needed for version 10.3.4.  The following are the high-level changes with this latest version (December 2019 based on Spotfire 10.3.4):

    • The silent installation commands for Spotfire Server and Node Manager changed in version 7.13.
    • With version 10.3.0 and above, the Spotfire Server installation directory structure has changed slightly with the Spotfire Server config commands moved from tomcat/bin to tomcat/spotfire-bin.
    • The update Node Manager services process can now be done using the update utility provided with the scripts.

    Create Spotfire Server Database

    The standard install files for Spotfire Server include a script for generating the required database instance and schema.

    This example uses a SQL Server database but the techniques described will work equally well for Oracle.

    For more information on setting up a Spotfire Database see the following  sections in the Spotfire Server Installation and Administration Guide:


    Install Spotfire Server

    The steps to install TSS are as follows:

    1 - Perform a silent install

    The parameters for performing a silent installation can be found in the section "Installing the Spotfire Server files (silently on Windows)" of the Spotfire Server Installation and Administration Guide.

    Starting with version 10.2.0, the DOWNLOAD_THIRD_PARTY parameter is no longer needed for NTLM authentiation.  The components for NTLM authentication are now included in the internal Spotfire files.  The installation parameters for the silent install changed in Spotfire 7.13 and above.  This example is for Spotfire Server 10.3.4 so it does not include the DOWNLOAD_THIRD_PARTY parameter:

    setup-win64.exe 
        INSTALLDIR=C:\tibco\tss\<version> 
        SPOTFIRE_WINDOWS_SERVICE=Create 
        SERVER_FRONTEND_PORT=80 
        SERVER_BACKEND_REGISTRATION_PORT=9080 
        SERVER_BACKEND_COMMUNICATION_PORT=9443 
        NODEMANAGER_HOST_NAMES= 
        -silent -log TSS_Install.log
    By convention, a 3 or 4-digit version number should be used, so 7.11.0, 10.3.4, 10.6.0 etc.  This mirrors the behavior of the installer when used manually.

    2 - Setup a TSS Configuration

    The config tool that is included with TSS allows the execution of multiple configuration commands using the "run" option.  The following is an example simple configuration script.

    # Run this script from the command-line using the following command:
    # config run <filename>.txt
    
    # Before using this script you need to set the variables below:
    set DB_DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
    set DB_URL = "jdbc:sqlserver://localhost:1433;DatabaseName=spotfire_server"
    set DB_USER = "spotfire_server"
    set DB_PASSWORD = "spotfire_server"
    set CONFIG_TOOL_PASSWORD = "spotfireadmin"
    set ADMIN_USER = "spotfireadmin"
    set ADMIN_PASSWORD = "spotfireadmin"
    
    echo Creating the database connection configuration
    bootstrap --no-prompt --driver-class="${DB_DRIVER}" --database-url="${DB_URL}" --username="${DB_USER}" --password="${DB_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="Initial Configuration"
    echo
    
    echo Creating the '${ADMIN_USER}' user to become administrator
    create-user --tool-password="${CONFIG_TOOL_PASSWORD}" --username="${ADMIN_USER}" --password="${ADMIN_PASSWORD}"
    echo
    
    echo Promoting the user '${ADMIN_USER}' to administrator
    promote-admin --tool-password="${CONFIG_TOOL_PASSWORD}" --username="${ADMIN_USER}"
    echo
     

    This script can be run using the following command line (note in Spotfire 10.3.0 and above the location of the Spotfire Server config command line has changed from tomcat/bin to tomcat/spotfire-bin):

     c:\tibco\tss\10.3.4\tomcat\spotfire-bin\config run simple-config.txt
     

    Note that these scripts contain embedded passwords.  This can be avoided by using common scripting techniques to decrypt the passwords before execution.

    3 - Upload the Deployment Files

    The deployment file is the .sdn file that is contained in the Deployment Kit download.  You will need to reference the full path to this file.

    config update-deployment --bootstrap-config <TSS Install Dir>\tomcat\webapps\spotfire\WEB-INF\bootstrap.xml 
                             --tool-password spotfireadmin 
                             --area Production 
                             <File Path>\Spotfire.Dxp.sdn
     

    4 - Set Auto Trust

    The Auto Trust feature is enabled to allow the automatic trust of the node when the node manager installation is completed.  The same procedure can be used to disable auto trust once the installation is complete if required.

    export-config --bootstrap-config <TSS Install Dir>\tomcat\webapps\spotfire\WEB-INF\bootstrap.xml 
                  --tool-password spotfireadmin 
                  <Working Folder>\configuration.xml
    
    set-config-prop --configuration <Working Folder>\configuration.xml 
                    --bootstrap-config <TSS Install Dir>\tomcat\webapps\spotfire\WEB-INF\bootstrap.xml
                    --name=security.trust.auto-trust.enabled 
                    --value=true
    
    import-config --bootstrap-config <TSS Install Dir>\tomcat\webapps\spotfire\WEB-INF\bootstrap.xml 
                  --tool-password spotfireadmin 
                  --comment "Set security.trust.auto-trust.enabled to True" 
                  --delete-file true 
                  <Working Folder>\configuration.xml
     

    This file can be run as follows:

     <TSS Install Dir>\tomcat\spotfire-bin\config run set-auto-trust.txt
     

    As mentioned previously, starting with Spotfire Server 10.3.0, the config command has moved to the tomcat/spotfire-bin directory.

    5 - Start the TSS Service

    The windows "net start" command can be used to start the TSS Service.  Usually the service name is TSS followed by the 3 or 4 digit version code.  For example the following command is for Spotfire 10.3.4:

     net start "Tss1034"
     

    Install Spotfire Node Manager

    The steps to install TSNM are as follows:

    1 - Perform a silent install

    The parameters for performing a silent installation can be found in the section "Installing a Node Manager (silently on Windows)" of the Spotfire Server Installation and Administration Guide.  The examples here show installing the Node Manager on Windows.  Starting with Spotfire 10.0.0, the Node Manager is supported on Linux for the TERR as a Service service.  The Windows Node Manager supports the Web Player, Automation Services and TERR as a Service services.

    Node Manager install script for 7.13 and later versions:

    nm-setup.exe 
        INSTALLDIR="C:\tibco\tsnm\<version>" 
        NODEMANAGER_REGISTRATION_PORT=7080 
        NODEMANAGER_COMMUNICATION_PORT=7443 
        SERVER_NAME=<Spotfire Server Name>
        SERVER_BACKEND_REGISTRATION_PORT=9080 
        SERVER_BACKEND_COMMUNICATION_PORT=9443 
        NODEMANAGER_HOST_NAMES=<Node Manager Host Names>
        -silent -log TSS_NM_install.log
     

    The <version> is the 3 or 4 digit version code, e.g. 7.11.0, 10.3.4, 10.6.0, etc.  The <Spotfire Server Name> needs to be the machine name of Spotfire Server that matches how Spofire Server names itself and is accessible via DNS.  The <Node Manager Host Names> is usually a comma separated list that includes the node manager machine name and IP address, and Spotfire Server needs to be able to access the Node Manager via the given names.

    2 - Install a Default Configuration File

    When first trusted, the Node Manager can execute the contents of a configuration file that will create Services and Instances.  Full details can be found in the section "Automatically installing services and instances" of the Spotfire Server Installation and Administration Guide.

    Here is an example of such a file that creates a single web player instance.  A more complex setup could include multiple Services and Instances.

    {
       "services" : [ {
               "capability" : "WEB_PLAYER",
               "deploymentArea" : "Production",
               "configuration" : "Default",
               "customName" : "My Web Player Service",
               "instances" : 1,
               "port" : 9501
               }
        ],
        "strict" : "false"
    }
     

    This file is copied to the Node Manager "config" folder:

     copy default.conf <TSNM Install Dir>\nm\config
     

    The default.conf file applies to an individual Node Manager instance, so in installations with multiple Node Managers, multiple individual default.conf files with specific contents will be required.

    3 - Start the TSNM Service

    The windows "net start" command can be used to start the TSNM Service.  Usually the service name is WpNmRemote followed by the 3 or 4 digit version code.  For example the following command is for Spotfire 10.3.4:

     net start "WpNmRemote1034"
     

    On startup, the Node Manager will create and start the Services and Instances listed in the default.conf file.  This can take a few minutes depending upon the number of items being created.


    Apply Hotfix to Spotfire Server

    NOTE: Starting with 10.3.0 most updates to Spotfire Server will be provided as Service Packs and not hotfixes, therefore this process may not be needed.  The process for upgrading to Service Packs (such as 10.3.0 to 10.3.1) is now the same as upgrading to new versions (such as 10.2.0 to 10.3.0) - for upgrade instructions, please refer to the section Upgrading Spotfire in the Spotfire Server manual. After upgrading to the latest Service Pack, you only need to apply any hotfixes available for that Service Pack version.

    The download from Support for each Spotfire Server Hotfix includes a JAR file that can be run in silent or console mode to apply the Hotfix.  Each Hotfix may contain extra steps such as running a database script, so it is not possible to cover all possible scenarios.  However in general the steps are as follows:

    1 - Stop the TSS Service

    The windows "net stop" command can be used to stop the TSS Service.  Usually the service name is TSS followed by the 3 digit version code.  For example the following command is for Spotfire 7.9.0:

     net stop "Tss790"
     

    2 - Run the Hotfix Utility

    The following command runs the Hotfix Utility in silent or console mode using the JDK that is included with Spotfire Server.

     <TSS Install Dir>\jdk\bin\java -jar hotfix.jar /console <TSS Install Dir>
     

    3 - Start the TSS Service

    The windows "net start" command can be used to start the TSS Service.  Usually the service name is TSS followed by the 3 digit version code.  For example the following command is for Spotfire 7.9.0:

     net start "Tss790"
     

    Apply Hotfix to Node Manager

    The process for applying the Hotfix to Node Manager involves uploading a new .sdn deployment file and then instructing the Node Manager to upgrade itself.  A utility is provided that allows the Upgrade of the Node Manager and Upgrade of the Node Manager services to be scripted instead of having to use the Web Administration GUI.  The latest update to the utility (December 2019) provides the ability to update any Node Manager services instead of having to delete and recreate them.  One no longer needs to delete the services and copy the default.conf file.  The services can now be updated using the utility provided.  The client updates are pushed to the existing services.

    1 - Upload the Client Hotfix deployment file

    Spotfire Client Hotfixes are cumulative so you will only have to upload the latest Hotfix .sdn file.  Starting in Spotfire 10.3.0, the Spotfire Server config command line is now in tomcat/spotfire-bin instead of tomcat/bin.

    <TSS Install Dir>\tomcat\spotfire-bin\config update-deployment
         --bootstrap-config <TSS Install Dir>\tomcat\webapps\spotfire\WEB-INF\bootstrap.xml
         --tool-password spotfireadmin 
         --area Production
         <Client Hotfix SDN File Path>
     

    2 - Upload the Node Manager Hotfix deployment file

    The Node Manager Hotfix file usually has the name Spotfire.Dxp.NodeManager<Platform>.sdn.  This example is for Windows:

    <TSS Install Dir>\tomcat\spotfire-bin\config update-deployment
       --bootstrap-config <TSS Install Dir>\tomcat\webapps\spotfire\WEB-INF\bootstrap.xml
       --tool-password spotfireadmin
       --area Production
       <File Path>\Spotfire.Dxp.NodeManagerWindows.sdn
     

    3 - Restart the TSS Service

    When deployment files are uploaded using the config tool as opposed to the Web Administration GUI, it can take Spotfire Server a few minutes to recognize the new files.  A workaround to this is to stop and start the Spotfire Server so that it recognizes the new files on startup.  More information on this issue can be found in the following Support Knowledge Base Article: https://support.tibco.com/s/article/Spotfire-Analyst-does-not-recognize-newly-deployed-package-if-deployed-using-update-deployment-command.

    The windows "net stop" and "net start" commands can be used to restart the TSS Service.  Usually the service name is TSS followed by the 3 digit version code.  For example the following commands are for Spotfire 10.3.4:

     net stop "Tss1034" timeout /t 30 net start "Tss1034" timeout /t 30
     

    A wait time of 30 seconds is included to allow the shutdown and startup commands to complete.  This may need to be increased in some situations.

    4 - Update the Node Manager

    The UpdateNodeManager utility is used to command the Node Manager to upgrade itself.  The "wait true" option instructs the utility not to exit until the upgrade has completed.  For a more detailed description of the UpdateNodeManager utility, see the section at the bottom of this article.

    <File Path>\UpdateNodeManager.exe
        update
        -server localhost
        -port 80
        -user spotfireadmin
        -password dPe3ptKiFRpXQkY7GI8SUA==
        -wait true
        -debug true
     

    The encrypted password for the command can be generated as follows:

     <File Path>\UpdateNodeManager.exe encrypt <password>
     

    The tool will respond with the encypted form of the password:

     Encrypted Password: dPe3ptKiFRpXQkY7GI8SUA==
     

    5 - Update the Node Manager Services

    The UpdateNodeManager utility is used to upgrade the Node Manager Services, e.g. Web Player, Automation Serivces, etc. to upgrade themselves.  The "wait true" option is currently ignored for Services.  For a more detailed description of the UpdateNodeManager utility, see the section at the bottom of this article.

    <File Path>\UpdateNodeManager.exe
        updateservices
        -server localhost
        -port 80
        -user spotfireadmin
        -password dPe3ptKiFRpXQkY7GI8SUA==
        -wait true
        -debug true
     

    Complex Installations

    The above steps are based on a single Spotfire Server installation with a single Node Manager.  For more complex scenarios it will be necessary to run the set of steps on each server in the installation.  Also default.conf files will need to be created for each Node Manager.

     


    UpdateNodeManager Utility

    This utility is a .NET executable that carries out the tasks of removing all existing Services and Instances from an installation, Updating the Node Manager to the latest hotfix level and updating any existing Node Manager services to the latest hotfix level.  This is not a supported Spotfire Product so any questions should be posted in the Answers section of Spotfire Community.

    The utility also encrypts passwords that are needed for the above activites, to avoid having passwords stored in batch files in plain text.

    For further information on the available options and their syntax, run the UpdateNodeManager.exe executable without any parameters:

    UpdateNodeManager.exe
    
    Usage: UpdateNodeManager <Command> [options]
    
       where Command is "update", "updateservices", "clean", "encrypt" or "help"
    
       and options are:
    
     <password>               - Password to Encrypt
     -url      <spotfire url> - http(s)://<server>:<port>/spotfire
     -server   <server>       - Spotfire Server Address
     -port     <port>         - Spotfire Server Port
     -user     <user name>    - Spotfire Server User Name
     -password <password>     - Encrypted Spotfire Server Password
     -wait     <wait>         - Set to true to wait for operations to complete
     -debug    <debug>        - Set to true to enable debug output
    
    Press Enter/Return to Exit...
     

    Files

    The attached zip file contains a set of example files including the UpdateNodeManager.exe utility.  These are provided as examples only and should not be taken to imply any best practices in terms of port numbers, usernames etc.

    You will most likely need to modify these files before using them in your environment.  The latest zip file is from December 2019.

    scriptedinstall_10.3_2020_09.zip

    scriptedinstall_04032018_legacy_0.zip


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...