Compare commits
1 Commits
feat/clust
...
feat/impro
| Author | SHA1 | Date | |
|---|---|---|---|
| 063a4d4f5c |
@@ -11,7 +11,7 @@ async fn main() {
|
|||||||
role: HostRole::Worker,
|
role: HostRole::Worker,
|
||||||
number_desired_hosts: 3,
|
number_desired_hosts: 3,
|
||||||
discovery_strategy: HarmonyDiscoveryStrategy::SUBNET {
|
discovery_strategy: HarmonyDiscoveryStrategy::SUBNET {
|
||||||
cidr: cidrv4!("192.168.0.1/25"),
|
cidr: cidrv4!("192.168.2.0/24"),
|
||||||
port: 25000,
|
port: 25000,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -20,7 +20,7 @@ async fn main() {
|
|||||||
role: HostRole::ControlPlane,
|
role: HostRole::ControlPlane,
|
||||||
number_desired_hosts: 3,
|
number_desired_hosts: 3,
|
||||||
discovery_strategy: HarmonyDiscoveryStrategy::SUBNET {
|
discovery_strategy: HarmonyDiscoveryStrategy::SUBNET {
|
||||||
cidr: cidrv4!("192.168.0.1/25"),
|
cidr: cidrv4!("192.168.2.0/24"),
|
||||||
port: 25000,
|
port: 25000,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -28,7 +28,8 @@ async fn main() {
|
|||||||
harmony_cli::run(
|
harmony_cli::run(
|
||||||
Inventory::autoload(),
|
Inventory::autoload(),
|
||||||
LocalhostTopology::new(),
|
LocalhostTopology::new(),
|
||||||
vec![Box::new(discover_worker), Box::new(discover_control_plane)],
|
vec![Box::new(discover_worker)],
|
||||||
|
//vec![Box::new(discover_worker), Box::new(discover_control_plane)],
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ impl<T: Topology> Interpret<T> for DiscoverHostForRoleInterpret {
|
|||||||
topology: &T,
|
topology: &T,
|
||||||
) -> Result<Outcome, InterpretError> {
|
) -> Result<Outcome, InterpretError> {
|
||||||
info!(
|
info!(
|
||||||
"Launching discovery agent, make sure that your nodes are successfully PXE booted and running inventory agent. They should answer on `http://<node_ip>:8080/inventory`"
|
"Launching discovery agent, make sure that your nodes are successfully PXE booted and running inventory agent. They should answer on `http://<node_ip>:25000/inventory`"
|
||||||
);
|
);
|
||||||
LaunchDiscoverInventoryAgentScore {
|
LaunchDiscoverInventoryAgentScore {
|
||||||
discovery_timeout: None,
|
discovery_timeout: None,
|
||||||
@@ -58,6 +58,8 @@ impl<T: Topology> Interpret<T> for DiscoverHostForRoleInterpret {
|
|||||||
let host_repo = InventoryRepositoryFactory::build().await?;
|
let host_repo = InventoryRepositoryFactory::build().await?;
|
||||||
|
|
||||||
let mut assigned_hosts = 0;
|
let mut assigned_hosts = 0;
|
||||||
|
// let hosts_for_role = host_repo.get_hosts_for_role(&self.score.role);
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
let all_hosts = host_repo.get_all_hosts().await?;
|
let all_hosts = host_repo.get_all_hosts().await?;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user