65 lines
1.4 KiB
Markdown
65 lines
1.4 KiB
Markdown
# Home Infrastructure
|
|
|
|
## Quick Start
|
|
|
|
Get started with a local Kubernetes cluster which can be used to design and test
|
|
new configuration before pushing them to real machines.
|
|
|
|
1. Login with Proton Pass and start the SSH daemon.
|
|
|
|
```shell
|
|
pass-cli login
|
|
pass-cli ssh-agent daemon start
|
|
export SSH_AUTH_SOCK="$HOME/.ssh/proton-pass-agent.sock"
|
|
```
|
|
|
|
2. Install the Proton Pass plugin for Ansible
|
|
|
|
```shell
|
|
just fetch-plugins
|
|
```
|
|
|
|
3. Launch Incus virtual machines
|
|
|
|
```shell
|
|
just up
|
|
```
|
|
|
|
4. Tear down the Incus virtual machines
|
|
|
|
```shell
|
|
just down
|
|
```
|
|
|
|
## Setup
|
|
|
|
```shell
|
|
just fetch-plugins
|
|
```
|
|
|
|
## Bare-metal provisioning
|
|
|
|
When creating a set of fresh machines, you must run the provisioning step to create the "Kolibri" automation user.
|
|
|
|
The Kolibri automation user is used for all other playbooks and has permissions to execute passwordless sudo.
|
|
|
|
```shell
|
|
ansible-playbook -i ansible/inventories/bare_metal/hosts.yaml ansible/playbooks/provision.yaml -K -e ansible_user=<your_interactive_user>
|
|
```
|
|
|
|
## Local Testing with Incus
|
|
|
|
```shell
|
|
just up
|
|
```
|
|
|
|
```shell
|
|
just headlamp
|
|
```
|
|
|
|
> The above command runs the Flatpak version of Headlamp which may not have permissions
|
|
> to access the Kubernetes config file copied from the instance.
|
|
>
|
|
> You should run `flatpak override --user --filesystem=$(pwd) io.kinvolk.Headlamp`
|
|
> to ensure that Headlamp can access the directory contents.
|