Categories
Business Intelligence Open Source SQL

Install Poli As service using Systemd

Poli is an easy-to-use SQL reporting application built for SQL lovers!”

Poli isn’t a fully fledged BI tool. In my experience Poli is enough for sizeable chunk of BI users. I often find alot of features in sophisticated BI tools are not used.

Poli is simple to get started. Within a couple of hours you will have a dashboard running off any JDBC compliant database. That means you can connect to just about all databases. You can use SQL to develop your reports and dashboards.

I wanted to run Poli as a service on Ubuntu 20.04. Here are the steps are followed. Instructions largely from How To Install Metabase with Systemd on Ubuntu 20.04/18.04/16.04

  • Install Java
  • Download latest version of Poli and unzip to a location you would like to install Poli. In my case it is /apps/poli
  • Add a system group
    • sudo groupadd -r appmgr
  • Create a system user appmgr with the default group appmgr
    • sudo useradd -r -s /bin/false -g appmgr appmgr
  • Give the new user ownership of Poli folder
    • sudo chown -R appmgr:appmgr /apps/poli
  • Create a systemd service unit file. I decided to use the start scripts that come with Poli to start the service.
    • sudo vim /etc/systemd/system/poli.service

[Unit]
Description=Poli Server

[Service]
WorkingDirectory=/apps/poli/
ExecStart=/bin/bash start.sh
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

Run the following commands to reload systemd and start Poli service and check status
sudo systemctl daemon-reload
sudo systemctl start poli.service
sudo systemctl status poli

This is output I get from status

poli.service - Poli Server
Loaded: loaded (/etc/systemd/system/poli.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2020-MM-DD HH::46 SAST; 13s ago
Main PID: 43993 (bash)
Tasks: 38 (limit: 9251)
Memory: 280.2M
CGroup: /system.slice/poli.service
├─43993 /bin/bash start.sh
└─44003 java -jar poli-0.12.2.jar --spring.config.name=application,poli
Mon DD YY:18:46 server-name systemd[1]: Started Poli Server.

Leave a Reply