Skip to content

Commit

Permalink
s3 management: add user management
Browse files Browse the repository at this point in the history
- accounting now uses the command runner utility code

- s3 users are now managed (created, deleted and updated)

Re PL-133084
  • Loading branch information
osnyx authored and ctheune committed Nov 14, 2024
1 parent 8b3d6e3 commit 68ce208
Show file tree
Hide file tree
Showing 11 changed files with 1,221 additions and 61 deletions.
18 changes: 18 additions & 0 deletions changelog.d/20241114_110006_PL-133084-s3-usermgmt_scriv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--
A new changelog entry.
Delete placeholder items that do not apply. Empty sections will be removed
automatically during release.
Leave the XX.XX as is: this is a placeholder and will be automatically filled
correctly during the release and helps when backporting over multiple platform
branches.
-->


### NixOS XX.XX platform

- S3 users are now managed automatically and can be viewed and managed via our
customer portal. (PL-133084)
10 changes: 5 additions & 5 deletions nixos/roles/ceph/rgw.nix
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,13 @@ in
'';
};

systemd.services.fc-ceph-rgw-accounting = rec {
description = "Upload S3 usage data to the Directory";
systemd.services.fc-ceph-rgw-users = rec {
description = "Sync S3 users and accounting with directory";
path = [ cephPkgs.ceph ];
serviceConfig.Type = "oneshot";
wants = [ fclib.network.sto.addressUnit ];
after = wants;
script = "${pkgs.fc.agent}/bin/fc-s3accounting --enc ${config.flyingcircus.encPath}";
script = "${pkgs.fc.agent}/bin/fc-s3users --enc ${config.flyingcircus.encPath}";
};

flyingcircus.services.sensu-client.checks = {
Expand Down Expand Up @@ -223,10 +223,10 @@ in
};
};

systemd.timers.fc-ceph-rgw-accounting = {
systemd.timers.fc-ceph-rgw-users = {
enable = ! config.flyingcircus.services.ceph.server.passive;

description = "Timer for uploading S3 usage data to the Directory";
description = "Timer for syncing S3 users and accounting with the directory";
wantedBy = [ "timers.target" ];
timerConfig = {
Persistent = true;
Expand Down
6 changes: 6 additions & 0 deletions pkgs/fc/agent/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,10 @@ buildPythonPackage rec {
checkInputs ++ [ py.pytest ] ++ propagatedBuildInputs
);

outputs = [ "out" "qa" ];

postCheck = ''
cp -a htmlcov/ $qa/
'';

}
47 changes: 0 additions & 47 deletions pkgs/fc/agent/fc/manage/s3accounting.py

This file was deleted.

Loading

0 comments on commit 68ce208

Please sign in to comment.