ReportPortal.io is a service, that provides increased capabilities to speed up results analysis and reporting through the use of built-in analytic features.
ReportPortal is a great addition to the Continuous Integration and Continuous Testing process.
In the "scripts" folder, you'll find a collection of scripts designed to set up each service individually. You are welcome to use them as needed. The install_all.sh script can be used to download and install all the services at once. Before running it, ensure you configure the required environment variables. The scripts are designed to automatically compile the software locally during the installation process.
How to install PostgreSQL 16 or 17 on Ubuntu LTS 20.04, 22.04, LTS 24.04 / Red Hat family (RHEL, AlmaLinux, etc).
- After successful installation, you need to prepare the database for ReportPortal services
sudo su - postgres -c "psql"
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;
- Change your PostgreSQL authentication methods. Edit the
pg_hba.conf
file, and changepeer
tomd5
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
File location:
- Ubuntu:
/etc/postgresql/<PSQL_VERSION>/main/pg_hba.conf
- RHEL:
/var/lib/pgsql/<PSQL_VERSION>/data/pg_hba.conf
- After the changes above, restart the PostgreSQL service
sudo systemctl restart postgresql
- Create the pgcrypto extantion for PostgreSQL
reportportal
database
psql -U rpuser -d reportportal -c "CREATE EXTENSION pgcrypto;"
How to install RabbitMQ 4.0.5 on Ubuntu LTS 20.04, 22.04, 24.04 / Red Hat family (RHEL, AlmaLinux, etc.).
- After installation, enable RabbitMQ web management console:
sudo rabbitmq-plugins enable rabbitmq_management
sudo rabbitmq-plugins enable rabbitmq_shovel rabbitmq_shovel_management
sudo rabbitmq-plugins enable rabbitmq_consistent_hash_exchange
- Check and provide ownership of RabbitMQ files to the RabbitMQ user:
sudo chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/
- Create an admin user for the RabbitMQ web management console
sudo rabbitmqctl add_user admin <strong_password>
sudo rabbitmqctl set_user_tags admin administrator
sudo rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"
- Configure user, permissions, and vhost for ReportPortal. 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
sudo rabbitmqctl add_user <your_rpmquser> <your_rpmquser_password>
sudo rabbitmqctl set_user_tags <your_rpmquser> administrator
sudo rabbitmqctl set_permissions -p / <your_rpmquser> ".*" ".*" ".*"
sudo rabbitmqctl add_vhost analyzer
sudo rabbitmqctl set_permissions -p analyzer <your_rpmquser> ".*" ".*" ".*"
- Restart rabbitmq server to deploy changes
sudo systemctl restart rabbitmq-server
To check RabbitMQ look forward <you_IP>:15672
How to install OpenSearch 2.18.0 on [Ubuntu] (https://opensearch.org/docs/latest/install-and-configure/install-opensearch/debian/) LTS 20.04, 22.04, 24.04 / Red Hat family (RHEL, AlmaLinux, etc). Check for Java requirements in your host according to compatibility (https://opensearch.org/docs/latest/install-and-configure/install-opensearch/index/) To check OpenSearch use the
curl -u '<your_opensearch_user>:<your_opensearch_password>' -XGET http://localhost:9200/_cluster/health?pretty (Use https if you're using SSL on your instance).
{
"cluster_name" : "opensearch",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"discovered_master" : true,
"discovered_cluster_manager" : true,
"active_primary_shards" : 6,
"active_shards" : 6,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 2,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 75.0
}
How to install ElasticSearch 8.17 on Ubuntu LTS 20.04, 22.04, 24.04 / Red Hat family (RHEL, AlmaLinux, etc). Also you need to install openjdk-11-jre-headless
and openjdk-8-jdk
To check ElasticSearch use the curl -X GET "localhost:9200/"
. The output will be:
{
"name" : "reportportal",
"cluster_name" : "ElasticSearch",
"cluster_uuid" : "98xfWPnKQNSI1ql7q7y57w",
"version" : {
"number" : "7.10.1",
"build_flavor" : "default",
"build_type" : "deb",
"build_hash" : "78722783c38caa25a70982b5b042074cde5d3b3a",
"build_date" : "2021-03-18T06:17:15.410153305Z",
"build_snapshot" : false,
"lucene_version" : "8.8.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
- Create a working directory
sudo mkdir /opt/traefik && sudo chown $USER:$USER /opt/traefik && cd /opt/traefik
- Download Traefik 2.11.16 release from official git repository and make binary executable
wget -c -N -O traefik https://github.com/traefik/traefik/releases/download/v2.11.16/traefik_v2.11.16_linux_amd64.tar.gz && chmod +x traefik
tar -xvf traefik_v2.11.16_linux_amd64.tar.gz
- Download ReportPortal Traefik configuration file
wget -O /etc/traefik/traefik.yml https://raw.githubusercontent.com/reportportal/linux-installation/main/data/traefik.yml
wget -O /etc/traefik/dynamic_conf.yml https://raw.githubusercontent.com/reportportal/linux-installation/main/data/dynamic_conf.yml
- Create Service for traefik
sudo tee /etc/systemd/system/traefik.service <<EOF
[Unit]
Description=Traefik
Documentation=https://doc.traefik.io/traefik/
After=network.target
[Service]
ExecStart=/usr/local/bin/traefik --configFile=/etc/traefik/traefik.yml
Restart=always
User=root
[Install]
WantedBy=multi-user.target
EOF
- Start Traefik
sudo systemctl daemon-reload
sudo systemctl enable traefik
sudo systemctl start traefik
- Check Traefik status
sudo systemctl status traefik
wget https://go.dev/dl/go1.22.6.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.22.6.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
How to install Python 3.11.11, Python 3.11.11 DEV and Python 3.11.11 VENV on Ubuntu LTS 24.04 / Red Hat family 6, 7, 8 (RHEL, AlmaLinux, etc).
For example for Ubuntu 24.04 OS: Create Env variables
PY_VERSION="3.11.11"
PY_TARBALL="Python-${PY_VERSION}.tar.xz"
Get required python version
sudo wget "https://www.python.org/ftp/python/${PY_VERSION}/${PY_TARBALL}"
Also you need to install ZIP
, GCC
and software-properties-common
(for Ubuntu)
sudo apt install zip software-properties-common gcc -y
compile python
tar -xf "${PY_TARBALL}"
cd "Python-${PY_VERSION}"
./configure
make -j"$(nproc)"
sudo make altinstall
Add environment variables:
MAVEN_REPO="https://repo1.maven.org/maven2/com/epam/reportportal"
API_VERSION="5.13.2"
UAT_VERSION="5.13.0"
MIGRATIONS_VERSION="5.13.0"
UI_VERSION="5.12.13"
SERVICE_INDEX_VERSION="5.13.0"
SERVICE_ANALYZER="5.13.1"
SERVICE_JOBS="5.13.0"
SERVICE_INDEX="5.13.0"
SERVICE_API_JAVA_OPTS="-Xmx1g -XX:+UseG1GC -XX:InitiatingHeapOccupancyPercent=70 -Djava.security.egd=file:/dev/./urandom"
SERVICE_UAT_JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom -XX:MinRAMPercentage=60.0 -XX:MaxRAMPercentage=90.0 --add-opens=java.base/java.lang=ALL-UNNAMED"
SERVICE_JOBS_JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom -XX:+UseG1GC -XX:+UseStringDeduplication -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=60 -XX:MaxRAMPercentage=70.0 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp"
POSTGRES_DB="reportportal"
RP_ENCRYPTION_KEY=<YourStrongEncryptionKey>
RP_JOBS_BASEURL="http://localhost:8686"
RP_AMQP_HOST=<your_rabbitmq_host>
RP_AMQP_PORT=<your_rabbitmq_port>
RP_AMQP_APIPORT=<your_rabbitmq_api_port>
RP_AMQP_USER=<your_rabbitmq_user>
RP_AMQP_PASS=<your_rabbitmq_password>
RP_AMQP_APIUSER=<your_rabbitmq_api_user>
RP_AMQP_APIPASS=<your_rabbitmq_api_password>
RP_AMQP_ANALYZER_VHOST=<your_analyzer_virtual_host>
RABBITMQ_HOST=<your_rabbitmq_host>
RABBITMQ_PORT=<your_rabbitmq_port>
RABBITMQ_API_PORT=<your_rabbitmq_api_port>
RABBITMQ_DEFAULT_USER=<your_rabbitmq_default_user>
RABBITMQ_DEFAULT_PASS=<your_rabbitmq_default_password>
AMQP_EXCHANGE_NAME=<your_amqp_exchange_name>
AMQP_VIRTUAL_HOST=<your_amqp_virtual_host>
AMQP_URL="amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@${RP_AMQP_HOST}:${RP_AMQP_PORT}${RP_AMQP_ANALYZER_VHOST}"
DATASTORE_TYPE="filesystem"
ANALYZER_BINARYSTORE_TYPE=<your_analyzer_binarystore_type>
INSTANCE_TASK_TYPE=<your_instance_task_type>
UWSGI_WORKERS=<your_uwsgi_workers_count>
COM_TA_REPORTPORTAL_JOB_INTERRUPT_BROKEN_LAUNCHES_CRON="PT1H"
COM_TA_REPORTPORTAL_JOB_LOAD_PLUGINS_CRON="PT10S"
COM_TA_REPORTPORTAL_JOB_CLEAN_OUTDATED_PLUGINS_CRON="PT10S"
RP_ENVIRONMENT_VARIABLE_CLEAN_ATTACHMENT_CRON="0 0 */24 * * *"
RP_ENVIRONMENT_VARIABLE_CLEAN_LOG_CRON="0 0 */24 * * *"
RP_ENVIRONMENT_VARIABLE_CLEAN_LAUNCH_CRON="0 0 */24 * * *"
RP_ENVIRONMENT_VARIABLE_CLEAN_STORAGE_CRON="0 0 */24 * * *"
RP_ENVIRONMENT_VARIABLE_STORAGE_PROJECT_CRON="0 */5 * * * *"
RP_ENVIRONMENT_VARIABLE_CLEAN_EXPIREDUSER_CRON="0 0 */24 * * *"
RP_ENVIRONMENT_VARIABLE_NOTIFICATION_EXPIREDUSER_CRON="0 0 */24 * * *"
RP_ENVIRONMENT_VARIABLE_CLEAN_EVENTS_CRON="0 30 05 * * *"
RP_ENVIRONMENT_VARIABLE_CLEAN_EVENTS_RETENTIONPERIOD="365"
RP_ENVIRONMENT_VARIABLE_CLEAN_STORAGE_CHUNKSIZE="20000"
RP_ENVIRONMENT_VARIABLE_PATTERN_ANALYSIS_BATCH_SIZE="100"
RP_ENVIRONMENT_VARIABLE_PATTERN_ANALYSIS_PREFETCH_COUNT="1"
RP_ENVIRONMENT_VARIABLE_PATTERN_ANALYSIS_CONSUMERS_COUNT="1"
RP_SERVER_PORT=<your_server_port>
RP_JOBS_BASEURL=<your_jobs_base_url>
RP_SESSION_LIVE=<your_session_live_duration>
RP_SAML_SESSION_LIVE=<your_saml_session_live_duration>
DATASTORE_PATH=<your_datastore_path>
NODE_VERSION="20"
PY_VERSION="23.11.11"
LOGGING_LEVEL=<your_logging_level>
Create a working directory
sudo mkdir /opt/reportportal/ && \
sudo chown -R $USER:$USER /opt/reportportal/ && \
cd /opt/reportportal/
- Download last relaese of Analyzer service, unzip and enter to directory:
curl -LO https://github.com/reportportal/service-auto-analyzer/archive/refs/tags/${SERVICE_ANALYZER}.zip && \
unzip ${SERVICE_ANALYZER}.zip && \
cd /opt/reportportal/service-auto-analyzer-${SERVICE_ANALYZER}
- Work with a virtual environment:
# Create a virtual environment with any name (for example /vrpanalyzer)
sudo python3.11 -m venv /analyzer
# Install python required libraries
sudo /analyzer/bin/pip install --upgrade pip
sudo /analyzer/bin/pip install --no-cache-dir -r requirements.txt
# Activate the virtual environment
source /vrpanalyzer/bin/activate
# Install stopwords package from the nltk library
sudo /analyzer/bin/python3.11 -m nltk.downloader -d /usr/share/nltk_data stopwords
- Start the uwsgi server, you can change properties, such as the worker's quantity for running the analyzer in several processes.
Set in app.ini your virtual environment specified above:
virtualenv = analyzer
Set in app.py RabbitMQ URL amqp://user:password@localhost:5672
, binary store type filesystem
, and directory name (for example rpstorage
)
# "amqpUrl": os.getenv("AMQP_URL", "amqp://user:password@localhost:5672").strip("/").strip("\\"),
# "binaryStoreType": os.getenv("ANALYZER_BINARYSTORE_TYPE", "filesystem"),
# "filesystemDefaultPath": os.getenv("FILESYSTEM_DEFAULT_PATH", "rpstorage").strip()
Activate the virtual environment
source /analyzer/bin/activate
Install stopwords package from the nltk library
sudo /analyzer/bin/python3.11 -m nltk.downloader -d /usr/share/nltk_data stopwords
Start Analyzer
/analyzer/bin/uwsgi --ini app.ini > /dev/null 2>&1 &
for analyzer train consider the same steps, but using "analyzer-train" instead "analyzer", also you will require the following environment variables:
INSTANCE_TASK_TYPE: train
UWSGI_WORKERS: 1
- Prepare automatic database Authentication
PGPASS_FILE="$HOME/.pgpass"
echo "Configuring automatic authentication in $PGPASS_FILE..."
cat <<EOF > "$PGPASS_FILE"
${POSTGRES_HOST}:${POSTGRES_PORT}:${RP_POSTGRES_DB}:${RP_POSTGRES_USER}:${POSTGRES_PASSWORD}
EOF
chmod 600 "$PGPASS_FILE"
- Download service
cd /opt/reportportal/ && \
wget -c -N -O migrations.zip https://github.com/reportportal/migrations/archive/${MIGRATIONS_VERSION}.zip && unzip migrations.zip && mv migrations-${MIGRATIONS_VERSION} migrations && rm -f migrations.zip
- Run service
You need to execute all up
scripts to prepare your database for ReportPortal services, run the following script in orther to install it:
for FILE in $(ls migrations/migrations/*.up.sql | sort -V); do
echo "Applying migration: $FILE"
psql -h "$POSTGRES_HOST" \
-p "$POSTGRES_PORT" \
-U "$RP_POSTGRES_USER" \
-d "$RP_POSTGRES_DB" \
-a -f "$FILE"
done
- Clean workspace
rm -f "$PGPASS_FILE"
rm -rf ./migrations/
- Clone the Repository
cd /opt/reportportal/ && \
sudo git clone --depth 1 --branch 5.13.0 https://github.com/reportportal/service-index.git /opt/reportportal/service-index-build
- Build the service
cd service-index-build/
sudo CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o app
- Install the Binary
sudo mkdir -p /opt/reportportal/service-index
sudo cp app /opt/reportportal/service-index/
sudo chmod +x /opt/reportportal/service-index/app
- Remove build folder and Run service
sudo rm -rf /opt/reportportal/service-index-build/
sudo nohup RP_SERVER_PORT=9000 LB_URL=http://localhost:8081 /opt/reportportal/service-index/app 2>&1 &
- Download API service
cd /opt/reportportal/ && \
curl -L $MAVEN_REPO/service-api/$API_VERSION/service-api-$API_VERSION-exec.jar -o service-api.jar
- Run API service
sudo RP_AMQP_HOST=$RP_AMQP_HOST RP_AMQP_APIUSER=$RP_RABBITMQ_USER RP_AMQP_APIPASS=$RP_RABBITMQ_PASSWORD RP_AMQP_USER=$RP_RABBITMQ_USER RP_AMQP_PASS=$RP_RABBITMQ_PASSWORD RP_DB_USER=$RP_POSTGRES_USER RP_DB_PASS=$RP_POSTGRES_PASSWORD RP_DB_HOST=$RP_DB_HOST java $SERVICE_API_JAVA_OPTS -jar service-api.jar 2>&1 &
- Download service
cd /opt/reportportal/ && \
curl -L $MAVEN_REPO/service-authorization/$UAT_VERSION/service-authorization-$UAT_VERSION-exec.jar -o service-uat.jar
- Run service
RP_DB_HOST=$RP_DB_HOST RP_DB_USER=$RP_POSTGRES_USER RP_DB_PASS=$RP_POSTGRES_PASSWORD java $SERVICE_UAT_JAVA_OPTS -jar service-uat.jar 2>&1 &
- Download service
cd /opt/reportportal/ && \
curl -L $MAVEN_REPO/service-jobs/$SERVICE_JOBS/service-jobs-$SERVICE_JOBS-exec.jar -o service-uat.jar
- Run service
RP_DB_HOST=$RP_DB_HOST RP_DB_USER=$RP_POSTGRES_USER RP_DB_PASS=$RP_POSTGRES_PASSWORD java $SERVICE_JOBS_JAVA_OPTS -jar service-uat.jar 2>&1 &
- Install dependencies
sudo apt-get update
sudo apt-get install -y git curl
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs npm
- Clone repository
git clone https://github.com/reportportal/service-ui.git service-ui
cd service-ui
git checkout $UI_VERSION
- Install Project Dependencies
cd app
npm cache clean --force
npm install --legacy-peer-deps --prefer-offline --no-audit --no-fund
- Set Up Env Variables
echo "PROXY_PATH='http://localhost:8080/'" > .env
- Run Project
nohup npm run dev > ui.log 2>&1 &
Check availability of ReportPortal