An Ansible playbook of Deploy TestLink with Nginx, PHP 7.4 (php-fpm), and MySQL 5.6+ on CentOS 8.
TestLink is an open-source web-based test management system that facilitates software quality assurance. The platform offers support for test cases, test suites, test plans, test projects and user management, as well as various reports and statistics.
Ansible is an open-source software provisioning, configuration management, and application-deployment tool enabling infrastructure as code.
Vagrant is an open-source software product for creating and configuring lightweight, reproducible, and portable development environments.
ansible_testlink
├── ansible.cfg
├── hosts
├── README.md
├── roles
│ ├── company_settings
│ │ └── tasks
│ │ └── main.yml
│ ├── mysql
│ │ ├── handlers
│ │ │ └── main.yml
│ │ └── tasks
│ │ └── main.yml
│ ├── nginx
│ │ ├── handlers
│ │ │ └── main.yml
│ │ ├── tasks
│ │ │ └── main.yml
│ │ └── templates
│ │ └── nginx.conf.j2
│ ├── php-fpm
│ │ ├── handlers
│ │ │ └── main.yml
│ │ └── tasks
│ │ └── main.yml
│ ├── system
│ │ └── tasks
│ │ └── main.yml
│ └── testlink
│ ├── handlers
│ │ └── main.yml
│ └── tasks
│ └── main.yml
├── site.yml
└── vars
└── main.yml
Install Vagrant and Virtual Box on a control node with a package manager.
For Mac users who use a homebrew package manager run:
brew install virtualbox
brew install vagrant
In your projects directory create a TestLink directory
mkdir TestLink
cd TestLink
Copy the patched Vagrantfile to the TestLink directory. Then run:
vagrant up
Check if you are able to ssh to the VM by running
vagrant ssh
You might want to open VirtualBox for debugging purposes (if needed).
-
Navigate to your projects directory and clone the repository
git clone https://github.com/galazarevna/ansible_testlink.git cd ansible_testlink
-
Create and activate a python3 virtual environment (optional)
-
Install Ansible on a control node with
pip
or a package manager.
For Mac users who use a homebrew package manager run:brew install ansible
-
Put mysql root password of your choice into the
vars/main.yml
file. -
Put the path to your TestLink directory
/Users/<user_name>/<your_projects>/TestLink
into the 'hosts' inventory file.
You can change the hosts settings in the 'hosts' inventory file (localhost:2222 is used in the playbook) -
Check the ssh connection to your managed node (vagrant CentOS 8 VM)
ansible all -m ping
Once you have "pong" in the response you are good to go!
-
To run the playbook on your local (vagrant) machine
ansible-playbook -i hosts site.yml
-
Once you provisioned the VM, navigate to the TestLink Installation page http://127.0.0.1:8080/install/index.php
You might want to forward the port 2222 by running:ssh vagrant@127.0.0.1 -p 2222 -i "/Users/<user_name>/<your_projects>/TestLink/.vagrant/machines/default/virtualbox/private_key" -L 8080:127.0.0.1:80
-
Follow the installation steps:
- provide the mysql root password set in the Reqiurements section
- set any username and password for the "testlink" db user
-
Remove password for the "testlink" db user created in the previous step from the
/var/www/testlink/config_db.inc.php
define('DB_PASS', '');
-
Navigate to http://localhost:8080/testlink/
Log into the TestLink with the default credentials - login: "admin", password: "admin"