Install Squash TM
Warning
The prerequisites listed on the page System Requirements and Prerequisites must be respected.
You can find the Squash TM app in various packages:
- a Windows installer that allows for a quick install for demonstration purposes only;
- a universal package compatible with Windows, and Linux (
.zip
ortar.gz
); - a Docker image.
Definition of the secret-related properties
Before using Squash TM in production, the following properties must be configured (see here):
squash.crypto.secret
: this defines the secret used to encrypt stored passwords.
Squash TM is currently delivered with a default value, this one must be changed.
(Changing the property later will result in the stored passwords becoming unusable.)squash.rest-api.jwt.secret
: this defines the secret used to generate API tokens and is therefore necessary to use them.
The use of API tokens is optional for now (it will be mandatory in the future).
Squash Orchestrator uses API tokens to communicate with Squash TM, so this property must be set if you plan to run automated tests.
(Changing this property later will make previously issued tokens unusable.)
Installation on Linux
Install with Linux Tarball
To install Squash TM using the Linux tarball:
-
Extract Squash TM's
.tar.gz
archive in/opt
:tar -zxvf archivexsquashtm.tar.gz
-
Create a user and a group dedicated to Squash TM:
adduser --system --group --home /opt/squash-tm squash-tm
-
Define that user as the owner of their folder and files:
chown -R squash-tm:squash-tm /opt/squash-tm
-
Populate the database using the scripts located in
/opt/squash-tm/database-scripts
.For a first install, run the script
<database>-full-install-version-8.X.X.RELEASE.sql
corresponding to the DBMS with Squash TM's version number.
For a version upgrade, run the upgrade scripts<database>-upgrade-to-X.X.X.sql
corresponding to the DBMS in order until you reach the target version. -
Make
startup.sh
executable:chmod +x /opt/squash-tm/bin/startup.sh
-
In the file
bin/startup.sh
, enter the login information for the database:DB_URL="jdbc:mariadb://localhost:3306/squashtm" or "jdbc:postgresql://localhost:5432/squashtm" DB_TYPE="mariadb" or "postgresql" DB_USERNAME="squash-tm" DB_PASSWORD="password"
-
Start Squash TM:
cd /opt/squash-tm/bin nohup ./startup.sh &
-
Access Squash TM on the browser at
http://localhost:8080/squash
.
The login and password for a new installation areadmin
/admin
. -
Press Ctrl + C to regain control over the terminal.
Install as systemd
on Debian
To install Squash TM as systemd
using Debian:
-
Copy the
systemd
service file that is located in/opt/squash-tm
:cp /opt/squash-tm/squash-tm.service /etc/systemd/system/
-
Reload the services:
systemctl daemon-reload
-
Make sure that Squash TM starts with the system:
systemctl enable squash-tm
-
Start Squash TM:
systemctl start squash-tm
There is no service file in
squash-tm-8.X.X.RELEASE.tar.gz
. Therefore, you must create the service filesquash-tm.service
with the following content:[Unit] Description=Squash-tm daemon After=systemd-user-sessions.service time-sync.target [Service] WorkingDirectory=/opt/squash-tm/bin ExecStart=/opt/squash-tm/bin/startup.sh ExecStop=/bin/kill $MAINPID KillMode=process Type=simple User=squash-tm Group=squash-tm Restart=on-failure RestartSec=10 StandardOutput=null StandardError=null StartLimitInterval=120 StartLimitBurst=3 [Install] WantedBy=multi-user.target
-
Access Squash TM on the browser at
http://localhost:8080/squash
.
The login and password for a new installation areadmin
/admin
.
Installation on Windows
Standard Install with a Zip File
To install Squash TM on Windows:
-
Install Squash TM: extract the
.zip
file and move its content to the desired location (named<rep>
below).
Warning: the Windows process linked to Squash TM must have reading and writing permissions on the install location. -
Populate the database thanks to the scripts located in
<rep>\squash-tm\database-scripts
.- For a first install run the script
<database>-full-install-version-8.X.X.RELEASE.sql
corresponding to the DBMS with Squash TM's version number; - For a version upgrade, run the upgrade scripts
<database>-upgrade-to-X.X.X.sql
corresponding to the DBMS in order until you reach the target version; - Or for a restoration from an existing database, run the DBMS command to restore a dump.
- For a first install run the script
-
In the file
startup.bat
, enter the login information for the database:DB_URL="jdbc:mariadb://localhost:3306/squashtm" or "jdbc:postgresql://localhost:5432/squashtm" DB_TYPE="mariadb" or "postgresql" DB_USERNAME="squash-tm" DB_PASSWORD="password"
-
Run by double-clicking the
startup.bat
or install Squash TM as a Windows service. -
Access Squash TM on the browser at
http://localhost:8080/squash
.
The login and password for a new installation areadmin
/admin
.
Installation as a Windows service (.exe
)
-
Perform the three first steps of the standard installation.
-
Install the Squash TM service via the prompt command as administrator (
cmd
):<rep>squash-tm\bin\squash-tm.exe install
-
Go to Services (search for "Services" or in the Services tab in the task manager).
-
Start the squash-tm service.
-
Access Squash TM on the browser at
http://localhost:8080/squash
.
The login and password for a new installation areadmin
/admin
.