Setting up Codetrails Error Analytics Server On-Premise

This page will guide you through the setup of a Codetrails Error Analytics Server in your own, private network.

System Requirements

In order to run the Codetrails Error Analytics Server your system must satisfy the following minimum specifications:

  • 2 GB of RAM

  • 2 GB of harddisk space

  • Java 8

  • MongoDB version 3.2 or higher

Configuring MongoDB

The Codetrails Error Analytics Server requires MongoDB in version 3.2 or higher. For information on how to install MongoDB, please refer to the official documentation.

Configure the MongoDB service to listen on IP address 127.0.0.1 (localhost) port 27017 (the default). The Codetrails Error Analytics server only accesses the MongoDB on this IP address and port. For security reasons, we recommend not to configure MongoDB to listen to any other, non-local IP addresses.

Installing Java

The Codetrails Error Analytics Server requires a Java Runtime Environment in version 8. For information on how to install Java, please refer to the official documentation.

Installing Codetrails Error Analytics Server

The Codetrails Error Analytics Server is made available to you by Codetrails personnel in form of a ZIP file. Unzip it to a location of your choice. For security reasons, we recommend executing the server with an unprivileged user account. (Make sure the user account has access to the contents of the unzipped server directory.)

Configuring Codetrails Error Analytics Server

By default, the Codetrails Error Analytics Server uses two gigabytes of RAM. If you want to give it more, edit the config/paths.conf file’s java_opts variable. For information on how to edit the java_opts variable, please refer to the official documentation.

All server configuration is done in a single file located in config/application.yml.

Example Configuration

The Codetrails Error Analytics ZIP file contains a configuration file at config/application.yml with an example configuration. It has three sections you can edit, the Global Section, Server Section, and the AER Section. Settings that you should change are marked with TODO.

Global Section

Here you can specify whether or not to use the server’s access control mechanism.

# Comment out this line if you don't want the application to manage access
# control and uncomment the next line
spring.profiles.include: user-based-security,single-organization-mode

# Uncomment if you want to use an external or no access control mechanism
#spring.profiles.include: no-auth-security,single-organization-mode

Server Section

Specifies the port on which the server is listening. You need to ensure this port is accessible by all potential clients.

server:
    port: 9003
    session:
       timeout: 3600

AER Section

This contains most of the server’s configuration. Make sure to review this section and to change all settings marked with TODO to fit your organization.

aer:
    # TODO: The path to the license key file relative to the server's JAR.
    # The license key file is provided to you by Codetrails.
    # Make sure it is located at the specified location.
    license:
        file: config/license.key

    # TODO: The address the server can be reached using browsers.
    # Must NOT have a trailing slash
    # Make sure it is available in your network to all reviewers.
    public-address: http://localhost:9003

    # Working directory to store application data.
    # Change this, if you have a large and fast disk elsewhere
    data-area: target/production/data
    system-database: tenants # The name of a database storing metadata

    organization:
        # TODO: A short name for the organization. Used as a database name
        key: example
        # TODO: A long name for the organization. This name is visible to users
        name: Example Organization

        # TODO: Only used in "user-based-security". Email of the admin user
        username: admin@example.org
        # TODO: Only used in "user-based-security". Password for the admin user
        # Can be changed within the application
        user-password: pass

        # TODO: Mailserver settings used to send emails (e.g. problem digests) to users.
        # For Example weekly problem digests
        mail:
            host: localhost # Hostname/IP address of a SMTP server
            username:
            password:
            sender-address: error-analytics-bot@codetrails.com
            sender-name: Codetrails Error Analytics Bot

    # TODO: Only used in "user-based-security". Can be used to gain full access.
    # Should only be used if the original admin was deleted.
    super-admin:
        username: super-admin
        password: pass

Installing the Codetrails Error Analytics Server License

The Codetrails Error Analytics Server can only be run with a valid license key. This license key is made available to you by Codetrails personnel as a file called license.key. By default, this file needs to be placed in the config folder, though you may configure its location in the config/application.yml file.

If no license key is installed, or if the license key is expired or corrupt, the server cannot be started.

Note that verification of the license key is done locally; no internet connection is required.

Running Codetrails Error Analytics Server

To start the Codetrails Error Analytics Server, use the bin/service.sh script:

bin/service.sh start

The startup process may take up to a minute.

Try accessing the server with your web browser. It should be available at the public-address you have specified in the application.yml configuration file. If everything works correctly, you will see a login screen. Use the admin username and password specified in the application.yml configuration file to log in. The application then asks you to perform additional configuration. Simply follow the steps and you are done.

If you want to stop the server, use the bin/service.sh script:

bin/service.sh stop

It is up to you to ensure that the Codetrails Error Analytics Server is automatically started whenever the system boots. Use your distribution’s init system (System V init, systemd, etc.) to accomplish this.

Updating the Server License

If you have renewed your license and want to replace the old one, make sure the server is shut down by using the bin/service.sh script:

bin/service.sh stop

Then, replace the license key file (default location config/license.key) with the new file.

Finally, restart the server using bin/service.sh script:

bin/service.sh start

results matching ""

    No results matching ""