Add deployment_configuration to make deployment using infra-rebuild work

Also document usage of infra-rebuild and its configuration file.
This commit is contained in:
June 2024-06-08 19:57:40 +02:00
parent 9d7f9d0ec8
commit 46e43e51aa
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0
2 changed files with 48 additions and 0 deletions

20
README.md Normal file
View file

@ -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.

View file

@ -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"
}
}
}