Commit Graph

29 Commits

Author SHA1 Message Date
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
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
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
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
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
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
925e84e4d2 feat(harmony): add TFTP server functionality (#10)
Introduce a new module and interface for serving files via TFTP in the HAClusterTopology structure. This includes adding the necessary dependencies, creating the `TftpServer` trait, implementing it where appropriate, and integrating its usage within the topology struct.

Reviewed-on: https://git.nationtech.io/NationTech/harmony/pulls/10
Co-authored-by: Jean-Gabriel Gill-Couture <jg@nationtech.io>
Co-committed-by: Jean-Gabriel Gill-Couture <jg@nationtech.io>
2025-01-07 19:12:35 +00:00
098cb30523 feat(load balancer): Can now fully configure an OPNSense HAProxy
instance for and openshift/OKD cluster

Squashed commit of the following:

commit f0d90d9e37da925c6b4441b076e212dd4f340cb7
Author: Jean-Gabriel Gill-Couture <jg@nationtech.io>
Date:   Fri Jan 3 10:19:49 2025 -0500

    chore: Remove opnsense config file committe by mistake

commit 73f017e6abc770003c483ee7e121c1c6e3cafa1a
Author: Jean-Gabriel Gill-Couture <jg@nationtech.io>
Date:   Fri Jan 3 10:17:42 2025 -0500

    feat(config): enhance HAProxy load balancer configuration and organize structs

    Add missing fields to the HAProxy load balancer configuration to make it fully functional. Move most of the HAProxy-related structs to their own file within `opnsense-config-xml` for better organization and maintainability.

commit 8a1b0b77dc6dde32298f69b0ca8a24ea2246de9e
Author: Jean-Gabriel Gill-Couture <jg@nationtech.io>
Date:   Tue Dec 31 12:06:37 2024 -0500

    feat(OPNSense): add support for configuration port and load balancer commit

    Introduce an optional port parameter to OPNSense configuration creation and enhance LoadBalancerInterpret to apply configurations after ensuring service existence. Adjust package installation commands to run non-interactively and log outputs. Add methods to enable the HAProxy component in the load balancer configuration.

commit 5075d1146f12cf7df2ae5d66ecee45f056ab39e8
Author: Jean-Gabriel Gill-Couture <jg@nationtech.io>
Date:   Sun Dec 29 09:29:57 2024 -0500

    docs: add README.md for OPNSense demo in vbox-opnsense

    Add a README file with instructions on how to download, start, and run the OPNSense virtual machine using VirtualBox, including credentials and command line usage details.

commit 5cda52430f1db6279707f8d189b7aac10195e09d
Author: Jean-Gabriel Gill-Couture <jg@nationtech.io>
Date:   Sat Dec 28 23:27:45 2024 -0500

    feat(opnsense-config): add package management and refactor load balancer module

    - Introduced `install_package` and `reload_haproxy` methods in the `Config` struct to manage OPNsense packages and reload HAProxy configuration.
    - Refactored `LoadBalancerConfig` to use a helper method `with_haproxy` for modifying HAProxy configurations, improving code readability and reducing duplication.
    - Added TODO warning in `add_backend` method to ensure new backends refer only to existing entities like servers or health checks.

commit d01186d21c443543e278c9e5190317b9961f8112
Author: Jean-Gabriel Gill-Couture <jg@nationtech.io>
Date:   Sat Dec 28 15:11:10 2024 -0500

    feat: Created demo project for virtualbox opnsense

commit c6c92ab1d457f5b2e38cbcfec0660c6fb550df1e
Author: Jean-Gabriel Gill-Couture <jeangabriel.gc@gmail.com>
Date:   Tue Dec 24 08:08:59 2024 -0500

    fix(xml): Support virtualbox config, pretty much vanilla opnsense

commit 4d5c23a6d07a434baa83d608247d0c7c446c1c08
Author: Sylvain Tremblay <stremblay@nationtech.io>
Date:   Fri Dec 20 16:15:18 2024 -0500

    fix: Support st opnsense config

commit 4546e6b5482061e3d51e07451ba182054d44d888
Author: johnride <jg@nationtech.io>
Date:   Fri Dec 20 21:11:56 2024 +0000

    feat: HAProxy load balancer able to load and create services, ready to be tested, they do not upload the new config yet

commit a899811d9bacea10e799a072965350842f9cbc7c
Author: johnride <jg@nationtech.io>
Date:   Fri Dec 20 18:39:32 2024 +0000

    feat: LoadBalancer building haproxy structures wip

commit 653c323f050ead350fd048fb30c1c3717b1471d1
Author: johnride <jg@nationtech.io>
Date:   Fri Dec 20 05:02:52 2024 +0000

    feat: LoadBalancer progress, now handles loading frontend, backend, servers and healthchecks from haproxy xml

commit 737e738f62d22523d5ededa4b6cc0b2e0ac7a0da
Author: jeangab <jeangabriel.gc@gmail.com>
Date:   Thu Dec 19 18:30:58 2024 -0500

    wip: Haproxy coming along, about 80% done before first test

commit 615ed36d89182e4bb1f2312dc9a8e4a7c31ab416
Author: Jean-Gabriel Gill-Couture <jeangabriel.gc@gmail.com>
Date:   Wed Dec 18 22:20:36 2024 -0500

    wip: LoadBalancer score coming along, first part of the score definition done. Next step is finishing it up and writing the concrete HAProxy implementation
2025-01-04 10:12:16 -05:00
Jean-Gabriel Gill-Couture
367e96b36a feat: Add OKD DNS score with DNS entries and registering dhcp leases 2024-12-18 15:58:49 -05:00
Jean-Gabriel Gill-Couture
478fd9e941 feat: Add score and opnsense implementation to register dhcp leases in dns server 2024-12-18 12:38:04 -05:00
51c6f1818c feat: remove the getMacAddress 2024-12-18 09:38:17 -05:00
Jean-Gabriel Gill-Couture
d0d81af796 feat(macro): Add mac_address macro 2024-12-17 09:54:23 -05:00
Jean-Gabriel Gill-Couture
1e0c2eb470 feat: Added new crate harmony_macros with ip! macro to facilitate creating ip addresses 2024-12-09 15:23:12 -05:00
jeangab
9c18c8be6d Integrated opnsense-config API in harmony, pretty easy, pretty happy. very much encouraging 2024-11-26 15:58:42 -05:00
Jean-Gabriel Gill-Couture
d30e909b83 feat(opnsense-config): Public API now complete for dhcp add_static_mapping and remove_static_mapping, not perfect but good enough to move forward 2024-11-23 15:07:04 -05:00
Jean-Gabriel Gill-Couture
b14d0ab686 feat: Can now save configuration, refactored repository into manager as it also executes commands to reload services and calling it a repository was found misleading by @stremblay" 2024-11-22 14:15:23 -05:00
Jean-Gabriel Gill-Couture
65c395aeae wip(opnsense-config): Refactoring to improve usability and features 2024-11-14 23:45:13 -05:00
Jean-Gabriel Gill-Couture
ab59923dae feat(opnsense-config): Add MaybeString type to preserve xml serialization of empty elements 2024-11-02 13:51:12 -04:00
Jean-Gabriel Gill-Couture
e0acbf304b wip: Full opnsense deserializer almost done, works on a slightly cheated config file, next step is to try the real config file 2024-10-18 00:48:57 -04:00
Jean-Gabriel Gill-Couture
b332723431 feat(opnsense-config): Refactor config to use a repository trait, implement file based and ssh, save a full config file 2024-10-14 16:13:20 -04:00
Jean-Gabriel Gill-Couture
32cea6c3ff wip: New crate opnsense-config 2024-10-13 08:48:56 -04:00
Jean-Gabriel Gill-Couture
6a5ebdbac7 wip: xml parser 2024-10-04 11:26:55 -04:00
jeangab
407bdbc032 wip: OPNSense XML config editor coming along 2024-09-30 16:20:11 -04:00
Jean-Gabriel Gill-Couture
042ff7e7dd chore: Move client setups to private repos that can be cloned manually by the developer 2024-09-13 16:19:49 -04:00
Jean-Gabriel Gill-Couture
ff3d53c704 wip: Working hard on topology, seems to have something that may work, next step is put the building blocks together for real 2024-09-08 19:06:21 -04:00
jeangab
8592a3bc36 feat: Refactored harmony into a workspace with independent modules per client, completed RusshClient test_connection implementation. Needs refactoring though 2024-09-06 16:10:06 -04:00
jeangab
cc01ec5fe5 chore(harmony): Use Cargo workspaces for core harmony and client specific implementation 2024-09-06 12:17:23 -04:00
aa28ab37b8 Core domain structure for harmony rs (#1)
Co-authored-by: jeangab <jeangabriel.gc@gmail.com>
Co-authored-by: Jean-Gabriel Gill-Couture <jeangabriel.gc@gmail.com>
Reviewed-on: https://git.nationtech.io/johnride/harmony/pulls/1
Co-authored-by: jeangab <jg@nationtech.io>
Co-committed-by: jeangab <jg@nationtech.io>
2024-09-06 12:41:00 +00:00
Jean-Gabriel Gill-Couture
1881428a63 try out ipmi and redfish rust crates 2024-08-30 11:44:25 -04:00