Skip to content

Commit

Permalink
Migrate umbrel-dev from Multipass to Docker
Browse files Browse the repository at this point in the history
umbrel-dev

Automatically initialize and manage an umbrelOS development environment.

Usage: npm run dev <command> [-- <args>]

Commands:
    help                      Show this help message
    start                     Either start an existing dev environment or create and start a new one
    logs                      Stream umbreld logs
    shell                     Get a shell inside the running dev environment
    exec -- <command>         Execute a command inside the running dev environment
    client -- <rpc> [<args>]  Query the umbreld RPC server via a CLI client
    rebuild                   Rebuild the operating system image from source and reboot the dev environment into it
    restart                   Restart the dev environment
    stop                      Stop the dev environment
    reset                     Reset the dev environment to a fresh state
    destroy                   Destroy the dev environment

Environment Variables:
    UMBREL_DEV_INSTANCE       The instance id of the dev environment. Allows running multiple instances of
                              umbrel-dev in different namespaces.

Note: umbrel-dev requires a Docker environment that exposes container IPs to the host. This is how Docker
natively works on Linux and can be done with OrbStack on macOS. On Windows this should work with WSL 2.
  • Loading branch information
lukechilds committed Oct 3, 2024
1 parent d43edc6 commit 09c2752
Show file tree
Hide file tree
Showing 7 changed files with 13,715 additions and 166 deletions.
15 changes: 2 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
{
"scripts": {
"vm:provision": "multipass launch --name umbrel-dev --cpus 4 --memory 8G --disk 50G 22.04 && npm run vm:stop && multipass mount --type native $PWD umbrel-dev:/opt/umbrel-mount && multipass exec umbrel-dev -- /opt/umbrel-mount/scripts/vm provision",
"vm:shell": "multipass shell umbrel-dev",
"vm:exec": "multipass exec --working-directory /home/ubuntu umbrel-dev --",
"vm:logs": "multipass exec umbrel-dev -- journalctl --unit umbreld-production --unit umbreld --unit ui --follow --lines 100 --output cat",
"vm:enable-development": "multipass exec umbrel-dev -- /opt/umbrel-mount/scripts/vm enable-development",
"vm:enable-production": "multipass exec umbrel-dev -- /opt/umbrel-mount/scripts/vm enable-production",
"vm:install-deps": "multipass exec umbrel-dev -- /opt/umbrel-mount/scripts/vm install-deps",
"vm:trpc": "npm run --silent vm:exec -- UMBREL_DATA_DIR=./data UMBREL_TRPC_ENDPOINT=http://localhost/trpc npm --prefix /home/ubuntu/umbrel/packages/umbreld run start -- client",
"vm:start": "multipass start umbrel-dev",
"vm:stop": "multipass stop umbrel-dev",
"vm:restart": "multipass restart umbrel-dev",
"vm:destroy": "multipass delete umbrel-dev && multipass purge",
"vm:remount": "multipass mount . umbrel-dev:/opt/umbrel-mount"
"dev": "./scripts/umbrel-dev",
"dev:help": "npm run dev help"
}
}
Loading

0 comments on commit 09c2752

Please sign in to comment.