The Voucher Cleanup Process
Overview
The voucher-cleanup.pl
program runs as an ongoing process and
regularly reviews the vouchers in the voucher database to trigger
state changes (such as removing old vouchers).
When deployed to a standard OS image this is process is run as a systemd service. The necessary
systemd configuration files are installed by the n2vs-svc
package and
are run on the backend-middleware (N2SVCD execution) environment for
N2VS (not the GUI, frontend-middleware (Jarvis), or DB servers).
Note that as this process connects to the SMF database, the voucher database, and the backend service API over HTTP, this program can run from any suitable container or VM.
Running voucher-cleanup.pl --help
will show the program usage.
Command Line Options
The following common options may be specified when executing:
Option | Type | Default | Description |
---|---|---|---|
--voucher-db-connect |
MongoDB Connection String | mongodb://n2vs:xxx@n2vs-mongo-db:27017/vouchers?authSource=admin |
A Perl MongoDB connection string to connect to the voucher database. This can be a read-only database connection (all changes are made via the backend processing system of N2VS |
--db-connect |
PSQL DB Connection String | dbi:Pg:dbname=n2in;host=n2vs-pg-db;port=5432 |
A Perl DBI PostgreSQL connection string. See PostgreSQL Connection Strings for more information. |
--db-user |
String | n2vs_owner |
The username of the user to connect to the PostgreSQL database instance with. |
--db-password |
String | The password for the user specified with --db-user to connect to the PostgreSQL database instance with. |
|
--service-channel-code |
String | deployment dependent | The API code to use when communicating with the N2VS password. This must match a service channel configured in the SMF database. |
--backend-url |
HTTP URL String | http://n2vs-backend:8080/api/ |
The backend API URL to communicate with the N2VS N2SVCD backend API. For production installations this should be reconfigured to use a TLS load balancer. |
Scalability
A single instance of this process is sufficiently efficient for all installations, however it is recommended at least two instances of this process are configured to execute on separate service nodes for redundancy.