Commit Graph

502 Commits

Author SHA1 Message Date
7f56d4d654 feat(adr/006-secret-management): propose using Keycloak for secret management
Introduce Architecture Decision Record (ADR) outlining the use of Keycloak as a secret management solution. The document details the context, considerations, decision workflow, rationale for choosing Keycloak over alternatives, and potential consequences including benefits and challenges.
2025-03-06 12:40:44 -05:00
c8547e38f2 feat(ipxe): create empty score shell for ipxe 2025-03-02 12:14:04 -05:00
bfc79abfb6 feat(ipxe): added slitaz image (super small image with gui and tools) 2025-03-02 10:05:50 -05:00
7697a170bd feat(ipxe): setup to have MAC specific bootfiles and fallback to a default if not found 2025-03-02 09:37:11 -05:00
941c9bc0b0 fix: missing protocol for ipxe boot file 2025-03-02 07:59:30 -05:00
51aeea1ec9 feat: support new configurable field in dhcp config: filenameipxe 2025-03-01 10:51:01 -05:00
8118df85ee feat: support new configurable field in dhcp config: filename64 2025-03-01 10:41:41 -05:00
7af83910ef doc: fix 2025-03-01 10:29:22 -05:00
1475f4af0c doc: fix 2025-03-01 10:25:24 -05:00
a3a61c734f doc: update README.md with instructions on how to add a field in opnsense config.xml 2025-03-01 10:17:51 -05:00
3f77bc7aef feat: support new configurable field in dhcp config: filename 2025-03-01 08:56:41 -05:00
d5125dd811 feat(iPXE): adding files for iPXE and memtest86 image 2025-02-23 16:39:57 -05:00
989f407502 docs(adr): add ADR for using iPXE with chaining for architecture independence
Adopt iPXE as the primary bootloader with chaining to support BIOS and UEFI architectures, enabling dynamic boot configurations, advanced network booting, and diskless machine management. This introduces a dependency on iPXE but offers significant benefits in flexibility and configuration simplicity.
2025-02-23 13:33:47 -05:00
1ca316c085 wip: added new xml fields for Caddy + legacy pxe filename 2025-02-22 14:24:51 -05:00
e390f1edb3 feat: started to prepare inventory / topoplogy for NCD 2025-02-22 11:12:28 -05:00
62a554fac7 feat(modules/opnsense): refactor and add upgrade functionality
Refactor OPNSense module to use a mod.rs structure and add an OPNsenseLaunchUpgrade score for launching firmware upgrades.
2025-02-21 11:24:04 -05:00
0eb9e02b99 feat: add .gitignore and update file paths
Add a .gitignore file to exclude target, private_repos, and log directories. Update TftpScore and HttpScore file paths in `main.rs` to use relative paths from the project root. Modify `HarmonyTUI` initialization in `lib.rs` to create log directory if it doesn't exist before setting the log file path.
2025-02-12 16:27:56 -05:00
96bbef8195 chore: Reorganize file tree for easier onboarding. Rust project now at the root for simple git clone && cargo run 2025-02-12 15:32:59 -05:00
83b4efd625 feat(example): add new example crate with basic setup 2025-02-12 14:32:17 -05:00
31e92a08a4 fix: autoload inventory and topology, update dhcp struct, add k8s deployment score
- Updated `Inventory` and `HAClusterTopology` to use `autoload` instead of `dummy`.
- Made fields in `DhcpScore` public for better access.
- Added `K8sDeploymentScore` to the list of modules registered with Maestro.
- Corrected logic in `Config::verify_package_installation` to check if package is installed.
- Updated `CaddyGeneral` struct to include `http_versions`.
2025-02-06 16:24:22 -05:00
0b30d82793 feat(harmony): add OPNSense shell command execution score
Introduces a new `OPNSenseShellCommandScore` to execute shell commands on an OPNSense device within the Harmony framework. This allows for custom command execution as part of the scoring and interpretation process, enhancing the flexibility and functionality of the system.
2025-02-04 16:39:49 -05:00
697c669d05 feat(examples/tui): add TUI example with harmony integration
- Create `Cargo.toml` for the new TUI example under `examples/tui`
- Implement basic `main.rs` that initializes Maestro and launches the TUI
- Update `harmony_tui/src/lib.rs` to handle async score execution gracefully
2025-02-04 15:43:05 -05:00
e5b4b5114e fix: improve code formatting and module organization
- Corrected code formatting issues such as inconsistent line breaks and unnecessary trailing commas.
- Reorganized `mod.rs` to ensure proper order of module declarations.
- Fixed misplaced imports in `help.rs` and corrected the rendering method signature.
- Cleaned up unused code lines and moved `dummy` module declaration to its correct position.
2025-02-04 14:44:58 -05:00
134f2b78d6 feat(tui): add panic logging and improve event handling
- Integrate `log_panics` for better error tracking in TUI.
- Enhance score interpretation result handling with async task management.
- Improve layout consistency in the UI rendering process.
2025-02-04 14:44:03 -05:00
0ade6209bb feat: Support opnsense 25.1 config 2025-02-03 08:16:24 -05:00
1877570d7c feat: Add verification of opnsense package installation, fix opnsense-config tests, add log file to tui 2025-02-02 17:06:23 -05:00
3eac78c6d3 feat(harmony): enhance PhysicalHost with builder methods and update dependencies
- Added builder methods to `PhysicalHost` for configuring CPU, memory size, storage, MAC address, labels, and management interface.
- Updated the edition of various Cargo.toml files to 2024.
- Implemented workspace inheritance for version, readme, and license fields in Cargo.toml files.
2025-02-01 11:45:04 -05:00
0cfd5dc89e fix(tui): handle 'End' key for bottom logs navigation
Update the TUI to handle both 'Shift+G' and 'End' keys for navigating to the bottom of logs. Adjusted the help widget text accordingly to reflect this change.
2025-01-29 15:50:35 -05:00
f1f2c796c4 feat(widget): add help widget and improve score widget
- Introduced a new `Help` widget to display user instructions.
- Improved the `ScoreListWidget` by removing unnecessary execution rendering methods and simplifying state transitions.
- Cleaned up unused imports and refactored code for better readability.
2025-01-29 15:34:16 -05:00
6628e193e0 feat: harmony terminal ui can now browse scores and (almost) launch them 2025-01-28 16:51:58 -05:00
3410751463 feat: add ScoreListWidget with execution confirmation
Implement ScoreListWidget to manage score list rendering and execution confirmation flow. This includes methods for scrolling through scores, launching an execution, confirming/denying the execution, and rendering a popup for user confirmation.
2025-01-27 23:24:21 -05:00
651266d71c fix: update Score trait implementation and TUI initialization
Update the `Score` trait implementations to return a `Box<dyn Interpret>` instead of concrete types or clones where necessary. Additionally, refactor the initialization and cleanup in `HarmonyTUI` to use utility functions provided by `ratatui`.
2025-01-25 12:36:22 -05:00
4bbe8e84d8 feat(harmony_tui): add initial TUI implementation with ratatui and crossterm
Add a new `harmony_tui` crate to initialize and run a text-based user interface (TUI) for the Harmony project using `ratatui` for rendering and `crossterm` for handling input. The `HarmonyTUI` struct initializes the terminal, enters a loop to render updates, and handles basic input events to exit. This commit sets up the foundation for further TUI development.
2025-01-24 11:30:01 -05:00
21258cf1af chore: Ran cargo fmt on all code 2025-01-24 10:50:38 -05:00
d6c8650d52 feat(k8s): add Kubernetes deployment resource handling
Introduce new modules to handle Kubernetes resources specifically focusing on Deployment resources. Added `K8sResource` and `K8sDeployment` structs along with necessary traits implementations for interpretation and execution in the inventory system. Also, fixed module reordering issues in opnsense-config-xml and corrected some fields types within its data structures.
2025-01-24 10:44:27 -05:00
caec71f06d feat(k8s): add initial Resource module structure
Introduce the initial structure for the Kubernetes (K8s) resource module, including `K8sResourceScore` and `K8sResourceInterpret`. Additionally, update the module paths to include the new K8s module.
2025-01-22 10:36:19 -05:00
98c2ab169c dep: Use github dependency for yaserde 2025-01-22 10:35:35 -05:00
d8c762e9df feat(harmony_macros): add yaml macro to validate YAML input
- Introduced a new `yaml` macro in `harmony_macros` that validates if the provided YAML string is valid by attempting to deserialize it using `serde_yaml`.
- Added dependencies on `serde`, `serde_yaml` for handling YAML deserialization.
- Included dev dependencies with features enabled for deriving types from `serde`.
2025-01-22 10:21:08 -05:00
jeangab
2041ce63d7 feat(adr): add architecture decision record for infrastructure abstractions
Introduce a new Architecture Decision Record (ADR) outlining the design of provider-agnostic infrastructure abstractions in Harmony. This ADR details how domain-driven traits will be used to define essential elements for resources and upgrades, enabling flexibility and portability across different cloud providers.
2025-01-18 07:11:29 -05:00
jeangab
42ed82b0c1 wip: Kube-rs demo 2025-01-16 16:13:48 -05:00
04db8103c4 fix(config): update variable names and remove unused imports
Refactor variable names to follow snake_case convention and remove unused imports across multiple files to improve code readability and maintainability.
2025-01-12 15:57:01 -05:00
f241bf793e fix(dhcp): remove unused IP range check and simplify DnsConfig
Remove the commented-out IP range validation in `DhcpConfig` and simplify the `DnsConfig` constructor by removing an unnecessary parameter, addressing several compiler warnings.
2025-01-12 15:32:14 -05:00
cad63ecf20 fix(config): specify attribute argument in yaserde macros
Update yaserde macro usage to explicitly specify the `attribute` argument for consistency and compatibility with newer versions of the yaserde crate. This change ensures that all fields annotated with `#[yaserde]` correctly define attributes, aligning with the recommended usage in the latest yaserde documentation.
2025-01-12 14:06:30 -05:00
jeangab
1665198e66 "Update Harmony Opnsense Configuration"
Improved configuration handling for Harmony Opnsense setup. Implemented changes to opnsense-config module to support various settings, including load balancer configuration and DHCP server settings. This update enhances the overall stability and functionality of the Harmony Opnsense setup process.
2025-01-11 13:52:57 -05:00
jeangab
9e6f22d7ea chore: Remove mistakenly commited file 2025-01-09 11:59:18 -05:00
jeangab
bec96c2954 feat(bootstrapping): add bootstrap load balancer and DHCP configurations
- Introduce `bootstrap_load_balancer` module for handling initial load balancing configuration.
- Add `bootstrap_dhcp` module for bootstrapping DHCP settings.
- Create `harmony_types` crate to house shared types, including `MacAddress`.
- Update `harmony_macros` to use `harmony_types` instead of directly referencing `harmony`.
2025-01-09 11:58:49 -05:00
jeangab
a80ead418e fix(config): update package installation command and add load balancer setup script
Update the package installation command to use the Opnsense firmware install script.
Add a call to the HAProxy setup script during the load balancer configuration process. This script is intended to copy the staging configuration to production, though its necessity in this context is uncertain.
2025-01-09 09:30:04 -05:00
jeangab
0af8e7e6a8 fix(load-balancer): implement missing HAProxy reload and sanitize output handling
Implement the `reload_restart` method in `LoadBalancerConfig` to ensure proper HAProxy configuration management. Additionally, enhance SSH command execution by sanitizing and logging outputs effectively. This ensures robust handling of HAProxy configurations and improves debugging capabilities through trace-level logs.
2025-01-08 16:30:56 -05:00
a55c63ffa6 feat(harmony_macros): add ipv4 macro
Adds a new `ipv4` macro to validate IPv4 addresses in proc macros. Removes unused `debug` import from `http.rs`.
2025-01-08 11:49:42 -05:00
81d40ec163 feat(opnsense-config): add caddy module with configuration management
Introduce a new Caddy module within opnsense-config to manage Caddy server configurations. This includes enabling/disabling Caddy, setting ports, and reloading/restarting the service via OPNsense shell commands. Additionally, provide a sample Caddy configuration file for PXE booting and a test file in the pxe-http-files directory.
2025-01-07 17:12:39 -05:00