Deploying a LogScale Cluster using Containers

For production purposes LogScale is distributed as the humio-core Docker image that does not include Kafka.

To deploy a LogScale cluster using the Kafka cluster configured in Deploying a Kafka Cluster using Containers:

  1. Create an empty file on the host machine to store the LogScale configuration. For example, logscale.env.

  2. Add the following lines to the configuration file:

    These lines configure the following settings:

    LogScale refers to these configurations as the LogScale environment variables.

    For more information on each of these environment variables, see the Configuration Variables.

    To make changes to the settings in the environment file, simply stopping and starting the container will not work. Stop the container using docker rm the container and docker run it again to pick up any changes.

  3. Create an empty directory on the host machine to store data for LogScale, for example:

    shell
    $ mkdir /data
  4. Download (pull) the latest LogScale image:

    shell
    $ sudo docker pull humio/humio-core
    shell
    $ sudo docker pull humio/humio-core:1.189.1--arm64

    The latest version of the image can be found on Docker Hub.

  5. Run the LogScale Docker image as a container

    shell
    $ sudo docker run -d  --restart always --net=host \
        -v /data:/data \
        --stop-timeout 300 \
        --env-file $PATH_TO_CONFIG_FILE --name humio-core humio/humio-core

    Replace $PATH_TO_CONFIG_FILE with the path of the configuration file you created.

This configuration will need to be repeated for each node in the LogScale cluster. Note that node IDs for LogScale nodes are allocated automatically.

Verify that LogScale is able to start using the configuration provided by looking at the log file. In particular, it should not keep logging problems connecting to Kafka.

shell
$ grep 'LogScale server is now running!'  /data/logs/humio_std_out.log
$ grep -i 'kafka'  /data/logs/humio_std_out.log

LogScale is now running. Navigate to http://localhost:8080 to view the LogScale Web UI.

In the above example, you started the LogScale container with full access to the network of the host machine. In a production environment, you should restrict this access by using a firewall, or adjusting the Docker network configuration.

If you experience any problems, first look at Additional Considerations.

Data and Log Directories

Using the above configuration and scripts you'll have a data directory with various subdirectories, including humio-data, and logs. If you're running the humio/single-node-demo, you'll also have kafka-data, and zookeeper-data.

While retaining the default locations are recommended, they can be changed. See the following variables for more information: DIRECTORY, HUMIO_AUDITLOG_DIR, HUMIO_DEBUGLOG_DIR, and JVM_LOG_DIR. It is also possible to change the Java temporary directory using JVM_TMP_DIR.

Starting a LogScale Container Deployment at Boot as a Service

There are different ways of starting the Docker container as a service. In the above example, we used Docker's restart policies. LogScale can be started using a process manager.

If you receive this warning after starting up the LogScale service, please ignore it. This does not affect the LogScale service.

syslog
LogScale server is now running!
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.humio.util.FileUtilsJNA (file:/app/humio/humio-assembly.jar) to field sun.nio.ch.FileChannelImpl.fd
WARNING: Please consider reporting this to the maintainers of com.humio.util.FileUtilsJNA
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release.