forked from NationTech/harmony
		
	Co-authored-by: Jean-Gabriel Gill-Couture <jeangabriel.gc@gmail.com> Co-authored-by: Ian Letourneau <ian@noma.to> Reviewed-on: https://git.nationtech.io/NationTech/harmony/pulls/130 Reviewed-by: Ian Letourneau <ian@noma.to> Co-authored-by: Jean-Gabriel Gill-Couture <jg@nationtech.io> Co-committed-by: Jean-Gabriel Gill-Couture <jg@nationtech.io>
		
			
				
	
	
		
			33 lines
		
	
	
		
			931 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			931 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| mod topology;
 | |
| 
 | |
| use crate::topology::{get_inventory, get_topology};
 | |
| use harmony::{
 | |
|     config::secret::SshKeyPair,
 | |
|     data::{FileContent, FilePath},
 | |
|     modules::okd::ipxe::OKDIpxeScore,
 | |
| };
 | |
| use harmony_secret::SecretManager;
 | |
| 
 | |
| #[tokio::main]
 | |
| async fn main() {
 | |
|     let inventory = get_inventory();
 | |
|     let topology = get_topology().await;
 | |
| 
 | |
|     let kickstart_filename = "inventory.kickstart".to_string();
 | |
|     let harmony_inventory_agent = "harmony_inventory_agent".to_string();
 | |
|     let ssh_key = SecretManager::get_or_prompt::<SshKeyPair>().await.unwrap();
 | |
| 
 | |
|     let ipxe_score = OKDIpxeScore {
 | |
|         kickstart_filename,
 | |
|         harmony_inventory_agent,
 | |
|         cluster_pubkey: FileContent {
 | |
|             path: FilePath::Relative("cluster_ssh_key.pub".to_string()),
 | |
|             content: ssh_key.public,
 | |
|         },
 | |
|     };
 | |
| 
 | |
|     harmony_cli::run(inventory, topology, vec![Box::new(ipxe_score)], None)
 | |
|         .await
 | |
|         .unwrap();
 | |
| }
 |