|
| 1 | +.TH xjcd 1 "@XRootD_VERSION_STRING@" |
| 2 | +.SH NAME |
| 3 | +xjcd \- bootstrap JournalCache forwarding proxy configuration for systemd |
| 4 | +.SH SYNOPSIS |
| 5 | +.nf |
| 6 | +\fBxjcd\fR [\fB--journal\fR \fIPATH\fR] \fIcommand\fR [\fIargs\fR...] |
| 7 | + |
| 8 | +\fBxjcd\fR \fBinit\fR [\fB--journal\fR \fIPATH\fR] |
| 9 | + \fB--xroot-port\fR \fIN\fR \fB--https-port\fR \fIN\fR |
| 10 | + \fB--tls-cert\fR \fIPATH\fR \fB--tls-key\fR \fIPATH\fR |
| 11 | + [\fB--install-systemd\fR] [\fB--systemd-unit\fR \fINAME\fR] |
| 12 | + [\fB--lib-dir\fR \fIPATH\fR] [\fB--plugin-suffix\fR \fIN\fR] |
| 13 | + |
| 14 | +\fBxjcd\fR \fBrender\fR |
| 15 | + |
| 16 | +\fBxjcd\fR \fBshow\fR |
| 17 | + |
| 18 | +\fBxjcd\fR \fBvalidate\fR |
| 19 | +.fi |
| 20 | +.SH DESCRIPTION |
| 21 | +The \fBxjcd\fR utility prepares a JournalCache HTTP forwarding proxy deployment. |
| 22 | +It writes bootstrap state, XRootD configuration, client plugin snippets, a |
| 23 | +systemd \fBEnvironmentFile\fR, and a systemd unit under \fI$journal/.xjc/\fR. |
| 24 | +Process startup is left to \fBsystemd\fR; there is no \fBxjcd run\fR command. |
| 25 | + |
| 26 | +Runtime policy (allowlist, redirects, bypass) is stored in |
| 27 | +\fI$journal/.xjc/policy.conf\fR and should be edited with \fBxjc\fR(1). That |
| 28 | +file is hot-reloaded by running xrootd processes when its mtime changes. |
| 29 | + |
| 30 | +Initial policy is \fIopen\fR: no \fBallow_origin\fR lines are written until |
| 31 | +rules are added with \fBxjc\fR. |
| 32 | +.SH OPTIONS |
| 33 | +.TP |
| 34 | +.B \-\-journal PATH |
| 35 | +Journal cache root directory. May also be set via |
| 36 | +.BR XRD_JOURNALCACHE_CACHE . |
| 37 | +.TP |
| 38 | +.B \-\-help |
| 39 | +Print usage and exit. |
| 40 | +.SH COMMANDS |
| 41 | +.TP |
| 42 | +.B init |
| 43 | +Create \fI$journal/.xjc/state.conf\fR, render configuration files, and seed |
| 44 | +\fI$journal/.xjc/policy.conf\fR if missing. TLS certificate and key paths are |
| 45 | +required. |
| 46 | +.RS 7 |
| 47 | +Init options: |
| 48 | +.TP |
| 49 | +.B \-\-xroot-port N |
| 50 | +TCP port for the native XRootD protocol. |
| 51 | +.TP |
| 52 | +.B \-\-https-port N |
| 53 | +TLS port for HTTP/HTTPS (XrdHttp). |
| 54 | +.TP |
| 55 | +.B \-\-tls-cert PATH |
| 56 | +Path to the TLS certificate (written into \fBhttp.cert\fR in \fBxrootd.cf\fR). |
| 57 | +.TP |
| 58 | +.B \-\-tls-key PATH |
| 59 | +Path to the TLS private key (written into \fBhttp.key\fR in \fBxrootd.cf\fR). |
| 60 | +.TP |
| 61 | +.B \-\-install-systemd |
| 62 | +After rendering, install \fI$journal/.xjc/etc/xjcd.service\fR into |
| 63 | +\fI/etc/systemd/system/\fR, run \fBsystemctl daemon-reload\fR, and |
| 64 | +\fBsystemctl enable \-\-now\fR the unit. Requires root (typically \fBsudo\fR). |
| 65 | +.TP |
| 66 | +.B \-\-systemd-unit NAME |
| 67 | +Systemd unit file name to install (default: \fBxjcd.service\fR). Use a distinct |
| 68 | +name when multiple journals run on one host (for example |
| 69 | +\fBjournalcache-foo.service\fR). |
| 70 | +.TP |
| 71 | +.B \-\-lib-dir PATH |
| 72 | +Directory containing XRootD plugin shared objects (default: \fI/usr/lib64\fR or |
| 73 | +\fI/usr/local/lib\fR on macOS). |
| 74 | +.TP |
| 75 | +.B \-\-plugin-suffix N |
| 76 | +Plugin version suffix in library names (default: \fB5\fR). |
| 77 | +.RE |
| 78 | +.TP |
| 79 | +.B render |
| 80 | +Regenerate all files under \fI$journal/.xjc/etc/\fR from |
| 81 | +\fI$journal/.xjc/state.conf\fR. Run after editing bootstrap parameters, then |
| 82 | +restart the systemd service. |
| 83 | +.TP |
| 84 | +.B show |
| 85 | +Print bootstrap paths, generated config locations, and systemd install hints. |
| 86 | +.TP |
| 87 | +.B validate |
| 88 | +Check journal writability, TLS file presence, and plugin library paths. |
| 89 | +.SH GENERATED LAYOUT |
| 90 | +.TP |
| 91 | +.B $journal/.xjc/state.conf |
| 92 | +Persistent bootstrap parameters written by \fBinit\fR. |
| 93 | +.TP |
| 94 | +.B $journal/.xjc/policy.conf |
| 95 | +Hot-reloadable runtime policy; edit with \fBxjc\fR(1). |
| 96 | +.TP |
| 97 | +.B $journal/.xjc/etc/xrootd.cf |
| 98 | +XRootD server configuration for the forwarding proxy. |
| 99 | +.TP |
| 100 | +.B $journal/.xjc/etc/journalcache-http.ext.conf |
| 101 | +JournalCache HTTP ext handler configuration (\fBforwarding = 1\fR). |
| 102 | +.TP |
| 103 | +.B $journal/.xjc/etc/client.plugins.d/journalcache.conf |
| 104 | +Client plugins loaded by the xrootd/PSS process. |
| 105 | +.TP |
| 106 | +.B $journal/.xjc/etc/xjcd.env |
| 107 | +Environment variables for \fBEnvironmentFile=\fR in systemd. |
| 108 | +.TP |
| 109 | +.B $journal/.xjc/etc/xjcd.service |
| 110 | +Generated systemd unit referencing the paths above. |
| 111 | +.SH EXAMPLES |
| 112 | +Initialize a journal and install the systemd unit: |
| 113 | +.nf |
| 114 | +sudo xjcd init \-\-journal /var/tmp/journalcache \\ |
| 115 | + \-\-xroot-port 1094 \-\-https-port 8443 \\ |
| 116 | + \-\-tls-cert /etc/xrootd/tls.crt \-\-tls-key /etc/xrootd/tls.key \\ |
| 117 | + \-\-install-systemd |
| 118 | +.fi |
| 119 | +Initialize without installing the unit: |
| 120 | +.nf |
| 121 | +xjcd init \-\-journal /var/tmp/journalcache \\ |
| 122 | + \-\-xroot-port 1094 \-\-https-port 8443 \\ |
| 123 | + \-\-tls-cert /etc/xrootd/tls.crt \-\-tls-key /etc/xrootd/tls.key |
| 124 | +.fi |
| 125 | +Manual systemd install: |
| 126 | +.nf |
| 127 | +sudo install \-m 0644 /var/tmp/journalcache/.xjc/etc/xjcd.service /etc/systemd/system/ |
| 128 | +sudo systemctl daemon-reload |
| 129 | +sudo systemctl enable \-\-now xjcd.service |
| 130 | +.fi |
| 131 | +Re-render after editing \fIstate.conf\fR: |
| 132 | +.nf |
| 133 | +xjcd render \-\-journal /var/tmp/journalcache |
| 134 | +sudo systemctl restart xjcd.service |
| 135 | +.fi |
| 136 | +.SH ENVIRONMENT |
| 137 | +.TP |
| 138 | +.B XRD_JOURNALCACHE_CACHE |
| 139 | +Default journal root when \fB\-\-journal\fR is omitted. |
| 140 | +.SH FILES |
| 141 | +.TP |
| 142 | +.I $journal/.xjc/state.conf |
| 143 | +Bootstrap state. |
| 144 | +.TP |
| 145 | +.I $journal/.xjc/policy.conf |
| 146 | +Runtime policy file. |
| 147 | +.TP |
| 148 | +.I $journal/.xjc/etc/ |
| 149 | +Generated configuration directory. |
| 150 | +.TP |
| 151 | +.I /etc/systemd/system/xjcd.service |
| 152 | +Default install target for \fB\-\-install-systemd\fR. |
| 153 | +.SH SEE ALSO |
| 154 | +.BR xjc (1), |
| 155 | +.BR xrootd (8), |
| 156 | +.BR xrdfs (1) |
| 157 | + |
| 158 | +Documentation: JournalCache plugin README and \fIhtml/index.html\fR under |
| 159 | +\fIXrdClJournalCachePlugin\fR. |
0 commit comments