Skip to content

Commit

Permalink
Merge pull request #584 from matyasselmeci/pr/systemd
Browse files Browse the repository at this point in the history
systemd service files and corresponding configs for Pelican services and Pelican-based OSDF services.
  • Loading branch information
matyasselmeci authored Feb 1, 2024
2 parents 448b0c7 + 68943a7 commit 9474446
Show file tree
Hide file tree
Showing 16 changed files with 226 additions and 0 deletions.
13 changes: 13 additions & 0 deletions systemd/osdf-cache.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description = Pelican service osdf-cache
After = network.target nss-lookup.target

[Service]
EnvironmentFile = -/etc/sysconfig/osdf-cache
ExecStart = /usr/bin/osdf --config /etc/pelican/osdf-cache.yaml cache serve
Restart = on-failure
RestartSec = 20s
WorkingDirectory = /var/spool/osdf

[Install]
WantedBy = multi-user.target
29 changes: 29 additions & 0 deletions systemd/osdf-cache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Enable Debug to send detailed logs, including XRootD logs, to the log file
# Debug: false
Logging:
LogLocation: /var/log/osdf-cache.log
## Valid Levels are Trace, Debug, Info, Warning, Error, Fatal and Panic.
# Level: "Error"
Federation:
# We need the "origins" director to find origins instead of the default ("caches" director)
DirectorUrl: https://osdf-director-origins.osg-htc.org
Server:
TLSCertificate: /etc/grid-security/xrd/xrdcert.pem
TLSKey: /etc/grid-security/xrd/xrdkey.pem
## Use TLSCACertificateDirectory instead of TLSCACertificateFile to support auth from grid clients
TLSCACertificateFile: /etc/pki/tls/certs/ca-bundle.crt
# TLSCACertificateDirectory: /etc/grid-security/certificates
EnableUI: false
## Set Hostname to the external DNS name this can be accessed over, if
## different than the current hostname.
# Hostname:
XRootD:
## Sitename is the resource name this cache is registered as under Topology.
## You must set this.
Sitename: TOPOLOGY_RESOURCE_NAME
## Authfile is the xrootd authorization file for VOMS/X.509 auth
## XXX remove this once #564 (https://github.com/PelicanPlatform/pelican/issues/564) is done
Authfile: /run/stash-cache-auth/Authfile
RunLocation: /run/pelican/osdf-cache/xrootd
Cache:
DataLocation: "/mnt/osdf"
12 changes: 12 additions & 0 deletions systemd/osdf-director.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description = Pelican service osdf-director
After = network.target nss-lookup.target

[Service]
EnvironmentFile = -/etc/sysconfig/osdf-director
ExecStart = /usr/bin/osdf --config /etc/pelican/osdf-director.yaml director serve
Restart = on-failure
RestartSec = 20s

[Install]
WantedBy = multi-user.target
10 changes: 10 additions & 0 deletions systemd/osdf-director.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Enable Debug to send detailed logs to the log file
# Debug: false
Logging:
LogLocation: /var/log/osdf-director.log
## Valid Levels are Trace, Debug, Info, Warning, Error, Fatal and Panic.
# Level: "Error"
Server:
TLSCertificate: /etc/grid-security/xrd/xrdcert.pem
TLSKey: /etc/grid-security/xrd/xrdkey.pem
TLSCACertificateFile: /etc/pki/tls/certs/ca-bundle.crt
13 changes: 13 additions & 0 deletions systemd/osdf-origin.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description = Pelican service osdf-origin
After = network.target nss-lookup.target

[Service]
EnvironmentFile = -/etc/sysconfig/osdf-origin
ExecStart = /usr/bin/osdf --config /etc/pelican/osdf-origin.yaml origin serve
Restart = on-failure
RestartSec = 20s
WorkingDirectory = /var/spool/osdf

[Install]
WantedBy = multi-user.target
30 changes: 30 additions & 0 deletions systemd/osdf-origin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Enable Debug to send detailed logs, including XRootD logs, to the log file
# Debug: false
Logging:
LogLocation: /var/log/osdf-origin.log
## Valid Levels are Trace, Debug, Info, Warning, Error, Fatal and Panic.
# Level: "Error"
Server:
TLSCertificate: /etc/grid-security/xrd/xrdcert.pem
TLSKey: /etc/grid-security/xrd/xrdkey.pem
## Use TLSCACertificateDirectory instead of TLSCACertificateFile to support auth from grid clients
TLSCACertificateFile: /etc/pki/tls/certs/ca-bundle.crt
# TLSCACertificateDirectory: /etc/grid-security/certificates
EnableUI: false
## Set Hostname to the external DNS name this can be accessed over, if
## different than the current hostname.
# Hostname:
XRootD:
## Sitename is the resource name this origin is registered as under Topology.
## You must set this.
Sitename: TOPOLOGY_RESOURCE_NAME
Mount: "/mnt/osdf"
Port: 1095
# This is the authfile for the authenticated origin instance generated by
# the stash-authfile@stash-origin-auth service and timer
# XXX remove this once #564 (https://github.com/PelicanPlatform/pelican/issues/564) is done
Authfile: /run/stash-origin-auth/Authfile
RunLocation: /run/pelican/osdf-origin/xrootd
Origin:
NamespacePrefix: "/MY_NAMESPACE"
Multiuser: false
12 changes: 12 additions & 0 deletions systemd/osdf-registry.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description = Pelican service osdf-registry
After = network.target nss-lookup.target

[Service]
EnvironmentFile = -/etc/sysconfig/osdf-registry
ExecStart = /usr/bin/osdf --config /etc/pelican/osdf-registry.yaml registry serve
Restart = on-failure
RestartSec = 20s

[Install]
WantedBy = multi-user.target
10 changes: 10 additions & 0 deletions systemd/osdf-registry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Enable Debug to send detailed logs to the log file
# Debug: false
Logging:
LogLocation: /var/log/osdf-registry.log
## Valid Levels are Trace, Debug, Info, Warning, Error, Fatal and Panic.
# Level: "Error"
Server:
TLSCertificate: /etc/grid-security/xrd/xrdcert.pem
TLSKey: /etc/grid-security/xrd/xrdkey.pem
TLSCACertificateFile: /etc/pki/tls/certs/ca-bundle.crt
13 changes: 13 additions & 0 deletions systemd/pelican-cache.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description = Pelican service pelican-cache
After = network.target nss-lookup.target

[Service]
EnvironmentFile = -/etc/sysconfig/pelican-cache
ExecStart = /usr/bin/pelican --config /etc/pelican/pelican-cache.yaml cache serve
Restart = on-failure
RestartSec = 20s
WorkingDirectory = /var/spool/pelican

[Install]
WantedBy = multi-user.target
11 changes: 11 additions & 0 deletions systemd/pelican-cache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Enable Debug to send detailed logs, including XRootD logs, to the log file
# Debug: false
Logging:
LogLocation: /var/log/pelican-cache.log
## Valid Levels are Trace, Debug, Info, Warning, Error, Fatal and Panic.
# Level: "Error"
Federation:
## The main URL for your federation. You must specify this.
DiscoveryUrl:
Cache:
DataLocation: "/mnt/pelican"
12 changes: 12 additions & 0 deletions systemd/pelican-director.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description = Pelican service pelican-director
After = network.target nss-lookup.target

[Service]
EnvironmentFile = -/etc/sysconfig/pelican-director
ExecStart = /usr/bin/pelican --config /etc/pelican/pelican-director.yaml director serve
Restart = on-failure
RestartSec = 20s

[Install]
WantedBy = multi-user.target
9 changes: 9 additions & 0 deletions systemd/pelican-director.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Enable Debug to send detailed logs, including XRootD logs, to the log file
# Debug: false
Logging:
LogLocation: /var/log/pelican-director.log
## Valid Levels are Trace, Debug, Info, Warning, Error, Fatal and Panic.
# Level: "Error"
Federation:
## The main URL for your federation. You must specify this.
DiscoveryUrl:
13 changes: 13 additions & 0 deletions systemd/pelican-origin.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description = Pelican service pelican-origin
After = network.target nss-lookup.target

[Service]
EnvironmentFile = -/etc/sysconfig/pelican-origin
ExecStart = /usr/bin/pelican --config /etc/pelican/pelican-origin.yaml origin serve
Restart = on-failure
RestartSec = 20s
WorkingDirectory = /var/spool/pelican

[Install]
WantedBy = multi-user.target
18 changes: 18 additions & 0 deletions systemd/pelican-origin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Enable Debug to send detailed logs, including XRootD logs, to the log file
# Debug: false
Logging:
LogLocation: /var/log/pelican-origin.log
## Valid Levels are Trace, Debug, Info, Warning, Error, Fatal and Panic.
# Level: "Error"
Federation:
## The main URL for your federation. You must specify this.
DiscoveryUrl:
## Set Hostname to the external DNS name this can be accessed over, if
## different than the current hostname.
# Hostname:
XRootD:
Mount: "/mnt/pelican"
Origin:
NamespacePrefix: "/MY_NAMESPACE"
## Enable multiuser to support Unix-based file ownership in the objects being served.
# Multiuser: false
12 changes: 12 additions & 0 deletions systemd/pelican-registry.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description = Pelican service pelican-registry
After = network.target nss-lookup.target

[Service]
EnvironmentFile = -/etc/sysconfig/pelican-registry
ExecStart = /usr/bin/pelican --config /etc/pelican/pelican-registry.yaml registry serve
Restart = on-failure
RestartSec = 20s

[Install]
WantedBy = multi-user.target
9 changes: 9 additions & 0 deletions systemd/pelican-registry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Enable Debug to send detailed logs, including XRootD logs, to the log file
# Debug: false
Logging:
LogLocation: /var/log/pelican-registry.log
## Valid Levels are Trace, Debug, Info, Warning, Error, Fatal and Panic.
# Level: "Error"
Federation:
## The main URL for your federation. You must specify this.
DiscoveryUrl:

0 comments on commit 9474446

Please sign in to comment.