Deployment Lifecycle
This page describes the current shared deployment flow implemented by
@le-space/core and @le-space/node.
High-Level Flow
- Validate the rootfs reference and deployment inputs.
- Resolve or rank CRN candidates.
- Build and sign the Aleph
INSTANCEmessage. - Broadcast the deployment request.
- Optionally publish required port forwards through an Aleph
AGGREGATE. - Wait for Aleph to process the deployment message.
- Poll runtime endpoints until networking becomes available.
- For
uc-go-peer, notify the CRN allocation, wait for the setup endpoint, run/configure, then fetch/metadata. - Verify required TCP and HTTPS reachability.
- If deployment fails on a CRN, forget failed messages and retry the next candidate when appropriate.
Shared Core Modules
manifests.tsManifest validation plus rootfsSTOREexistence and gateway probing.crns.tsCRN list fetching, compatibility filtering, geo enrichment, ranking, and preferred-country selection.instance-deployment.tsAlephINSTANCEpayload creation and message broadcasting.aggregate-publication.tsPort-forward aggregate publication.deployment-inspection.tsAleph message polling and rejection diagnostics.runtime.tsScheduler, execution-map, and runtime availability inspection.guest.tsuc-go-peersetup, metadata fetch, and reachability verification.forget.tsCleanup of failed deployments.retention.tsSuccessful-deployment ledger maintenance and forgetting old resources.
Retry Model
The current shared deploy executor supports:
- explicit
crn_hashpinning - preferred-country ranking
- multi-CRN retry when a deployment is rejected
- cleanup of failed deployment attempts before moving to the next CRN
This keeps the higher-level consumer workflows simpler because the retry behavior now lives in shared code instead of repo-local scripts.
uc-go-peer Guest Lifecycle
The current shared implementation includes the uc-go-peer operational flow:
- deploy VM
- wait for runtime networking
- notify CRN allocation endpoint
- wait for temporary setup endpoint
- submit
/configure - poll
/metadata - verify relay ports and optional HTTPS proxy
That makes the shared repo more than a raw Aleph SDK. It already contains the first app-profile lifecycle that UC needs today.
Retention Flow
The shared retention logic stores a ledger under the Aleph aggregate key
uc-go-peer-successful-deployments.
Each successful record may include:
instance_item_hashrootfs_item_hashsite_item_hashrootfs_cidsite_urlrelay_peer_idrootfs_versionvm_namedeployed_at
When the keep limit is exceeded, older Aleph hashes are collected and forgotten
through a shared FORGET message.