Deployment¶
embeddyn deploys one application, the embeddyn Lab (the browser GUI with all its workspaces and its API), in five ways:
| Way | For | Start |
|---|---|---|
| Run from a checkout | developers, trying it out | ./run.sh / .\run.bat |
| Install for your user | daily use from a checkout | ./install-linux.sh / .\install-windows.bat |
| Desktop app | the Lab in its own window, no Python needed | ./starter-electron.sh, or an installer from a release |
| Server | a shared machine, a lab PC, remote use | installers/server/, the container |
| Release | publishing all of the above | push a v* tag |
All of them run the same command, embeddyn lab (= embeddyn mechatronics gui):
embeddyn lab [project.yaml] [--host 127.0.0.1] [--port 8710] [--open] [--allow-remote] [--token T | --token-file F]
It listens on 127.0.0.1 by default. Another --host needs --allow-remote and then an access token: one is
generated (and printed) unless you give --token, EMBEDDYN_LAB_TOKEN, or --token-file / EMBEDDYN_LAB_TOKEN_FILE
(a generated token is kept in that file, so it survives restarts). Every request must carry it: open the printed
http://host:8710/?token=... once, which stores it in a cookie (HttpOnly, SameSite=Strict), or send
Authorization: Bearer <token>. GET /api/health needs no token (health checks). The Lab starts simulators,
emulators and tools on the machine it runs on: give the token only to people you would give a shell, and put a TLS
reverse proxy in front of it before it leaves a trusted network.
Run from a checkout¶
./run.sh # Linux/macOS: first run sets up .venv, then opens http://127.0.0.1:8710
./run.sh --check # set up only
./run.sh --profile full # set up with another bootstrap profile (studio, full, dev, rf)
./run.sh --port 8800 examples/mechatronics/rc-servo-lab.yaml # other arguments go to `embeddyn lab`
The first run installs Python 3.10+ if it is missing (brew, apt, dnf, pacman, zypper; winget on Windows), runs
bootstrap.py bootstrap --profile studio --no-sync (a .venv with the studio and pins extras) and fetches the
externals/pin_configurator submodule. It loads this user's tool paths from ~/.config/embeddyn/env.sh (Renode and
its own environment script, Arm toolchain, SDKs); write that file once with
python -m embeddyn.mechatronics.devboards user-env [--renode /path/to/renode], or the Emulation workspace and the
dev boards report Renode as missing. EMBEDDYN_PYTHON uses another Python environment instead; EMBEDDYN_PORT
another port. start.sh / start.bat still work and call run.
Installer scripts¶
./install-linux.sh # this checkout for your user (no sudo)
./install-linux.sh --desktop # build the desktop app here and install it as a package
./install-linux.sh --release [v0.2.0] # download the desktop app from a GitHub release (latest if no tag)
./install-linux.sh --file Embeddyn-0.2.0-linux-amd64.deb # a package you already have
./install-linux.sh --user # with --desktop/--release/--file: per-user AppImage, no sudo
./install-linux.sh --service # also run the Lab as a systemd user service
./install-linux.sh --uninstall # projects, parts and settings are kept
.\install-windows.bat # (install-windows.ps1) this checkout for your user
.\install-windows.ps1 -Desktop | -Release [-Tag v0.2.0] | -File setup.exe | -Service | -Uninstall
Checkout install. A virtual environment in ~/.local/share/embeddyn-app/venv (%LOCALAPPDATA%\embeddyn-app\venv) with
this checkout installed in editable mode, so a git pull updates it (run the script again when dependencies change).
It adds embeddyn and embeddyn-lab to ~/.local/bin (%LOCALAPPDATA%\embeddyn-app\bin, added to the user PATH) and an
Embeddyn Lab menu entry with the icon, which opens the Lab in the browser.
Desktop package. Debian/Ubuntu get the .deb through apt and Fedora/openSUSE the .rpm through dnf/zypper
(both install to /opt/Embeddyn, command embeddyn-desktop, asks for sudo once); other distributions, and
--user, get the AppImage in ~/.local/opt/embeddyn (needs libfuse2). On Windows the NSIS installer is per user.
Desktop app (Electron)¶
The desktop app is the Lab in its own window. Its main process (packaging/electron/main.cjs) starts the Lab backend
(embeddyn.local.desktop) on a free loopback port with a fresh token, adds the token to every request, and stops the
backend (and the tools it started, such as the pin configurator) when the last window closes. The window loads only
the Lab and the local tools it frames; the Lab's pop-out views open as windows of the same session; links to other
local tools open in the system browser.
./starter-electron.sh # set up (.venv, Node.js 20+, Electron) and open the app from this checkout
./starter-electron.sh --check # set up only
./starter-electron.sh --packager # build the installers for this OS into dist/electron/
./starter-electron.sh --packager deb # only one Linux target (AppImage, deb, rpm, tar.gz)
On Windows: .\starter-electron.bat (starter-electron.ps1 -Check | -Packager).
--packager bundles the backend with PyInstaller (packaging/build_desktop.py --onedir): the embeddyn package and
its data, examples/mechatronics and the pin configurator's application files, laid out like the checkout. It must
run on each target OS and architecture. The packaged app needs no Python, except for the Pins workspace: it runs the
pin configurator with a python3 from PATH that has Flask and pdfplumber, or with PIN_CONFIGURATOR_PYTHON.
External emulators and debuggers come from PATH or RENODE_BIN, OPENOCD_BIN. Installer files are named
Embeddyn-<version>-<os>-<arch>.<ext>.
Server¶
Run the Lab as a background service of your user:
installers/server/install-linux-service.sh # systemd user service on 127.0.0.1:8710
installers/server/install-linux-service.sh --remote # 0.0.0.0, token in ~/.config/embeddyn/lab.token
installers/server/install-linux-service.sh --port 8800 --uninstall
Logs: journalctl --user -u embeddyn-lab. loginctl enable-linger $USER keeps it running without a login. The
Python is EMBEDDYN_PYTHON, else the checkout's .venv, else the checkout install's venv.
On Windows, installers\server\install-windows-service.ps1 [-Remote] [-Port 8800] [-Uninstall] registers a
scheduled task that starts the Lab at logon (no administrator rights; token in %APPDATA%\embeddyn\lab.token).
The server archive of a release (embeddyn-server-<version>.tar.gz, made by python tools/release.py server) has
the Lab without the desktop shell: unpack it, then ./run.sh --check and one of the service installers.
Container¶
docker compose up -d --build # from this checkout (docker-compose.yml)
docker compose logs embeddyn | grep token # open http://127.0.0.1:8710/?token=... once
The published image: installers/server/docker-compose.yml runs ghcr.io/xsession/embeddyn:<version|latest>.
| Path | Holds |
|---|---|
/data |
Studio data, your parts (/data/parts), the token (/data/lab.token) |
/workspace |
projects and firmware (the working directory) |
/toolchains |
read-only tools: a portable Renode in /toolchains/renode (RENODE_BIN) |
The port is published on 127.0.0.1:8710 only. OpenOCD, gdb-multiarch and the ARM binutils are in the image;
Renode is mounted, not downloaded, so you choose its build. In a container the Pins workspace's configurator listens
inside the container only: use it from the desktop app or a checkout.
Releases¶
A release is a tag. The version is declared in pyproject.toml and packaging/electron/package.json (and its lock);
tools/release.py keeps them in step:
python tools/release.py version # the current version
python tools/release.py version 0.2.0 # set it everywhere
python tools/release.py version --check v0.2.0 # what CI runs: fail unless every declaration matches
git commit -am "Release 0.2.0" && git tag v0.2.0 && git push --follow-tags
The Release workflow then:
- checks the version and runs the Lab and deployment tests,
- builds the desktop installers on every OS (the reusable
Electron installers workflow): Windows x64
.exe, macOS.dmg(Intel and Apple Silicon), Linux x64 AppImage,.deb,.rpm,.tar.gz, - builds the server archive and the wheel (
tools/release.py server,tools/release.py wheel), - builds the container image, checks it starts, and pushes
ghcr.io/<owner>/embeddyn:<version>(and:latestfor a final release), - uploads everything with
SHA256SUMSto the GitHub release, verifies the uploaded checksums and publishes it.
A tag with a suffix (v0.2.0-rc.1) becomes a pre-release. Actions ▸ Release ▸ Run workflow rebuilds an existing
tag. Pull requests that touch embeddyn/ or packaging/ build the installers as workflow artifacts.
Locally, ./starter-electron.sh --packager and python tools/release.py server produce the same files.