Re: AW: CentOS 7/systemd startup script for fuseki

2018-03-07 Thread Andy Seaborne
Maybe the best way to proceed is to put a script in now so it gets 
picked up in the next release and not worry too much about the details 
but instead mark it "experimental" or "template to start from".


We can discuss details we know about but often its the things other 
users have in their systems that generate concerns we can not know.


Great tutorial!

Andy

On 02/03/18 14:42, Neubert, Joachim wrote:

+1 for inclusion, and for consideration of more FHS compatible directory 
layout, too.

The

   Environment=FUSEKI_HOME=/opt/fuseki
   Environment=FUSEKI_BASE=/etc/fuseki

lines in Osmas script makes the environment settings quite clear. However, I'm 
not sure if these completely override the settings in /etc/default/fuseki.


Setting FUSEKI_HOME and FUSEKI_BASE should work.
If /etc/default/fuseki is leaking through that's a bug.
Or we ough to advise not having /etc/default/fuseki and put the setting 
in the script.


FUSEKI_HOME and FUSEKI_BASE defaults are supposed to be something simple 
and not prescriptive.




The path in

   ExecStart=/opt/fuseki/fuseki-server

unfortunately cannot be replaced by $FUSEKI_HOME ("Executable path is not absolute" - 
"Refusing").

If published as part of the docs, the memory setting should probably be

   Environment=JVM_ARGS=-Xmx2G

perhaps with a hint on how it should increase with total memory size.

Another sentence in 
https://jena.apache.org/documentation/fuseki2/fuseki-run.html#fuseki-service could 
clarify: "For newer systemd based Linux systems, the script 'fuseki.service' is 
provided. Please adapt to your paths and settings."

Cheers, Joachim



-Ursprüngliche Nachricht-
Von: Osma Suominen [mailto:osma.suomi...@helsinki.fi]
Gesendet: Freitag, 2. März 2018 15:15
An: users@jena.apache.org
Betreff: Re: CentOS 7/systemd startup script for fuseki

ajs6f kirjoitti 02.03.2018 klo 16:01:
  > Is this worth including in the distribution as a file, or maybe just in
"README"-type docs?

I think it would be worth including - after some consideration perhaps.
There is already an old-style sysv init script in the Fuseki distribution after 
all.

However, I would like some discussion first about what the proper way is to
install Fuseki as a system level service on a typical Linux machine.
As you can see from the tutorial I linked to from my previous message, it's
currently a bit cumbersome to make it comply to the FHS. Naturally the chosen
directory layout also affects the systemd unit file.

-Osma

--
Osma Suominen
D.Sc. (Tech), Information Systems Specialist National Library of Finland P.O. 
Box
26 (Kaikukatu 4)
00014 HELSINGIN YLIOPISTO
Tel. +358 50 3199529
osma.suomi...@helsinki.fi
http://www.nationallibrary.fi


AW: CentOS 7/systemd startup script for fuseki

2018-03-02 Thread Neubert, Joachim
+1 for inclusion, and for consideration of more FHS compatible directory 
layout, too. 

The 

  Environment=FUSEKI_HOME=/opt/fuseki
  Environment=FUSEKI_BASE=/etc/fuseki

lines in Osmas script makes the environment settings quite clear. However, I'm 
not sure if these completely override the settings in /etc/default/fuseki.

The path in

  ExecStart=/opt/fuseki/fuseki-server

unfortunately cannot be replaced by $FUSEKI_HOME ("Executable path is not 
absolute" - "Refusing").

If published as part of the docs, the memory setting should probably be

  Environment=JVM_ARGS=-Xmx2G

perhaps with a hint on how it should increase with total memory size.

Another sentence in 
https://jena.apache.org/documentation/fuseki2/fuseki-run.html#fuseki-service 
could clarify: "For newer systemd based Linux systems, the script 
'fuseki.service' is provided. Please adapt to your paths and settings."

Cheers, Joachim


> -Ursprüngliche Nachricht-
> Von: Osma Suominen [mailto:osma.suomi...@helsinki.fi]
> Gesendet: Freitag, 2. März 2018 15:15
> An: users@jena.apache.org
> Betreff: Re: CentOS 7/systemd startup script for fuseki
> 
> ajs6f kirjoitti 02.03.2018 klo 16:01:
>  > Is this worth including in the distribution as a file, or maybe just in
> "README"-type docs?
> 
> I think it would be worth including - after some consideration perhaps.
> There is already an old-style sysv init script in the Fuseki distribution 
> after all.
> 
> However, I would like some discussion first about what the proper way is to
> install Fuseki as a system level service on a typical Linux machine.
> As you can see from the tutorial I linked to from my previous message, it's
> currently a bit cumbersome to make it comply to the FHS. Naturally the chosen
> directory layout also affects the systemd unit file.
> 
> -Osma
> 
> --
> Osma Suominen
> D.Sc. (Tech), Information Systems Specialist National Library of Finland P.O. 
> Box
> 26 (Kaikukatu 4)
> 00014 HELSINGIN YLIOPISTO
> Tel. +358 50 3199529
> osma.suomi...@helsinki.fi
> http://www.nationallibrary.fi


AW: CentOS 7/systemd startup script for fuseki

2018-03-02 Thread Neubert, Joachim
Hi Osma,

Thank you so much - works beautifully and without modification under RH/CentOS 
7.4

Cheers, Joachim

> -Ursprüngliche Nachricht-
> Von: Osma Suominen [mailto:osma.suomi...@helsinki.fi]
> Gesendet: Freitag, 2. März 2018 14:38
> An: users@jena.apache.org
> Betreff: Re: CentOS 7/systemd startup script for fuseki
> 
> Hi Joachim!
> 
> Glad you asked, I've been on sitting on one for a while and thought it should 
> be
> shared but never got to it.
> 
> Mine is included at the bottom of the message. It's for an Ubuntu 16.04 system
> where Fuseki has been installed according to the Skosmos tutorial [1] i.e. 
> with
> symlinks that make it fit better into a Linux FHS layout.
> It's placed at /etc/systemd/system/fuseki.service
> 
> -Osma
> 
> [1] https://github.com/NatLibFi/Skosmos/wiki/InstallTutorial
> 
> --cut--
> [Unit]
> Description=Fuseki
> 
> [Service]
> Environment=FUSEKI_HOME=/opt/fuseki
> Environment=FUSEKI_BASE=/etc/fuseki
> Environment=JVM_ARGS=-Xmx12G
> User=fuseki
> ExecStart=/opt/fuseki/fuseki-server
> Restart=on-abort
> 
> [Install]
> WantedBy=multi-user.target
> --cut--
> 
> 
> Neubert, Joachim kirjoitti 02.03.2018 klo 14:07:
> > Hi everybody,
> >
> > Has anybody a proper systemd startup script for fuseki in place?
> >
> > So far I use an entry for the "fuseki" init.d script in /etc/rc.local, 
> > which works
> after making the latter executable. But perhaps the problem has been solved in
> a better way.
> >
> > Cheers, Joachim
> >
> >
> >
> 
> 
> --
> Osma Suominen
> D.Sc. (Tech), Information Systems Specialist National Library of Finland P.O. 
> Box
> 26 (Kaikukatu 4)
> 00014 HELSINGIN YLIOPISTO
> Tel. +358 50 3199529
> osma.suomi...@helsinki.fi
> http://www.nationallibrary.fi