Download and extract in a location.
tar -xvf lenses.tar.gz -C lenses
The directory structure is:
lenses ├── lenses.conf ├── security.conf ├── license.json ├── bin/ ├── plugins/ └── logs/
Make sure the directory is owned by the root user.
The security configuration file contains information about the admin user account and password and LDAP connection details. Please make sure it is only readable by the Lenses user.
chmod 0600 /path/to/security.conf chown [lenses-user]:root /path/to/security.conf
Lenses needs write access inside the directory it is running from and /tmp.
logs - In this directory two kinds of files are stored: log files and Lenses SQL processors (when in-process) state. To change the location for the processors’ state directory, use lenses.sql.state.dir option.
storage - Location for Lenses H2 database. To change this directory, use the lenses.storage.directory option.
tmp - Used for temporary files and JNI shared libraries. See here for instructions for JNI
Start Lenses by running:
or pass the location of the config file:
The default settings mean that you can login on http://localhost:9991 using your authentication provider, or with the admin account that comes by default with the
We strongly recommend
changing the defaults
To stop Lenses, press
Lenses and Kafka itself use two common Java libraries that take advantage of JNI and are extracted to /tmp.
You must either:
- Mount /tmp without noexec
- or set org.xerial.snappy.tempdir and java.io.tmpdir to a different location
If your server uses systemd as Service Manager, then manage Lenses (start upon system boot, stop, restart) with it. Below you can find a simple unit file that starts Lenses automatically on system boot.
[Unit] Description=Run Lenses.io service [Service] Restart=always User=[LENSES-USER] Group=[LENSES-GROUP] LimitNOFILE=4096 WorkingDirectory=/opt/lenses #Environment=LENSES_LOG4J_OPTS="-Dlogback.configurationFile=file:/etc/lenses/logback.xml" ExecStart=/opt/lenses/bin/lenses /etc/lenses/lenses.conf [Install] WantedBy=multi-user.target