Documentation/Setup/Installation

From ScriptRunner
Revision as of 20:14, 10 October 2020 by Shaun.mccreery (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Documentation :: Setup :: Installation

This provides a typical installation process, but consideration should be given for local installation standards and ways of working. Please read the Requirements page before starting to ensure you're aware of prerequisites such as having a suitable JRE installed.


Quick Start Guide


  • Run the downloaded setup.sh script. You will need to run this as sudo to allow it to set up any required user accounts, and to create directories to install the application in. You will be prompted to change the default user, installation directory and log directory should you wish to change the defaults.
    sudo sh setup.sh


  • Within the setup directory in your installation, there are .sql files that can be used to set up your database. The default location for these is /opt/smnt/scriptRunner/setup/.
    ScriptRunner only supports using DB2, MySQL or PostgreSQL. Variants of these my also work but have not been tested.
    Use the relevant script to set up your database using your database admin account.

    MySQL Example:
    mysql -h {databaseHost} -u {user} -p{password} < /opt/smnt/scriptRunner/setup/mysql_setup.sql

    DB2 Example:
    db2 CONNECT TO {yourDatabaseInstance} USER {user} USING {password}
    db2 -tf /opt/smnt/scriptRunner/setup/db2_setup.sql

    PostgreSQL Example:
    psql -h {databaseHost} -U {user} -d {database} -a -f /opt/smnt/scriptRunner/setup/postgres_setup.sql


  • Start ScriptRunner by using the init.sh script in your installation directory.
    cd /opt/smnt/scriptRunner/init.sh start


  • ScriptRunner should now be running in setup mode. This mode will allow you to input the rest of your configuration through the web interface.
    Navigate to http(s)://(yourServerName/yourServerIP):(yourPortNumber - default is 8080)/setup. So if your server has an IP of 10.0.10.1 then you can access as below:
    http://10.0.10.1:8080/setup


  • Add your database information to the Edit Database Configuration form that should now be showing and click Save.

    EditDatabaseConfiguration.PNG

    Upon saving, ScriptRunner will validate your database connection. If you receive an error, double check the information you provided and check that the host you are running ScriptRunner on can access your database.


  • Complete the Edit Global Configuration form that should now be shown and click Save. This configuration will be common to any other ScriptRunner hosts you add to your installation and can be updated at any time.

    EditGlobalConfiguration.png


  • Upon saving your Global Configuration, a new key pair is generated. This key pair is used to encrypt communications to any agents you deploy.
    Copy and save the public key shown should you plan to use ScriptRunner Agents at any point.

    SetupGeneratedKeyPair.png


  • Once prompted, click Continue. This will then take you to a login screen.

    SetupComplete.png

    If there was a problem in saving your configuration, you will see the below failed message. Click Retry to go back and review your configuration.

    SetupFailed.png


  • Login to ScriptRunner using the setup user.

    User: setup
    Password: ScriptRunner123


    You will be prompted to change the default password on first login.


  • Setup an 2FA key for the setup user.

    Information on setting up an MFA key can be found :::: HERE ::::.

    If you are unable to set up a 2FA key, then the below query can be run to disable this for the setup user.
    UPDATE SR_GROUPS SET mfaRequired = false WHERE name = 'Initial Setup Group';