chusiang.testlink
Rol de Ansible: TestLink
Un rol de Ansible para desplegar TestLink con Nginx, PHP 7 (php-fpm) y MySQL 5.6+ en Ubuntu y Debian.
Ubuntu 16.04 | Ubuntu 14.04 (EOL) | 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] |
Requisitos
Si queremos usar este rol de TestLink en Debian 8, necesitamos incluir tasks/pre_tasks.yml
en pre_tasks
para usar mysql-server-5.6.
pre_tasks:
- name: agregar manualmente el repositorio de mysql
include: tasks/pre_tasks.yml
roles:
- williamyeh.nginx
- chusiang.php7
- geerlingguy.mysql
Variables del Rol
Si tienes un servidor de base de datos independiente, puedes establecer setup_local_database
en false
, no se ejecutarán las tareas de instalación del servidor de base de datos.
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 necesita 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'
Dependencias
Aquí debería ir una lista de otros roles alojados en Galaxy, además de cualquier detalle respecto a parámetros que puedan necesitar ser configurados para otros roles, o variables que se usen de otros roles.
Por cierto, si necesitas cambiar el espejo de apt, puedes usar el rol chusiang.switch-apt-mirror.
Ejemplo de Playbook
Incluir un ejemplo de cómo utilizar tu rol (por ejemplo, con variables pasadas como parámetros) es siempre útil para los usuarios también:
- hosts: servers
roles:
- { role: chusiang.testlink }
Contenedor Docker
Este repositorio contiene Ansible en Docker, publicado en el público Docker Hub a través de un mecanismo de construcción automatizada.
Docker Hub: chusiang/testlink
Imágenes
ubuntu-16.04
(más reciente)ubuntu-14.04
(EOL)debian-8
Uso
Ejecutar el contenedor.
$ docker run --name=testlink -p 8080:80 -d chusiang/testlink 3bf486c1515b9c28499bbd48f1fe3d3164434108636a49585b1a7b4e3965293e
Comprobar el estado del contenedor.
$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3bf486c1515b chusiang/testlink "/run.sh" hace 20 minutos Activo 20 minutos 443/tcp, 0.0.0.0:8080->80/tcp testlink
Ir a la web de TestLink (http://localhost:8080).
Iniciar sesión con la cuenta de administrador predeterminada, el nombre y contraseña son admin / admin.
Licencia
Copyright (c) chusiang de 2016-2018 bajo la licencia MIT.
[^1]: TestLink 1.9.15 se basa en PHP > 5.4 y MySQL 5.6.x, por favor ten cuidado. (más)
[^2]: Por defecto solo tiene MySQL 5.5.x en Debian 8, así que utilizo el repositorio oficial de desarrollo de mysql para instalar MySQL 5.6.x. (más)
Deploy TestLink with Nginx, PHP 7 (php-fpm) and MySQL 5.6+ on Ubuntu and Debian.
ansible-galaxy install chusiang.testlink