ReportPortal is a service that provides great capabilities for speeding up results analysis and reporting by means of built-in analytical features.
This guide is intended to provide you with sufficient information to get started with ReportPortal on CentOS/RHEL Linux distributions with no Docker/Kubernetes usage.
Before you deploy ReportPortal you should have installed all its dependencies.
PostgreSQL
RabbitMQ
ElasticSearch
In order to install PostgreSQL 11 on your CentOS/RHEL 7/6 systems please follow the steps below.
## CentOS/RHEL - 7
rpm -Uvh https://yum.postgresql.org/11/redhat/rhel-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
## CentOS/RHEL - 6
rpm -Uvh https://yum.postgresql.org/11/redhat/rhel-6-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum install postgresql11-server
This will create a data directory and other configuration files on your system
/usr/pgsql-11/bin/postgresql-11-setup initdb
To enable and start PostgreSQL service using the following commands as per your operating systems
CentOS/RHEL – 7
systemctl enable postgresql-11.service
systemctl start postgresql-11.service
CentOS/RHEL – 6
service postgresql-11 start
chkconfig postgresql-11 on
After completing the above all steps. Your PostgreSQL 11 server is ready to use. Log in to postfix instance to verify the connection
su - postgres -c "psql"
psql (11.0)
Type "help" for help.
postgres=#
Please run the following commands, having previously determined the name and password for your ReportPortal db user
create database reportportal;
create user <your_rpdbuser> with encrypted password '<your_rpdbuser_password>';
grant all privileges on database reportportal to <your_rpdbuser>;
ALTER USER <your_rpdbuser> WITH SUPERUSER;
Edit the /var/lib/pgsql/11/data/pg_hba.conf file, and change peer to md5 in the following lines
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
Restart the PostgreSQL service
yum install postgresql11-contrib
PGPASSWORD=<your_rpdbuser_password> psql -U <your_rpdbuser> -d reportportal -c "CREATE EXTENSION pgcrypto;"
RabbitMQ is written in Erlang Language. Erlang is not available in default YUM repository, hence you will need to install EPEL repository
yum -y install epel-release
Now install Erlang using following command
yum -y install erlang socat
You can now check the Erlang version using
erl -version
RabbitMQ provides RPM package for enterprise Linux systems which are precompiled and can be installed directly. The only required dependency was to install Erlang into the system
Download the Erlang RPM package by running
wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.10/rabbitmq-server-3.6.10-1.el7.noarch.rpm
Import the GPG key
rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
Install the RPM package
rpm -Uvh rabbitmq-server-3.6.10-1.el7.noarch.rpm
To enable and start RabbitMQ service using the following commands as per your operating systems
CentOS/RHEL – 7
systemctl enable rabbitmq-server
systemctl start rabbitmq-server
CentOS/RHEL – 6
chkconfig rabbitmq-server on
chkconfig --list | grep rabbitmq
sudo service rabbitmq-server start
Enable RabbitMQ web management console
rabbitmq-plugins enable rabbitmq_management
Provide ownership of RabbitMQ files to the RabbitMQ user by running
chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/
Now you will need to create an administrative user for RabbitMQ web management console. Run the following commands for same
rabbitmqctl add_user admin StrongPassword
rabbitmqctl set_user_tags admin administrator
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"
Run the following commands in order to configure your RabbitMQ work with ReportPortal. Please determine the name and the password for your ReportPortal Rabbitmq user in advance
rabbitmqctl add_user <your_rpmquser> <your_rpmquser_password>
rabbitmqctl set_user_tags <your_rpmquser> administrator
rabbitmqctl set_permissions -p / <your_rpmquser> ".*" ".*" ".*"
rabbitmqctl add_vhost analyzer
rabbitmqctl set_permissions -p analyzer <your_rpmquser> ".*" ".*" ".*"
The recommended way to install Elasticsearch on CentOS 7 is by installing the rpm package from the official Elasticsearch repository
sudo yum install java-1.8.0-openjdk-devel
Verify the Java installation by printing the Java version
java -version
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
Create a file called elasticsearch.repo in the /etc/yum.repos.d/ directory for RedHat based distributions, or in the /etc/zypp/repos.d/ directory for OpenSuSE based distributions, containing:
[elasticsearch-7.x]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
You can now install Elasticsearch
sudo yum install elasticsearch
Once the installation process is complete, start and enable the service by running
CentOS/RHEL – 7
sudo systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service
CentOS/RHEL – 6
chkconfig --add elasticsearch
chkconfig elasticsearch on
service elasticsearch start
You can verify that Elasticsearch is running by sending an HTTP request to port 9200 on localhost with the following curl command
curl -X GET "localhost:9200/"
The output will look similar to the following
{
"name" : "fLVNqN_",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "6zKcQppYREaRH0tyfJ9j7Q",
"version" : {
"number" : "6.7.0",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "8453f77",
"build_date" : "2019-03-21T15:32:29.844721Z",
"build_snapshot" : false,
"lucene_version" : "7.7.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
./download_services.sh
Use 'chmod +x' on the files if it's not.
RP_POSTGRES_USER=<your_rpdbuser>
RP_POSTGRES_PASSWORD=<your_rpdbuser_password>
RP_RABBITMQ_USER=<your_rpmquser>
RP_RABBITMQ_PASSWORD=<your_rpmquser_password>
You can also change heap size values for API and UAT services by adjusting the following variables
# API
SERVICE_API_JAVA_OPTS="-Xms1024m -Xmx2048m"
# UAT
SERVICE_UAT_JAVA_OPTS="-Xms512m -Xmx512m"
./start_rp.sh
It take some time to initialize your RP installation.
Open http://YOUR_PUBLIC_IP:8080 page in your browser. Defalut login and password is:
default
1q2w3e