From 4d5a5a0895f5de2a792085da8ae22e3894a697c5 Mon Sep 17 00:00:00 2001 From: Jon Date: Thu, 2 May 2024 23:36:40 +0000 Subject: [PATCH 01/10] Added nix flake stuff --- .gitignore | 2 + flake.lock | 761 +++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 67 +++++ 3 files changed, 830 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.gitignore b/.gitignore index 6a9390b..cfe3211 100644 --- a/.gitignore +++ b/.gitignore @@ -161,3 +161,5 @@ cython_debug/ # vscode .vscode +.devenv +.pre-commit-config.yaml diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..a6c1801 --- /dev/null +++ b/flake.lock @@ -0,0 +1,761 @@ +{ + "nodes": { + "cachix": { + "inputs": { + "devenv": "devenv_2", + "flake-compat": [ + "devenv-k8s", + "devenv", + "flake-compat" + ], + "nixpkgs": [ + "devenv-k8s", + "devenv", + "nixpkgs" + ], + "pre-commit-hooks": [ + "devenv-k8s", + "devenv", + "pre-commit-hooks" + ] + }, + "locked": { + "lastModified": 1712055811, + "narHash": "sha256-7FcfMm5A/f02yyzuavJe06zLa9hcMHsagE28ADcmQvk=", + "owner": "cachix", + "repo": "cachix", + "rev": "02e38da89851ec7fec3356a5c04bc8349cae0e30", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "cachix", + "type": "github" + } + }, + "deploy-repo-template": { + "flake": false, + "locked": { + "lastModified": 1710788754, + "narHash": "sha256-46GUCjs0oPZp2AxzHq6OZITzmqwwhb3Pbgtno6Ec9zY=", + "ref": "refs/heads/main", + "rev": "79e85fc90d7d1d0c3c5e4b1db676b2de377a69e7", + "revCount": 14, + "type": "git", + "url": "https://github.com/LCOGT/deploy-repo-template.git" + }, + "original": { + "type": "git", + "url": "https://github.com/LCOGT/deploy-repo-template.git" + } + }, + "devenv": { + "inputs": { + "cachix": "cachix", + "flake-compat": "flake-compat_2", + "nix": "nix_2", + "nixpkgs": "nixpkgs_2", + "pre-commit-hooks": "pre-commit-hooks" + }, + "locked": { + "lastModified": 1713195025, + "narHash": "sha256-TIUCx0Vlu9ImxTtRyQUFf5RWvTT4GxCTKRSiMFZdZuw=", + "owner": "cachix", + "repo": "devenv", + "rev": "01e01a3b4d991983dda055d10dcf93e86e1e1f8a", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "devenv", + "type": "github" + } + }, + "devenv-k8s": { + "inputs": { + "deploy-repo-template": "deploy-repo-template", + "devenv": "devenv", + "flake-parts": "flake-parts", + "kpt": "kpt", + "mk-shell-bin": "mk-shell-bin", + "nix2container": "nix2container", + "nixpkgs": "nixpkgs_3", + "octopilot": "octopilot", + "skaffold": "skaffold" + }, + "locked": { + "lastModified": 1713222238, + "narHash": "sha256-viSH6JTcPJxu/BQnXBjgUsmhJatCxlpmqMizrI2DuYk=", + "owner": "LCOGT", + "repo": "devenv-k8s", + "rev": "6c9d9b168c07ac6d7592c2543534c70f5586b453", + "type": "github" + }, + "original": { + "owner": "LCOGT", + "repo": "devenv-k8s", + "type": "github" + } + }, + "devenv_2": { + "inputs": { + "flake-compat": [ + "devenv-k8s", + "devenv", + "cachix", + "flake-compat" + ], + "nix": "nix", + "nixpkgs": "nixpkgs", + "poetry2nix": "poetry2nix", + "pre-commit-hooks": [ + "devenv-k8s", + "devenv", + "cachix", + "pre-commit-hooks" + ] + }, + "locked": { + "lastModified": 1708704632, + "narHash": "sha256-w+dOIW60FKMaHI1q5714CSibk99JfYxm0CzTinYWr+Q=", + "owner": "cachix", + "repo": "devenv", + "rev": "2ee4450b0f4b95a1b90f2eb5ffea98b90e48c196", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "python-rewrite", + "repo": "devenv", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { + "inputs": { + "systems": "systems_4" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "devenv-k8s", + "devenv", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "gomod2nix": { + "inputs": { + "flake-utils": "flake-utils_4", + "nixpkgs": [ + "devenv-k8s", + "skaffold", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1710154385, + "narHash": "sha256-4c3zQ2YY4BZOufaBJB4v9VBBeN2dH7iVdoJw8SDNCfI=", + "owner": "nix-community", + "repo": "gomod2nix", + "rev": "872b63ddd28f318489c929d25f1f0a3c6039c971", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "gomod2nix", + "type": "github" + } + }, + "kpt": { + "inputs": { + "flake-parts": [ + "devenv-k8s", + "flake-parts" + ], + "kpt": "kpt_2", + "nixpkgs": [ + "devenv-k8s", + "nixpkgs" + ] + }, + "locked": { + "dir": "kpt", + "lastModified": 1712953401, + "narHash": "sha256-A/b71BZrx+FbGLtO/hAcvOeBI8r6hM0XDccoa3IgaCE=", + "owner": "LCOGT", + "repo": "devenv-k8s", + "rev": "d9556f6cd69348b6f726c217a1f53638f6594917", + "type": "github" + }, + "original": { + "dir": "kpt", + "owner": "LCOGT", + "repo": "devenv-k8s", + "type": "github" + } + }, + "kpt_2": { + "flake": false, + "locked": { + "lastModified": 1700611672, + "narHash": "sha256-GHEk5nezva+26cpCrgriaGIL2PvSLWgC0UtmFkNHoDc=", + "owner": "kptdev", + "repo": "kpt", + "rev": "aff697dbfc8134b059bcfbdfb792a1048aaa57b5", + "type": "github" + }, + "original": { + "owner": "kptdev", + "ref": "v1.0.0-beta.48", + "repo": "kpt", + "type": "github" + } + }, + "mk-shell-bin": { + "locked": { + "lastModified": 1677004959, + "narHash": "sha256-/uEkr1UkJrh11vD02aqufCxtbF5YnhRTIKlx5kyvf+I=", + "owner": "rrbutani", + "repo": "nix-mk-shell-bin", + "rev": "ff5d8bd4d68a347be5042e2f16caee391cd75887", + "type": "github" + }, + "original": { + "owner": "rrbutani", + "repo": "nix-mk-shell-bin", + "type": "github" + } + }, + "nix": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "devenv-k8s", + "devenv", + "cachix", + "devenv", + "nixpkgs" + ], + "nixpkgs-regression": "nixpkgs-regression" + }, + "locked": { + "lastModified": 1708577783, + "narHash": "sha256-92xq7eXlxIT5zFNccLpjiP7sdQqQI30Gyui2p/PfKZM=", + "owner": "domenkozar", + "repo": "nix", + "rev": "ecd0af0c1f56de32cbad14daa1d82a132bf298f8", + "type": "github" + }, + "original": { + "owner": "domenkozar", + "ref": "devenv-2.21", + "repo": "nix", + "type": "github" + } + }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "devenv-k8s", + "devenv", + "cachix", + "devenv", + "poetry2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1688870561, + "narHash": "sha256-4UYkifnPEw1nAzqqPOTL2MvWtm3sNGw1UTYTalkTcGY=", + "owner": "nix-community", + "repo": "nix-github-actions", + "rev": "165b1650b753316aa7f1787f3005a8d2da0f5301", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-github-actions", + "type": "github" + } + }, + "nix2container": { + "inputs": { + "flake-utils": "flake-utils_3", + "nixpkgs": [ + "devenv-k8s", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712990762, + "narHash": "sha256-hO9W3w7NcnYeX8u8cleHiSpK2YJo7ecarFTUlbybl7k=", + "owner": "nlewo", + "repo": "nix2container", + "rev": "20aad300c925639d5d6cbe30013c8357ce9f2a2e", + "type": "github" + }, + "original": { + "owner": "nlewo", + "repo": "nix2container", + "type": "github" + } + }, + "nix_2": { + "inputs": { + "flake-compat": [ + "devenv-k8s", + "devenv", + "flake-compat" + ], + "nixpkgs": [ + "devenv-k8s", + "devenv", + "nixpkgs" + ], + "nixpkgs-regression": "nixpkgs-regression_2" + }, + "locked": { + "lastModified": 1712911606, + "narHash": "sha256-BGvBhepCufsjcUkXnEEXhEVjwdJAwPglCC2+bInc794=", + "owner": "domenkozar", + "repo": "nix", + "rev": "b24a9318ea3f3600c1e24b4a00691ee912d4de12", + "type": "github" + }, + "original": { + "owner": "domenkozar", + "ref": "devenv-2.21", + "repo": "nix", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1692808169, + "narHash": "sha256-x9Opq06rIiwdwGeK2Ykj69dNc2IvUH1fY55Wm7atwrE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9201b5ff357e781bf014d0330d18555695df7ba8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1711703276, + "narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-regression": { + "locked": { + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + } + }, + "nixpkgs-regression_2": { + "locked": { + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1710695816, + "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "614b4613980a522ba49f0d194531beddbb7220d3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1710796454, + "narHash": "sha256-lQlICw60RhH8sHTDD/tJiiJrlAfNn8FDI9c+7G2F0SE=", + "owner": "cachix", + "repo": "devenv-nixpkgs", + "rev": "06fb0f1c643aee3ae6838dda3b37ef0abc3c763b", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "rolling", + "repo": "devenv-nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "octopilot": { + "inputs": { + "flake-parts": [ + "devenv-k8s", + "flake-parts" + ], + "nixpkgs": [ + "devenv-k8s", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1711718101, + "narHash": "sha256-bMeByl+3OdGsFcHA2fE37IvSbcG81SYhuruZzJ/YPdA=", + "owner": "dailymotion-oss", + "repo": "octopilot", + "rev": "319bb180ec99b5a8ac5d23d75dedfeb61d5feeaf", + "type": "github" + }, + "original": { + "owner": "dailymotion-oss", + "repo": "octopilot", + "type": "github" + } + }, + "poetry2nix": { + "inputs": { + "flake-utils": "flake-utils", + "nix-github-actions": "nix-github-actions", + "nixpkgs": [ + "devenv-k8s", + "devenv", + "cachix", + "devenv", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1692876271, + "narHash": "sha256-IXfZEkI0Mal5y1jr6IRWMqK8GW2/f28xJenZIPQqkY0=", + "owner": "nix-community", + "repo": "poetry2nix", + "rev": "d5006be9c2c2417dafb2e2e5034d83fabd207ee3", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "poetry2nix", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": [ + "devenv-k8s", + "devenv", + "flake-compat" + ], + "flake-utils": "flake-utils_2", + "gitignore": "gitignore", + "nixpkgs": [ + "devenv-k8s", + "devenv", + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1712897695, + "narHash": "sha256-nMirxrGteNAl9sWiOhoN5tIHyjBbVi5e2tgZUgZlK3Y=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "40e6053ecb65fcbf12863338a6dcefb3f55f1bf8", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "root": { + "inputs": { + "devenv-k8s": "devenv-k8s", + "flake-parts": [ + "devenv-k8s", + "flake-parts" + ], + "nixpkgs": [ + "devenv-k8s", + "nixpkgs" + ] + } + }, + "skaffold": { + "inputs": { + "flake-parts": [ + "devenv-k8s", + "flake-parts" + ], + "gomod2nix": "gomod2nix", + "nixpkgs": [ + "devenv-k8s", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1711736775, + "narHash": "sha256-wRzy040KH+IfgK+g3Dj4Re4hb1S+G3xaxJ41TrsPEvE=", + "owner": "jashandeep-sohi", + "repo": "skaffold", + "rev": "e57813c8e738a0a347f8732221961584e025b6a5", + "type": "github" + }, + "original": { + "owner": "jashandeep-sohi", + "repo": "skaffold", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..748df0e --- /dev/null +++ b/flake.nix @@ -0,0 +1,67 @@ +{ + description = "Description for the project"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + devenv-k8s.url = "github:LCOGT/devenv-k8s"; + + nixpkgs.follows = "devenv-k8s/nixpkgs"; + flake-parts.follows = "devenv-k8s/flake-parts"; + }; + + nixConfig = { + extra-substituters = [ + "https://devenv.cachix.org" + "https://lco-public.cachix.org" + ]; + + extra-trusted-public-keys = [ + "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=" + "lco-public.cachix.org-1:zSmLK7CkAehZ7QzTLZKt+5Y26Lr0w885GUB4GlT1SCg=" + ]; + }; + + outputs = inputs@{ flake-parts, ... }: + flake-parts.lib.mkFlake { inherit inputs; } { + imports = [ + inputs.devenv-k8s.flakeModules.default + ]; + + systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ]; + + perSystem = { config, self', inputs', pkgs, system, ... }: { + # Per-system attributes can be defined here. The self' and inputs' + # module parameters provide easy access to attributes of the same + # system. + + # https://devenv.sh/basics/ + # Enter using `nix develop --impure` + config.devenv.shells.default = { + + # https://devenv.sh/packages/ + packages = [ + + ]; + + # https://devenv.sh/reference/options/#entershell + enterShell = '' + export KUBECONFIG="`pwd`/local-kubeconfig" + + echo "Setting KUBECONFIG=$KUBECONFIG" + echo + echo "This is done to sandbox Kuberenetes tools (kubectl, skaffold, etc) to the local K8s cluster for this project." + echo "If you would like to use a local K8s cluster across multiple projects, then set 'KUBECONFIG' to a common path" + echo "in both projects before running the command to create the local cluster." + ''; + }; + }; + + flake = { + # The usual flake attributes can be defined here, including system- + # agnostic ones like nixosModule and system-enumerating ones, although + # those are more easily expressed in perSystem. + + }; + }; +} From 7834d0e5bf84aea83240537dd51d287aec44a4be Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 3 May 2024 20:47:46 +0000 Subject: [PATCH 02/10] Add initial nix/kustomize/skaffold stuff --- README.md | 3 ++ k8s/base/deploy-server.yaml | 74 +++++++++++++++++++++++++++++ k8s/base/deploy-worker.yaml | 50 +++++++++++++++++++ k8s/base/kustomization.yaml | 2 + k8s/base/svc-server.yaml | 14 ++++++ k8s/envs/local/kustomization.yaml | 18 +++++++ k8s/envs/local/secrets.env.changeme | 0 k8s/envs/local/settings.env | 15 ++++++ local-cluster.yaml | 6 +++ local-registry.yaml | 4 ++ skaffold.yaml | 56 ++++++++++++++++++++++ 11 files changed, 242 insertions(+) create mode 100644 k8s/base/deploy-server.yaml create mode 100644 k8s/base/deploy-worker.yaml create mode 100644 k8s/base/kustomization.yaml create mode 100644 k8s/base/svc-server.yaml create mode 100644 k8s/envs/local/kustomization.yaml create mode 100644 k8s/envs/local/secrets.env.changeme create mode 100644 k8s/envs/local/settings.env create mode 100644 local-cluster.yaml create mode 100644 local-registry.yaml create mode 100644 skaffold.yaml diff --git a/README.md b/README.md index 381a07a..14815cb 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,9 @@ If you want to start with some test data, run this management command one time a ./manage.py populate_test_data +## Nix development +If you like nix, run `nix develop --impure` to start your nix development environment + ## API Structure The application has a REST API with the following endpoints you can use. You must pass your user's API token in the request header to access any of the endpoints - the headers looks like `{'Authorization': 'Token 123456789abcdefg'}` if you are using python's requests library. diff --git a/k8s/base/deploy-server.yaml b/k8s/base/deploy-server.yaml new file mode 100644 index 0000000..2776948 --- /dev/null +++ b/k8s/base/deploy-server.yaml @@ -0,0 +1,74 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone/deployment-apps-v1.json + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: server + labels: + app.kubernetes.io/component: server +spec: + selector: + matchLabels: + app.kubernetes.io/component: server + template: + metadata: + labels: + app.kubernetes.io/component: server + spec: + securityContext: + fsGroup: 1 + volumes: + - name: tmp + emptyDir: + sizeLimit: 128Mi + containers: + - name: default + image: datalab + securityContext: + runAsNonRoot: true + runAsUser: 1 + runAsGroup: 1 + readOnlyRootFilesystem: true + command: + - gunicorn + - --bind=0.0.0.0:8080 + - --worker-class=gevent + - --workers=$(GUNICORN_WORKERS) + - --timeout=$(GUNICORN_TIMEOUT) + - --user=daemon + - --group=daemon + - --access-logfile=- + - --error-logfile=- + - datalab.wsgi + env: + - name: GUNICORN_WORKERS + value: "2" + - name: GUNICORN_TIMEOUT + value: "300" + envFrom: + - configMapRef: + name: env + optional: false + - secretRef: + name: env + optional: false + ports: + - name: http + containerPort: 8080 + protocol: TCP + volumeMounts: + - name: tmp + mountPath: /tmp + readOnly: false + livenessProbe: + initialDelaySeconds: 15 + timeoutSeconds: 3 + httpGet: + path: / + port: http + readinessProbe: + initialDelaySeconds: 15 + timeoutSeconds: 3 + httpGet: + path: / + port: http diff --git a/k8s/base/deploy-worker.yaml b/k8s/base/deploy-worker.yaml new file mode 100644 index 0000000..17efa7f --- /dev/null +++ b/k8s/base/deploy-worker.yaml @@ -0,0 +1,50 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone/deployment-apps-v1.json + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: worker + labels: + app.kubernetes.io/component: worker +spec: + selector: + matchLabels: + app.kubernetes.io/component: worker + template: + metadata: + labels: + app.kubernetes.io/component: worker + spec: + securityContext: + fsGroup: 1 + volumes: + - name: tmp + emptyDir: + sizeLimit: 128Mi + containers: + - name: default + image: datalab + securityContext: + runAsNonRoot: true + runAsUser: 1000 + runAsGroup: 1000 + readOnlyRootFilesystem: true + command: + - "python" + - "manage.py" + - "rundramatiq" + - "--processes" + - "2" + - "--threads" + - "4" + envFrom: + - configMapRef: + name: env + optional: false + - secretRef: + name: env + optional: false + volumeMounts: + - name: tmp + mountPath: /tmp + readOnly: false diff --git a/k8s/base/kustomization.yaml b/k8s/base/kustomization.yaml new file mode 100644 index 0000000..4ea1bcc --- /dev/null +++ b/k8s/base/kustomization.yaml @@ -0,0 +1,2 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization diff --git a/k8s/base/svc-server.yaml b/k8s/base/svc-server.yaml new file mode 100644 index 0000000..2975fa9 --- /dev/null +++ b/k8s/base/svc-server.yaml @@ -0,0 +1,14 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone/service-v1.json + +apiVersion: v1 +kind: Service +metadata: + name: server +spec: + type: ClusterIP + selector: + app.kubernetes.io/component: server + ports: + - name: http + port: 8080 + targetPort: http diff --git a/k8s/envs/local/kustomization.yaml b/k8s/envs/local/kustomization.yaml new file mode 100644 index 0000000..2e05753 --- /dev/null +++ b/k8s/envs/local/kustomization.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../../base/ + +secretGenerator: + - name: env + type: Opaque + behavior: replace + envs: + - ./secrets.env + +configMapGenerator: + - name: env + behavior: replace + envs: + - ./settings.env diff --git a/k8s/envs/local/secrets.env.changeme b/k8s/envs/local/secrets.env.changeme new file mode 100644 index 0000000..e69de29 diff --git a/k8s/envs/local/settings.env b/k8s/envs/local/settings.env new file mode 100644 index 0000000..a2dee8b --- /dev/null +++ b/k8s/envs/local/settings.env @@ -0,0 +1,15 @@ +DEBUG=True + +DB_ENGINE=django.db.backends.postgresql +DB_HOST=postgresql.datalab-web-deps +DB_NAME=datalab +DB_USER=datalab + +OAUTH_TOKEN_URL=https://observe.lco.global/o/token/ +OAUTH_PROFILE_URL=https://observe.lco.global/api/profile/ + +DRAMATIQ_BROKER=redis://redis.datalab-web-deps +DRAMATIQ_RESULT_BACKEND=redis://redis.datalab-web-deps + +CACHE_BACKEND=django.core.cache.backends.redis.RedisCache +CACHE_LOCATION=redis://redis.datalab-web-deps diff --git a/local-cluster.yaml b/local-cluster.yaml new file mode 100644 index 0000000..9422cb8 --- /dev/null +++ b/local-cluster.yaml @@ -0,0 +1,6 @@ +apiVersion: ctlptl.dev/v1alpha1 +kind: Cluster +name: kind-datalab +product: kind +registry: lco-local +kubernetesVersion: v1.23.17 diff --git a/local-registry.yaml b/local-registry.yaml new file mode 100644 index 0000000..f5de791 --- /dev/null +++ b/local-registry.yaml @@ -0,0 +1,4 @@ +apiVersion: ctlptl.dev/v1alpha1 +kind: Registry +name: lco-local +port: 12315 diff --git a/skaffold.yaml b/skaffold.yaml new file mode 100644 index 0000000..dea29c7 --- /dev/null +++ b/skaffold.yaml @@ -0,0 +1,56 @@ +apiVersion: skaffold/v4beta8 +kind: Config +metadata: + name: deps +profiles: + - name: deps + deploy: + helm: + releases: + - name: redis + namespace: datalab-web-deps + createNamespace: true + repo: https://charts.bitnami.com/bitnami + remoteChart: redis + version: 18.12.1 + setValues: + architecture: standalone + auth.enabled: false + + - name: postgresql + namespace: datalab-web-deps + createNamespace: true + repo: https://charts.bitnami.com/bitnami + remoteChart: postgresql + version: 11.9.13 + setValues: + auth.username: datalab + auth.password: changeme + auth.database: datalab + auth.postgresPassword: postgres + +apiVersion: skaffold/v4beta8 +kind: Config +metadata: + name: datalab +profiles: + - name: app + build: + tagPolicy: + gitCommit: + variant: Tags + local: + push: true + artifacts: + - image: datalab + custom: + buildCommand: skaffold-builder-buildx + dependencies: + dockerfile: + path: Dockerfile + manifests: + kustomize: + paths: + - k8s/envs/local/ + deploy: + kubectl: {} From c0fe3f9a2e61418c6d3032803823e4bda084c283 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 23 Aug 2024 18:24:09 +0000 Subject: [PATCH 03/10] Get skaffolding working for local development --- datalab/settings.py | 4 +- datalab/urls.py | 5 ++ flake.nix | 2 +- k8s/base/deploy-server.yaml | 112 ++++++++++++++++++++++--- k8s/base/deploy-static.yaml | 131 ++++++++++++++++++++++++++++++ k8s/base/deploy-worker.yaml | 15 +++- k8s/base/kustomization.yaml | 21 +++++ k8s/base/pv.yaml | 14 ++++ k8s/base/pvc.yaml | 12 +++ k8s/base/svc-server.yaml | 6 +- k8s/base/svc-static.yaml | 16 ++++ k8s/envs/local/kustomization.yaml | 23 +++--- k8s/envs/local/ns.yaml | 4 + k8s/envs/local/secrets.env | 8 ++ k8s/envs/local/settings.env | 15 +++- skaffold.yaml | 106 +++++++++++++----------- 16 files changed, 413 insertions(+), 81 deletions(-) create mode 100644 k8s/base/deploy-static.yaml create mode 100644 k8s/base/pv.yaml create mode 100644 k8s/base/pvc.yaml create mode 100644 k8s/base/svc-static.yaml create mode 100644 k8s/envs/local/ns.yaml create mode 100644 k8s/envs/local/secrets.env diff --git a/datalab/settings.py b/datalab/settings.py index 1837673..34d4ff5 100644 --- a/datalab/settings.py +++ b/datalab/settings.py @@ -224,8 +224,8 @@ def get_list_from_env(variable, default=None): # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/4.2/howto/static-files/ -STATIC_URL = '/static/' -STATIC_ROOT = '/static/' +STATIC_URL = os.getenv('STATIC_URL', '/static/') +STATIC_ROOT = os.getenv('STATIC_ROOT', '/static/') # Default primary key field type # https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field diff --git a/datalab/urls.py b/datalab/urls.py index 234108b..083a77c 100644 --- a/datalab/urls.py +++ b/datalab/urls.py @@ -15,6 +15,8 @@ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin +from django.contrib.staticfiles.urls import staticfiles_urlpatterns +from django.conf import settings from django.urls import path, re_path, include from rest_framework_nested import routers import ocs_authentication.auth_profile.urls as authprofile_urls @@ -39,3 +41,6 @@ path('api/available_operations/', OperationOptionsApiView.as_view(), name='available_operations'), re_path(r'^authprofile/', include(authprofile_urls)), ] + +if settings.DEBUG: + urlpatterns += staticfiles_urlpatterns() diff --git a/flake.nix b/flake.nix index 748df0e..826e954 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "Description for the project"; + description = "Datalab"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; diff --git a/k8s/base/deploy-server.yaml b/k8s/base/deploy-server.yaml index 2776948..48f72fd 100644 --- a/k8s/base/deploy-server.yaml +++ b/k8s/base/deploy-server.yaml @@ -16,18 +16,110 @@ spec: app.kubernetes.io/component: server spec: securityContext: - fsGroup: 1 + fsGroup: 1000 volumes: - name: tmp emptyDir: sizeLimit: 128Mi + - name: static + emptyDir: + sizeLimit: 128Mi + initContainers: + - name: check-db-ready + image: postgres:14-alpine + command: + - sh + - -c + - | + until pg_isready --username=$DB_USER --dbname=$DB_NAME --host=$DB_HOST --port=$DB_PORT; + do echo waiting for database; + sleep 1; + done; + + securityContext: + runAsNonRoot: true + runAsUser: 1000 + runAsGroup: 1000 + readOnlyRootFilesystem: true + + envFrom: + - configMapRef: + name: env + optional: false + - secretRef: + name: env + optional: false + + resources: + requests: + cpu: 50m + memory: 16Mi + limits: + cpu: 50m + memory: 16Mi + + - name: django-migrate + image: datalab + command: + - python + - manage.py + - migrate + - --no-input + + securityContext: + runAsNonRoot: true + runAsUser: 1000 + runAsGroup: 1000 + readOnlyRootFilesystem: true + + volumeMounts: + - name: tmp + mountPath: /tmp + + envFrom: + - configMapRef: + name: env + optional: false + - secretRef: + name: env + optional: false + + - name: django-collectstatic + image: datalab + command: + - python + - manage.py + - collectstatic + - --no-input + + securityContext: + runAsNonRoot: true + runAsUser: 1000 + runAsGroup: 1000 + readOnlyRootFilesystem: true + + volumeMounts: + - name: tmp + mountPath: /tmp + - name: static + mountPath: /static + readOnly: false + + envFrom: + - configMapRef: + name: env + optional: false + - secretRef: + name: env + optional: false + containers: - name: default image: datalab securityContext: runAsNonRoot: true - runAsUser: 1 - runAsGroup: 1 + runAsUser: 1000 + runAsGroup: 1000 readOnlyRootFilesystem: true command: - gunicorn @@ -35,8 +127,6 @@ spec: - --worker-class=gevent - --workers=$(GUNICORN_WORKERS) - --timeout=$(GUNICORN_TIMEOUT) - - --user=daemon - - --group=daemon - --access-logfile=- - --error-logfile=- - datalab.wsgi @@ -53,22 +143,24 @@ spec: name: env optional: false ports: - - name: http + - name: server containerPort: 8080 protocol: TCP volumeMounts: - name: tmp mountPath: /tmp readOnly: false + - name: static + mountPath: /static livenessProbe: initialDelaySeconds: 15 timeoutSeconds: 3 httpGet: - path: / - port: http + path: /admin/login/ + port: server readinessProbe: initialDelaySeconds: 15 timeoutSeconds: 3 httpGet: - path: / - port: http + path: /admin/login/ + port: server diff --git a/k8s/base/deploy-static.yaml b/k8s/base/deploy-static.yaml new file mode 100644 index 0000000..96ed873 --- /dev/null +++ b/k8s/base/deploy-static.yaml @@ -0,0 +1,131 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone/deployment-apps-v1.json + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: static + labels: + app.kubernetes.io/component: static +spec: + selector: + matchLabels: + app.kubernetes.io/component: static + template: + metadata: + labels: + app.kubernetes.io/component: static + spec: + securityContext: + fsGroup: 1000 + + volumes: + - name: tmp + emptyDir: + sizeLimit: 32Mi + + - name: static + emptyDir: + sizeLimit: 128Mi + + initContainers: + - name: check-db-ready + image: postgres:14-alpine + command: + - sh + - -c + - | + until pg_isready --username=$DB_USER --dbname=$DB_NAME --host=$DB_HOST --port=$DB_PORT; + do echo waiting for database; + sleep 1; + done; + + securityContext: + runAsNonRoot: true + runAsUser: 1000 + runAsGroup: 1000 + readOnlyRootFilesystem: true + + envFrom: + - configMapRef: + name: env + optional: false + - secretRef: + name: env + optional: false + + resources: + requests: + cpu: 50m + memory: 16Mi + limits: + cpu: 50m + memory: 16Mi + + - name: django-collectstatic + image: datalab + command: + - python + - manage.py + - collectstatic + - --no-input + + securityContext: + runAsNonRoot: true + runAsUser: 1000 + runAsGroup: 1000 + readOnlyRootFilesystem: true + + volumeMounts: + - name: tmp + mountPath: /tmp + + - name: static + mountPath: /public + + env: + - name: STATIC_ROOT + value: "/public/static/" + + envFrom: + - configMapRef: + name: env + optional: false + - secretRef: + name: env + optional: false + + containers: + - name: default + image: ghcr.io/static-web-server/static-web-server:2 + command: + - /static-web-server + - --root=/public + - --health + - --port=8000 + - --host=0.0.0.0 + + securityContext: + runAsNonRoot: true + runAsUser: 1000 + runAsGroup: 1000 + readOnlyRootFilesystem: true + + volumeMounts: + - name: tmp + mountPath: /tmp + + - name: static + mountPath: /public + + ports: + - name: static + containerPort: 8000 + protocol: TCP + + envFrom: + - configMapRef: + name: env + optional: false + - secretRef: + name: env + optional: false \ No newline at end of file diff --git a/k8s/base/deploy-worker.yaml b/k8s/base/deploy-worker.yaml index 17efa7f..e85ef90 100644 --- a/k8s/base/deploy-worker.yaml +++ b/k8s/base/deploy-worker.yaml @@ -16,11 +16,11 @@ spec: app.kubernetes.io/component: worker spec: securityContext: - fsGroup: 1 + fsGroup: 1000 volumes: - name: tmp - emptyDir: - sizeLimit: 128Mi + persistentVolumeClaim: + claimName: worker-tmp-pvc containers: - name: default image: datalab @@ -48,3 +48,12 @@ spec: - name: tmp mountPath: /tmp readOnly: false + livenessProbe: + initialDelaySeconds: 15 + timeoutSeconds: 3 + failureThreshold: 3 + successThreshold: 1 + periodSeconds: 30 + exec: + command: + - /bin/true diff --git a/k8s/base/kustomization.yaml b/k8s/base/kustomization.yaml index 4ea1bcc..dd953c5 100644 --- a/k8s/base/kustomization.yaml +++ b/k8s/base/kustomization.yaml @@ -1,2 +1,23 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + +resources: + - ./deploy-server.yaml + - ./svc-server.yaml + - ./deploy-static.yaml + - ./svc-static.yaml + - ./pv.yaml + - ./pvc.yaml + - ./deploy-worker.yaml + +labels: + - pairs: + app.kubernetes.io/name: datalab + includeSelectors: true + +secretGenerator: + - name: env + type: Opaque + +configMapGenerator: + - name: env diff --git a/k8s/base/pv.yaml b/k8s/base/pv.yaml new file mode 100644 index 0000000..02b5f94 --- /dev/null +++ b/k8s/base/pv.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: worker-tmp-pv + labels: + type: local +spec: + storageClassName: standard + capacity: + storage: 1Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/tmp/" \ No newline at end of file diff --git a/k8s/base/pvc.yaml b/k8s/base/pvc.yaml new file mode 100644 index 0000000..9d9c042 --- /dev/null +++ b/k8s/base/pvc.yaml @@ -0,0 +1,12 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: worker-tmp-pvc +spec: + volumeName: worker-tmp-pv + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 1Gi + storageClassName: standard diff --git a/k8s/base/svc-server.yaml b/k8s/base/svc-server.yaml index 2975fa9..19605d1 100644 --- a/k8s/base/svc-server.yaml +++ b/k8s/base/svc-server.yaml @@ -4,11 +4,13 @@ apiVersion: v1 kind: Service metadata: name: server + labels: + app.kubernetes.io/component: server spec: type: ClusterIP selector: app.kubernetes.io/component: server ports: - - name: http + - name: server port: 8080 - targetPort: http + targetPort: server diff --git a/k8s/base/svc-static.yaml b/k8s/base/svc-static.yaml new file mode 100644 index 0000000..357e1fc --- /dev/null +++ b/k8s/base/svc-static.yaml @@ -0,0 +1,16 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/master-standalone/service-v1.json + +apiVersion: v1 +kind: Service +metadata: + name: static + labels: + app.kubernetes.io/component: static +spec: + type: ClusterIP + selector: + app.kubernetes.io/component: static + ports: + - name: static + port: 80 + targetPort: static \ No newline at end of file diff --git a/k8s/envs/local/kustomization.yaml b/k8s/envs/local/kustomization.yaml index 2e05753..41ccaad 100644 --- a/k8s/envs/local/kustomization.yaml +++ b/k8s/envs/local/kustomization.yaml @@ -2,17 +2,20 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - ../../base/ +- ../../base/ +- ./ns.yaml + +namespace: datalab secretGenerator: - - name: env - type: Opaque - behavior: replace - envs: - - ./secrets.env +- behavior: merge + envs: + - ./secrets.env + name: env + type: Opaque configMapGenerator: - - name: env - behavior: replace - envs: - - ./settings.env +- behavior: merge + envs: + - ./settings.env + name: env diff --git a/k8s/envs/local/ns.yaml b/k8s/envs/local/ns.yaml new file mode 100644 index 0000000..392194e --- /dev/null +++ b/k8s/envs/local/ns.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: datalab \ No newline at end of file diff --git a/k8s/envs/local/secrets.env b/k8s/envs/local/secrets.env new file mode 100644 index 0000000..f8307b7 --- /dev/null +++ b/k8s/envs/local/secrets.env @@ -0,0 +1,8 @@ +DB_PASSWORD=changeme +SECRET_KEY=changeme +OAUTH_SERVER_KEY=changeme +OAUTH_CLIENT_ID=changeme +OAUTH_CLIENT_SECRET=changeme +ARCHIVE_API_TOKEN=changeme +AWS_ACCESS_KEY_ID=changeme +AWS_SECRET_ACCESS_KEY=changeme \ No newline at end of file diff --git a/k8s/envs/local/settings.env b/k8s/envs/local/settings.env index a2dee8b..777896c 100644 --- a/k8s/envs/local/settings.env +++ b/k8s/envs/local/settings.env @@ -1,15 +1,22 @@ DEBUG=True DB_ENGINE=django.db.backends.postgresql -DB_HOST=postgresql.datalab-web-deps +DB_HOST=postgresql.datalab-web-deps.svc DB_NAME=datalab DB_USER=datalab +DATALAB_OPERATION_BUCKET=datalab-operation-output-local-test +AWS_BUCKET=datalab-operation-output-local-test +AWS_DEFAULT_REGION=us-west-2 + +TEMP_FITS_DIR=/tmp/fits/ + +ARCHIVE_API=https://archive-api.lco.global OAUTH_TOKEN_URL=https://observe.lco.global/o/token/ OAUTH_PROFILE_URL=https://observe.lco.global/api/profile/ -DRAMATIQ_BROKER=redis://redis.datalab-web-deps -DRAMATIQ_RESULT_BACKEND=redis://redis.datalab-web-deps +DRAMATIQ_BROKER_URL=redis://redis-master.datalab-web-deps.svc +DRAMATIQ_RESULT_BACKEND_URL=redis://redis-master.datalab-web-deps.svc CACHE_BACKEND=django.core.cache.backends.redis.RedisCache -CACHE_LOCATION=redis://redis.datalab-web-deps +CACHE_LOCATION=redis://redis-master.datalab-web-deps.svc diff --git a/skaffold.yaml b/skaffold.yaml index dea29c7..e827cb7 100644 --- a/skaffold.yaml +++ b/skaffold.yaml @@ -1,56 +1,64 @@ -apiVersion: skaffold/v4beta8 +apiVersion: skaffold/v4beta10 kind: Config metadata: name: deps -profiles: - - name: deps - deploy: - helm: - releases: - - name: redis - namespace: datalab-web-deps - createNamespace: true - repo: https://charts.bitnami.com/bitnami - remoteChart: redis - version: 18.12.1 - setValues: - architecture: standalone - auth.enabled: false +deploy: + helm: + releases: + - name: redis + remoteChart: oci://registry-1.docker.io/bitnamicharts/redis + version: 19.1.0 + namespace: datalab-web-deps + createNamespace: true + setValues: + architecture: standalone + auth.enabled: false + master.persistence.enabled: false - - name: postgresql - namespace: datalab-web-deps - createNamespace: true - repo: https://charts.bitnami.com/bitnami - remoteChart: postgresql - version: 11.9.13 - setValues: - auth.username: datalab - auth.password: changeme - auth.database: datalab - auth.postgresPassword: postgres + - name: postgresql + remoteChart: oci://registry-1.docker.io/bitnamicharts/postgresql + version: 12.12.10 + namespace: datalab-web-deps + createNamespace: true + setValues: + architecture: standalone + primary.persistence.size: 2Gi + auth: + database: datalab + username: datalab + password: changeme +--- -apiVersion: skaffold/v4beta8 +apiVersion: skaffold/v4beta10 kind: Config metadata: - name: datalab -profiles: - - name: app - build: - tagPolicy: - gitCommit: - variant: Tags - local: - push: true - artifacts: - - image: datalab - custom: - buildCommand: skaffold-builder-buildx - dependencies: - dockerfile: - path: Dockerfile - manifests: - kustomize: - paths: - - k8s/envs/local/ - deploy: - kubectl: {} + name: app +requires: + - configs: + - app-image +manifests: + kustomize: + paths: + - k8s/envs/local/ +deploy: + kubectl: {} + logs: + prefix: podAndContainer + +--- + +apiVersion: skaffold/v4beta10 +kind: Config +metadata: + name: app-image +build: + tagPolicy: + gitCommit: + variant: Tags + artifacts: + - image: datalab + custom: + buildCommand: skaffold-builder-buildx + dependencies: + dockerfile: + path: Dockerfile From 97f18bf2543496462192b3e9a7b7770b81a3c032 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 23 Aug 2024 18:27:50 +0000 Subject: [PATCH 04/10] Renamed secrets --- k8s/envs/local/secrets.env.changeme | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 k8s/envs/local/secrets.env.changeme diff --git a/k8s/envs/local/secrets.env.changeme b/k8s/envs/local/secrets.env.changeme deleted file mode 100644 index e69de29..0000000 From c4a0cdc874e9a9e696955584702479fe75dcf8f9 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 23 Aug 2024 18:53:51 +0000 Subject: [PATCH 05/10] Update readme with nix instructions for local dev --- README.md | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c6d453f..65acfff 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ This application is the backend server for the PhotonRanch Datalab. It is a djan ## Local Development +### Bare Metal Start by creating a virtualenv for this project and entering it: ``` python -m venv /path/to/my/virtualenv @@ -38,8 +39,25 @@ Now start your server ./manage.py runserver ``` -## Nix development -If you like nix, run `nix develop --impure` to start your nix development environment +### Nix development +For this mode of development, you must install: +- nix with flakes support +- kind +- skaffold + +Then to develop, run these commands: +- `nix develop --impure` to start your nix development environment - **called anytime you use a new terminal** +- `kind create cluster --config ./local-cluster.yaml` to create the cluster - **should only need to be called one time within the nix environment** +- `ctlptl apply -f local-registry.yaml -f local-cluster.yaml` to start up the registry and cluster - **should only need to be called one time within the nix environment** +- `skaffold dev -m deps` to start the dependencies - **run this in a different tab to keep running during development** +- configure the `./k8s/envs/local/secrets.env` values for connecting to the appropriate services. +- `skaffold dev -m app --port-forward` to start the servers and worker. This will auto-redeploy as you make changes to the code. + +### Connecting a frontend +You can also run a local [datalab-ui](https://github.com/LCOGT/datalab-ui) to connect to your datalab. Assuming you've cloned that repo: +- Change the `./public/config/config.json` "datalabApiBaseUrl" to be `http://127.0.0.1:8080/api/` or wherever your backend is deployed to +- `npm install` to install the libraries +- `npm run serve` to run the server at `http://127.0.0.1:8081` assuming your backend was already running (otherwise it will try to be :8080) ## API Structure The application has a REST API with the following endpoints you can use. You must pass your user's API token in the request header to access any of the endpoints - the headers looks like `{'Authorization': 'Token 123456789abcdefg'}` if you are using python's requests library. @@ -108,9 +126,4 @@ Available Operations are introspected from the `data_operations` directory and m `DELETE /api/datasessions/datasession_id/operations/operation_id/` ## ROADMAP -* Come up with operation `wizard_description` format and add endpoint to get them for all available operations so the frontend can auto-create UI wizards for new operations. -* Figure out user accounts between PTR and datalab - datalab needs user accounts for permissions to gate access to only your own sessions. -* Implement operations to actually do something when they are added to a session - * Figure out caching and storage of intermediate results - * Figure out asynchronous task queue or temporal for executing operations - * Add in operation results/status to the serialized operations output (maybe to the model too as needed) +* TBD From 7b37fc9dce5ae146fb990c0a73e35116d16d6474 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 30 Aug 2024 06:29:32 +0000 Subject: [PATCH 06/10] Updates from review comments --- .gitignore | 3 + README.md | 5 +- flake.lock | 101 +++++++++--------- k8s/base/deploy-static.yaml | 2 +- k8s/base/deploy-worker.yaml | 5 +- k8s/base/kustomization.yaml | 2 - k8s/base/pv.yaml | 14 --- k8s/base/pvc.yaml | 12 --- k8s/base/svc-static.yaml | 2 +- k8s/envs/local/ns.yaml | 2 +- .../{secrets.env => secrets.env.changeme} | 2 +- 11 files changed, 59 insertions(+), 91 deletions(-) delete mode 100644 k8s/base/pv.yaml delete mode 100644 k8s/base/pvc.yaml rename k8s/envs/local/{secrets.env => secrets.env.changeme} (84%) diff --git a/.gitignore b/.gitignore index bfd7ad4..88eb71a 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,9 @@ MANIFEST pip-log.txt pip-delete-this-directory.txt +# Local dev secrets +k8s/envs/local/secrets.env + # Unit test / coverage reports htmlcov/ .tox/ diff --git a/README.md b/README.md index 65acfff..12138ad 100644 --- a/README.md +++ b/README.md @@ -42,14 +42,11 @@ Now start your server ### Nix development For this mode of development, you must install: - nix with flakes support -- kind -- skaffold Then to develop, run these commands: - `nix develop --impure` to start your nix development environment - **called anytime you use a new terminal** -- `kind create cluster --config ./local-cluster.yaml` to create the cluster - **should only need to be called one time within the nix environment** - `ctlptl apply -f local-registry.yaml -f local-cluster.yaml` to start up the registry and cluster - **should only need to be called one time within the nix environment** -- `skaffold dev -m deps` to start the dependencies - **run this in a different tab to keep running during development** +- `skaffold dev -m deps` to start the dependencies - **run this in a different tab to keep running during development or use 'run' instead of 'dev'** - configure the `./k8s/envs/local/secrets.env` values for connecting to the appropriate services. - `skaffold dev -m app --port-forward` to start the servers and worker. This will auto-redeploy as you make changes to the code. diff --git a/flake.lock b/flake.lock index a6c1801..60c27c4 100644 --- a/flake.lock +++ b/flake.lock @@ -36,11 +36,11 @@ "deploy-repo-template": { "flake": false, "locked": { - "lastModified": 1710788754, - "narHash": "sha256-46GUCjs0oPZp2AxzHq6OZITzmqwwhb3Pbgtno6Ec9zY=", + "lastModified": 1724949886, + "narHash": "sha256-QWbhBLY847eR8Ez+hmbBQwRH/mGgj6RjaE5mloXKUS4=", "ref": "refs/heads/main", - "rev": "79e85fc90d7d1d0c3c5e4b1db676b2de377a69e7", - "revCount": 14, + "rev": "c8a3e5cfbeb153a11d1652a33d7d70e3c5344e8f", + "revCount": 16, "type": "git", "url": "https://github.com/LCOGT/deploy-repo-template.git" }, @@ -58,11 +58,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1713195025, - "narHash": "sha256-TIUCx0Vlu9ImxTtRyQUFf5RWvTT4GxCTKRSiMFZdZuw=", + "lastModified": 1724763216, + "narHash": "sha256-oW2bwCrJpIzibCNK6zfIDaIQw765yMAuMSG2gyZfGv0=", "owner": "cachix", "repo": "devenv", - "rev": "01e01a3b4d991983dda055d10dcf93e86e1e1f8a", + "rev": "1e4ef61205b9aa20fe04bf1c468b6a316281c4f1", "type": "github" }, "original": { @@ -84,11 +84,11 @@ "skaffold": "skaffold" }, "locked": { - "lastModified": 1713222238, - "narHash": "sha256-viSH6JTcPJxu/BQnXBjgUsmhJatCxlpmqMizrI2DuYk=", + "lastModified": 1724959650, + "narHash": "sha256-PWMf8E1ONLOF4YrcSBSsThiWJEkcE6R31dpTiDl8Zcc=", "owner": "LCOGT", "repo": "devenv-k8s", - "rev": "6c9d9b168c07ac6d7592c2543534c70f5586b453", + "rev": "0486dcd4276bb25bccf886d3a2e2d0523e46c788", "type": "github" }, "original": { @@ -167,11 +167,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1712014858, - "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "lastModified": 1722555600, + "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", + "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", "type": "github" }, "original": { @@ -312,11 +312,11 @@ }, "locked": { "dir": "kpt", - "lastModified": 1712953401, - "narHash": "sha256-A/b71BZrx+FbGLtO/hAcvOeBI8r6hM0XDccoa3IgaCE=", + "lastModified": 1724262194, + "narHash": "sha256-+WcLnbPBGKOD04ogx/J9QS/OfxAVXcH1JvgahA5okRM=", "owner": "LCOGT", "repo": "devenv-k8s", - "rev": "d9556f6cd69348b6f726c217a1f53638f6594917", + "rev": "dbc88d8238fbfcb3bd08c66157bef4b8dc63b379", "type": "github" }, "original": { @@ -371,11 +371,11 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1708577783, - "narHash": "sha256-92xq7eXlxIT5zFNccLpjiP7sdQqQI30Gyui2p/PfKZM=", + "lastModified": 1712911606, + "narHash": "sha256-BGvBhepCufsjcUkXnEEXhEVjwdJAwPglCC2+bInc794=", "owner": "domenkozar", "repo": "nix", - "rev": "ecd0af0c1f56de32cbad14daa1d82a132bf298f8", + "rev": "b24a9318ea3f3600c1e24b4a00691ee912d4de12", "type": "github" }, "original": { @@ -419,11 +419,11 @@ ] }, "locked": { - "lastModified": 1712990762, - "narHash": "sha256-hO9W3w7NcnYeX8u8cleHiSpK2YJo7ecarFTUlbybl7k=", + "lastModified": 1724921078, + "narHash": "sha256-g6Zb7OrlNEM1lep9e/Neqn8Z+0VgCXAakF03GjtSfA8=", "owner": "nlewo", "repo": "nix2container", - "rev": "20aad300c925639d5d6cbe30013c8357ce9f2a2e", + "rev": "505c19a99771ca2f7b049b3c64f190ccc158861f", "type": "github" }, "original": { @@ -479,20 +479,14 @@ }, "nixpkgs-lib": { "locked": { - "dir": "lib", - "lastModified": 1711703276, - "narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", - "type": "github" + "lastModified": 1722555339, + "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" }, "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" } }, "nixpkgs-regression": { @@ -545,11 +539,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1710796454, - "narHash": "sha256-lQlICw60RhH8sHTDD/tJiiJrlAfNn8FDI9c+7G2F0SE=", + "lastModified": 1713361204, + "narHash": "sha256-TA6EDunWTkc5FvDCqU3W2T3SFn0gRZqh6D/hJnM02MM=", "owner": "cachix", "repo": "devenv-nixpkgs", - "rev": "06fb0f1c643aee3ae6838dda3b37ef0abc3c763b", + "rev": "285676e87ad9f0ca23d8714a6ab61e7e027020c6", "type": "github" }, "original": { @@ -561,17 +555,17 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1712963716, - "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "lastModified": 1716977621, + "narHash": "sha256-Q1UQzYcMJH4RscmpTkjlgqQDX5yi1tZL0O345Ri6vXQ=", + "owner": "cachix", + "repo": "devenv-nixpkgs", + "rev": "4267e705586473d3e5c8d50299e71503f16a6fb6", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", + "owner": "cachix", + "ref": "rolling", + "repo": "devenv-nixpkgs", "type": "github" } }, @@ -587,15 +581,16 @@ ] }, "locked": { - "lastModified": 1711718101, - "narHash": "sha256-bMeByl+3OdGsFcHA2fE37IvSbcG81SYhuruZzJ/YPdA=", - "owner": "dailymotion-oss", + "lastModified": 1724261402, + "narHash": "sha256-ablZLlVPhrC5cShu2/5e80cbrR5MOMGc7Fpgf37HNbQ=", + "owner": "jashandeep-sohi", "repo": "octopilot", - "rev": "319bb180ec99b5a8ac5d23d75dedfeb61d5feeaf", + "rev": "b17d9033a57525c63fc973e3d1108fefdec62210", "type": "github" }, "original": { - "owner": "dailymotion-oss", + "owner": "jashandeep-sohi", + "ref": "fix/commit-with-api", "repo": "octopilot", "type": "github" } @@ -643,11 +638,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1712897695, - "narHash": "sha256-nMirxrGteNAl9sWiOhoN5tIHyjBbVi5e2tgZUgZlK3Y=", + "lastModified": 1713775815, + "narHash": "sha256-Wu9cdYTnGQQwtT20QQMg7jzkANKQjwBD9iccfGKkfls=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "40e6053ecb65fcbf12863338a6dcefb3f55f1bf8", + "rev": "2ac4dcbf55ed43f3be0bae15e181f08a57af24a4", "type": "github" }, "original": { diff --git a/k8s/base/deploy-static.yaml b/k8s/base/deploy-static.yaml index 96ed873..50804d0 100644 --- a/k8s/base/deploy-static.yaml +++ b/k8s/base/deploy-static.yaml @@ -128,4 +128,4 @@ spec: optional: false - secretRef: name: env - optional: false \ No newline at end of file + optional: false diff --git a/k8s/base/deploy-worker.yaml b/k8s/base/deploy-worker.yaml index e85ef90..ccfada5 100644 --- a/k8s/base/deploy-worker.yaml +++ b/k8s/base/deploy-worker.yaml @@ -19,8 +19,9 @@ spec: fsGroup: 1000 volumes: - name: tmp - persistentVolumeClaim: - claimName: worker-tmp-pvc + emptyDir: + medium: Memory + sizeLimit: 1Gi containers: - name: default image: datalab diff --git a/k8s/base/kustomization.yaml b/k8s/base/kustomization.yaml index dd953c5..65826f1 100644 --- a/k8s/base/kustomization.yaml +++ b/k8s/base/kustomization.yaml @@ -6,8 +6,6 @@ resources: - ./svc-server.yaml - ./deploy-static.yaml - ./svc-static.yaml - - ./pv.yaml - - ./pvc.yaml - ./deploy-worker.yaml labels: diff --git a/k8s/base/pv.yaml b/k8s/base/pv.yaml deleted file mode 100644 index 02b5f94..0000000 --- a/k8s/base/pv.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -kind: PersistentVolume -metadata: - name: worker-tmp-pv - labels: - type: local -spec: - storageClassName: standard - capacity: - storage: 1Gi - accessModes: - - ReadWriteOnce - hostPath: - path: "/tmp/" \ No newline at end of file diff --git a/k8s/base/pvc.yaml b/k8s/base/pvc.yaml deleted file mode 100644 index 9d9c042..0000000 --- a/k8s/base/pvc.yaml +++ /dev/null @@ -1,12 +0,0 @@ -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: worker-tmp-pvc -spec: - volumeName: worker-tmp-pv - accessModes: - - "ReadWriteOnce" - resources: - requests: - storage: 1Gi - storageClassName: standard diff --git a/k8s/base/svc-static.yaml b/k8s/base/svc-static.yaml index 357e1fc..ff217dd 100644 --- a/k8s/base/svc-static.yaml +++ b/k8s/base/svc-static.yaml @@ -13,4 +13,4 @@ spec: ports: - name: static port: 80 - targetPort: static \ No newline at end of file + targetPort: static diff --git a/k8s/envs/local/ns.yaml b/k8s/envs/local/ns.yaml index 392194e..9e0b515 100644 --- a/k8s/envs/local/ns.yaml +++ b/k8s/envs/local/ns.yaml @@ -1,4 +1,4 @@ apiVersion: v1 kind: Namespace metadata: - name: datalab \ No newline at end of file + name: datalab diff --git a/k8s/envs/local/secrets.env b/k8s/envs/local/secrets.env.changeme similarity index 84% rename from k8s/envs/local/secrets.env rename to k8s/envs/local/secrets.env.changeme index f8307b7..ccaa972 100644 --- a/k8s/envs/local/secrets.env +++ b/k8s/envs/local/secrets.env.changeme @@ -5,4 +5,4 @@ OAUTH_CLIENT_ID=changeme OAUTH_CLIENT_SECRET=changeme ARCHIVE_API_TOKEN=changeme AWS_ACCESS_KEY_ID=changeme -AWS_SECRET_ACCESS_KEY=changeme \ No newline at end of file +AWS_SECRET_ACCESS_KEY=changeme From 99d9eddb8328af90c488365771ec800c61c61427 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 30 Aug 2024 06:37:34 +0000 Subject: [PATCH 07/10] Switch to generic ephemeral volume for worker tmp storage --- k8s/base/deploy-worker.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/k8s/base/deploy-worker.yaml b/k8s/base/deploy-worker.yaml index ccfada5..74a5252 100644 --- a/k8s/base/deploy-worker.yaml +++ b/k8s/base/deploy-worker.yaml @@ -19,9 +19,16 @@ spec: fsGroup: 1000 volumes: - name: tmp - emptyDir: - medium: Memory - sizeLimit: 1Gi + ephemeral: + volumeClaimTemplate: + metadata: + labels: + type: datalab-worker-tmp-volume + spec: + accessModes: [ "ReadWriteOnce" ] + resources: + requests: + storage: 1Gi containers: - name: default image: datalab From d73517d200172769285a4f596e9bf2919f10d891 Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 30 Aug 2024 06:40:05 +0000 Subject: [PATCH 08/10] Update skaffold instructions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 12138ad..d2729b8 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Then to develop, run these commands: - `nix develop --impure` to start your nix development environment - **called anytime you use a new terminal** - `ctlptl apply -f local-registry.yaml -f local-cluster.yaml` to start up the registry and cluster - **should only need to be called one time within the nix environment** - `skaffold dev -m deps` to start the dependencies - **run this in a different tab to keep running during development or use 'run' instead of 'dev'** -- configure the `./k8s/envs/local/secrets.env` values for connecting to the appropriate services. +- Copy `./k8s/envs/local/secrets.env.changeme` to a version without `.changeme` and fill in values for connecting to the appropriate services. - `skaffold dev -m app --port-forward` to start the servers and worker. This will auto-redeploy as you make changes to the code. ### Connecting a frontend From 854c99ea0102d6310339ec2cd1aa3c56146a5be1 Mon Sep 17 00:00:00 2001 From: Lloyd Dakin Date: Mon, 9 Sep 2024 11:51:01 -0700 Subject: [PATCH 09/10] ignore kube config --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 88eb71a..492097d 100644 --- a/.gitignore +++ b/.gitignore @@ -171,3 +171,4 @@ cython_debug/ tmp/ tmp/**/* dump.rdb +local-kubeconfig From 80c13b9887b2deded210764af54ec1864fa5cfb8 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 10 Sep 2024 17:39:13 +0000 Subject: [PATCH 10/10] Update flake lockfile --- flake.lock | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index 60c27c4..bb5ea90 100644 --- a/flake.lock +++ b/flake.lock @@ -36,11 +36,11 @@ "deploy-repo-template": { "flake": false, "locked": { - "lastModified": 1724949886, - "narHash": "sha256-QWbhBLY847eR8Ez+hmbBQwRH/mGgj6RjaE5mloXKUS4=", + "lastModified": 1725037657, + "narHash": "sha256-p1ZfPG60DqmcUGJX8rkCVFr0Wh7ZVLCn/BoM6IGTbOo=", "ref": "refs/heads/main", - "rev": "c8a3e5cfbeb153a11d1652a33d7d70e3c5344e8f", - "revCount": 16, + "rev": "82058b4c22070bdb386e13b0edadb45742dc3b2e", + "revCount": 17, "type": "git", "url": "https://github.com/LCOGT/deploy-repo-template.git" }, @@ -84,11 +84,11 @@ "skaffold": "skaffold" }, "locked": { - "lastModified": 1724959650, - "narHash": "sha256-PWMf8E1ONLOF4YrcSBSsThiWJEkcE6R31dpTiDl8Zcc=", + "lastModified": 1725659503, + "narHash": "sha256-GklipTzYxNtpxifQaW1GFesUzIiRowrrM7IL8Ql3bqw=", "owner": "LCOGT", "repo": "devenv-k8s", - "rev": "0486dcd4276bb25bccf886d3a2e2d0523e46c788", + "rev": "98c64c1fd378135b72963dcdf3a65fd79ebc0b81", "type": "github" }, "original": {