Skip to content
Snippets Groups Projects
Commit e571e57f authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

rename things with `voucher` in them for more clarity

The point is this is where PaymentServer's persistent state goes.  That
includes vouchers but might include more stuff too.
parent 6587a9fa
Branches
No related tags found
No related merge requests found
...@@ -19,11 +19,11 @@ Deployment notes ...@@ -19,11 +19,11 @@ Deployment notes
3. Create a labeled filesystem on the partition :: 3. Create a labeled filesystem on the partition ::
mkfs.ext4 -L voucher-database /dev/nvme1n1p1 mkfs.ext4 -L zkapissuer-database /dev/nvme1n1p1
4. Mount the new filesystem :: 4. Mount the new filesystem ::
systemctl restart var-lib-voucher-database.mount systemctl restart var-lib-zkapissuer-database.mount
5. Deploy the PrivateStorageio update. 5. Deploy the PrivateStorageio update.
......
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
# (maybe it could? but why bother?) we do a bind-mount here so there is a # (maybe it could? but why bother?) we do a bind-mount here so there is a
# configured value readable. The database won't really have a dedicated # configured value readable. The database won't really have a dedicated
# volume but it will sort of appear as if it does. # volume but it will sort of appear as if it does.
services.private-storage-issuer.voucherFileSystem = { services.private-storage-issuer.databaseFileSystem = {
device = "/var/lib/origin-zkapissuer-v2"; device = "/var/lib/origin-zkapissuer-v2";
options = ["bind"]; options = ["bind"];
}; };
# XXX This should be handled by the storage module like voucher-database # XXX This should be handled by the storage module like zkapissuer-database
# is handled by the issuer module. # is handled by the issuer module.
fileSystems."/storage" = { fsType = "tmpfs"; }; fileSystems."/storage" = { fsType = "tmpfs"; };
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
# beyond control of this particular part of the system) for the # beyond control of this particular part of the system) for the
# PaymentServer voucher database. This makes it easier to manage for # PaymentServer voucher database. This makes it easier to manage for
# tasks like backup/recovery and encryption. # tasks like backup/recovery and encryption.
services.private-storage-issuer.voucherFileSystem = { services.private-storage-issuer.databaseFileSystem = {
label = "voucher-database"; label = "zkapissuer-database";
}; };
# Clean up packages after a while # Clean up packages after a while
......
...@@ -55,6 +55,6 @@ in { ...@@ -55,6 +55,6 @@ in {
ristrettoSigningKeyPath = config.deployment.secrets.ristretto-signing-key.destination; ristrettoSigningKeyPath = config.deployment.secrets.ristretto-signing-key.destination;
stripeSecretKeyPath = config.deployment.secrets.stripe-secret-key.destination; stripeSecretKeyPath = config.deployment.secrets.stripe-secret-key.destination;
database = "SQLite3"; database = "SQLite3";
databasePath = "${config.fileSystems."voucher-database".mountPoint}/vouchers.sqlite3"; databasePath = "${config.fileSystems."zkapissuer-database".mountPoint}/vouchers.sqlite3";
}; };
} }
...@@ -81,13 +81,13 @@ in { ...@@ -81,13 +81,13 @@ in {
The kind of voucher database to use. The kind of voucher database to use.
''; '';
}; };
services.private-storage-issuer.voucherFileSystem = lib.mkOption { services.private-storage-issuer.databaseFileSystem = lib.mkOption {
# Logically, the type is the type of an entry in fileSystems - but we'll # Logically, the type is the type of an entry in fileSystems - but we'll
# just let the type system enforce that when we pass the value on to # just let the type system enforce that when we pass the value on to
# fileSystems. # fileSystems.
description = '' description = ''
Configuration for a filesystem to mount which will hold the voucher Configuration for a filesystem to mount which will hold the issuer's
database. internal state database.
''; '';
}; };
services.private-storage-issuer.databasePath = lib.mkOption { services.private-storage-issuer.databasePath = lib.mkOption {
...@@ -135,7 +135,7 @@ in { ...@@ -135,7 +135,7 @@ in {
in lib.mkIf cfg.enable { in lib.mkIf cfg.enable {
# Make sure the voucher database filesystem is mounted. # Make sure the voucher database filesystem is mounted.
fileSystems = { fileSystems = {
"voucher-database" = cfg.voucherFileSystem // { "zkapissuer-database" = cfg.databaseFileSystem // {
mountPoint = "/var/lib/${stateDirectory}"; mountPoint = "/var/lib/${stateDirectory}";
}; };
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment