Update default SSH user to 'sol' and enhance cloud-init config; bump version to 0.1.15

- Change the default SSH username from 'ubuntu' to 'sol' for consistency with Solstice CI environment.
- Modify cloud-init user configuration to align with the new default, adding enhanced permissions and settings for 'sol' user.
- Increment orchestrator version to 0.1.15.

Signed-off-by: Till Wegmueller <toasterson@gmail.com>
This commit is contained in:
Till Wegmueller 2025-11-18 14:48:20 +01:00
parent 2c73c80619
commit 8f909c0105
No known key found for this signature in database
3 changed files with 10 additions and 6 deletions

View file

@ -1,6 +1,6 @@
[package] [package]
name = "orchestrator" name = "orchestrator"
version = "0.1.14" version = "0.1.15"
edition = "2024" edition = "2024"
build = "build.rs" build = "build.rs"

View file

@ -245,7 +245,7 @@ async fn main() -> Result<()> {
let mq_cfg_clone = mq_cfg.clone(); let mq_cfg_clone = mq_cfg.clone();
let tx_for_consumer = sched_tx.clone(); let tx_for_consumer = sched_tx.clone();
let persist_for_consumer = persist.clone(); let persist_for_consumer = persist.clone();
let default_ssh_user = std::sync::Arc::new(String::from("ubuntu")); let default_ssh_user = std::sync::Arc::new(String::from("sol"));
// Start consumer that can be shut down cooperatively on ctrl-c // Start consumer that can be shut down cooperatively on ctrl-c
let (shutdown_tx, shutdown_rx) = tokio::sync::oneshot::channel::<()>(); let (shutdown_tx, shutdown_rx) = tokio::sync::oneshot::channel::<()>();
let consumer_task = tokio::spawn(async move { let consumer_task = tokio::spawn(async move {
@ -446,9 +446,13 @@ fn make_cloud_init_userdata(
let s = format!( let s = format!(
r#"#cloud-config r#"#cloud-config
users: users:
- default - name: sol
ssh_authorized_keys: gecos: Solstice CI
- {ssh_pubkey} groups: [sudo]
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys:
- {ssh_pubkey}
write_files: write_files:
- path: /etc/solstice/job.yaml - path: /etc/solstice/job.yaml
permissions: '0644' permissions: '0644'

View file

@ -221,7 +221,7 @@ impl<H: Hypervisor + 'static> Scheduler<H> {
).await { ).await {
Some(ip) => { Some(ip) => {
let ip_owned = ip.clone(); let ip_owned = ip.clone();
let user = item.ctx.ssh_user.clone().unwrap_or_else(|| "ubuntu".to_string()); let user = item.ctx.ssh_user.clone().unwrap_or_else(|| "sol".to_string());
let per_job_key_path = item.ctx.ssh_private_key_path.as_ref().map(|s| expand_tilde(s)); let per_job_key_path = item.ctx.ssh_private_key_path.as_ref().map(|s| expand_tilde(s));
let key_mem_opt = item.ctx.ssh_private_key_pem.clone(); let key_mem_opt = item.ctx.ssh_private_key_pem.clone();
// Choose correct runner binary based on label (illumos vs linux) // Choose correct runner binary based on label (illumos vs linux)