From 76fa5d119d8512cf5e9a1696ccfdd32740fc1878 Mon Sep 17 00:00:00 2001 From: Andrew Battat Date: Fri, 24 May 2024 19:04:40 +0000 Subject: [PATCH] Chore(NODE-1353): Organize metrics-proxy under monitoring/ component --- .gitlab/CODEOWNERS | 5 +---- ic-os/rootfs/guestos.bzl | 4 ++-- ic-os/rootfs/hostos.bzl | 4 ++-- .../etc/systemd/system/metrics-proxy.service | 16 ---------------- .../metrics-proxy/guestos}/metrics-proxy.yaml | 0 .../metrics-proxy/hostos}/metrics-proxy.yaml | 0 .../metrics-proxy}/metrics-proxy.service | 0 7 files changed, 5 insertions(+), 24 deletions(-) delete mode 100644 ic-os/rootfs/hostos/etc/systemd/system/metrics-proxy.service rename ic-os/rootfs/{guestos/etc => monitoring/metrics-proxy/guestos}/metrics-proxy.yaml (100%) rename ic-os/rootfs/{hostos/etc => monitoring/metrics-proxy/hostos}/metrics-proxy.yaml (100%) rename ic-os/rootfs/{guestos/etc/systemd/system => monitoring/metrics-proxy}/metrics-proxy.service (100%) diff --git a/.gitlab/CODEOWNERS b/.gitlab/CODEOWNERS index 3e952511003..e6b8170a20d 100644 --- a/.gitlab/CODEOWNERS +++ b/.gitlab/CODEOWNERS @@ -56,10 +56,7 @@ go_deps.bzl @dfinity-lab/teams/idx /toolchains/ @dfinity-lab/teams/node-team # [metrics-proxy] -/ic-os/rootfs/hostos/etc/metrics-proxy.yaml @dfinity-lab/teams/DRE -/ic-os/rootfs/hostos/etc/systemd/system/metrics-proxy.service @dfinity-lab/teams/DRE -/ic-os/rootfs/guestos/etc/metrics-proxy.yaml @dfinity-lab/teams/DRE -/ic-os/rootfs/guestos/etc/systemd/system/metrics-proxy.service @dfinity-lab/teams/DRE +/ic-os/rootfs/monitoring/metrics-proxy/ @dfinity-lab/teams/DRE # [GitLab-CI] /.pre-commit-config.yaml @dfinity-lab/teams/idx diff --git a/ic-os/rootfs/guestos.bzl b/ic-os/rootfs/guestos.bzl index bc289bb996e..f8f213be5e1 100644 --- a/ic-os/rootfs/guestos.bzl +++ b/ic-os/rootfs/guestos.bzl @@ -10,8 +10,6 @@ rootfs_files = { Label("//ic-os/rootfs/guestos:etc/sysctl.d/privileged-ports.conf"): "/etc/sysctl.d/privileged-ports.conf", Label("//ic-os/rootfs/guestos:etc/sysfs.d/hugepage.conf"): "/etc/sysfs.d/hugepage.conf", Label("//ic-os/rootfs/guestos:etc/tmpfiles.d/ic-node.conf"): "/etc/tmpfiles.d/ic-node.conf", - Label("//ic-os/rootfs/guestos:etc/metrics-proxy.yaml"): "/etc/metrics-proxy.yaml", - Label("//ic-os/rootfs/guestos:etc/systemd/system/metrics-proxy.service"): "/etc/systemd/system/metrics-proxy.service", # prep files: Label("//ic-os/rootfs/guestos:prep/filebeat/filebeat.fc"): "/prep/filebeat/filebeat.fc", @@ -129,4 +127,6 @@ rootfs_files = { Label("monitoring/node_exporter/setup-node_exporter-keys/setup-node_exporter-keys.sh"): "/opt/ic/bin/setup-node_exporter-keys.sh", Label("monitoring/node_exporter/setup-node_exporter-keys/setup-node_exporter-keys.service"): "/etc/systemd/system/setup-node_exporter-keys.service", Label("hostos-scripts/vsock/10-vhost-vsock.rules"): "/etc/udev/rules.d/10-vhost-vsock.rules", + Label("monitoring/metrics-proxy/guestos/metrics-proxy.yaml"): "/etc/metrics-proxy.yaml", + Label("monitoring/metrics-proxy/metrics-proxy.service"): "/etc/systemd/system/metrics-proxy.service", } diff --git a/ic-os/rootfs/hostos.bzl b/ic-os/rootfs/hostos.bzl index aff0ce564c6..9cecc238e4f 100644 --- a/ic-os/rootfs/hostos.bzl +++ b/ic-os/rootfs/hostos.bzl @@ -6,8 +6,6 @@ rootfs_files = { Label("hostos/etc/sudoers"): "/etc/sudoers", Label("hostos/etc/tmpfiles.d/ic-node.conf"): "/etc/tmpfiles.d/ic-node.conf", Label("hostos/etc/udev/rules.d/20-ipmi.rules"): "/etc/udev/rules.d/20-ipmi.rules", - Label("hostos/etc/metrics-proxy.yaml"): "/etc/metrics-proxy.yaml", - Label("hostos/etc/systemd/system/metrics-proxy.service"): "/etc/systemd/system/metrics-proxy.service", # consolidated files: Label("misc/metrics.sh"): "/opt/ic/bin/metrics.sh", @@ -73,4 +71,6 @@ rootfs_files = { Label("monitoring/node_exporter/node_exporter"): "/etc/default/node_exporter", Label("monitoring/node_exporter/setup-node_exporter-keys/setup-node_exporter-keys.sh"): "/opt/ic/bin/setup-node_exporter-keys.sh", Label("monitoring/node_exporter/setup-node_exporter-keys/setup-node_exporter-keys.service"): "/etc/systemd/system/setup-node_exporter-keys.service", + Label("monitoring/metrics-proxy/hostos/metrics-proxy.yaml"): "/etc/metrics-proxy.yaml", + Label("monitoring/metrics-proxy/metrics-proxy.service"): "/etc/systemd/system/metrics-proxy.service", } diff --git a/ic-os/rootfs/hostos/etc/systemd/system/metrics-proxy.service b/ic-os/rootfs/hostos/etc/systemd/system/metrics-proxy.service deleted file mode 100644 index 55d6775375b..00000000000 --- a/ic-os/rootfs/hostos/etc/systemd/system/metrics-proxy.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Prometheus metrics proxy -After=node_exporter.service - -[Service] -User=metrics-proxy -ExecStart=/opt/ic/bin/metrics-proxy /etc/metrics-proxy.yaml -Restart=on-failure -RestartSec=10 -KillSignal=SIGINT -StartLimitBurst=5 -StartLimitInterval=60 -LimitNOFILE=65536 - -[Install] -WantedBy=multi-user.target diff --git a/ic-os/rootfs/guestos/etc/metrics-proxy.yaml b/ic-os/rootfs/monitoring/metrics-proxy/guestos/metrics-proxy.yaml similarity index 100% rename from ic-os/rootfs/guestos/etc/metrics-proxy.yaml rename to ic-os/rootfs/monitoring/metrics-proxy/guestos/metrics-proxy.yaml diff --git a/ic-os/rootfs/hostos/etc/metrics-proxy.yaml b/ic-os/rootfs/monitoring/metrics-proxy/hostos/metrics-proxy.yaml similarity index 100% rename from ic-os/rootfs/hostos/etc/metrics-proxy.yaml rename to ic-os/rootfs/monitoring/metrics-proxy/hostos/metrics-proxy.yaml diff --git a/ic-os/rootfs/guestos/etc/systemd/system/metrics-proxy.service b/ic-os/rootfs/monitoring/metrics-proxy/metrics-proxy.service similarity index 100% rename from ic-os/rootfs/guestos/etc/systemd/system/metrics-proxy.service rename to ic-os/rootfs/monitoring/metrics-proxy/metrics-proxy.service