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`.
This commit is contained in:
jeangab
2025-01-09 11:58:49 -05:00
parent a80ead418e
commit bec96c2954
20 changed files with 208 additions and 55 deletions

View File

@@ -10,7 +10,9 @@ use harmony::{
inventory::Inventory,
maestro::Maestro,
modules::{
http::HttpScore, okd::{dhcp::OKDBootstrapDhcpScore, dns::OKDBootstrapDnsScore}, tftp::TftpScore
http::HttpScore,
okd::{dhcp::OKDDhcpScore, dns::OKDDnsScore},
tftp::TftpScore,
},
topology::{LogicalHost, UnmanagedRouter, Url},
};
@@ -48,6 +50,10 @@ async fn main() {
ip: ip!("10.100.8.20"),
name: "cp0".to_string(),
}],
bootstrap_host: LogicalHost {
ip: ip!("10.100.8.20"),
name: "cp0".to_string(),
},
workers: vec![],
switch: vec![],
};
@@ -73,8 +79,8 @@ async fn main() {
// TODO regroup smaller scores in a larger one such as this
// let okd_boostrap_preparation();
// let dhcp_score = OKDBootstrapDhcpScore::new(&topology, &inventory);
// let dns_score = OKDBootstrapDnsScore::new(&topology);
// let dhcp_score = OKDDhcpScore::new(&topology, &inventory);
// let dns_score = OKDDnsScore::new(&topology);
// let load_balancer_score =
// harmony::modules::okd::load_balancer::OKDLoadBalancerScore::new(&topology);