summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorRobin Stumm <serverkorken@gmail.com>2023-01-20 23:54:49 +0100
committerRobin Stumm <serverkorken@gmail.com>2023-01-20 23:59:26 +0100
commit093e3eb20d3ffd03577e1dcd4dc24fa3fbc6e257 (patch)
tree3f6eb4aec00c5aedcd6b85ddf3b8b02ba7c6a086 /nixos
parentc590d510379f99c6037c0657e38962f89a84ed92 (diff)
ceph: enable dashboard in nixos test
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/ceph-single-node.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/nixos/tests/ceph-single-node.nix b/nixos/tests/ceph-single-node.nix
index 4fe5dc59ff8f3..4a5636fac1563 100644
--- a/nixos/tests/ceph-single-node.nix
+++ b/nixos/tests/ceph-single-node.nix
@@ -181,6 +181,17 @@ let
     monA.wait_until_succeeds("ceph osd stat | grep -e '3 osds: 3 up[^,]*, 3 in'")
     monA.wait_until_succeeds("ceph -s | grep 'mgr: ${cfg.monA.name}(active,'")
     monA.wait_until_succeeds("ceph -s | grep 'HEALTH_OK'")
+
+    # Enable the dashboard and recheck health
+    monA.succeed(
+        "ceph mgr module enable dashboard",
+        "ceph config set mgr mgr/dashboard/ssl false",
+        # default is 8080 but it's better to be explicit
+        "ceph config set mgr mgr/dashboard/server_port 8080",
+    )
+    monA.wait_for_open_port(8080)
+    monA.wait_until_succeeds("curl -q --fail http://localhost:8080")
+    monA.wait_until_succeeds("ceph -s | grep 'HEALTH_OK'")
   '';
 in {
   name = "basic-single-node-ceph-cluster";