From 46e43e51aaca3865ed1eaaff86b3307d00b645cb Mon Sep 17 00:00:00 2001 From: June Date: Sat, 8 Jun 2024 19:57:40 +0200 Subject: [PATCH] Add deployment_configuration to make deployment using infra-rebuild work Also document usage of infra-rebuild and its configuration file. --- README.md | 20 ++++++++++++++++++++ deployment_configuration.json | 28 ++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 README.md create mode 100644 deployment_configuration.json diff --git a/README.md b/README.md new file mode 100644 index 0000000..fff8bbf --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# nix-infra + +nix infrastructure configuration for CCCHH. + +For deployment we're using [infra-rebuild](https://git.hamburg.ccc.de/CCCHH/infra-rebuild). \ +To easily get a shell with `infra-rebuild` going, use the following command: + +``` +nix shell git+https://git.hamburg.ccc.de/CCCHH/infra-rebuild#infra-rebuild +``` + +After that you can simply run the following to deploy e.g. the git and matrix hosts: + +``` +infra-rebuild switch git matrix +``` + +By default infra-rebuild tries to use the FQDN from the nixosConfiguration of the host for deployment. +However to override individual parts of the deployment target, a [`deployment_configuration.json`](./deployment_configuration.json) can be used. +This is exactly what we're doing to set the default deployment user to `colmena-deploy` and have custom target hostnames for Chaosknoten hosts, since they don't have an FQDN defined in their nixosConfiguration. diff --git a/deployment_configuration.json b/deployment_configuration.json new file mode 100644 index 0000000..2cc3215 --- /dev/null +++ b/deployment_configuration.json @@ -0,0 +1,28 @@ +{ + "default": { + "targetUser": "colmena-deploy" + }, + "hosts": { + "netbox": { + "targetHostname": "netbox-intern.hamburg.ccc.de" + }, + "matrix": { + "targetHostname": "matrix-intern.hamburg.ccc.de" + }, + "public-web-static": { + "targetHostname": "public-web-static-intern.hamburg.ccc.de" + }, + "git": { + "targetHostname": "git.hamburg.ccc.de" + }, + "forgejo-actions-runner": { + "targetHostname": "forgejo-actions-runner-intern.hamburg.ccc.de" + }, + "eh22-wiki": { + "targetHostname": "eh22-wiki-intern.hamburg.ccc.de" + }, + "nix-box-june": { + "targetHostname": "nix-box-june-intern.hamburg.ccc.de" + } + } +}