Skip to content

Commit

Permalink
Merge pull request PelicanPlatform#1666 from brianhlin/pr/1660-rpm-co…
Browse files Browse the repository at this point in the history
…nfigd

Add default config.d locations to RPM packaging
  • Loading branch information
matyasselmeci authored Nov 1, 2024
2 parents 579c4fa + bf2aae0 commit 9a57b4a
Show file tree
Hide file tree
Showing 16 changed files with 279 additions and 100 deletions.
32 changes: 28 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,19 +269,43 @@ nfpms:
dst: "/usr/lib/systemd/system/pelican-registry.service"
- src: "systemd/pelican-cache.yaml"
dst: "/etc/pelican/pelican-cache.yaml"
type: config|noreplace
type: config
- src: "systemd/pelican-origin.yaml"
dst: "/etc/pelican/pelican-origin.yaml"
type: config|noreplace
type: config
- src: "systemd/pelican-director.yaml"
dst: "/etc/pelican/pelican-director.yaml"
type: config|noreplace
type: config
- src: "systemd/pelican-registry.yaml"
dst: "/etc/pelican/pelican-registry.yaml"
type: config|noreplace
type: config
- src: "systemd/pelican.logrotate"
dst: "/etc/logrotate.d/pelican"
type: config|noreplace
- src: "systemd/examples/10-federation.yaml"
dst: "/etc/pelican/config.d/10-federation.yaml"
type: config|noreplace
- src: "systemd/examples/20-origin-exports.yaml"
dst: "/etc/pelican/config.d/20-origin-exports.yaml"
type: config|noreplace
- src: "systemd/examples/60-origin-multiuser.yaml"
dst: "/etc/pelican/config.d/60-origin-multiuser.yaml"
type: config|noreplace
- src: "systemd/examples/90-debugging.yaml"
dst: "/etc/pelican/config.d/90-debugging.yaml"
type: config|noreplace
- dst: "/etc/pelican/config.d"
type: "dir"
file_info:
owner: root
group: root
mode: 0755
- dst: "/usr/share/pelican/config.d"
type: "dir"
file_info:
owner: root
group: root
mode: 0755
- dst: "/var/log/pelican"
type: "dir"
file_info:
Expand Down
16 changes: 16 additions & 0 deletions systemd/10-osdf-defaults.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
#####################################################
# Open Science Data Federation configuration
#
# DO NOT EDIT THIS FILE! It will be overwritten upon RPM upgrade.
# If you wish to make changes to the Pelican configuration, create files
# in /etc/pelican/config.d containing your changes.
#####################################################

Federation:
DiscoveryUrl: "https://osg-htc.org"

Server:
TLSCertificate: /etc/pki/tls/certs/pelican.crt
TLSKey: /etc/pki/tls/private/pelican.key
TLSCACertificateFile: /etc/pki/tls/certs/ca-bundle.crt
15 changes: 15 additions & 0 deletions systemd/examples/10-federation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
#####################################################
# Federation configuration
#
# Required configuration to integrate with your federation
#####################################################

Federation:
## The main URL for your federation. You must specify this.
DiscoveryUrl:

## If the external DNS name of your host is different from the output
## of `hostname -f`, set Hostname to the external DNS name
# Server:
# Hostname:
11 changes: 11 additions & 0 deletions systemd/examples/15-osdf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
#####################################################
# OSDF configuration
#
# Required configuration to integrate your service with the OSDF
#####################################################

XRootD:
## Sitename is the resource name this cache is registered as under Topology.
## You must set this.
Sitename: TOPOLOGY_RESOURCE_NAME
52 changes: 52 additions & 0 deletions systemd/examples/20-origin-exports.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
#####################################################
# Origin export configuration
#
# The following sections describe required andoptional origin configurations
#
# See Origin config here:
# https://docs.pelicanplatform.org/federating-your-data
#
# If serving an S3 origin, see:
# https://docs.pelicanplatform.org/federating-your-data/s3-backend
#####################################################

## If you are running an origin, uncomment this line
# Origin:
## If you are running an origin, uncomment this line and set its
## value to 's3' or 'posix'
# StorageType:

## If 'StorageType: s3', uncomment and fill out the following:
# S3ServiceUrl:
# S3Region:
# S3UrlStyle:

## If you are running an origin, uncomment this line to specify the
## list of namespaces and backing filesystem or object store to serve
# Exports:
## If you are running an origin, uncomment this line to specify
## the namespace that you would like to serve with the federation
## via your origin
# - FederationPrefix:
## If you are running an origin, uncomment this line to specify
## the capabilities associated with this namespace
## https://docs.pelicanplatform.org/federating-your-data#origin-and-namespace-capabilities
# Capabilities:

## If 'StorageType: posix', uncomment and fill out the following
## with the path to the POSIX filesystem to serve
# StoragePrefix:

## If 'StorageType: s3', uncomment and fill out the following:
# S3Bucket:

## If 'StorageType: s3', uncomment and fill out the following if
## they are required by the underlying object store:
# S3AccessKeyfile:
# S3SecretKeyfile:

## OPTIONAL: See multi-export configuration details here:
## https://docs.pelicanplatform.org/federating-your-data#multi-export-origins
# - FederationPrefix:
# Capabilities:
11 changes: 11 additions & 0 deletions systemd/examples/50-webui.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
#####################################################
# Pelican admin web interface configuration
#
# Optional configuration. See:
# https://docs.pelicanplatform.org/federating-your-data#login-to-admin-website
#####################################################

## Set to 'true' to enable the admin web interface
Server:
EnableUI: false
15 changes: 15 additions & 0 deletions systemd/examples/60-origin-multiuser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
#####################################################
# Pelican Origin Multiuser Configuration (OPTIONAL)
#
# Optional configuration that allows a Pelican origin to switch users
# for reads/writes. Enable this configuration if your origin is
# serving POSIX-mounted data that is also accessible from another
# POSIX system (e.g., an HTCondor Access Point)
#####################################################

## If you need Pelican multiuser behavior, uncomment the following
## lines and set both values to 'true'
# Origin:
# Multiuser: false
# ScitokensMapSubject: false
25 changes: 25 additions & 0 deletions systemd/examples/90-debugging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
#####################################################
# Common Debugging Configuration
#
# Optional configuration for incr;easing log level verbosity
#####################################################

## Set Debug: true to increase verbosity of logging in
## /var/log/pelican
# Debug: false

## Uncomment the following sections to increase component-specific
## logging verbosity
# Logging:
# Level: "Trace"
# Cache:
# Http: "trace"
# Ofs: "trace"
# Pfc: "trace"
# Xrd: "trace"
# Origin:
# Http: "trace"
# Ofs: "trace"
# Scitokens: "trace"
# Xrootd: "trace"
33 changes: 14 additions & 19 deletions systemd/osdf-cache.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
## Enable Debug to send detailed logs, including XRootD logs, to the log file
# Debug: false
---
#####################################################
# OSDF Pelican Cache configuration
#
# DO NOT EDIT THIS FILE! It will be overwritten upon RPM upgrade.
# If you wish to make changes to the Pelican configuration, create files
# in /etc/pelican/config.d containing your changes.
#####################################################

ConfigLocations:
- "/usr/share/pelican/config.d"
- "/etc/pelican/config.d"

Logging:
LogLocation: /var/log/pelican/osdf-cache.log
## Valid Levels are Trace, Debug, Info, Warning, Error, Fatal and Panic.
# Level: "Error"
Server:
TLSCertificate: /etc/pki/tls/certs/pelican.crt
TLSKey: /etc/pki/tls/private/pelican.key
## 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

Cache:
DataLocation: "/mnt/osdf"
RunLocation: /run/pelican/xrootd/osdf-cache
21 changes: 13 additions & 8 deletions systemd/osdf-director.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
## Enable Debug to send detailed logs to the log file
# Debug: false
---
#####################################################
# OSDF Pelican Director configuration
#
# DO NOT EDIT THIS FILE! It will be overwritten upon RPM upgrade.
# If you wish to make changes to the Pelican configuration, create files
# in /etc/pelican/config.d containing your changes.
#####################################################

ConfigLocations:
- "/usr/share/pelican/config.d"
- "/etc/pelican/config.d"

Logging:
LogLocation: /var/log/pelican/osdf-director.log
## Valid Levels are Trace, Debug, Info, Warning, Error, Fatal and Panic.
# Level: "Error"
Server:
TLSCertificate: /etc/pki/tls/certs/pelican.crt
TLSKey: /etc/pki/tls/private/pelican.key
TLSCACertificateFile: /etc/pki/tls/certs/ca-bundle.crt
36 changes: 14 additions & 22 deletions systemd/osdf-origin.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,18 @@
## Enable Debug to send detailed logs, including XRootD logs, to the log file
# Debug: false
---
#####################################################
# OSDF Pelican Origin configuration
#
# DO NOT EDIT THIS FILE! It will be overwritten upon RPM upgrade.
# If you wish to make changes to the Pelican configuration, create files
# in /etc/pelican/config.d containing your changes.
#####################################################

ConfigLocations:
- "/usr/share/pelican/config.d"
- "/etc/pelican/config.d"

Logging:
LogLocation: /var/log/pelican/osdf-origin.log
## Valid Levels are Trace, Debug, Info, Warning, Error, Fatal and Panic.
# Level: "Error"
Server:
TLSCertificate: /etc/pki/tls/certs/pelican.crt
TLSKey: /etc/pki/tls/private/pelican.key
## 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

Origin:
NamespacePrefix: "/MY_NAMESPACE"
Multiuser: false
RunLocation: /run/pelican/xrootd/osdf-origin
21 changes: 13 additions & 8 deletions systemd/osdf-registry.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
## Enable Debug to send detailed logs to the log file
# Debug: false
---
#####################################################
# OSDF Pelican Registry configuration
#
# DO NOT EDIT THIS FILE! It will be overwritten upon RPM upgrade.
# If you wish to make changes to the Pelican configuration, create files
# in /etc/pelican/config.d containing your changes.
#####################################################

ConfigLocations:
- "/usr/share/pelican/config.d"
- "/etc/pelican/config.d"

Logging:
LogLocation: /var/log/pelican/osdf-registry.log
## Valid Levels are Trace, Debug, Info, Warning, Error, Fatal and Panic.
# Level: "Error"
Server:
TLSCertificate: /etc/pki/tls/certs/pelican.crt
TLSKey: /etc/pki/tls/private/pelican.key
TLSCACertificateFile: /etc/pki/tls/certs/ca-bundle.crt
22 changes: 13 additions & 9 deletions systemd/pelican-cache.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
## Enable Debug to send detailed logs, including XRootD logs, to the log file
# Debug: false
---
#####################################################
# Pelican Cache configuration
#
# DO NOT EDIT THIS FILE! It will be overwritten upon RPM upgrade.
# If you wish to make changes to the Pelican configuration, create files
# in /etc/pelican/config.d containing your changes.
#####################################################

ConfigLocations:
- "/usr/share/pelican/config.d"
- "/etc/pelican/config.d"

Logging:
LogLocation: /var/log/pelican/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"
20 changes: 13 additions & 7 deletions systemd/pelican-director.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
## Enable Debug to send detailed logs, including XRootD logs, to the log file
# Debug: false
---
#####################################################
# Pelican Director configuration
#
# DO NOT EDIT THIS FILE! It will be overwritten upon RPM upgrade.
# If you wish to make changes to the Pelican configuration, create files
# in /etc/pelican/config.d containing your changes.
#####################################################

ConfigLocations:
- "/usr/share/pelican/config.d"
- "/etc/pelican/config.d"

Logging:
LogLocation: /var/log/pelican/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:
Loading

0 comments on commit 9a57b4a

Please sign in to comment.