jdt deploy --- Install to a Node¶
Deploys a package to a Jarvis node. Supports three targets: local filesystem, Docker container (legacy install only), or remote Pi Zero over SSH.
Restart the node after deploying
jdt deploy installs the files but does not load them into the running node. Restart the node service afterwards (sudo systemctl restart jarvis-node on a Pi) so it discovers the new components and sends their tool schemas to jarvisd. jdt's own "Discovery caches will auto-refresh" message is out of date; see below.
Usage¶
Targets¶
jdt deploy local¶
Installs to a local jarvis-node-setup installation.
| Argument/Option | Description |
|---|---|
path |
Package directory (default: current directory) |
--node-dir |
Path to jarvis-node-setup (auto-detected) |
Node directory resolution order:
--node-dirflagJARVIS_NODE_DIRenvironment variable- Sibling repo:
../jarvis-node-setup - Production install:
/opt/jarvis-node
jdt deploy local . # Auto-detect node location
jdt deploy local . --node-dir ~/jarvis/jarvis-node-setup # Explicit path
jdt deploy docker¶
Installs into a Docker node container.
Legacy Docker install only
This target is for nodes of the legacy Docker install. Jarvis Automation (jarvisd) runs no node containers: use local or ssh for a Pi's Python node, and the mobile app for a computer's desktop agent (Where your code runs).
| Argument | Description |
|---|---|
container |
Container name (partial match OK) |
path |
Package directory (default: current directory) |
What it does:
docker cpthe package to/tmp/jarvis-pkg-installin the containerdocker execthe container'scommand_store.py installcommand- Cleans up the temp directory
jdt deploy ssh¶
Installs on a remote Pi Zero (or any Linux host) over SSH.
| Argument/Option | Description |
|---|---|
host |
SSH target (e.g., pi@<dev-node>.local) |
path |
Package directory (default: current directory) |
--node-dir |
Remote node directory (default: /opt/jarvis-node) |
jdt deploy ssh pi@<dev-node>.local .
jdt deploy ssh pi@<kitchen-node>.local . --node-dir /opt/jarvis-node
What it does:
scpthe package to the remote hostsshin,cdto the node directory and runcommand_store.py installas the SSH user (nosudo: the install writes to that user's~/.jarvis/; apt and post-install steps escalate through the node's own sudoers grants)- Cleans up the temp files
Examples¶
Development loop¶
# Edit, test, deploy, restart, repeat
jdt test . && jdt deploy local . && sudo systemctl restart jarvis-node
Deploy to all nodes¶
jdt deploy local .
jdt deploy docker jarvis-node-kitchen . # legacy Docker install only
jdt deploy ssh pi@<dev-node>.local .
CI/CD deploy¶
jdt test . && jdt deploy ssh pi@<kitchen-node>.local . --node-dir /opt/jarvis-node \
&& ssh pi@<kitchen-node>.local sudo systemctl restart jarvis-node
What Happens During Install¶
All three targets ultimately run the node's command_store.py install command, which:
- Reads
jarvis_package.yamlfrom the package - Copies each component to its
custom_*directory:commands/custom_commands/<name>,agents/custom_agents/<name>,device_families/custom_families/<name>,device_managers/custom_managers/<name>orroutines/custom_routines/<name>(see Where installed packages land) - Installs pip dependencies declared in the manifest
- Seeds secret placeholders (user fills values via the mobile app)
- On a Pi, runs the manifest's system steps (
apt_packages,apt_sources,post_install)
After the install: restart the node¶
The install runs as a separate process, and it does not refresh the running node: the node has no background refresh and nothing watches its directories. The new components load when the node restarts:
For a node you run from a checkout, stop and start it. jdt prints "Installed successfully. Discovery caches will auto-refresh." after a deploy; that message predates the current node and is wrong, so restart anyway. (An install from the mobile app restarts the node by itself.)