Install Squash TM
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, Mac, and Linux (.zip or tar.gz)
-
a Docker image
In Squash TM 1.X, Debian (.deb) package and Redhat (.rpm) packages were available but today, they are depreciated. This procedure explains how to switch to tarball (tar.gz).
Warning
You MUST install a JRE version 11 before installing Squash TM, no matter the environment and no matter the installer.
Installation Using 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 group dedicated to Squash TM
adduser --system --group --home /opt/squash-tm squash-tm
-
Define squash-tm as the owner of their folder and files
chown -R squash-tm:squash-tm /opt/squash-tm
-
Populate the database thanks so scripts located in:
/opt/squash-tm/database-scripts
For a first install, run the script <database>-full-install-version-4.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:mysql://localhost:3306/squashtm" ou "jdbc:postgresql://localhost:5432/squashtm" DB_TYPE="mysql" ou "postgresql" DB_USERNAME="squash-tm" DB_PASSWORD="password"
-
Start squash-tm via:
cd /opt/squash-tm/bin nohup ./startup.sh &
-
Press Ctrl + C to regain control over the terminal.
Install as Systemd Using 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/
-
Then, reload the services:
systemctl daemon-reload
-
Make sure that Squash-tm starts with the system:
systemctl enable squash-tm
-
Finally, start Squash TM:
systemctl start squash-tm
There is no service file in squash-tm-4.X.X.RELEASE.tar.gz. Therefore, you must create the service file squash-tm.service using 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
Installation Using Windows
Info
The Windows installer is delivered for evaluation purposes and its use in production is not recommended. It is installed via an installer. Thus it will not be described here.
Standard Install With .zip File
To install Squash TM on Windows:
-
Install Squash TM: extract the .zip file and move its content to the desired location (Following this, we will use <rep>). 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-2.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
-
In the file startup.bat, enter the login information for the database:
DB_URL="jdbc:mysql://localhost:3306/squashtm" ou "jdbc:postgresql://localhost:5432/squashtm" DB_TYPE="mysql" ou "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 the following address:
http://localhost:8080/squash
The login and password for a new installation are:
login : admin password : admin
Installation as a Windows service (.exe)
To install Squash TM as a Windows service, you must first have done the 3 first steps of the standard installation. Then follow these steps:
-
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
-
Step 5 of the standard installation
Install Using Docker Image
To install Squash TM using the Docker image, please read the specific documentation on https://hub.docker.com/r/squashtest/squash-tm.
Switch from Packaged Install (1.X) to tarball (tar.gz)
Red Hat and Debian packaged installations are no longer supported for Squash TM 2.X+. This part describes the steps to follow to switch from a packaged installation for Squash TM 1.X to a tarball installation for Squash TM 2.X.
Focus
Before starting the installation, make sure to save all the Squash TM binaries, configuration files, plugins, licenses, and database.
This documentation is also valid for Debian/Ubuntu or Red Hat/CentOS. If there are any differences, they will be clearly stated.
Save Items Before Migrating
Before migrating, you must first create a backup repository
mkdir -p /opt/squash-bckp/plugins
mkdir -p /opt/squash-bckp/conf
mkdir -p /opt/squash-bckp/ident
For Debian/Ubuntu:
cp -r /usr/share/squash-tm/plugins/* /opt/squash-bckp/plugins
cp -r /etc/squash-tm/* /opt/squash-bckp/conf
cp /etc/default/squash-tm /opt/squash-bckp/ident
For Red Hat/CentOS:
cp -r /usr/lib/squash-tm/plugins/* /opt/squash-bckp/plugins
cp -r /etc/squash-tm/* /opt/squash-bckp/conf
cp /etc/sysconfig/squash-tm /opt/squash-bckp/ident
Deleting the Previous installation
Warning
If "uninstall database" is suggested, click "No".
For Debian/Ubuntu:
apt purge squash-tm
For Red Hat/CentOS :
yum remove squash-tm
Install
Info
For the following, it is supposed that the Squash TM 2.X has been downloaded into /opt
cd /opt
tar -zxvf squash-tmXXXX.tar.gz
chmod +x squash-tm/bin/startup.sh
Use the Previous App
Configure
If the configuration files were not changed, you can skip this part. However, if they were, you have to edit every file that is in/opt/squash-bckp/conf, copy the old configuration parameters into the files located in /opt/squash-tm/conf/
Log into the Database
To be able to log into the database again:
- Edit /opt/squash-bckp/ident/squash-tm
- Copy the values of the following variables:
- DB_TYPE
- DB_URL
- DB_USERNAME
- DB_PASSWORD
- Paste them in the file /opt/squash-tm/bin/startup.sh
Focus
Do not forget to run the upgrade scripts on the database to upgrade the schema to version 2.X.
License
To get Squash TM license file:
cp -ar /opt/squash-bckp/plugins/license /opt/squash-tm/plugins
Plugins
Between Squash TM versions 1 and 2, the plugins have evolved. Thus, it is not possible to re-use the old plugins simply by copy-pasting them:
- Make a list of the plugins/jar located in /opt/squash-bckp/plugins/
- If the plugin is included in Squash TM, it is already updated in /opt/squash-tm/plugins/
- If the plugin is free, download its updated new version on Squash TM's website site
- If the plugin is commercial, contact the Squash TM Support Team.
Service under Systemd
- Create the service file in /etc/systemd/system/squash-tm.service
- Enter this example in it (to edit if Squash TM is not being installed in /opt)
[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
#Restart=on-failure
User=squash-tm
Group=squash-tm
[Install]
WantedBy=multi-user.target
- Reload services
systemctl daemon-reload
- Update database
The update scripts are located in /opt/squash-tm/database-scripts/
- Change Squash TM user
useradd squash-tm
chown -R squash-tm: /opt/squash-tm/
-
Delete repository
- For Debian/Ubuntu
sh rm /etc/apt/sources.list.d/squash-tm.list*
- For Red Hat/CentOS
sh rm /etc/yum.repos.d/squashtest.repo*
-
Start Squash-TM
systemctl enable squash-tm
systemctl start squash-tm
To verify that Squash TM starts correctly, see the logs located in /opt/squash-tm/logs/squash-tm.log.