Network configuration
When deploying an Allure TestOps instance, you need to decide on:
- the external address (host and port) which the users will use to access Allure TestOps in their browsers,
- the listening port on which the Allure TestOps will listen to HTTP requests.
A production deployment usually relies on a reverse proxy or a load balancer that makes sure that user requests to the external address are routed to the listening port.
By default, Allure TestOps uses the unencrypted HTTP protocol. However, with a reverse proxy or a load balancer, it is possible to enable HTTPS.
It is common to have the testops service listening to port 8080 and a reverse proxy or a load balancer listening to port 443. The HTTPS requests on port 443 are being translated to HTTP requests on port 8080, then Allure TestOps processes them and responds to them. Where necessary, it uses the external address for generating cross-page links.
Common network parameters
Unlike other deployment methods, Kubernetes provides an integrated reverse proxy or a load balancer (Ingress or Istio). It listens to port 80 (or port 443 if HTTPS is enabled) and routes the requests to the listening port of the testops service.
Define the parameters in the values.yaml file:
instanceFqdn
— external host;port
— listening port (8080 by default);network.ingress.enabled
— set totrue
to use Ingress;network.istio.enabled
— set totrue
to use Istio.
Note that it is required to enable either Ingress or Istio, but not both.
For example, with the configuration below, the users will access the instance as http://testops.example.com
(port 80), where Ingress will receive the requests and send them to the testops service (port 8080).
instanceFqdn: testops.example.com
port: 8080
# ...
network:
ingress:
enabled: true
Define the parameters in the .env file:
TESTOPS_INSTANCE_URL
— external host;TESTOPS_INSTANCE_PORT
— external port of the application container;TESTOPS_CONTAINER_PORT
— port on which the application runs inside the container.
For example, with the configuration below, the users will access the instance as http://testops.example.com
, assuming a reverse proxy will route the requests from the default port 80 to port 8080:
TESTOPS_INSTANCE_URL=testops.example.com
TESTOPS_INSTANCE_PORT=80
TESTOPS_CONTAINER_PORT=8080
When deploying using DEB or RPM packages, port 8080 will always be used for listening. In the /opt/testops/conf/testops.conf file, define the external host and port via the ALLURE_ENDPOINT
parameter, specifying the full external URL.
For example, with the configuration below, the users will access the instance as http://testops.example.com
, assuming a reverse proxy will route the requests from the default port 80 to port 8080:
ALLURE_ENDPOINT=http://testops.example.com
Reverse proxy parameters
When setting up a reverse proxy for Allure TestOps, make sure the following parameters are configured correctly:
maximum size for a request body (for example,
client_max_body_size
in nginx);Set this parameter to 300 MB or higher. A lower limit may prevent uploading test results to Allure TestOps.
server response timeout (for example,
proxy_read_timeout
in nginx).Set this parameter to 300 seconds or higher. A lower timeout may interrupt uploading of test results to Allure TestOps.
Enabling HTTPS
Both Ingress and Istio can work via the HTTPS protocol when provided with a valid TLS certificate. No external reverse proxy is needed.
Edit the parameters in the values.yaml file:
network.tls.enabled
— must betrue
;network.tls.secretName
— the name of a Kubernetes secret that stores a TLS certificate.
For example:
host: testops.example.com
gateway:
service:
port: 8080
# ...
network:
ingress:
enabled: true
tls:
enabled: true
secretName: allure-tls
To enable HTTPS for a Docker Compose installation, set up a reverse proxy, such as nginx.
Then, open the .env file and update the following parameters:
- Change
TESTOPS_PROTO
fromhttp
tohttps
. - Change
TESTOPS_INSTANCE_PORT
from80
to443
.
For example:
TESTOPS_PROTO=https
TESTOPS_INSTANCE_URL=testops.example.com
TESTOPS_INSTANCE_PORT=443
TESTOPS_CONTAINER_PORT=8080
To enable HTTPS when using DEB or RPM packages, set up a reverse proxy, such as nginx.
Then, open the /opt/testops/conf/testops.conf file and update the ALLURE_ENDPOINT
parameter by changing http
to https
.
For example:
ALLURE_ENDPOINT=https://testops.example.com
Configuring firewall
If you are using a firewall, make sure that incoming traffic is allowed.
This step may be done in different ways, depending on the firewall you use. Below are examples for the default firewalls in different Linux distributions. Please be sure to replace 8080
with the relevant port for your deployment.
sudo ufw allow 8080/tcp
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --reload