- 1. Introduction
- 2. Prerequisites
- 3. Configuring Docker Environment Variables
- 4. Installation
- 5. Usage
- 6. Create and restore a backup
- 7. How and where can I find the log files?
- 8. Update
- 9. How to use a previous version
- 10. Uninstallation
- 11. Documentation
- 12. FAQ
- 13. License
- 14. Contact
- 15. Contributing
- 16. Acknowledgements
❗
|
This documentation covers the Klaros Test Management installation for production systems using a MariaDB, MSSQL, MySQL or PostgreSQL database. The instructions for the test installations with the integrated Apache Derby database can be found here. |
This installation documentation shows step by step how to install and configure Klaros Test Management under Docker for Windows and Linux.
Docker is a free container-based software that allows a secure installation of applications on different operating systems such as Windows and Linux.
You can find further information at Why-Docker.
Klaros Test Management is a professional web-based test management software. It contains components for resource management and evaluation of test activity. Tracking of test requirements is supported, as well as agile development processes. Numerous interfaces with issue trackers, test automation tools and continuous integration servers allow seamless integration into existing development environments.
Klaros Test Management is available free of charge in the Community Edition and can also be used for commercial purposes without restrictions.
The Enterprise Edition offers you the full range of functions, including one-year support and free access to all software updates. An overview of the features of both editions can be found here.
To receive your free 30-day trial license for the Enterprise Edition, you can request your license key here.
Detailed information, extensive documentation, videos and a freely accessible online demo can be found under Klaros Test Management.
Windows
The current hardware requirements and installation steps are described in the official Docker documentation. The Docker Desktop installation requires a login.
To make it easier to update Klaros Test Management later, it is recommended to use Git to download the Dockerfile from GitHub.
This completes the preparations for Windows. The chapter Installation describes how to use Git Bash to download the Dockerfile and prepare it for future updates.
Linux
See the official Docker documentation for the latest hardware requirements and installation steps.
sudo apt-get update sudo apt-get install git
sudo yum check-update sudo yum install git-core
git --version Output: git version 2.17.1
This completes the preparations for Linux. The chapter Installation describes how the Dockerfile can be downloaded and prepared for future updates.
Variable | Default | Description |
---|---|---|
DATABASE_HOST |
db |
Database host |
DATABASE_NAME |
klaros |
Database name |
DATABASE_USER |
klaros |
Database user |
DATABASE_CONTAINER_NAME |
klaros_db |
Container name for the database |
DATABASE_PASSWORD |
P@ssw0rd |
Database password |
DATABASE_ROOT_PASSWORD |
P@ssw0rd |
[MariaDB/MySQL Only] Root password for the "root" user |
DATABASE_PORT |
10001 |
Public port for accessing the database from the outside |
KLAROS_CONTAINER_NAME |
klaros_postgresql |
Container name for the Klaros Test Management application |
KLAROS_PORT |
18080 |
Public port for later access to the website |
TOMCAT_PASSWORD |
P@ssw0rd |
Password for login to 127.0.0.1:18080/monitoring |
TIMEZONE |
Time zone |
|
MEMORY_MIN |
128 |
Minimum available RAM in MB |
MEMORY_MAX |
786 |
Maximum available RAM in MB |
VOLUME_NAME |
klaros-data |
The volume is automatically created by Docker Compose with the name "klaros-data" if it does not already exist. This is where the data is stored |
DATABASE_CONTAINER_NAME |
DATABASE_PORT |
KLAROS_CONTAINER_NAME |
KLAROS_PORT |
TIMEZONE |
MEMORY_MIN |
MEMORY_MAX |
VOLUME_NAME |
The environment variables can be configured and changed via the .env file. For port forwarding only the ports "KLAROS_PORT" and "DATABASE_PORT" in the .env file have to be changed.
When creating the image, all values in table 1 can be changed before the first server start. After the first start of the server, the values in table 2 can be changed as often as desired. All changes require a restart.
If required, the environment variable JAVA_OPTS can be added to the Dockerfile of klaros to make additional settings for the Tomcat server.
Example to set the time zone via JAVA_OPTS
❗
|
If necessary, please change the time zone in the .env file and not in the Dockerfile. |
ENV JAVA_OPTS -Duser.timezone=Europe/Berlin |
The .env file is located in the same directory as the docker-compose.yml file and can be opened with your preferred text editor.
vi .env
git init git clone https://github.com/klaros-testmanagement/klaros-docker
ls
you can check whether the directory was created correctlyls Output: klaros-docker
The image is needed to create the Klaros container and start the server.
cd ~/klaros-docker/PostgreSQL docker-compose build
cd ~/klaros-docker/MySQL docker-compose build
cd ~/klaros-docker/MariaDB docker-compose build
cd ~/klaros-docker/Microsoft\ SQL\ Server/ docker-compose build
Two Docker containers for the server and the database are automatically created at startup. The configurations can be found in the .env file.
docker-compose up
Details
docker-compose up -d
For more information about the docker-compose up
parameters, see the official Docker Compose documentation.
After the server has been started, the message "Server startup in x ms" appears at the end. You can now use any browser to enter your IP address and port to access the Klaros website.
Username: admin Password: admin
For testing or validation purposes, it may be desirable to run multiple instances of Klaros simultaneously in the same Docker environment. This section describes the necessary configuration changes.
Another Klaros instance can be used to try a new Klaros version or to test an existing backup.
Before the configuration changes are made, each instance must be stored in a separate directory.
PostgreSQL
cp -r PostgreSQL/ PostgreSQL2
cd ~/klaros-docker/PostgreSQL2 vi .env
MySQL
cp -r MySQL/ MySQL2
cd ~/klaros-docker/MySQL2 vi .env
MariaDB
cp -r MariaDB/ MariaDB2
cd ~/klaros-docker/MariaDB2 vi .env
Microsoft SQL Server
cp -r Microsoft\ SQL\ Server/ Microsoft\ SQL\ Server2
cd Microsoft\ SQL\ Server2/ vi .env
To run a second instance independently of the first instance, the instances must differ in name, port, and volume.
Current value | New value | Description |
---|---|---|
KLAROS_PORT=18080 |
KLAROS_PORT=18081 |
Public port for later access to the website |
DATABASE_PORT=10001 |
DATABASE_PORT=10002 |
Public port for accessing the database from the outside. |
DATABASE_CONTAINER_NAME=klaros_db |
DATABASE_CONTAINER_NAME=klaros_db2 |
Container name for the database |
KLAROS_CONTAINER_NAME=klaros_postgresql |
KLAROS_CONTAINER_NAME=klaros_postgresql2 |
Container name for the Klaros Test Management application |
VOLUME_NAME=klaros-data |
VOLUME_NAME=klaros-data2 |
Volume name. The data is stored here |
docker-compose up
If the container was started in the foreground, you can shut down the server with the key combination CTRL + C.
Alternatively the server can also be shut down via docker-compose stop
.
A distinction is made between an SQL backup (dump) and a volume backup. You can use an SQL backup to back up the database while it is running. With a volume backup, the server must be shut down beforehand. An SQL backup also requires less memory than a volume backup, but lacks important data such as configuration and log files. Both backup strategies have their advantages, so it is desirable to combine them.
Individual SQL backups can be found under the name "backup_sql_klaros<Date>.tar.gz".
Volume or volume and SQL backups are named "backup_klaros<Date>.tar.gz". If you create several backups per day, it is recommended to specify a time (hours, minutes and seconds) when creating the backups. To do this, add %H(hour), %M(minute) and %S(second) in date.
ℹ️
|
If an error occurs while creating a backup, the log files provide traceable procedures for the error messages. |
$(date '%y-%m-%d-%Hh-%Mm-%Ss')
$(date '+%y-%m-%d-%H:%M:%S')
Details
This would give the backup the following name:
Windows: backup_klaros19-10-28-11h-34m-33s.tar.gz
Linux: backup_klaros19-10-28-11:34:33.tar.gz
To change the backup path, the variable "BACKUP_DIR" can be adjusted.
BACKUP_DIR="~/klaros-docker/Path/backup"
BACKUP_DIR=~/klaros-docker/Path/backup
❗
|
An SQL backup can only be created while the system is running. |
Windows
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup mkdir -p ${BACKUP_DIR} docker exec -t klaros_db bash -c "pg_dump -c -U \${DATABASE_USER} -d \${DATABASE_NAME}" > ${BACKUP_DIR}/backup${DATE}.sql tar cvzf ${BACKUP_DIR}/backup_sql_klaros${DATE}.tar.gz -C ${BACKUP_DIR} backup${DATE}.sql rm ${BACKUP_DIR}/backup${DATE}.sql
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup mkdir -p ${BACKUP_DIR} docker exec klaros_db bash -c "mysqldump -u \${DATABASE_USER} --password=\${DATABASE_PASSWORD} \${DATABASE_NAME} --single-transaction --routines --triggers" > ${BACKUP_DIR}/backup${DATE}.sql tar cvzf ${BACKUP_DIR}/backup_sql_klaros${DATE}.tar.gz -C ${BACKUP_DIR} backup${DATE}.sql rm ${BACKUP_DIR}/backup${DATE}.sql
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup mkdir -p ${BACKUP_DIR} docker exec -t klaros_db bash -c "./opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P \$DATABASE_PASSWORD -Q \"BACKUP DATABASE [klaros] TO DISK = N'/data/mssql-data/backup.bak' WITH FORMAT\"" && docker cp klaros_db:/data/mssql-data/backup.bak ${BACKUP_DIR}/backup${DATE}.bak tar cvzf ${BACKUP_DIR}/backup_sql_klaros${DATE}.tar.gz -C ${BACKUP_DIR} backup${DATE}.bak rm ${BACKUP_DIR}/backup${DATE}.bak
Linux
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup mkdir -p ${BACKUP_DIR} sudo docker exec -t klaros_db bash -c "pg_dump -c -U \${DATABASE_USER} -d \${DATABASE_NAME}" > ${BACKUP_DIR}/backup${DATE}.sql tar cvzf ${BACKUP_DIR}/backup_sql_klaros${DATE}.tar.gz -C ${BACKUP_DIR} backup${DATE}.sql rm ${BACKUP_DIR}/backup${DATE}.sql
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup mkdir -p ${BACKUP_DIR} sudo docker exec klaros_db bash -c "mysqldump -u \${DATABASE_USER} --password=\${DATABASE_PASSWORD} \${DATABASE_NAME} --single-transaction --routines --triggers" > ${BACKUP_DIR}/backup${DATE}.sql tar cvzf ${BACKUP_DIR}/backup_sql_klaros${DATE}.tar.gz -C ${BACKUP_DIR} backup${DATE}.sql rm ${BACKUP_DIR}/backup${DATE}.sql
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup mkdir -p ${BACKUP_DIR} sudo docker exec -t klaros_db bash -c "./opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P \$DATABASE_PASSWORD -Q \"BACKUP DATABASE [klaros] TO DISK = N'/data/mssql-data/backup.bak' WITH FORMAT\"" && sudo docker cp klaros_db:/data/mssql-data/backup.bak ${BACKUP_DIR}/backup${DATE}.bak sudo tar cvzf ${BACKUP_DIR}/backup_sql_klaros${DATE}.tar.gz -C ${BACKUP_DIR} backup${DATE}.bak rm -f ${BACKUP_DIR}/backup${DATE}.bak
❗
|
For a volume backup, the server must be shut down. |
Windows
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/PostgreSQL mkdir -p ${BACKUP_DIR} docker-compose stop docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine /bin/sh -c "tar cvzf /backup/${BACKUP_NAME} /data/klaros-home /data/catalina-base/logs /data/postgres-data" cd -
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/MySQL mkdir -p ${BACKUP_DIR} docker-compose stop docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "tar cvzf /backup/${BACKUP_NAME} /data/klaros-home /data/catalina-base/logs /data/mysql-data" cd -
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/MariaDB mkdir -p ${BACKUP_DIR} docker-compose stop docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "tar cvzf /backup/${BACKUP_NAME} /data/klaros-home /data/catalina-base/logs /data/mariadb-data" cd -
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/Microsoft\ SQL\ Server/ mkdir -p ${BACKUP_DIR} docker-compose stop docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "tar cvzf /backup/${BACKUP_NAME} /data/klaros-home /data/catalina-base/logs /data/mssql-data" cd -
Linux
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/PostgreSQL mkdir -p ${BACKUP_DIR} sudo docker-compose stop sudo docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "tar cvzf /backup/${BACKUP_NAME} /data/klaros-home /data/catalina-base/logs /data/postgres-data" cd -
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/MySQL mkdir -p ${BACKUP_DIR} sudo docker-compose stop sudo docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "tar cvzf /backup/${BACKUP_NAME} /data/klaros-home /data/catalina-base/logs /data/mysql-data" cd -
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/MariaDB mkdir -p ${BACKUP_DIR} sudo docker-compose stop sudo docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "tar cvzf /backup/${BACKUP_NAME} /data/klaros-home /data/catalina-base/logs /data/mariadb-data" cd -
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/Microsoft\ SQL\ Server/ mkdir -p ${BACKUP_DIR} sudo docker-compose stop sudo docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "tar cvzf /backup/${BACKUP_NAME} /data/klaros-home /data/catalina-base/logs /data/mssql-data" cd -
The first step is to create an SQL backup while the system is running. Then the server will be shut down to perform the volume backup.
Windows
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/PostgreSQL mkdir -p ${BACKUP_DIR} docker exec -t klaros_db bash -c "pg_dump -c -U \${DATABASE_USER} -d \${DATABASE_NAME}" > ${BACKUP_DIR}/backup${DATE}.sql docker-compose stop docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "tar cvzf /backup/${BACKUP_NAME} /data/klaros-home /data/catalina-base/logs /data/postgres-data -C /backup backup${DATE}.sql" rm ${BACKUP_DIR}/backup${DATE}.sql cd -
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/MySQL mkdir -p ${BACKUP_DIR} docker exec klaros_db bash -c "mysqldump -u \${DATABASE_USER} --password=\${DATABASE_PASSWORD} \${DATABASE_NAME} --single-transaction --routines --triggers" > ${BACKUP_DIR}/backup${DATE}.sql docker-compose stop docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "tar cvzf /backup/${BACKUP_NAME} /data/klaros-home /data/catalina-base/logs /data/mysql-data -C /backup backup${DATE}.sql" rm ${BACKUP_DIR}/backup${DATE}.sql cd -
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/MariaDB mkdir -p ${BACKUP_DIR} docker exec klaros_db bash -c "mysqldump -u \${DATABASE_USER} --password=\${DATABASE_PASSWORD} \${DATABASE_NAME} --single-transaction --routines --triggers" > ${BACKUP_DIR}/backup${DATE}.sql docker-compose stop docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "tar cvzf /backup/${BACKUP_NAME} /data/klaros-home /data/catalina-base/logs /data/mariadb-data -C /backup backup${DATE}.sql" rm ${BACKUP_DIR}/backup${DATE}.sql cd -
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/Microsoft\ SQL\ Server/ mkdir -p ${BACKUP_DIR} docker exec -t klaros_db bash -c "./opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P \$DATABASE_PASSWORD -Q \"BACKUP DATABASE [klaros] TO DISK = N'/data/mssql-data/backup.bak' WITH FORMAT\"" && docker cp klaros_db:/data/mssql-data/backup.bak ${BACKUP_DIR}/backup${DATE}.bak docker-compose stop docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "tar cvzf /backup/${BACKUP_NAME} /data/klaros-home /data/catalina-base/logs /data/mssql-data -C /backup backup${DATE}.bak" rm ${BACKUP_DIR}/backup${DATE}.bak cd -
Linux
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/PostgreSQL mkdir -p ${BACKUP_DIR} sudo docker exec -t klaros_db bash -c "pg_dump -c -U \${DATABASE_USER} -d \${DATABASE_NAME}" > ${BACKUP_DIR}/backup${DATE}.sql sudo docker-compose stop sudo docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "tar cvzf /backup/${BACKUP_NAME} /data/klaros-home /data/catalina-base/logs /data/postgres-data -C /backup backup${DATE}.sql" rm ${BACKUP_DIR}/backup${DATE}.sql cd -
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/MySQL mkdir -p ${BACKUP_DIR} sudo docker exec klaros_db bash -c "mysqldump -u \${DATABASE_USER} --password=\${DATABASE_PASSWORD} \${DATABASE_NAME} --single-transaction --routines --triggers" > ${BACKUP_DIR}/backup${DATE}.sql sudo docker-compose stop sudo docker run --rm --volumes-from klaros_db -v /$BACKUP_DIR:/backup alpine sh -c "tar cvzf /backup/$BACKUP_NAME /data/klaros-home /data/catalina-base/logs /data/mysql-data -C /backup backup$DATE.sql" rm ${BACKUP_DIR}/backup${DATE}.sql cd -
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/MariaDB mkdir -p ${BACKUP_DIR} sudo docker exec klaros_db bash -c "mysqldump -u \${DATABASE_USER} --password=\${DATABASE_PASSWORD} \${DATABASE_NAME} --single-transaction --routines --triggers" > ${BACKUP_DIR}/backup${DATE}.sql sudo docker-compose stop sudo docker run --rm --volumes-from klaros_db -v /$BACKUP_DIR:/backup alpine sh -c "tar cvzf /backup/$BACKUP_NAME /data/klaros-home /data/catalina-base/logs /data/mariadb-data -C /backup backup$DATE.sql" rm ${BACKUP_DIR}/backup${DATE}.sql cd -
DATE=$(date '+%y-%m-%d') BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/Microsoft\ SQL\ Server/ mkdir -p ${BACKUP_DIR} sudo docker exec -t klaros_db bash -c "./opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P \$DATABASE_PASSWORD -Q \"BACKUP DATABASE [klaros] TO DISK = N'/data/mssql-data/backup.bak' WITH FORMAT\"" && sudo docker cp klaros_db:/data/mssql-data/backup.bak ${BACKUP_DIR}/backup${DATE}.bak sudo docker-compose stop sudo docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "tar cvzf /backup/${BACKUP_NAME} /data/klaros-home /data/catalina-base/logs /data/mssql-data -C /backup backup${DATE}.bak" rm -f ${BACKUP_DIR}/backup${DATE}.bak cd -
Restoring from a .sql file also works with the backup archive "backup_klaros<Date>.tar.gz" if a "backup<Date>.sql" file exists. Note that the database container must still be running while the server is shutting down. Then the container is stopped via docker-compose stop
.
ℹ️
|
Note to adjust the date of the respective backups. |
Windows
DATE=19-11-28 BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_sql_klaros${DATE}.tar.gz cd ~/klaros-docker/PostgreSQL docker stop klaros_postgresql tar xvzf ${BACKUP_DIR}/${BACKUP_NAME} backup${DATE}.sql cat backup${DATE}.sql | docker exec -i klaros_db bash -c "psql -U \${DATABASE_USER} -d \${DATABASE_NAME}" rm backup${DATE}.sql docker-compose stop cd -
DATE=19-11-28 BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_sql_klaros${DATE}.tar.gz cd ~/klaros-docker/MySQL docker stop klaros_mysql tar xvzf ${BACKUP_DIR}/${BACKUP_NAME} backup${DATE}.sql cat backup${DATE}.sql | docker exec -i klaros_db bash -c "mysql -u \${DATABASE_USER} --password=\${DATABASE_PASSWORD} \${DATABASE_NAME}" rm backup${DATE}.sql docker-compose stop cd -
DATE=19-11-28 BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_sql_klaros${DATE}.tar.gz cd ~/klaros-docker/MariaDB docker stop klaros_mariadb tar xvzf ${BACKUP_DIR}/${BACKUP_NAME} backup${DATE}.sql cat backup${DATE}.sql | docker exec -i klaros_db bash -c "mysql -u \${DATABASE_USER} --password=\${DATABASE_PASSWORD} \${DATABASE_NAME}" rm backup${DATE}.sql docker-compose stop cd -
DATE=19-11-28 BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_sql_klaros${DATE}.tar.gz cd ~/klaros-docker/Microsoft\ SQL\ Server/ docker stop klaros_mssql2017 tar xvzf ${BACKUP_DIR}/${BACKUP_NAME} backup${DATE}.bak docker cp backup${DATE}.bak klaros_db:/data/mssql-data/backup.bak docker exec -i klaros_db bash -c "./opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P \$DATABASE_PASSWORD -Q \"RESTORE DATABASE [klaros] FROM DISK = N'/data/mssql-data/backup.bak' WITH FILE = 1, REPLACE, STATS = 5\"" rm backup${DATE}.bak docker-compose stop cd -
Linux
DATE=19-11-28 BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_sql_klaros${DATE}.tar.gz cd ~/klaros-docker/PostgreSQL sudo docker stop klaros_postgresql tar xvzf ${BACKUP_DIR}/${BACKUP_NAME} backup${DATE}.sql cat backup${DATE}.sql | sudo docker exec -i klaros_db bash -c "psql -U \${DATABASE_USER} -d \${DATABASE_NAME}" rm backup${DATE}.sql sudo docker-compose stop cd -
DATE=19-11-28 BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_sql_klaros${DATE}.tar.gz cd ~/klaros-docker/MySQL sudo docker stop klaros_mysql tar xvzf ${BACKUP_DIR}/${BACKUP_NAME} backup${DATE}.sql cat backup${DATE}.sql | sudo docker exec -i klaros_db bash -c "mysql -u \${DATABASE_USER} --password=\${DATABASE_PASSWORD} \${DATABASE_NAME}" rm backup${DATE}.sql sudo docker-compose stop cd -
DATE=19-11-28 BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_sql_klaros${DATE}.tar.gz cd ~/klaros-docker/MariaDB sudo docker stop klaros_mariadb tar xvzf ${BACKUP_DIR}/${BACKUP_NAME} backup${DATE}.sql cat backup${DATE}.sql | sudo docker exec -i klaros_db bash -c "mysql -u \${DATABASE_USER} --password=\${DATABASE_PASSWORD} \${DATABASE_NAME}" rm backup${DATE}.sql sudo docker-compose stop cd -
DATE=19-11-28 BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_sql_klaros${DATE}.tar.gz cd ~/klaros-docker/Microsoft\ SQL\ Server/ sudo docker stop klaros_mssql2017 sudo tar xvzf ${BACKUP_DIR}/${BACKUP_NAME} backup${DATE}.bak sudo docker cp backup${DATE}.bak klaros_db:/data/mssql-data/backup.bak sudo docker exec -i klaros_db bash -c "./opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P \$DATABASE_PASSWORD -Q \"RESTORE DATABASE [klaros] FROM DISK = N'/data/mssql-data/backup.bak' WITH FILE = 1, REPLACE, STATS = 5\"" rm -f backup${DATE}.bak sudo docker-compose stop cd -
❗
|
The container must be shut down before restoration. |
Windows
DATE=19-11-28 BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/PostgreSQL docker-compose stop docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "cd /data && tar xvzf /backup/${BACKUP_NAME} --strip 1 --exclude=backup${DATE}.sql" cd -
DATE=19-11-28 BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/MySQL docker-compose stop docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "cd /data && tar xvzf /backup/${BACKUP_NAME} --strip 1 --exclude=backup${DATE}.sql" cd -
DATE=19-11-28 BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/MariaDB docker-compose stop docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "cd /data && tar xvzf /backup/${BACKUP_NAME} --strip 1 --exclude=backup${DATE}.sql" cd -
DATE=19-11-28 BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/Microsoft\ SQL\ Server/ docker-compose stop docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "cd /data && tar xvzf /backup/${BACKUP_NAME} --strip 1 --exclude=backup${DATE}.bak" cd -
Linux
DATE=19-11-28 BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/PostgreSQL sudo docker-compose stop sudo docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "cd /data && tar xvzf /backup/${BACKUP_NAME} --strip 1 --exclude=backup${DATE}.sql" cd -
DATE=19-11-28 BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/MySQL sudo docker-compose stop sudo docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "cd /data && tar xvzf /backup/${BACKUP_NAME} --strip 1 --exclude=backup${DATE}.sql" cd -
DATE=19-11-28 BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/MariaDB sudo docker-compose stop sudo docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "cd /data && tar xvzf /backup/${BACKUP_NAME} --strip 1 --exclude=backup${DATE}.sql" cd -
DATE=19-11-28 BACKUP_DIR=~/klaros-docker/backup BACKUP_NAME=backup_klaros${DATE}.tar.gz cd ~/klaros-docker/Microsoft\ SQL\ Server/ sudo docker-compose stop sudo docker run --rm --volumes-from klaros_db -v /${BACKUP_DIR}:/backup alpine sh -c "cd /data && tar xvzf /backup/${BACKUP_NAME} --strip 1 --exclude=backup${DATE}.bak" cd -
Log files may be required for troubleshooting. To access log files, a shell can be opened directly in the Docker-Container or they can be taken from the backup.
Relevant log files can be found here:
/data/catalina-base/logs
/data/mysql-data ← Additional for MySQL
In the Klaros container, open a shell with docker exec
to get access to the logs.
ℹ️
|
Please note that the server must be started when accessing via the shell and is not shut down. |
more
docker exec -it klaros_db sh more /data/catalina-base/logs/catalina.2019-12-09.log
Windows
Windows users can use the WinRAR archive program to extract .tar.gz archives.
Then you can display the Klaros Test Management logs in the "logs" folder of catalina-base and the MySQL logs in the "mysql-data" folder.
Linux
tar
to unpack the archive.sudo tar -xzf backup_klaros19-10-28.tar.gz
Then you can display the Klaros Test Management logs in the "logs" folder of catalina-base and the MySQL logs in the "mysql-data" folder.
❗
|
After an update of Klaros Test Management, it is no longer possible to install the previous version. Also make sure to refresh the image after the update, otherwise the previous version will still be used. |
git pull
git pull origin master
To perform an update from an older to a newer version, the first step is to search for new updates in the GitHub repository. Current versions can be viewed via git tag
. Then a local branch "update" with the desired version can be created and merged. Alternatively, you can merge your local branch directly with the master instead of creating a second branch.
git checkout master git pull origin master git checkout tags/<tag_name> -b update git checkout klaros git merge update git branch -D update
docker-compose down docker-compose build docker image prune
docker-compose up
❗
|
If a newer version is already in use, then an older version can only be used by creating a new instance or a re-installation. |
You can view currently supported versions on GitHub releases.
After the repository has been cloned, the tags can be listed using git tag
and with git checkout tags/<tag_name> -b <new_branch>
a new branch is created and checked out.
git tag git checkout tags/<tag_name> -b klaros
To completely remove Klaros Test Management from Docker, the container must be stopped first, before the container and volume can be removed.
Then remove the ~/klaros-docker directory and the image.
docker-compose down --volume docker rmi klaros-postgresql docker rmi postgres-klaros_db rm -rf ~/klaros-docker/
docker-compose down --volume docker rmi klaros-mysql docker rmi mysql-klaros_db rm -rf ~/klaros-docker/
docker-compose down --volume docker rmi klaros-mariadb docker rmi mariadb-klaros_db rm -rf ~/klaros-docker/
docker-compose down --volume docker rmi klaros-mssql2017 docker rmi mssql2017-klaros_db rm -rf ~/klaros-docker/
You will find information on how to get started with Klaros Test Management in our tutorial and in the user manual. Both are available in the application itself after successful login.
Our installation documentation contains a description of how to install Klaros Test Management under Docker for ApacheDerby, MariaDB, MSSQL, MySQL and PostgreSQL databases.
A technical FAQ as well as a FAQ on prices, ordering and delivery can be found on our website.
Klaros Test Management for Docker is licensed under the terms of the MIT License.
By installing our software through Docker, you also agree to our Limited Use Software License Agreement.
We hope that we have given you a smooth start with this description.
If you have any questions, requests or just want to give feedback, please write to us at [email protected] or use our forum.
Would you like to help us or make suggestions for improvement? Follow these steps to suggest your changes.
-
Create an issue and describe your idea
-
Fork the repo
-
Create a new branch (
git checkout -b feature/my-idea
) -
Make your changes
-
Commit your changes (
git commit -am 'Adding feature'
) -
Push to your branch (
git push origin feature/my-idea
) -
Create a Pull Request
-
André Raabe for providing the Apache Derby and Microsoft SQL Server Version
-
https://github.com/x3nb63 for adding the DATABASE_HOST variable