chusiang.testlink
Ansible Role: TestLink
This is an Ansible role for deploying TestLink with Nginx, PHP 7 (php-fpm), and MySQL 5.6+ on Ubuntu and Debian systems.
Ubuntu 16.04 | Ubuntu 14.04 (End of Life) | Debian 8 | |
---|---|---|---|
TestLink | 1.9.17 | 1.9.15 [^1] | 1.9.17 |
Nginx | 1.14.0 | 1.12.2 | 1.14.0 |
PHP | 7.0.29 | 7.0.29 | 7.0.29 |
MySQL | 5.7.21 | 5.6.33 | 5.6.39 [^2] |
Requirements
To use this TestLink role on Debian 8, include tasks/pre_tasks.yml
in the pre_tasks
section to use MySQL server 5.6.
pre_tasks:
- name: manually add MySQL repository
include: tasks/pre_tasks.yml
roles:
- williamyeh.nginx
- chusiang.php7
- geerlingguy.mysql
Role Variables
If you have a separate database server, set setup_local_database
to false
to skip installing a database server.
setup_local_database: true
# TestLink
testlink_tarball_version: '1.9.17'
testlink_tarball_url: 'https://downloads.sourceforge.net/project/testlink/TestLink%201.9/TestLink%201.9.17/testlink-1.9.17.tar.gz'
testlink_tarball_md5: '7183c30133fecc18c8074142016b6a44'
testlink_var_path: '/var/testlink'
testlink_db_name: 'testlinkdb'
testlink_db_user: 'testlinkdb'
testlink_db_password: 'cUv4UK6ardC6cMGL'
testlink_db_host: 'localhost'
# Nginx
nginx_user: 'www-data'
nginx_testlink_path: '/usr/share/nginx/testlink'
nginx_server_name: 'testlink.example.tw'
nginx_enable_ssl: false
# PHP-FPM
php_owner: '{{ nginx_user }}'
php_group: '{{ nginx_user }}'
php_max_execution_time: '3000'
php_session_gc_maxlifetime: '60000'
# MySQL 5.6.x
#
# - TestLink 1.9.15 requires mysql-server 5.6.x
# - https://github.com/TestLinkOpenSourceTRMS/testlink-code
mysql_root_password: ''
mysql_root_password_update: 'no'
mysql_packages:
- 'mysql-server'
- 'mysql-client'
- 'python-mysqldb'
Dependencies
Here’s a list of other roles you need:
If you need to change the apt mirror, use the chusiang.switch-apt-mirror role.
Example Playbook
Here's how to use this role with an example:
- hosts: servers
roles:
- { role: chusiang.testlink }
Docker Container
This repository contains a Dockerized version of Ansible, published to the public Docker Hub through an automated build.
Docker Hub: chusiang/testlink
Images
ubuntu-16.04
(latest)ubuntu-14.04
(End of Life)debian-8
Usage
To run the container:
$ docker run --name=testlink -p 8080:80 -d chusiang/testlink
To check the status of the container:
$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Access TestLink on the web by going to http://localhost:8080.
Log in using the default admin account, where the username and password are both admin.
License
Copyright (c) chusiang from 2016-2018 under the MIT license.
[^1]: Be careful with TestLink 1.9.15 as it requires PHP > 5.4 and MySQL 5.6.x. (more)
[^2]: Debian 8 only comes with MySQL 5.5.x by default, so we use the MySQL official development repo to install MySQL 5.6.x. (more)
Deploy TestLink with Nginx, PHP 7 (php-fpm) and MySQL 5.6+ on Ubuntu and Debian.
ansible-galaxy install chusiang.testlink