Install Allure TestOps using packages

Install Allure TestOps using packages

Prerequisites

HW requirements

Before you start the installation process, we advise you to check the hardware requirements for the installation.

Infrastructure configuration

You need to configure required infrastructure before installing Allure TestOps:

Read this article to configure the infrastructure.

Get the access to the packages

Install Java

Each service requires java-11 to be installed.

Debian linux

To install Java on Debian machine, use following command:

sudo apt-get install openjdk-11-jre

Red Hat linux

To install Java on Red Hat machine, use following command:

yum install java-11-openjdk

Installation

Debian linux

Install Allure TestOps deb repository

In the command lines below replace login:password with your credentials:

cat << EOF >> /etc/apt/sources.list.d/allure.list
deb [trusted=yes]  https://login:password@qameta.jfrog.io/artifactory/debian allure main
EOF
sudo apt-get update

Install packages

sudo apt-get install allure-uaa allure-report allure-gateway

Red Hat linux

Install Allure TestOps rpm repository

In the command lines below replace login:password with your credentials:

cat << EOF >> /etc/yum.repos.d/allure.repo
[Allure-EE]
name=Allure-EE
baseurl=https://login:password@qameta.jfrog.io/artifactory/rpm/
failovermethod=priority
enabled=1
gpgcheck=0
EOF

Install packages

yum install allure-uaa allure-report allure-gateway

Configuration of Allure TestOps

Allure UAA

General settings

  1. allure.license.body - license key
  2. allure.security.user.name - admin name
  3. allure.security.user.password - admin password
  4. allure.registration.auto-approve - lets new users register without the admin’s permission
  5. allure.jwt.secret - the secret used for the JWT key generation

Consul settings

  1. spring.cloud.consul.host - host
  2. spring.cloud.consul.port - port

PostgreSQL settings

  1. spring.datasource.url - URL in the format jdbc:postgresql://localhost:5432/uaa
  2. spring.datasource.username - user name
  3. spring.datasource.password - user password

Allure Report

Consul settings

  1. spring.cloud.consul.host - host
  2. spring.cloud.consul.port - port

PostgreSQL settings

  1. spring.datasource.url - URL in the format jdbc:postgresql://localhost:5432/uaa
  2. spring.datasource.username - user name
  3. spring.datasource.password - user password

RabbitMQ settings

  1. spring.rabbitmq.host - host
  2. spring.rabbitmq.port - port
  3. spring.rabbitmq.username - user name
  4. spring.rabbitmq.password - user password
  5. spring.rabbitmq.virtual-host - virtual host

Storage setup (File System)

  1. allure.blob-storage.type - file storage type (file_system, s3)
  2. allure.blob-storage.file-system.directory - storage directory

Storage setup (S3)

  1. allure.blob-storage.type - storage type, set to s3
  2. allure.blob-storage.s3.endpoint - host, e.g., s3.amazonaws.com
  3. allure.blob-storage.s3.region - region
  4. allure.blob-storage.s3.bucket - bucket
  5. allure.blob-storage.s3.access-key - access key
  6. allure.blob-storage.s3.secret-key - secret key

Allure Gateway

Consul settings

  1. spring.cloud.consul.port - port
  2. spring.cloud.consul.host - host

Start Allure TestOps

Now, it’s time to enable and start applications after all subsystems of the application are configured

systemctl start allure-uaa
systemctl status allure-report
systemctl status allure-gateway
systemctl enable allure-uaa
systemctl enable allure-report
systemctl enable allure-gateway

Connect to Allure TestOps

Running application is available on the port # 8083.

Use following template for the URL to access the running application:

http://your_domain_or_ip:8083/

Update Allure TestOps

Following commands will update Allure TestOps to the latest version:

Debian linux

sudo apt-get update
sudo apt-get install allure-uaa allure-report allure-gateway

Red Hat linux

yum install allure-uaa allure-report allure-gateway

Installation of a specific version of Allure TestOps

To install a specific version of Allure TestOps use following commands:

Debian linux

sudo apt-get update
sudo apt-get install allure-uaa=3.131.0-46 allure-report=3.131.0-46 allure-gateway=3.131.0-46

Red Hat linux

yum install allure-uaa-3.131.0-46 allure-report-3.131.0-46 allure-gateway-3.131.0-46

Troubleshooting Allure TestOps

By default all components write logs to stdout, you can get logs by journalctl:

journalctl -f -n 100 -u allure-uaa
journalctl -f -n 100 -u allure-report
journalctl -f -n 100 -u allure-gateway

where:

-f        - to follow the journal
-n 100    - the number of journal entries to show
-u name   - name of a unit

To check the service status in consul

To show service status in consul use the URLs below, replace 127.0.0.1 by your actual consul IP address:

curl  http://127.0.0.1:8500/v1/health/service/allure-ee-gateway?ns=default
curl  http://127.0.0.1:8500/v1/health/service/allure-ee-uaa?ns=default
curl  http://127.0.0.1:8500/v1/health/service/allure-ee-report?ns=default

Removing Allure TestOps

It is not clear at all, why are you going to do such a thing, but to remove Allure TestOps you need to do the following:

  1. Remove packages
  2. Remove configurations and assets

Removing packages

Debian

sudo apt-get remove allure-uaa allure-report allure-gateway

Red Hat

yum remove allure-uaa allure-report allure-gateway

Removing configurations and assets

rm -rf /opt/allure
rm -rf /var/lib/allure

Using Allure TestOps with reverse proxy

If you want to use Allure TestOps with http/https, you should install nginx and certbot

Install nginx

sudo apt install nginx certbot

obtain a SSL certificate, where %%DOMAIN%% is your domain name.

certbot certonly -d %%DOMAIN%%

Nginx configuration

Put nginx config into file /etc/nginx/sites-available/allure.conf

cat << EOF > /etc/nginx/sites-available/allure.conf
upstream allure {
     server 127.0.0.1:8083 weight=1;
}

server {
   listen 80;
   server_name %%DOMAIN%%;
   return 301 https://$host$request_uri;
}

server {
   listen 0.0.0.0:443 ssl;
   server_name %%DOMAIN%%;
   ssl_certificate /etc/letsencrypt/live/%%DOMAIN%%/fullchain.pem;
   ssl_certificate_key /etc/letsencrypt/live/%%DOMAN%%/privkey.pem;
   ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
   ssl_protocols TLSv1.1 TLSv1.2;
   ssl_prefer_server_ciphers on;
   location / {
       proxy_pass http://allure;
       proxy_set_header Host $host;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_redirect off;
   }
}
EOF

Enable site

ln -s /etc/nginx/sites-available/allure.conf /etc/nginx/sites-enabled/allure.conf

Start nginx

systemctl start nginx
systemctl enable nginx

Back to deployment