You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Nova Resource:Wmcz-stats/Documentation/Create instances

From Wikitech-static
< Nova Resource:Wmcz-stats‎ | Documentation
Revision as of 00:00, 7 April 2021 by imported>Urbanecm (typo)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page lists how to initialize individual services.

Druid

First, install Java 8 (according to https://druid.apache.org/docs/latest/tutorials/index.html, Java 11 is not yet supported). Done by adding the following to /etc/apt/sources.list.d/repository_openjdk-8-jdk.list:

deb http://apt.wikimedia.org/wikimedia buster-wikimedia component/jdk8
deb-src http://apt.wikimedia.org/wikimedia buster-wikimedia component/jdk8

Then, run apt update && apt install openjdk-8-jdk-headless.

Mount /srv to extra storage, see Help:Adding Disk Space to Cloud VPS instances for docs. Then, create an account for Druid with sudo adduser --system --home /srv/druid druid Download Druid from https://druid.apache.org/docs/latest/tutorials/index.html and extract it to /srv/druid, and then create systemd service:

urbanecm@druid01:~$ cat /lib/systemd/system/druid.service
[Unit]
Description=Druid

[Service]
Restart=always
RestartSec=2s
WorkingDirectory=/srv/druid
User=druid
ExecStart=/srv/druid/bin/start-nano-quickstart

[Install]
WantedBy=multi-user.target
urbanecm@druid01:~$

Turnilo

First, install npm with sudo apt install npm. Then, install turnilo itself with sudo npm install -g turnilo and create a service account for it with sudo adduser --system --home /var/turnilo turnilo.

Then, a systemd unit needs to be created:

urbanecm@turnilo02:~$ cat /lib/systemd/system/turnilo.service
[Unit]
Description=Turnilo

[Service]
Restart=always
RestartSec=2s
WorkingDirectory=/var/turnilo
User=turnilo
ExecStart=/usr/local/bin/turnilo --examples

[Install]
WantedBy=multi-user.target
urbanecm@turnilo02:~$