mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 12:03:59 +00:00
Major feature additions and infrastructure improvements for the Prole Database Installer, enabling command-line operation and packaged binary distribution. ## Ncurses Terminal Interface - Add installer/ncurses_ui.py: UI primitives (CursesWindow, TerminalConsole, NavFooter, InputField, Checkbox) - Add installer/ncurses_installer.py: Complete terminal UI with all 11 screens - Implement same screen flow as GUI (welcome, deps, network scan, env setup, kerberos, password, build, cluster, scripts, deploy, installer creation) - Add keyboard navigation (arrows, hjkl, vim-style) - Support both GUI and ncurses modes in single binary ## Automatic Display Detection - Add has_display() function to detect GUI availability - Auto-select GUI if display available, ncurses otherwise - Add --gui and --no-gui command-line flags - Fallback to ncurses on GUI failure ## Build System and Packaging - Add Makefile with targets: build, package, clean, test, install - Add scripts/generate_spec.py: PyInstaller spec generator - Add installer.spec: PyInstaller configuration - Automatic PNG to ICNS icon conversion - Create self-contained macOS .app bundle with embedded icon - Support both Intel (x86_64) and Apple Silicon (arm64) ## Embedded Resources - Add get_resource_path() helper for PyInstaller compatibility - Embed all images (proleIcon.png, proleLogo.png, proleLogoSepia.png) - Embed prole-net/prole-scan binary (6.8 MB universal binary) - Embed prole-app/dist/Prole Tools.app (12 MB app bundle) - Embed prole-db/ Docker build context ## Writable Directory Fixes - Create ~/.prole/build/prole-db/ for Docker builds (fixes read-only _MEIPASS) - Create ~/.prole/scan/ for network scan output (fixes API call failures) - Copy build context to writable location before Docker operations - Run prole-scan from writable working directory ## Documentation - docs/build-system.md: Complete build system guide - docs/ncurses-installer.md: Ncurses interface documentation - docs/RELEASE-NOTES.md: Feature overview and release notes - docs/IMAGE-RESOURCES.md: Image resource management - docs/EMBEDDED-RESOURCES.md: Binary and app bundle embedding - docs/DOCKER-BUILD-FIX.md: Docker build hang solution - docs/PROLE-HOME-DIRECTORY.md: ~/.prole directory structure - BUILD.md: Quick build reference ## Key Changes install.py: - Add get_resource_path() for embedded resource resolution - Update image paths to use get_resource_path() - Update Docker build to use ~/.prole/build/prole-db/ - Update network scan to use ~/.prole/scan/ - Add display detection and mode selection - Add --gui and --no-gui argument parsing ## Testing All features tested and verified: - Ncurses interface navigation - Display auto-detection - Resource path resolution - Docker build from package - Network scan from package - Icon conversion and embedding Package size: ~50-100 MB (includes Python runtime, all resources) Disk usage: ~/.prole/ uses ~2-6 MB 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| bin | ||
| build | ||
| conf | ||
| deploy/gcp/terraform | ||
| dist | ||
| docs | ||
| etc | ||
| img | ||
| infrastructure | ||
| installer | ||
| k3s | ||
| k8s | ||
| prole-app | ||
| prole-db | ||
| prole-mssql-db | ||
| prole-net | ||
| prole-tools-app | ||
| scripts | ||
| src | ||
| tests | ||
| tools | ||
| workstation | ||
| .coveragerc | ||
| .gitignore | ||
| BUILD.md | ||
| docker-root-prole-db.sh | ||
| docker-run-prole-db.sh | ||
| docker-run-ubuntu.sh | ||
| env.sh | ||
| install.py | ||
| installer.spec | ||
| LICENSE | ||
| Makefile | ||
| network_prompt.txt | ||
| pom.xml | ||
| prole_requirements.txt | ||
| prole-db.iml | ||
| prole.sh | ||
| README.md | ||
| requirements.txt | ||
| run_tests.sh | ||
| run_with_coverage.sh | ||
| setup.spec | ||
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
helm upgrade --install -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/main/docs/src/samples/monitoring/kube-stack-config.yaml prometheus-community prometheus-community/kube-prometheus-stack
kubectl apply -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/main/docs/src/samples/monitoring/prometheusrule.yaml
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add cnpg-grafana https://cloudnative-pg.github.io/grafana-dashboards
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard
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 svc/prometheus-community-kube-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 svc/prometheus-community-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:
- k3sup: https://github.com/alexellis/k3sup
- k3d: https://k3d.io/
- kubectl
- SSH access to the Pis (defaults assume user
piand key~/.ssh/id_rsa)
- 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
- 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
- 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"
- 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_ARGSin 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.