Skip to content

galazarevna/ansible_testlink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Playbook for TestLink

An Ansible playbook of Deploy TestLink with Nginx, PHP 7.4 (php-fpm), and MySQL 5.6+ on CentOS 8.

What is TestLink?

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.

http://testlink.org/

What is Ansible?

Ansible is an open-source software provisioning, configuration management, and application-deployment tool enabling infrastructure as code.

https://www.ansible.com/

What is Vagrant?

Vagrant is an open-source software product for creating and configuring lightweight, reproducible, and portable development environments.

https://www.vagrantup.com/

Structure

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

Prerequisites

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).

Requirements

  • 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!

Playbook Usage

  • To run the playbook on your local (vagrant) machine

    ansible-playbook -i hosts site.yml
    

TestLink Installation

  • 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"

About

An Ansible playbook of Deploy TestLink with Nginx, PHP 7.4 (php-fpm), and MySQL 5.6+ on CentOS 8.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages