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

Difference between revisions of "Nova Resource:Wmcz-stats/Documentation/Create instances"

From Wikitech-static
Jump to navigation Jump to search
imported>Urbanecm
m (typo)
 
imported>Quiddity
m (fixes)
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
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 <code>/etc/apt/sources.list.d/repository_openjdk-8-jdk.list</code>:
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 <code>/etc/apt/sources.list.d/repository_openjdk-8-jdk.list</code>:


<source>
<syntaxhighlight lang="text">
deb http://apt.wikimedia.org/wikimedia buster-wikimedia component/jdk8
deb http://apt.wikimedia.org/wikimedia buster-wikimedia component/jdk8
deb-src http://apt.wikimedia.org/wikimedia buster-wikimedia component/jdk8
deb-src http://apt.wikimedia.org/wikimedia buster-wikimedia component/jdk8
</source>
</syntaxhighlight>


Then, run <code>apt update && apt install openjdk-8-jdk-headless</code>.
Then, run <code>apt update && apt install openjdk-8-jdk-headless</code>.
Line 13: Line 13:
Mount /srv to extra storage, see [[Help:Adding Disk Space to Cloud VPS instances]] for docs. Then, create an account for Druid with <code>sudo adduser --system --home /srv/druid druid</code> Download Druid from https://druid.apache.org/docs/latest/tutorials/index.html and extract it to <code>/srv/druid</code>, and then create systemd service:
Mount /srv to extra storage, see [[Help:Adding Disk Space to Cloud VPS instances]] for docs. Then, create an account for Druid with <code>sudo adduser --system --home /srv/druid druid</code> Download Druid from https://druid.apache.org/docs/latest/tutorials/index.html and extract it to <code>/srv/druid</code>, and then create systemd service:


<source>
<syntaxhighlight lang="bash">
urbanecm@druid01:~$ cat /lib/systemd/system/druid.service
urbanecm@druid01:~$ cat /lib/systemd/system/druid.service
[Unit]
[Unit]
Line 28: Line 28:
WantedBy=multi-user.target
WantedBy=multi-user.target
urbanecm@druid01:~$
urbanecm@druid01:~$
</source>
</syntaxhighlight>


== Turnilo ==
== Turnilo ==
Line 35: Line 35:
Then, a systemd unit needs to be created:
Then, a systemd unit needs to be created:


<source>
<syntaxhighlight lang="bash">
urbanecm@turnilo02:~$ cat /lib/systemd/system/turnilo.service
urbanecm@turnilo02:~$ cat /lib/systemd/system/turnilo.service
[Unit]
[Unit]
Line 50: Line 50:
WantedBy=multi-user.target
WantedBy=multi-user.target
urbanecm@turnilo02:~$
urbanecm@turnilo02:~$
</source>
</syntaxhighlight>

Latest revision as of 19:19, 4 September 2021

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:~$