karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Burgazzoli (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KARAF-4281) System scripts: provide Systemd templates to manage Karaf child instances
Date Tue, 19 Jan 2016 08:19:39 GMT
Luca Burgazzoli created KARAF-4281:

             Summary: System scripts: provide Systemd templates to manage Karaf child instances
                 Key: KARAF-4281
                 URL: https://issues.apache.org/jira/browse/KARAF-4281
             Project: Karaf
          Issue Type: New Feature
          Components: karaf-os-integration
            Reporter: Luca Burgazzoli
            Priority: Minor

Systemd's has as  a sort of template-engine for unit files which are defined in the form of
template-name@.service, i.e. for karaf I've created one named karaf@.service with content

  Description=Karaf - %i
  After=syslog.target network.target


  ExecStart=/opt/apache/karaf-4/bin/karaf daemon
  ExecStop=/opt/apache/karaf-4/bin/karaf stop



With such configuration, you do not need to create a systemd unit file for each child instance
but you can leverage karaf@.service, i.e:

  systemctl start karaf@instance-1

A service created in such way can also be configured to auto-start at boot like any other
Systemd unit:

  [lb@home]# systemctl enable karaf@instance-1
  Created symlink from /etc/systemd/system/multi-user.target.wants /karaf@instance-1.service
to /etc/systemd/system/karaf@.service. 

This message was sent by Atlassian JIRA

View raw message