zededa:workshop:05_patch_envelopes
This is an old revision of the document!
Table of Contents
Patch Envelopes
Patch Envelopes are versioned bundles of files, scripts, or configuration that can be pushed to edge nodes and delivered into running applications without requiring a full app redeployment. They are attached to App Bundles and mounted as a volume inside the running app at a defined path. A patch envelope has a manifest that describes the included files and their target locations.
What It Is
- A versioned bundle containing: binary files, config files, shell scripts, or any artifact
- Attached to an App Bundle definition; delivered inline to the running app via a volume mount
- The manifest describes each file: name, target path inside the app, and optional execution permissions
- Multiple versions of a patch envelope can coexist; the app bundle specifies which version to use
- Applied without restarting the app or redeploying the full App Bundle (for file delivery; script execution may require app-side handling)
Flow: ZEDUI to API to Edge Node
ZEDUI
- Navigate to Objects > Patch Envelopes
- Click Create Patch Envelope
- Enter a name and version string
- Upload one or more artifact files
- Define the manifest: for each file, specify the target path inside the app
- Click Save
- To apply: edit the target App Bundle and add the patch envelope reference under Patch Envelopes
- Re-deploy or update the App Instance to push the new envelope
Terraform
resource "zedcloud_patch_envelope" "app_config" {
name = "app-config-v2"
version = "2"
description = "Updated config files for workshop app"
project_id = zedcloud_project.workshop.id
artifact {
binary_artifact = filebase64("config/app.conf")
file_name = "app.conf"
volume_path = "/config/app.conf"
}
}
# Reference in the App Bundle
resource "zedcloud_application" "workshop_app" {
# ... other fields ...
patch_envelope {
patch_id = zedcloud_patch_envelope.app_config.id
version = "2"
}
}
API
# Create the patch envelope
POST /v1/patchenvelopes
{
"name": "app-config-v2",
"version": "2",
"projectId": "<project_id>",
"artifacts": [
{
"artifactMetaData": {
"fileName": "app.conf",
"volumePath": "/config/app.conf"
},
"binaryArtifact": "<base64_encoded_content>"
}
]
}
# Associate with an app bundle via the app definition
PATCH /v1/apps/{app_id}
{
"patchEnvelopes": [
{ "patchId": "<envelope_id>", "version": "2" }
]
}
What Happens on the Edge Node
- The controller delivers the patch envelope metadata and download reference to EVE-OS at next heartbeat
- EVE-OS downloads the patch envelope bundle from the controller-internal store
- EVE-OS mounts the patch envelope as a read-write volume inside the running app container or VM at the paths defined in the manifest
- The app can read, execute, or process the delivered files immediately without restart
- On update (new version assigned), EVE-OS delivers the new version and replaces the mounted files
Related Resources
zededa/workshop/05_patch_envelopes.1780243624.txt.gz ยท Last modified: (external edit)
