about summary refs log tree commit diff
path: root/ops/nixos
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-02-21T15·35+0000
committerVincent Ambo <tazjin@google.com>2020-02-21T15·35+0000
commit6e4df43f623ee0661c3f3747f7260981c6fc23f7 (patch)
tree241a6fc963ecb292a81b3ef92bb5f03fc52abf53 /ops/nixos
parent7290a18cb139d7b477d3704a5d3be8f4c468b16a (diff)
feat(ops/nixos/camden): Forward logs to Stackdriver Logging r/563
Enables the journaldriver service to forward logs into a "home"
log-stream in the "tazjins-infrastructure" project.

The service account key for camden has been placed on the machine
manually.
Diffstat (limited to 'ops/nixos')
-rw-r--r--ops/nixos/camden/default.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/ops/nixos/camden/default.nix b/ops/nixos/camden/default.nix
index e60385e8fe08..0f1fb1666bd0 100644
--- a/ops/nixos/camden/default.nix
+++ b/ops/nixos/camden/default.nix
@@ -170,6 +170,14 @@ in lib.fix(self: {
     postRun = "systemctl reload nginx";
   };
 
+  # Forward logs to Google Cloud Platform
+  services.journaldriver = {
+    enable                 = true;
+    logStream              = "home";
+    googleCloudProject     = "tazjins-infrastructure";
+    applicationCredentials = "/etc/gcp/key.json";
+  };
+
   # serve my website
   services.nginx = {
     enable = true;