Commit Graph

269 Commits

Author SHA1 Message Date
chrisfu
9d96a94bec ansible: replace no_swap role with swap role and enhance K3s setup
- Removed the `no_swap` role and replaced it with the new `swap` role for managing swap configurations.
- Updated the K3s role to dynamically detect the first available wired interface IP and validate it.
- Enhanced K3s installation by adding support for disabling SELinux RPM.
- Adjusted inventory and `site.yml` to align with the updated roles.
- Added `.vault_pass` to `.gitignore`.
- Updated Ansible configuration with result format compatibility for different versions.
2026-01-21 16:19:17 -08:00
chrisfu
1a30f44106 ansible: replace no_swap role with swap role and enhance K3s setup
- Removed the `no_swap` role and replaced it with the new `swap` role for managing swap configurations.
- Updated the K3s role to dynamically detect the first available wired interface IP and validate it.
- Enhanced K3s installation by adding support for disabling SELinux RPM.
- Adjusted inventory and `site.yml` to align with the updated roles.
- Added `.vault_pass` to `.gitignore`.
- Updated Ansible configuration with result format compatibility for different versions.
2026-01-21 16:19:14 -08:00
chrisfu
e69b5f2008 ansible: replace no_swap role with swap role and enhance K3s setup
- Removed the `no_swap` role and replaced it with the new `swap` role for managing swap configurations.
- Updated the K3s role to dynamically detect the first available wired interface IP and validate it.
- Enhanced K3s installation by adding support for disabling SELinux RPM.
- Adjusted inventory and `site.yml` to align with the updated roles.
- Added `.vault_pass` to `.gitignore`.
- Updated Ansible configuration with result format compatibility for different versions.
2026-01-21 16:16:14 -08:00
chrisfu
bee7c09d89 infrastructure: rsyslogd use fqdn directory names 2026-01-21 16:00:53 -08:00
chrisfu
1a69097699 fix hostname typo 2026-01-21 10:38:39 -08:00
chrisfu
f4d96211d8 ansible: add K3s role files 2026-01-21 10:27:27 -08:00
chrisfu
772a36294e ansible: configure K3s cluster and update inventory
- Added `k3s_hosts` group to the inventory and associated host entries.
- Updated `site.yml` to include roles for disabling swap and setting up the K3s cluster.
2026-01-21 10:23:05 -08:00
chrisfu
a6cc1173e9 ansible: update inventory and configure rsyslog for Linux hosts
- Add `Linux_Hosts` group in inventory with child nodes.
- Update `site.yml` to apply `rsyslog` role to `Linux_Hosts` with privilege escalation.
2026-01-20 22:16:32 -08:00
chrisfu
11746f40e9 chore: remove legacy Analysis-00.toc file from build directory
Deleted outdated and unused Analysis-00.toc file to clean up the project structure.
2026-01-19 23:35:07 -08:00
chrisfu
cbfe930b78 feat: add ncurses interface, build system, and embedded resources
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>
2026-01-19 23:10:37 -08:00
chrisfu
bc0ff26f87 feat(install): restore Initialization Scripts screen and refactor for stability
- Restored "Initialization Scripts" screen (step #9) and corrected wizard navigation flow.
- Refactored UI/logic separation by introducing `ProleController` for script execution.
- Implemented sequential execution of initialization scripts with automatic tab switching:
    1. init_openbao.sh initialize
    2. init_cloudnative_pg.sh initialize
    3. init_prole-db.sh start
    4. init_port_forwards.sh start
- Integrated AI-powered environment summary using local Ollama (llama3) and kubectl.
- Fixed Tkinter `TclError` race conditions using `safe_after` and widget existence checks.
- Resolved `SyntaxError` related to `PROJECT_ROOT` global declaration.
- Synchronized sidebar numbering and footer navigation across the 11-step installer.
2026-01-19 21:14:52 -08:00
chrisfu
5b76fc9b6e pihole ansible management fixes 2026-01-19 01:41:45 -08:00
chrisfu
9cfac76b4c ansible managed rsyslog 2026-01-18 22:49:49 -08:00
chrisfu
d55459b83f ansible managed piholes 2026-01-18 22:01:23 -08:00
chrisfu
031bd51a80 Configure Pi-hole DNS forwarding and Samba AD reverse DNS zone 2026-01-18 20:38:24 -08:00
chrisfu
d9418b8b43 ansible roles: pihole_dnx samaba_reverse_dns 2026-01-18 20:12:59 -08:00
chrisfu
9b50fb963d Merge branch 'main' of github.com:dredx/prole 2026-01-18 20:03:18 -08:00
chrisfu
c4156f58d0 ansible starts here 2026-01-18 20:02:41 -08:00
chrisfu
8fff62721d Merge remote-tracking branch 'origin/main' 2026-01-18 16:35:38 -08:00
chrisfu
96b68c493f remove background files 2026-01-18 16:35:30 -08:00
chrisfu
15a60575ad remove background files 2026-01-18 16:14:09 -08:00
chrisfu
f2fea37302 remove unnecessary files 2026-01-18 16:07:12 -08:00
chrisfu
c462c3fb71 Cleanup: Remove unused ProleRouter components and update network scan references
- Deleted ProleRouter-related YAML files (services, deployments, storage) and unused `call_openapi.py`.
- Updated installer to reference `prole-net/prole-scan` instead of outdated `net/scan`.
- Renamed `network_prompt.txt` to match the new directory structure.
2026-01-18 15:12:21 -08:00
chrisfu
197c72dd7a Refactor prole-app and establish temporary release process
- Moved prole-tools-app to prole-app at the project root to make it self-contained for transition to its own repository.
- Created prole-tools-app/dist/ directory to host build artifacts.
- Generated distribution artifacts (Prole Tools.app and Prole Tools.zip) using prole-app/build.sh package.
- Checked in the generated artifacts to prole-tools-app/dist/ (bypassing .gitignore for temporary release process).
Changes Summary
•
Renamed directory prole-tools-app/ to prole-app/.
•
Populated prole-tools-app/dist/ with the latest build output from prole-app/build.sh.
•
Staged all changes, including the forced addition of ignored artifacts in prole-tools-app/dist/.
2026-01-18 15:04:23 -08:00
chrisfu
a4d0a2e0a3 Update prole-db docker tag to 17.7-037 and update pg_prolelog deb package 2026-01-15 11:58:39 -08:00
chrisfu
8df19ba986 updated pg_prolelog packages 2026-01-12 23:00:46 -08:00
chrisfu
bc2d051dc7 temporarily add pg_prolelog artifact 2026-01-12 12:01:41 -08:00
chrisfu
f2cd348780 Merge branch 'main' of github.com:dredx/prole 2026-01-12 11:52:30 -08:00
chrisfu
adb68f0c73 remove overzealous check in cache files 2026-01-12 11:43:55 -08:00
chrisfu
80587c167c Fix navigation infinite loop in installer and add comprehensive test coverage - Fixed infinite loop in ProleInstaller.show_page by preventing default fallback to page 0 on invalid IDs - Improved on_next/on_prev logic with robust sequence checks - Added tests/test_navigation.py to verify navigation flows and edge cases - Cleaned up redundant imports and page registrations in install.py 2026-01-11 20:13:53 -08:00
chrisfu
f7ba4f6235 Milestone: Unified Prole Installation Experience. Successfully established a new user-friendly installation workflow for macOS: Restored traditional drag-and-drop installer for Prole.app; Introduced a standalone 'setup' binary built with PyInstaller, enabling users to run the full dependency installer without a local Python environment; Automated DMG creation with a clean layout including Prole.app, the setup tool, and an Applications symlink; Enhanced the internal app launcher to automatically source local environment configurations ($PROLE_HOME/env.sh); Streamlined the codebase by rolling back complex multi-terminal 'Remote Join' logic in favor of this robust, static-binary approach. 2026-01-11 15:37:10 -08:00
chrisfu
906392d462 feat(installer): improve UI and add test coverage for core features
- Refactored installer UI with updated canvas rendering, sidebar navigation, and footer buttons.
- Enhanced styling for macOS compatibility and consistent design across controls.
- Added Pytest-based unit tests for `screen.py` and `config.py`.
- Expanded dependency catalog with new tools like `tshark` and `pyshark`.
- Improved error tolerance for background rendering and added placeholders for Kerberos configuration.
2026-01-08 21:51:30 -08:00
chrisfu
7b71d80053 feat(scripts): improve Kerberos cache validation and logging in DNS sync script
- Added check for default Kerberos cache when `KRB5CCNAME` is unset.
- Enhanced logging to provide clearer guidance for missing credentials.
2026-01-03 17:31:02 -08:00
chrisfu
9a6cf38657 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	prole-dns/init-prole-dns.sh
2026-01-02 21:44:11 -08:00
chrisfu
ab0bffb186 feat(scripts): enhance error handling and logging in Samba DNS operations
- Added error checks for `samba-tool dns add` and `update` to handle pre-existing records gracefully.
- Improved Kerberos cache validation with warnings and hints for unreadable or missing caches.
- Updated usage examples to provide better guidance for Kerberos authentication.
2026-01-02 21:43:14 -08:00
chrisfu
3061fb36a5 feat(scripts): enhance error handling and logging in Samba DNS operations
- Added error checks for `samba-tool dns add` and `update` to handle pre-existing records gracefully.
- Improved Kerberos cache validation with warnings and hints for unreadable or missing caches.
- Updated usage examples to provide better guidance for Kerberos authentication.
2026-01-02 21:41:48 -08:00
chrisfu
67fac13c55 feat(scripts): auto-detect and use Kerberos cache for sudo sessions in DNS sync
- Added logic to auto-set `KRB5CCNAME` from the sudo user's Kerberos cache, if available.
- Improved logging to indicate when the Kerberos cache is automatically utilized.
2026-01-02 21:24:47 -08:00
chrisfu
b38bd39145 feat(scripts): enforce Kerberos usage and improve validation in DNS sync script
- Replaced `-k yes` with `--use-kerberos=required` for all `samba-tool` commands.
- Added Kerberos ticket validation with warnings for unset or missing `KRB5CCNAME`.
- Updated usage example to emphasize preserving Kerberos ticket via `sudo -E`.
2026-01-02 21:18:51 -08:00
chrisfu
89dfd9e1be Merge remote-tracking branch 'origin/main'
# Conflicts:
#	prole-dns/init-prole-dns.sh
2026-01-02 20:58:51 -08:00
chrisfu
a3b3d83f44 feat(scripts): introduce DNS sync script for Samba AD and hosts management
- Added `init-prole-dns.sh` to sync host records to Samba AD DNS.
- Included a fallback `hosts.txt` for static entries when Postgres is unavailable.
- Script supports operations such as start, stop, sync, status, and flush.
- Integrated cron-based hourly sync functionality.
2026-01-02 20:56:44 -08:00
chrisfu
4c0c593b34 feat(scripts): introduce DNS sync script for Samba AD and hosts management
- Added `init-prole-dns.sh` to sync host records to Samba AD DNS.
- Included a fallback `hosts.txt` for static entries when Postgres is unavailable.
- Script supports operations such as start, stop, sync, status, and flush.
- Integrated cron-based hourly sync functionality.
2026-01-02 20:30:39 -08:00
chrisfu
b735a1df13 feat(app): add support for Ollama service integration
- Added Ollama endpoint to `Config.swift` and `install.py`.
- Updated `ServiceChecker` to handle Ollama status checks and errors.
- Enhanced `StatusView` with a sixth traffic light for Ollama.
2026-01-02 09:11:56 -08:00
chrisfu
7140933f28 feat(app): add support for Ollama service integration
- Added Ollama endpoint to `Config.swift` and `install.py`.
- Updated `ServiceChecker` to handle Ollama status checks and errors.
- Enhanced `StatusView` with a sixth traffic light for Ollama.
2025-12-30 23:56:24 -08:00
chrisfu
10adb0e53a feat(app, k8s): add OpenBAO status check and enhance service integration
- Added OpenBAO readiness check via `PFScriptBridge`.
- Merged service defaults with indexed configuration in `Config.swift`.
- Improved service checker to handle OpenBAO readiness using `kubectl`.
- Refined `StatusView` to support traffic light interactivity and case-insensitive service matching.
- Expanded `prole-db.yaml` with additional PostgreSQL extensions and function grants.
2025-12-30 23:47:22 -08:00
chrisfu
db01fb3dde Merge remote-tracking branch 'origin/main' 2025-12-30 22:19:02 -08:00
chrisfu
73bc5bfede feat: implement encrypted development database with OpenBao and CNPG - Update install.py with password matching visual feedback and OpenBao integration - Enhance etc/init_openbao.sh to store database password in OpenBao KV - Update etc/init_cloudnative_pg.sh to synchronize database password from OpenBao to K8s secrets - Configure CNPG cluster in k8s/prole/prole-db.yaml with pg_hba for password authentication - Update various scripts and app sources for better service integration 2025-12-30 22:18:55 -08:00
chrisfu
973920db07 feat: implement encrypted development database with OpenBao and CNPG - Update install.py with password matching visual feedback and OpenBao integration - Enhance etc/init_openbao.sh to store database password in OpenBao KV - Update etc/init_cloudnative_pg.sh to synchronize database password from OpenBao to K8s secrets - Configure CNPG cluster in k8s/prole/prole-db.yaml with pg_hba for password authentication - Update various scripts and app sources for better service integration 2025-12-30 22:15:14 -08:00
chrisfu
528e362d95 feat(scripts): add create, delete, and recreate actions for CloudNative-PG initialization
- Introduced new script commands to manage CloudNative-PG clusters (`create`, `delete`, `recreate`).
- Updated default namespace to `prole` and refined variable handling for cluster name.
- Adjusted kustomization.yaml to reference `prole-db.yaml` for consistency in manifests.
2025-12-24 03:02:57 -08:00
chrisfu
940a48a237 refactor(scripts, installer): replace deprecated init_primary_domain.sh with init_openbao.sh
- Removed `init_primary_domain.sh` entirely; introduced `init_openbao.sh` with updated logic and streamlined functionality.
- Standardized script names to align with the OpenBao-centric workflow.
- Updated installer to dynamically fetch Prole database versions and reflect script changes.
- Improved TLS generation and k8s manifest handling for CloudNative-PG.
- Added new references to OpenBao initialization across scripts and UI components.
2025-12-23 22:40:03 -08:00
chrisfu
6fa949cabc refactor(app, scripts): remove deprecated init-port-forwards.sh; enhance UI and db management
- Deleted `init-port-forwards.sh`, removing deprecated placeholder script.
- Introduced `dbStatus` command in `PFScriptBridge.swift` for querying database status with `kubecolor`.
- Improved `StatusView` UI: refined button interactivity and font standardization.
- Added `DBStatusWindowController` to `AppDelegate` for better database status visibility and control.
- Updated `OverlayWindow`: adjusted window levels and interaction behavior for smoother UX.
2025-12-22 21:27:00 -08:00