From eeef91333b10c8ff12c53f09e6e8fe5ff1da0f30 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Sun, 14 Jul 2024 13:31:18 +0200 Subject: [PATCH] docs(readme): Update deployment instructions docs(readme): Fix commands for ZSH --- README.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 72bde6c..fc3d3f3 100644 --- a/README.md +++ b/README.md @@ -30,22 +30,32 @@ Additionally, it deploys an age identity, which is later used for decrypting sec 1. Make sure your have a [Secret service](https://www.gnu.org/software/emacs/manual/html_node/auth/Secret-Service-API.html) running (such as Keepassxc) that provides the age identity. 2. Ensure you have root SSH access to the server. -3. Run nixos-anywhere: `nix run .#bootstrap ` +3. Run nixos-anywhere: `nix run '.#bootstrap' ` ### Deployment -To deploy all servers at once: `nix run nixpkgs#deploy-rs -- .# -k` -To deploy only one server: `nix run nixpkgs#deploy-rs -- -k --targets .#` +To deploy all servers at once: `nix run 'nixpkgs#deploy-rs' -- '.#' -k` +To deploy only one server: `nix run 'nixpkgs#deploy-rs' -- -k --targets '.#'` ## Deploying to Kubernetes To deploy to the Kubernetes cluster, first make sure you have an admin account on the cluster. -You can generate this using `nix run .#gen-k3s-cert ~/.kube`, assuming you have SSH access to the master node. +You can generate this using `nix run '.#gen-k3s-cert' ~/.kube`, assuming you have SSH access to the master node. This puts a private key, signed certificate and a kubeconfig in the kubeconfig directory -If the cluster has not been initialized yet, next run `nix run .#kubenix-bootstrap.x86_64-linux`. +If the cluster has not been initialized yet, next run `nix run '.#kubenix.x86_64-linux.bootstrap.deploy'`. -Lastly, deploy everything to the cluster using `nix run .#kubenix.x86_64-linux`. +Applications are currently deployed in two method: + - A single big deployment of many applications (which I am trying to move away from) + - A separate deployment for each application using [ApplySets](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/declarative-config/#how-to-delete-objects) + +The first method: `nix run '.#kubenix.x86_64-linux.all.deploy'` +The second method: `nix run '.#kubenix.x86_64-linux..deploy'` +Currently, the applications being deployed like this are: +- `cyberchef` +- `freshrss` + +Lastly, deploy everything to the cluster using `nix run '.#kubenix.x86_64-linux'`. ## Known bugs