diff --git a/crates/idunn-daemon/src/main.rs b/crates/idunn-daemon/src/main.rs index 1153bc3..8b43cfc 100644 --- a/crates/idunn-daemon/src/main.rs +++ b/crates/idunn-daemon/src/main.rs @@ -5415,6 +5415,33 @@ fn swarm_targets(options: &SwarmOptions) -> Result> { enabled: true, interval_seconds: 30, }, + DaemonTarget { + daemon_id: "yggdrasil-codex-connector".to_string(), + verse_id: "yggdrasil.local".to_string(), + name: "Yggdrasil Codex Connector".to_string(), + health_contract: locally_supervised_health_contract( + "codex-connector.cultnet-rudp-service-health", + "failed", + ), + deploy_command: Some(yggdrasil_actuator("deploy", "codex-connector")), + restart_command: Some(yggdrasil_actuator("restart", "codex-connector")), + release: Some(with_source_change_pathspecs( + with_deployed_revision_witness( + release_target_on_branch( + "CodexConnector", + PathBuf::from("/srv/build/CodexConnector"), + "main", + "restart-after-verified-build", + None, + "restart-required", + ), + PathBuf::from("/srv/codex-connector/deploy/deployment.env"), + ), + DEPLOYABLE_SOURCE_PATHS, + )), + enabled: true, + interval_seconds: 30, + }, DaemonTarget { daemon_id: "yggdrasil-ghostlight".to_string(), verse_id: "yggdrasil.local".to_string(), @@ -8386,7 +8413,9 @@ mod tests { .lines() .any(|line| line == "ReadWritePaths=/var/lib/gamecult/idunn-authority") ); + assert!(unit.contains("/etc/gamecult/codex-connector")); assert!(unit.contains("/etc/gamecult/ghostlight")); + assert!(unit.contains("/etc/systemd/system/codex-connector.service")); assert!(unit.contains("/etc/systemd/system/epiphany-swarm.service")); assert!(unit.contains("/etc/systemd/system/ghostlight-dungeon.service")); assert!(!unit.contains("ReadWritePaths=/etc ")); @@ -8400,7 +8429,7 @@ mod tests { actuator.contains("bifrost-persona-feedback) target_requires_bifrost_authority=true") ); assert!(actuator.contains( - "epiphany|voidbot|heimdall|repixelizer|streampixels|odin|ghostlight|gjallar) target_requires_bifrost_authority=false" + "epiphany|voidbot|heimdall|repixelizer|streampixels|odin|codex-connector|ghostlight|gjallar) target_requires_bifrost_authority=false" )); assert!( actuator @@ -8442,6 +8471,14 @@ mod tests { "odin", true, ), + ( + "yggdrasil-codex-connector", + "CodexConnector", + "main", + "/srv/codex-connector/deploy/deployment.env", + "codex-connector", + true, + ), ( "yggdrasil-ghostlight", "Ghostlight", @@ -8496,6 +8533,7 @@ mod tests { let actuator = include_str!("../../../scripts/linux/idunn-yggdrasil"); assert!(actuator.contains("deploy:odin|restart:odin")); + assert!(actuator.contains("deploy:codex-connector|restart:codex-connector")); assert!(actuator.contains("deploy:ghostlight|restart:ghostlight")); assert!(actuator.contains("restart:heimdall")); assert!(actuator.contains("deploy:heimdall")); diff --git a/scripts/linux/idunn-yggdrasil b/scripts/linux/idunn-yggdrasil index 65c7f83..d13fdcc 100644 --- a/scripts/linux/idunn-yggdrasil +++ b/scripts/linux/idunn-yggdrasil @@ -20,7 +20,7 @@ compose=/srv/compose/yggdrasil-apps.yaml require_release_lineage() { case "$target" in bifrost-persona-feedback) target_requires_bifrost_authority=true ;; - epiphany|voidbot|heimdall|repixelizer|streampixels|odin|ghostlight|gjallar) target_requires_bifrost_authority=false ;; + epiphany|voidbot|heimdall|repixelizer|streampixels|odin|codex-connector|ghostlight|gjallar) target_requires_bifrost_authority=false ;; *) echo "deployment target has no release-authority policy: $target" >&2; exit 1 ;; esac if [ "$requires_bifrost_authority" != "$target_requires_bifrost_authority" ]; then @@ -72,7 +72,7 @@ case "$action:$target" in restart:gjallar) exec systemctl restart gjallar-yggdrasil.service ;; - deploy:voidbot|restart:voidbot|deploy:epiphany|restart:epiphany|deploy:odin|restart:odin|deploy:ghostlight|restart:ghostlight) + deploy:voidbot|restart:voidbot|deploy:epiphany|restart:epiphany|deploy:odin|restart:odin|deploy:codex-connector|restart:codex-connector|deploy:ghostlight|restart:ghostlight) manifest="/srv/odin/deploy-manifests/$target" if [ ! -x "$manifest" ] || [ ! -O "$manifest" ]; then echo "root-owned executable deploy manifest is not installed: $manifest" >&2 diff --git a/scripts/linux/idunn-yggdrasil.service b/scripts/linux/idunn-yggdrasil.service index a57c118..c8dd2f8 100644 --- a/scripts/linux/idunn-yggdrasil.service +++ b/scripts/linux/idunn-yggdrasil.service @@ -19,7 +19,7 @@ UMask=027 PrivateTmp=yes ProtectHome=yes ProtectSystem=full -ReadWritePaths=/etc/gamecult/idunn /etc/gamecult/ghostlight /etc/systemd/system/epiphany-swarm.service /etc/systemd/system/ghostlight-dungeon.service /var/lib/gamecult/idunn /srv/build /srv/voidbot +ReadWritePaths=/etc/gamecult/idunn /etc/gamecult/codex-connector /etc/gamecult/ghostlight /etc/systemd/system/codex-connector.service /etc/systemd/system/epiphany-swarm.service /etc/systemd/system/ghostlight-dungeon.service /var/lib/gamecult/idunn /srv/build /srv/voidbot ReadOnlyPaths=/var/lib/gamecult/idunn-authority [Install]