Go to file
chrisfu 17cb827be5 test(dashboard): add unit tests for systemd unit and script validation
- Ensure dashboard service doesn't create an ordering cycle with `multi-user.target`.
- Verify service safely attaches to a virtual terminal (VT) and passes VT to Xorg.
- Ensure no `su` usage by default in the service.
- Validate script behavior for passing VT and `-keeptty` options to Xorg.

chore(dashboard): update systemd unit to avoid VT conflicts and improve logging

- Remove `After` and `Wants` directives for `multi-user.target` to prevent conflicts.
- Add `TTYPath`, `StandardInput`, and related options for VT attachment.
- Ensure `ExecStopPost` restores getty service for the dashboard VT.

fix(dashboard): improve Xorg resolution and clean up script logic

- Dynamically determine Xorg executable location in `dashboard.sh`.
- Pass VT, display, and `-keeptty` to Xorg to improve script reliability.

fix(mariadb): correct exFAT mount options for external storage

- Avoid `chown` failures by setting root ownership with group access for `mysql`.
- Update external mount options to `uid=0,gid=mysql,umask=0002`.

cleanup(mariadb): remove unnecessary owner/group permissions from migration marker task
2026-03-13 01:49:57 -07:00
.idea/runConfigurations Configure Silent Install Test with unique logging and shared run configuration 2026-02-02 16:13:15 -08:00
authority Refactor project structure and update initialization scripts 2026-02-14 13:44:49 -08:00
bin feat(installer): improve UI and add test coverage for core features 2026-01-08 21:51:30 -08:00
conf Remove prole.cfg and introduce regression tests to improve KDC and Kong initialization 2026-03-09 17:09:41 -07:00
deploy Fix instance count enforcement for CNPG to always default to 3 and update manifests/tests accordingly 2026-03-11 13:21:50 -07:00
docs test(dashboard): add unit tests for systemd unit and script validation 2026-03-13 01:49:57 -07:00
etc fix(cnpg): converge to 3 instances with resilient apply 2026-03-12 01:42:42 -07:00
gitea refactor: rename backup script to etc/init_cnpg_backup.sh and optimize Supabase image prefetch 2026-03-02 00:34:01 -08:00
img Installer refactor: k3d cluster lifecycle, kubeconfig handling, UI polish & cleanup - Fix KUBECONFIG not generated for dev/k3d clusters by merging k3d kubeconfig in _script_env_for_namespace() and after cluster creation - Fix Add/Delete button macOS black focus ring with highlightbackground/highlightthickness styling - Refactor milestones, actions, controller, deploy pipeline, and env helpers - Simplify prole.cfg and port-mapping.cfg defaults - Improve archive_garage_backup.py and init_cloudnative_pg.sh - Remove unused img/LOADING_GIF_README.md and img/generate_loading_gif.py - Add qodana.yaml for static analysis configuration 2026-02-20 01:28:52 -08:00
infrastructure test(dashboard): add unit tests for systemd unit and script validation 2026-03-13 01:49:57 -07:00
installer Fix installer path portability (avoid hardcoded /Users paths) 2026-03-09 16:55:49 -07:00
k3s feat(k3s): automate kubeconfig setup and deploy svc.prole.org check site 2026-02-26 19:04:22 -08:00
k8s Fix instance count enforcement for CNPG to always default to 3 and update manifests/tests accordingly 2026-03-11 13:21:50 -07:00
mock_val Add regression tests and logic to handle recycling Released prole-iscsi PVs with stale claimRefs 2026-03-09 22:19:46 -07:00
prole Fix Percona PG 18 build and update installer configuration. 2026-02-28 23:11:32 -08:00
prole-app refactor: modernize installer and monitoring setup 2026-02-19 21:07:39 -08:00
prole-db installer: stabilize retries + improve k3s inventory detection 2026-03-07 23:57:21 -08:00
prole-mssql-db Fix installer path portability (avoid hardcoded /Users paths) 2026-03-09 16:55:49 -07:00
prole-net Implement real-time command executor for network scan: added run_streaming_cmd for unbuffered output, integrated with NetworkScreen UI, and added unit tests. 2026-02-28 17:58:58 -08:00
prole-tools-app Refactor project structure and update initialization scripts 2026-02-14 13:44:49 -08:00
scripts Fix instance count enforcement for CNPG to always default to 3 and update manifests/tests accordingly 2026-03-11 13:21:50 -07:00
src Remove prole-db-manager; simplify deployment via prole-authority; fix pg18 downgrade & cluster name 2026-03-01 20:40:44 -08:00
ssl Enable TLS for k3s registry and deploy SSL certs 2026-03-10 00:58:08 -07:00
supabase refactor: rename backup script to etc/init_cnpg_backup.sh and optimize Supabase image prefetch 2026-03-02 00:34:01 -08:00
tests test(dashboard): add unit tests for systemd unit and script validation 2026-03-13 01:49:57 -07:00
tools test(dashboard): add unit tests for systemd unit and script validation 2026-03-13 01:49:57 -07:00
vault_backup Summary of recent repairs and infrastructure updates 2026-02-15 17:51:57 -08:00
.coveragerc feat(installer): improve UI and add test coverage for core features 2026-01-08 21:51:30 -08:00
.gitignore milestone(k3s+cnpg): end-to-end deploy run via standalone installer 2026-03-03 20:03:15 -08:00
ansible_min.cfg Implement real-time command executor for network scan: added run_streaming_cmd for unbuffered output, integrated with NetworkScreen UI, and added unit tests. 2026-02-28 17:58:58 -08:00
ansible_recovery.log Fix Kong OOM crash: increase memory limit to 1Gi, mount ConfigMap to subdirectory 2026-02-22 01:02:00 -08:00
ansible.cfg ansible: add K3s datastore export/import, improve iSCSI handling, and migrate merlin to MariaDB primary 2026-03-06 14:25:13 -08:00
ansible.sh checkpoint: k3s agent config + node labels + registry optimizations 2026-03-07 03:14:26 -08:00
BUILD.md feat: add ncurses interface, build system, and embedded resources 2026-01-19 23:10:37 -08:00
end_time.txt Fix Kong OOM crash: increase memory limit to 1Gi, mount ConfigMap to subdirectory 2026-02-22 01:02:00 -08:00
env.sh Fix installer path portability (avoid hardcoded /Users paths) 2026-03-09 16:55:49 -07:00
Executing Fix Kong OOM crash: increase memory limit to 1Gi, mount ConfigMap to subdirectory 2026-02-22 01:02:00 -08:00
install_final.log Fix Kong OOM crash: increase memory limit to 1Gi, mount ConfigMap to subdirectory 2026-02-22 01:02:00 -08:00
install_reset.log Fix Kong OOM crash: increase memory limit to 1Gi, mount ConfigMap to subdirectory 2026-02-22 01:02:00 -08:00
install_retry.log Fix Kong OOM crash: increase memory limit to 1Gi, mount ConfigMap to subdirectory 2026-02-22 01:02:00 -08:00
install.pid Fix Kong OOM crash: increase memory limit to 1Gi, mount ConfigMap to subdirectory 2026-02-22 01:02:00 -08:00
install.py Enhance build system with 'make test' and fix installer test debris. Added 'make test' to Makefile with 'pyconv' (black) integration and coverage summary. Reformatted codebase with black. Fixed 'install.py' test bug where MagicMock objects created directory debris by improving mocking and patching in 'tests/test_navigation.py', 'tests/test_service_layer_navigation.py', and 'tests/test_install_logic.py'. 2026-02-25 14:55:05 -08:00
LICENSE Initial commit 2025-07-12 18:02:40 -07:00
Makefile Fix Percona PG 18 build and update installer configuration. 2026-02-28 23:11:32 -08:00
network_description.txt feat: complete end-to-end installation and storage integration. This commit marks a significant milestone where the end-to-end installation process is now fully functional. Key changes: Integrated Garage storage service (S3-compatible); Implemented Prole DB backup; Enhanced Kerberos integration; Updated default namespace to prole-chrisfu-deadbeef; Streamlined dependencies (removed Ollama); Added installation validation and testing scripts; Improved installer UI and deployment logic. 2026-01-29 22:50:05 -08:00
network_prompt.txt Refactor prole-app and establish temporary release process 2026-01-18 15:04:23 -08:00
pom.xml use k3s-arg datastore-endpoint external mysql 2025-08-29 13:03:02 -07:00
prole_requirements.txt Add prole.spec and extend OpenTofu k3s configuration 2026-02-24 21:47:02 -08:00
prole-db.iml Checkpoint: Refactor common services and monitoring initialization. Updates: etc/init_monitoring.sh (Grafana naming, legacy cleanup), etc/init_common_services.sh (migration/cleanup logic), added etc/init_registry.sh, updated etc/init_cloudnative_pg.sh (manifest filtering), updated configs, and enhanced tests. Fixed: excluded .ansible logs and added to .gitignore. 2026-02-09 18:50:44 -08:00
prole.sh milestone(k3s+cnpg): end-to-end deploy run via standalone installer 2026-03-03 20:03:15 -08:00
prole.spec Add prole.spec and extend OpenTofu k3s configuration 2026-02-24 21:47:02 -08:00
qodana.yaml Installer refactor: k3d cluster lifecycle, kubeconfig handling, UI polish & cleanup - Fix KUBECONFIG not generated for dev/k3d clusters by merging k3d kubeconfig in _script_env_for_namespace() and after cluster creation - Fix Add/Delete button macOS black focus ring with highlightbackground/highlightthickness styling - Refactor milestones, actions, controller, deploy pipeline, and env helpers - Simplify prole.cfg and port-mapping.cfg defaults - Improve archive_garage_backup.py and init_cloudnative_pg.sh - Remove unused img/LOADING_GIF_README.md and img/generate_loading_gif.py - Add qodana.yaml for static analysis configuration 2026-02-20 01:28:52 -08:00
README.md ansible: fix netplan_static YAML, dashboard conky pkg, mariadb vault vars 2026-03-05 23:02:42 -08:00
requirements.txt Update Prole-DB and improve Supabase integration 2026-02-01 23:56:25 -08:00
run_with_coverage.sh feat(installer): improve UI and add test coverage for core features 2026-01-08 21:51:30 -08:00
start_time_final.txt Fix Kong OOM crash: increase memory limit to 1Gi, mount ConfigMap to subdirectory 2026-02-22 01:02:00 -08:00
start_time.txt Fix Kong OOM crash: increase memory limit to 1Gi, mount ConfigMap to subdirectory 2026-02-22 01:02:00 -08:00
status.py Refactor namespace handling to use prole.cfg as sole source of truth 2026-03-02 18:50:53 -08:00
supabase.sh Configure Silent Install Test with unique logging and shared run configuration 2026-02-02 16:13:15 -08:00
test_resolve.sh Refactor namespace handling to use prole.cfg as sole source of truth 2026-03-02 18:50:53 -08:00

prole-db is a PostgreSQL database for Prole

claudnative-pg cluster setup

brew install pre-reqs

brew install docker docker-compose
brew install kubernetes-cli kubectx k3d
brew install mysql-client python@3.14 python-tk@3.14 postgresql@17

start k3d cluster

k3d cluster create prole-service-cluster -a 2 --registry-create k8s-prole-org-registry:k8s.prole.org:5000 --api-port 10.0.0.205:6443 k3d cluster create prole-dev-cluster -a 2 --api-port 0.0.0.0:6443

build prole-db Docker image

cd prole-db
docker build -t prole-db:17.7-037 .
k3d image import prole-db:17.7-037 -c prole-service-cluster
docker tag prole-db:17.7-037 k8s.prole.org:5000/prole-db:17.7-037
docker push k8s.prole.org:5000/prole-db:17.7-037
# vim ~/.docker/daemon.json 
# "insecure-registries": [ "k3.localhost:5000", "k8s.prole.org:5000" ]

install cloudnative postgres operator

kubectl apply --server-side -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.27/releases/cnpg-1.27.0.yaml
./etc/init_monitoring.sh
kubectl apply -f cloudnative-pg-prole-dB.yaml

check status

kubectl cnpg status prole-db
kubectl cnpg psql prole-db

port forwards

kubectl port-forward -n monitoring svc/kps-kube-prometheus-stack-prometheus 9090 &
kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard-kong-proxy 8443:443 &
kubectl port-forward svc/prole-db-rw 5432:5432 --address 0.0.0.0 &
kubectl port-forward -n monitoring svc/kps-grafana 3000:80 --address 0.0.0.0 &

useful tool

kubectl krew install view-secret

Install from the cert-manager release manifest

kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.19.1/cert-manager.yaml

install cmctl

kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.19.1/cert-manager.yaml
brew install cmctl
cmctl check api

Install Barman-Cloud backup

kubectl apply -f https://github.com/cloudnative-pg/plugin-barman-cloud/releases/download/v0.8.0/manifest.yaml

prole logo cmd

figlet -f small "prole" | boxes -d ansi-rounded | boxes -d shell

K3s HA install for Prole (Pi cluster + local k3d agents)

This repository includes scripts to create an HA K3s control plane across Raspberry Pi hosts and attach local k3d agents.

Topology overview:

  • raspberry.prole.org → first K3s server (embedded etcd)
  • pi.prole.org → additional K3s server (recommended for HA)
  • This host (developer machine) → local k3d agents that join the remote K3s server

Prerequisites:

  1. Install first K3s server on raspberry.prole.org
cd k3s
# Optional env overrides:
# export K3S_FIRST_SERVER_HOST=raspberry.prole.org
# export K3S_FIRST_SERVER_USER=pi
# export K3S_SSH_KEY=$HOME/.ssh/id_rsa
# export K3S_VERSION=v1.30.6+k3s1
# export K3S_EXTRA_ARGS="--cluster-init --tls-san raspberry.prole.org"
./install_k3s_first_server.sh
  1. Join pi.prole.org as an additional HA server (optional but recommended)
cd k3s
# Optional env overrides:
# export K3S_EXISTING_SERVER_HOST=raspberry.prole.org
# export K3S_EXISTING_SERVER_USER=pi
# export K3S_ADDITIONAL_SERVER_HOST=pi.prole.org
# export K3S_ADDITIONAL_SERVER_USER=pi
# export K3S_SSH_KEY=$HOME/.ssh/id_rsa
# export K3S_VERSION=v1.30.6+k3s1
# export K3S_EXTRA_ARGS="--tls-san raspberry.prole.org --tls-san pi.prole.org"
./join_k3s_additional_server.sh
  1. Get the K3s node token from the first server
cd k3s
# Optional env overrides:
# export K3S_SERVER_HOST=raspberry.prole.org
# export K3S_SERVER_USER=pi
# export K3S_SSH_KEY=$HOME/.ssh/id_rsa
TOKEN=$(./get_remote_k3s_node_token.sh)
echo "K3s token: $TOKEN"
  1. Create a local k3d agents-only cluster that joins the remote K3s server
cd k3s
# Required: provide the token
export K3S_REMOTE_TOKEN="$TOKEN"
# Optional env overrides:
# export K3D_CLUSTER_NAME=prole-remote-agents
# export K3D_AGENTS=2
# export K3D_IMAGE=rancher/k3s:v1.30.6-k3s1
# export K3D_REGISTRY_CONFIG=$HOME/dev/prole/k3s/registries.yaml
# export K3S_REMOTE_SERVER_HOST=raspberry.prole.org
# export K3S_REMOTE_SERVER_PORT=6443
./create_k3d_join_remote_agents.sh

Notes:

  • The scripts default to embedded etcd HA. For true quorum, use at least 3 servers where possible. With two servers, loss of one server can cause loss of quorum; consider adding a third server or running an external etcd.
  • If you prefer an external datastore (e.g., MySQL/PG/etcd), adjust K3S_EXTRA_ARGS in the server install to set --datastore-endpoint=... and remove --cluster-init.
  • The local k3d cluster creates only agents that connect to the remote control-plane; it does not run a separate control-plane locally.

Node console dashboard (k3s hosts)

tools/dashboard.sh can be deployed to all k3s_hosts via Ansible as a dashboard.service.

  • Start the dashboard (also stops the graphical desktop if one is running):
    • sudo systemctl start dashboard
  • Stop it:
    • sudo systemctl stop dashboard
  • Enable it at boot (optional):
    • sudo systemctl enable dashboard