Installing Trento Server

Trento Server can be deployed in different ways depending on your infrastructure and requirements.

Supported deployment methods:

Kubernetes deployment

The subsection uses the following placeholders:

  • TRENTO_SERVER_HOSTNAME: the host name used by the end user to access the console.

  • ADMIN_PASSWORD: the password of the admin user created during the installation process.

    The password must meet the following requirements:

    • minimum length of 8 characters

    • the password must not contain 3 identical numbers or letters in a row (for example, 111 or aaa)

    • the password must not contain 4 sequential numbers or letters (for example, 1234, abcd, ABCD)

By default, the provided Helm chart uses Traefik as ingress class
Main usages are related to:

  • path rewriting

  • endpoint protection

Search for Traefik specific usage scenarios on GitHub. In case another ingress controller is used, adapt accordingly.

Installing Trento Server on an existing Kubernetes cluster

Trento Server consists of a several components delivered as container images and intended for deployment on a Kubernetes cluster. A manual production-ready deployment of these components requires Kubernetes knowledge. Customers without in-house Kubernetes expertise and those who want to try Trento with a minimum of effort, can use the Trento Helm chart. This approach automates the deployment of all the required components on a single Kubernetes cluster node. You can use the Trento Helm chart to install Trento Server on a existing Kubernetes cluster as follows:

The examples in this section do not specify a Kubernetes namespace for simplicity. By default, Helm installs to the default namespace.

For production deployments, create and use a dedicated namespace.

Example:

kubectl create namespace trento
helm upgrade \
   --install trento-server oci://registry.suse.com/trento/trento-server \
   --namespace trento \
   ...

The examples in this section deliver an installation of Trento Server without Prometheus. If you want to have Prometheus installed and enabled along Trento Server refer to [sec-prometheus-integration].

  1. Install Helm:

    curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
  2. Connect Helm to an existing Kubernetes cluster.

  3. Use Helm to install Trento Server with the Trento Helm chart:

    helm upgrade \
       --install trento-server oci://registry.suse.com/trento/trento-server \
       --set global.trentoWeb.origin=TRENTO_SERVER_HOSTNAME \
       --set trento-web.adminUser.password=ADMIN_PASSWORD \
       --set prometheus.enabled=false

    Where:

    global.trentoWeb.origin

    Uses the provided hostname (for example, trento.example.com) to configure internal functionalities such as the interactive API portal, websockets, or certificate generation.

    trento-web.adminUser.password

    Sets the initial password for the default admin account to access the Trento console.

    prometheus.enabled

    Enables or disables the deployment of Prometheus. For more information, see [sec-prometheus-integration].

  4. To verify that the Trento Server installation was successful, open the URL of the Trento Web (http://TRENTO_SERVER_HOSTNAME) from a workstation on the SAP administrator’s LAN.

Installing Trento Server on K3s

If you do not have a Kubernetes cluster, or you have one but you do not want to use it for Trento, you can use SUSE Rancher’s K3s as an alternative. To deploy Trento Server on K3s, you need a server or VM (see [sec-trento-server-requirements] for minimum requirements) and follow the steps in the following procedure.

The following procedure deploys Trento Server on a single-node K3s cluster. Note that this setup is not recommended for production use.

  1. Log in to the Trento Server host.

  2. Install K3s either as root or a non-root user.

    • Installing as user root:

      curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_SELINUX_RPM=true sh
    • Installing as a non-root user:

      curl -sfL https://get.k3s.io | INSTALL_K3S_SKIP_SELINUX_RPM=true sh -s - --write-kubeconfig-mode 644
  3. Install Helm as root.

    curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
  4. Set the KUBECONFIG environment variable for the same user that installed K3s:

    export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
  5. With the same user that installed K3s, install Trento Server using the Helm chart:

    helm upgrade \
       --install trento-server oci://registry.suse.com/trento/trento-server \
       --set global.trentoWeb.origin=TRENTO_SERVER_HOSTNAME \
       --set trento-web.adminUser.password=ADMIN_PASSWORD \
       --set prometheus.enabled=false

    Where:

    global.trentoWeb.origin

    Uses the provided hostname (for example, trento.example.com) to configure internal functionalities such as the interactive API portal, websockets, or certificate generation.

    trento-web.adminUser.password

    Sets the initial password for the default admin account to access the Trento console.

    prometheus.enabled

    Enables or disables the deployment of Prometheus. For more information, see [sec-prometheus-integration].

  6. Monitor the creation and start-up of the Trento Server pods, and wait until they are ready and running:

    watch kubectl get pods

    All pods must be in the ready and running state.

  7. Log out of the Trento Server host.

  8. To verify that the Trento Server installation was successful, open the URL of the Trento Web (http://TRENTO_SERVER_HOSTNAME) from a workstation on the SAP administrator’s LAN.

Deploying Trento Server on selected nodes

If you use a multi-node Kubernetes cluster, it is possible to deploy Trento Server images on selected nodes by specifying the field nodeSelector in the helm upgrade command as follows:

 helm upgrade \
   --install trento-server oci://registry.suse.com/trento/trento-server \
   --set global.trentoWeb.origin=TRENTO_SERVER_HOSTNAME \
   --set trento-web.adminUser.password=ADMIN_PASSWORD \
   --set postgresql.primary.nodeSelector.LABEL=VALUE \
   --set trento-web.nodeSelector.LABEL=VALUE \
   --set prometheus.enabled=false

Replace LABEL and VALUE with the actual label key and value of your target node.

Enabling email alerts

Email alerting feature notifies the SAP Basis administrator about important changes in the SAP Landscape being monitored by Trento.

The reported events include the following:

  • Host heartbeat failed

  • Cluster health detected critical

  • Database health detected critical

  • SAP System health detected critical

This feature is disabled by default. It can be enabled at installation time or anytime at a later stage. In both cases, the procedure is the same and uses the following placeholders:

SMTP_SERVER

The SMTP server designated to send email alerts

SMTP_PORT

Port on the SMTP server

SMTP_USER

User name to access SMTP server

SMTP_PASSWORD

Password to access SMTP server

ALERTING_SENDER

Sender email for alert notifications

ALERTING_RECIPIENT

Email address to receive alert notifications.

The command to enable email alerts is as follows:

helm upgrade \
   --install trento-server oci://registry.suse.com/trento/trento-server \
   --set global.trentoWeb.origin=TRENTO_SERVER_HOSTNAME \
   --set trento-web.adminUser.password=ADMIN_PASSWORD \
   --set prometheus.enabled=false \
   --set trento-web.alerting.enabled=true \
   --set trento-web.alerting.smtpServer=SMTP_SERVER \
   --set trento-web.alerting.smtpPort=SMTP_PORT \
   --set trento-web.alerting.smtpUser=SMTP_USER \
   --set trento-web.alerting.smtpPassword=SMTP_PASSWORD \
   --set trento-web.alerting.sender=ALERTING_SENDER \
   --set trento-web.alerting.recipient=ALERTING_RECIPIENT
Enabling SSL

Ingress may be used to provide SSL termination for the Web component of Trento Server. This would allow to encrypt the communication from the agent to the server, which is already secured by the corresponding API key. It would also allow HTTPS access to the Web console with trusted certificates.

Configuration must be done in the tls section of the values.yaml file of the chart of the Trento Server Web component.

For details on the required Ingress setup and configuration, refer to: https://kubernetes.io/docs/concepts/services-networking/ingress/. Particularly, refer to section https://kubernetes.io/docs/concepts/services-networking/ingress/#tls for details on the secret format in the YAML configuration file.

Additional steps are required on the Agent side.

systemd deployment

A systemd-based installation of the Trento Server using RPM packages can be performed manually on the latest supported versions of SUSE Linux Enterprise Server for SAP applications, from 15 SP4 up to 16. For installations on service packs other than the current one, make sure to update the repository URL as described in the relevant notes throughout this guide.

List of dependencies
Install Trento dependencies
Install PostgreSQL

The current instructions are tested with the following PostgreSQL versions:

SUSE Linux Enterprise Server for SAP applications PostgreSQL Version

15 SP4

14.10

15 SP5

15.5

15 SP6

16.9

15 SP7

17.5

16.0

17.6

Using a different version of PostgreSQL may require different steps or configurations, especially when changing the major number. For more details, refer to the official PostgreSQL documentation.

  1. Install PostgreSQL server:

    sudo zypper install postgresql-server
  2. Enable and start PostgreSQL server:

    sudo systemctl enable --now postgresql
Configure PostgreSQL
  1. Start psql with the postgres user to open a connection to the database:

    sudo su - postgres
    psql
  2. Initialize the databases in the psql console:

    CREATE DATABASE wanda;
    CREATE DATABASE trento;
    CREATE DATABASE trento_event_store;
  3. Create the users:

    The values WANDA_USER, WANDA_PASSWORD, TRENTO_USER, and WEB_PASSWORD are placeholders. Replace them with your own secure values before running these commands.

    CREATE USER WANDA_USER WITH PASSWORD 'WANDA_PASSWORD';
    CREATE USER TRENTO_USER WITH PASSWORD 'WEB_PASSWORD';
  4. Grant required privileges to the users and close the connection:

    \c wanda
    GRANT ALL ON SCHEMA public TO WANDA_USER;
    \c trento
    GRANT ALL ON SCHEMA public TO TRENTO_USER;
    \c trento_event_store
    GRANT ALL ON SCHEMA public TO TRENTO_USER;
    \q
  5. Exit the postgres user session:

    exit
  6. Allow the PostgreSQL database to receive connections to the respective databases and users. To do this, add the following to /var/lib/pgsql/data/pg_hba.conf:

    The pg_hba.conf file works sequentially. This means that the rules on the top have preference over the ones below. The following example shows a permissive address range. So for this to work, the entires must be written at the top of the host entries. For further information, refer to the pg_hba.conf documentation.

    host   wanda                      WANDA_USER    0.0.0.0/0     scram-sha-256
    host   trento,trento_event_store  TRENTO_USER   0.0.0.0/0     scram-sha-256
  7. Allow PostgreSQL to bind on all network interfaces in /var/lib/pgsql/data/postgresql.conf by changing the following line:

    listen_addresses = '*'
  8. Restart PostgreSQL to apply the changes:

    sudo systemctl restart postgresql
Install RabbitMQ
  1. Install RabbitMQ server:

    sudo zypper install rabbitmq-server
  2. Allow connections from external hosts by modifying /etc/rabbitmq/rabbitmq.conf, so the Trento-agent can reach RabbitMQ:

    listeners.tcp.default = 5672
  3. If firewalld is running, add a rule to firewalld:

    sudo firewall-cmd --zone=public --add-port=5672/tcp --permanent
    sudo firewall-cmd --reload
  4. Enable the RabbitMQ service:

    sudo systemctl enable --now rabbitmq-server
Configure RabbitMQ

To configure RabbitMQ for a production system, follow the official suggestions in the RabbitMQ guide.

  1. Create a new RabbitMQ user:

    The values TRENTO_USER and TRENTO_USER_PASSWORD are placeholders. Replace them with your own secure values before running these commands.

    sudo rabbitmqctl add_user TRENTO_USER TRENTO_USER_PASSWORD
  2. Create a virtual host:

    sudo rabbitmqctl add_vhost vhost
  3. Set permissions for the user on the virtual host:

    sudo rabbitmqctl set_permissions -p vhost TRENTO_USER ".*" ".*" ".*"
Install Trento using RPM packages

The trento-web and trento-wanda packages are available by default on supported SUSE Linux Enterprise Server for SAP applications distributions.

Install Trento web, wanda and checks:

sudo zypper install trento-web trento-wanda
Create the configuration files

Both services depend on respective configuration files. They must be placed in /etc/trento/trento-web and /etc/trento/trento-wanda respectively, and examples of how to modify them are available in /etc/trento/trento-web.example and /etc/trento/trento-wanda.example.

You can create the content of the secret variables such as SECRET_KEY_BASE, ACCESS_TOKEN_ENC_SECRET and REFRESH_TOKEN_ENC_SECRET using openssl:

openssl rand -out /dev/stdout 48 | base64
  1. Create the /etc/trento/trento-web configuration file. For example:

    The values TRENTO_USER, TRENTO_USER_PASSWORD, and WEB_PASSWORD are placeholders. Replace them with your own secure values before running these commands.

    # /etc/trento/trento-web
    AMQP_URL=amqp://TRENTO_USER:TRENTO_USER_PASSWORD@localhost:5672/vhost
    DATABASE_URL=ecto://TRENTO_USER:WEB_PASSWORD@localhost/trento
    EVENTSTORE_URL=ecto://TRENTO_USER:WEB_PASSWORD@localhost/trento_event_store
    ENABLE_ALERTING=false
    CHARTS_ENABLED=false
    ADMIN_USER=admin
    ADMIN_PASSWORD=trentodemo
    ENABLE_API_KEY=true
    PORT=4000
    TRENTO_WEB_ORIGIN=trento.example.com
    SECRET_KEY_BASE=some-secret
    ACCESS_TOKEN_ENC_SECRET=some-secret
    REFRESH_TOKEN_ENC_SECRET=some-secret
    CHECKS_SERVICE_BASE_URL=/wanda
    OAS_SERVER_URL=https://trento.example.com
    • The TRENTO_WEB_ORIGIN configures internal functionalities such as the interactive API portal, websockets, or certificate generation.

      Ensure that a valid hostname, FQDN, or IP address is configured in TRENTO_WEB_ORIGIN when using HTTPS. Otherwise, websocket connections will fail, preventing real-time updates in the web interface.

    • The ADMIN_PASSWORD variable must meet the following requirements:

      • Minimum of 8 characters

      • The password not contain 3 consecutive identical numbers or letters (for example, 111 or aaa)

      • The password must not contain 4 consecutive numbers or letters (for example, 1234, abcd, ABCD)

    • The ENABLE_ALERTING enables the alerting system to receive email notifications. Set ENABLE_ALERTING to true and add additional variables to the /etc/trento/trento-web to enable the feature:

      # /etc/trento/trento-web
      ENABLE_ALERTING=true
      ALERT_SENDER=<<SENDER_EMAIL_ADDRESS>>
      ALERT_RECIPIENT=<<RECIPIENT_EMAIL_ADDRESS>>
      SMTP_SERVER=<<SMTP_SERVER_ADDRESS>>
      SMTP_PORT=<<SMTP_PORT>>
      SMTP_USER=<<SMTP_USER>>
      SMTP_PASSWORD=<<SMTP_PASSWORD>>
  2. Create the /etc/trento/trento-wanda configuration file. For example:

    The values WANDA_USER, WANDA_PASSWORD, TRENTO_USER, and TRENTO_USER_PASSWORD are placeholders. Replace them with your own secure values before running these commands.

    # /etc/trento/trento-wanda
    CORS_ORIGIN=http://localhost
    AMQP_URL=amqp://TRENTO_USER:TRENTO_USER_PASSWORD@localhost:5672/vhost
    DATABASE_URL=ecto://WANDA_USER:WANDA_PASSWORD@localhost/wanda
    PORT=4001
    SECRET_KEY_BASE=some-secret
    OAS_SERVER_URL=https://trento.example.com/wanda
    AUTH_SERVER_URL=http://localhost:4000
  3. Secure the configuration files.

    To protect sensitive information, the configuration files must have 600 permissions so that only the root user can read them:

    sudo chmod 600 /etc/trento/trento-web
    sudo chmod 600 /etc/trento/trento-wanda
Start the services

In some SUSE Linux Enterprise Server for SAP applications environments, SELinux may be enabled and set to enforcing mode by default. If Trento services fail to start or show permission-related errors, check the SELinux status:

sudo getenforce

If SELinux is set to enforcing, switch it to permissive mode either temporarily or permanently:

  • Temporary change (until reboot):

    sudo setenforce 0
  • Permanent change (persists after reboot):

    Edit /etc/selinux/config and set:

    SELINUX=permissive

Enable and start the services:

sudo systemctl enable --now trento-web trento-wanda
Monitor the services

Use journalctl to check if the services are up and running correctly. For example:

sudo journalctl -fu trento-web
Check the health status of Trento Web and Trento Wanda

You can check if Trento Web and Trento Wanda services function correctly by accessing the healthz and readyz API.

If Trento web and wanda are ready, and the database connection is set up correctly, the output should be as follows:

{"ready":true}{"database":"pass"}
  1. Check Trento Web health status using curl:

    curl http://localhost:4000/api/readyz
    curl http://localhost:4000/api/healthz
  2. Check Trento Wanda health status using curl:

    curl http://localhost:4001/api/readyz
    curl http://localhost:4001/api/healthz
Install and configure NGINX
  1. Install NGINX package:

    sudo zypper install nginx
  2. If firewalld is running, add firewalld rules for HTTP and HTTPS:

    sudo firewall-cmd --zone=public --add-service=https --permanent
    sudo firewall-cmd --zone=public --add-service=http --permanent
    sudo firewall-cmd --reload
  3. Start and enable NGINX:

    sudo systemctl enable --now nginx
  4. Create a /etc/nginx/conf.d/trento.conf Trento configuration file:

    map $http_upgrade $connection_upgrade {
      default upgrade;
      '' close;
    }
    
    upstream web {
      server 127.0.0.1:4000 max_fails=5 fail_timeout=60s;
    }
    
    upstream wanda {
      server 127.0.0.1:4001 max_fails=5 fail_timeout=60s;
    }
    
    server {
        # Redirect HTTP to HTTPS
        listen 80;
        server_name trento.example.com;
        return 301 https://$host$request_uri;
    }
    
    server {
        server_name trento.example.com;
        listen 443 ssl;
    
        ssl_certificate /etc/nginx/ssl/certs/trento.crt;
        ssl_certificate_key /etc/ssl/private/trento.key;
    
        ssl_protocols TLSv1.2 TLSv1.3;
        ssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384';
        ssl_prefer_server_ciphers on;
        ssl_session_cache shared:SSL:10m;
    
        # Wanda rule
        location /wanda/  {
            allow all;
    
            # Proxy Headers
            proxy_http_version 1.1;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
            proxy_set_header X-Cluster-Client-Ip $remote_addr;
    
            # Important Websocket Bits!
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
    
            # Add final slash to replace the location path value by the value in proxy_pass
            # https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass
            proxy_pass http://wanda/;
        }
    
        # Web rule
        location / {
            # this endpoint should not be accessible publicly
            # it is internally used by wanda to introspect access tokens and personal access tokens
            location /api/session/token/introspect {
                deny all;
                return 404;
            }
    
            allow all;
    
            # Proxy Headers
            proxy_http_version 1.1;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
            proxy_set_header X-Cluster-Client-Ip $remote_addr;
    
            # The Important Websocket Bits!
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
    
            proxy_pass http://web;
        }
    }
Prepare SSL certificate for NGINX

Create or provide a certificate for NGINX to enable SSL for Trento. Choose one of the following methods:

Create a self-signed certificate

Manually generate a self-signed certificate and ensure it is trusted by the system.

  1. Generate a self-signed certificate:

    Adjust subjectAltName = DNS:trento.example.com by replacing trento.example.com with your domain and change the value 5 to the number of days for which you need the certificate to be valid. For example, -days 365 for one year.

    openssl req -newkey rsa:2048 --nodes -keyout trento.key -x509 -days 5 -out trento.crt -addext "subjectAltName = DNS:trento.example.com"
  2. Copy the generated trento.key to a location accessible by NGINX:

    sudo cp trento.key /etc/ssl/private/trento.key
  3. Create a directory for the generated trento.crt file. The directory must be accessible by NGINX:

    sudo mkdir -p /etc/nginx/ssl/certs/
  4. Copy the generated trento.crt file to the created directory:

    sudo cp trento.crt /etc/nginx/ssl/certs/trento.crt
  5. Ensure the self-signed certificate is trusted:

    1. Convert trento.crt to the PEM format:

      openssl x509 -in trento.crt -out trento.pem -outform PEM
    2. Copy the certificate in PEM format to /etc/pki/trust/anchors/:

      sudo cp trento.pem /etc/pki/trust/anchors/
    3. Run the update-ca-certificates command:

      sudo update-ca-certificates
  6. Check the NGINX configuration:

    sudo nginx -t

    If the configuration is correct, the output should be as follows:

    nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
    nginx: configuration file /etc/nginx/nginx.conf test is successful

    If there are issues with the configuration, the output indicates what needs to be adjusted.

  7. Enable NGINX:

    sudo systemctl restart nginx
Create a signed certificate with Let’s Encrypt using PackageHub repository

Automate obtaining a signed certificate with Let’s Encrypt and configure NGINX to use it.

  1. Enable the PackageHub repository (replace x.x with your OS version, for example 15.7):

    sudo SUSEConnect --product PackageHub/x.x/x86_64
    sudo zypper refresh
  2. Find the Certbot NGINX plug-in package available in your current Service Pack:

    zypper search certbot-nginx

    Example output:

    S  | Name                    | Summary                  | Type
    ---+-------------------------+--------------------------+--------
       | python313-certbot-nginx | Nginx plugin for Certbot | package
  3. Install Certbot and its NGINX plug-in. Use the specific package name returned in the output of the previous step. For example:

    sudo zypper install certbot python313-certbot-nginx
  4. Obtain a certificate and configure NGINX with Certbot:

    Replace trento.example.com with your domain. For more information, refer to Certbot instructions for NGINX

    sudo certbot --nginx -d trento.example.com

    Certbot certificates are valid for 90 days. Refer to the above link for details on how to renew certificates.

Accessing the trento-web UI

Pin the browser to https://trento.example.com. You should be able to login using the credentials specified in the ADMIN_USER and ADMIN_PASSWORD environment variables.