Multipass¶
The Multipass provider lets you define and manage local Ubuntu VMs using Canonical Multipass. It follows the standard cdkx two-phase workflow — synth and deploy — and wraps the multipass CLI under the hood.
Local-only provider
Multipass runs on your machine. No cloud account or API token is required. You do need Multipass installed locally and available in PATH.
Installation¶
How it works¶
- Synth — your app runs and writes a cloud assembly (
cdkx.out/). - Deploy —
cdkx deployreads the assembly and callsmultipass launchfor each instance.cdkx destroycallsmultipass delete --purge.
Quick example¶
Then run:
cdkx synth # produces cdkx.out/
cdkx deploy # runs: multipass launch jammy --name dev --cpus 4 --memory 4G --disk 20G
cdkx destroy # runs: multipass delete dev --purge
Example with network and cloud-init¶
Networks and mounts are declared inline on MltInstance — no separate constructs needed:
Supported resources¶
| Construct | Type string | Description |
|---|---|---|
MltInstance |
Multipass::Compute::Instance |
A Ubuntu VM managed by Multipass |
Networks and mounts are inline
There are no separate MltNetwork or MltMount constructs. Network interfaces and directory mounts are declared as plain objects directly on MltInstance.networks and MltInstance.mounts. See Instance for details.
Resource lifecycle¶
All MltInstance props are create-only. Once a VM is launched its configuration cannot be updated — the engine will never call update. To change a VM, destroy it and redeploy.
| Operation | What happens |
|---|---|
cdkx deploy |
Calls multipass launch for each new instance |
cdkx destroy |
Calls multipass delete --purge for each instance |
See also
- MltInstance — all props, attributes, and examples
- CLI Reference — standard
cdkx synth,deploy, anddestroycommands