Development Environment
Getting Started
Clone the repository and checkout the development branch
Dependencies
A development shell is available using nix with all dependencies installed. Use by running nix develop
to enter the shell.
direnv
For a more comfortable developer experience, many nix users use direnv to integrate with their shell. After you have direnv installed, create a .envrc
file in the root of the git repository with the following contents:
Note that by convention the .envrc
file should not be checked into git.
- Homelab
- Docs
- Install Material for MkDocs including image processing dependencies
Develop
Bootstrap
Run the task dev
to fully bootstrap the development environment.
After waiting ~15 minutes you should be able to reach the hosted services at https://*.127-0-0-1.nip.io
, for example at https://home.127-0-0-1.nip.io.
Caveats
- SSL certs are invalid because there is no domain name
- Does not help in testing external networking (e.g. Cloudflare)
- No persistent storage
Git
Run the task dev:git-configuration
to add the local gitea instance in the sandbox environment in the cluster as a remote in git. When you push to it, the local ArgoCD will detect the change and apply the configuration changes.
Now when you need to commit, push to the sandbox remote.
Explore
Get access to secrets by using some task scripts:
Newlines
Some terminals might show a newline character in the password like nZ6hzMpShZvf5AVS⏎
, but simply ignore it when using the password.
Clean up
Run the task dev:cleanup
to clean up (delete the local test Kubernetes cluster)