4.1
Linux archive
Quickstart
1. Download and extract
tar -xvf lenses.tar.gz -C lenses
This will extract the application in a lenses
directory.
Make sure the directory is owned by the root
user.
2. Configure Lenses
Use the 2 sample configuration files, included in the directory, and create the Lenses configuration. The sample files are:
lenses.conf.sample security.conf.sample
- Enable any configuration points by removing the
#
comment prefix. - Change the values as you want. Here’s the configuration section .
- Copy or rename the files to their official names:
lenses.conf security.conf
After that, the final directory structure should be:
lenses ├── lenses.conf ← edited and renamed from .sample ├── security.conf ← edited and renamed from .sample ├── license.json ├── logback.xml ├── logback-debug.xml ├── bin/ ├── jre/ ├── lib/ ├── licences/ ├── logs/ ← created when you run Lenses ├── plugins/ ├── storage/ ← created when you run Lenses └── ui/
3. Set file permissions
security.conf
contains sensitive information:
- admin user account and password
- LDAP or SSO connection details.
Make it only readable by the Lenses user:
chmod 0600 /path/to/security.conf
chown [lenses-user]:root /path/to/security.conf
Lenses needs write access in 2 places:
lenses/
- when Lenses runs, it will create 2 directories:lenses/logs
- stores 2 kinds of files:- log files
- SQL processors (when
In Process mode). To change the location for the processors’ state directory, use
lenses.sql.state.dir
option.
lenses/storage
- Location for Lenses H2 database. To change this directory, use thelenses.storage.directory
option.
/tmp
(Global temporary directory) - Used for temporary files and JNI shared libraries. See here for instructions for JNI .
Start Lenses
Start Lenses by running:
bin/lenses
or pass the location of the config file:
bin/lenses lenses.conf
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 admin:admin
credentials.
We strongly recommend
changing the defaults
.
To stop Lenses, press CTRL+C
.
JNI libraries
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
LENSES_OPTS="-Dorg.xerial.snappy.tempdir=/path/to/exec/tmp -Djava.io.tmpdir=/path/to/exec/tmp"
SystemD example
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