Container Deployment Using
humio-single-node-demo (Testing
Only)
Important
The
humio-single-node-demo
is not recommended or supported for use in production deployment and
should be used for development and testing only. For a production
deployment, see Using humio-core or
Install Humio Operator on Kubernetes.
For more information on the reference architecture for a Kubernetes
deployment, see LogScale Kubernetes Reference Architecture.
To deploy the LogScale single node demo using Docker:
Install Docker on the machine where you want to run LogScale. You can Download Docker from their site, or by using a package installation program like yum or apt-get.
Create a LogScale configuration file on the host machine. This should define basic settings such as the hostname and port numbers that LogScale will use. A sample configuration file called
logscale.envis shown here:iniAUTHENTICATION_METHOD=none ELASTIC_PORT=9200 PUBLIC_URL=http://localhost:8080 KAFKA_SERVERS=127.0.0.1:9092 HUMIO_PORT=8080This sets the public URL to be on port 8080, use the embedded Kafka service and listen on the default IP address.
For other configuration values, see Basic Configuration and Configuration Variables.
Important
Docker only loads the environment file when the container is initially created. If you make changes to the settings in your environment file, restarting the container won't work. You'll need to execute docker rm with the container name, and then execute docker run for the changes to take effect.
Create a directory to store data for LogScale.
Pull the latest LogScale docker image by running the following at the command-line:
shell$sudo docker pull humio/humio-single-node-demo
Starting Docker with LogScale
Run the LogScale docker image as a container.
$ sudo docker run -v $HOST_DATA_DIR:/data \
--net=host \
--name=humio \
--ulimit="nofile=250000:250000" \
--stop-timeout 300 \
--env-file=$PATH_TO_CONFIG_FILE humio/humio-single-node-demoTo customize the configuration:
Replace
$HOST_DATA_DIRwith the path to the directory you created in the earlier step. For example, if you created/home/username/data, specify that directory here. When the container runs it will create files under this mount point, including directories such ashumio-data,logs,kafka-data(as the demo container contains Kafka), andzookeeper-data.Replace
$PATH_TO_CONFIG_FILEwith the path of the configuration file you created earlier,logscale.env.
Using a web browser, navigate to http://localhost:8080 to
open the LogScale web interface.
Additional Considerations
Note the following points:
If you're running the LogScale containers on SELinux in
enforcingmode, the container has to be started with the--privilegedflag set.In the example above, the LogScale container was started with full access to the network of the host machine (
--net=host). Another possibility is to forward explicit ports:-p 8080:8080. By default LogScale only uses port 8080. See also theHUMIO_HTTP_BINDandHUMIO_SOCKET_BINDvariables.On a macOS machine, there can be problems with using the
--net=hostoption, as this gives full access to the host network. If you get issues, use-p 8080:8080to forward port 8080 on the host network to the Docker container. Port 8080 (HTTP) is used by the LogScale web UI.You may also need to enable enough memory for the virtual machine running Docker on Mac. Open the Docker app, go to preferences, and specify at least 4GB.
Running LogScale as a System Service
The Docker container can be started as a service using the Docker run reference.
To ensure LogScale restarts, add
--detach and
--restart=always to the above Docker run:
$ sudo docker run ... --detach --restart=always