Scripts that install, update, run and back up the
PEVA Connector — the integration service that downloads
archival fund descriptions from the PEvA2 system (Portál NAČR)
and feeds them into Elza — on a Linux host. They are built on
the shared Lightcomp deployment engine; one config file
(peva-connector-env) holds everything environment-specific.
On the target host, as a user with sudo:
curl -fsSL https://get.lightcomp.com/peva-connector/peva-connector-bootstrap.sh | bash -s -- --home /opt/peva-connector
This downloads the script bundle (checksum-verified) into
/opt/peva-connector/scripts, renders the product-named commands and
systemd units, and seeds the configuration file. Then:
/opt/peva-connector/scripts/peva-connector-env — uncomment
only the values that differ from the defaults (database name, health URL,
CSC account …).elza
through the file's group; do not use chmod 600):
sudo chgrp elza /opt/peva-connector/scripts/peva-connector-env
sudo chmod 640 /opt/peva-connector/scripts/peva-connector-envconfig/peva-connector.yml — PEvA, Elza and database
credentials)./opt/peva-connector/scripts/peva-connector-deploy --show-configsudo /opt/peva-connector/scripts/peva-connector-deploy --auto
(or a specific version:
peva-connector-deploy 1.0.0).Add --channel main to the install command for the latest
(snapshot) scripts instead of stable; the choice is remembered for updates.
Separate from the deploy config above, the application itself reads
config/peva-connector.yml in the install directory
(spring.config.name=peva-connector). Create it from the template
shipped in the distribution package and fill in the PEvA endpoint/credentials,
the Elza connection and the PostgreSQL URL/credentials. The service listens on
port 8081 by default and exposes a health endpoint at
/actuator/health.
Re-run the installed bootstrap — no arguments needed. It
locates the installation from its own path, keeps the channel it was installed
from and never overwrites your peva-connector-env. When the
published build is unchanged nothing is downloaded (safe to run as often as you
like):
/opt/peva-connector/scripts/peva-connector-bootstrap.sh
sudo /opt/peva-connector/scripts/peva-connector-deploy --auto
The flow is: stop service → pre-update DB backup → activate the new release (atomic symlink switch) → start → verify. The result is reported to the Lightcomp Customer Service Center (CSC) when an account is configured.
CUSTOMER_ID +
CUSTOMER_SERVICE_SECRET in peva-connector-env),
--auto installs the version confirmed for this
instance in the CSC portal — confirming there is how you control
the rollout.--auto follows the public
stable channel.…-preupdate-…dump in
/opt/peva-connector/backup) is the rollback anchor; the newest
ones are kept regardless of age.Downgrade warning: switching back to an older release is not a safe rollback by itself — Liquibase migrates the database schema forward on startup. Restore the matching pre-update dump first.
Install the peva-connector-update service (below),
then enable per instance in peva-connector-env:
AUTOUPDATE=on
The timer checks hourly and applies a newly confirmed version outside working
hours (default Mo-Fr 06:00-18:00, configurable via
AUTOUPDATE_WORKHOURS; set it empty to update any hour — typical for
TEST instances).
The bundle ships unit templates in
/opt/peva-connector/scripts/systemd/, already rendered with your
install path and the elza service account filled in — copy and
enable, no editing needed. Each service is a separate decision; install only
what the instance needs.
| Unit | Purpose | Runs as | Schedule |
|---|---|---|---|
peva-connector.service |
the application (current/peva-connector.jar) |
elza | always |
peva-connector-backup.timer |
database backup | elza | weekly, Sun 02:30 |
peva-connector-health.timer |
health heartbeat to CSC | elza |
every 10 min; send rate = HEARTBEAT_INTERVAL |
peva-connector-update.timer |
unattended update | root | hourly, outside AUTOUPDATE_WORKHOURS |
peva-connector.serviceRequired on every instance.
sudo cp /opt/peva-connector/scripts/systemd/peva-connector.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now peva-connector.service
Verify: systemctl status peva-connector; application log in
logs/peva-connector.log.
peva-connector-backupRecommended on production. Runs weekly as the app user
(BACKUP_AS=dbuser — the DB password is read from
peva-connector.yml), so peva-connector-env must be
readable by that user (the chgrp/chmod 640 step in
Install). Retention is configured in
peva-connector-env (BACKUP_KEEP_DAYS, default 14
days).
sudo cp /opt/peva-connector/scripts/systemd/peva-connector-backup.{service,timer} /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now peva-connector-backup.timer
sudo systemctl start peva-connector-backup.service # run one backup now to verify
peva-connector-healthInstall when the instance has a CSC account; without one the service is a
harmless no-op. Recommended config in peva-connector-env:
HEALTH_URL=http://127.0.0.1:8081/actuator/health so the heartbeat
distinguishes "process up" from "really serving".
sudo cp /opt/peva-connector/scripts/systemd/peva-connector-health.{service,timer} /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now peva-connector-health.timer
sudo systemctl start peva-connector-health.service # send one heartbeat now to verify
Verify locally without sending:
/opt/peva-connector/scripts/peva-connector-health --check.
peva-connector-updateOpt-in. The unit runs as root (it stops/starts the service; no sudo setup)
and stays inert until you set AUTOUPDATE=on in
peva-connector-env.
sudo cp /opt/peva-connector/scripts/systemd/peva-connector-update.{service,timer} /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now peva-connector-update.timer
Verify: systemctl list-timers 'peva-connector-*' shows the next
run; activity: journalctl -u peva-connector-update.service -n 50.
| File | Purpose |
|---|---|
| peva-connector-bootstrap.sh | installer / updater of the scripts (stable) |
| peva-connector-scripts.tar.gz (.sha256) | the script bundle, stable channel |
| snapshots/main/ | main channel (latest) — same file names |