Launch files
Launch files let you start multiple nodes simultaneously, including those with dependencies on each other. With a single launch file, you or your team can recreate an entire node environment using just one command.
Running the Example
Section titled “Running the Example”Start by cloning this repository:
-
Clone the repository:
Terminal window git clone https://github.com/Peppy-bot/launch_example -
Navigate into the directory:
Terminal window cd launch_example
In the root directory, you’ll find a peppy_launcher.json5 file. Opening it reveals the following structure:
- All deployments are defined in the
deploymentarray - Each deployment requires a
sourceandinstancesattribute
The source attribute supports three formats:
- URL: A link to a
.tar.zstarchive, requiring bothurlandsha256attributes - Git repository: Requires
repo,path(location within the repo), andrefattributes - Local path: Specified via the
localkey, pointing to a directory on your filesystem. The path can be either absolute or relative to thepeppy_launcher.json5file
From within the cloned repository, execute the launcher:
peppy stack launch ./python/peppy_launcher.json5peppy stack launch ./rust/peppy_launcher.json5PeppyOS automatically inspects the name and tag of each node, verifies that all dependencies are met, and constructs the node stack in the correct order.
Verify that the node stack was configured correctly:
❯ peppy stack listListing nodes...Requesting node stack graph from core 'adoring-wiles-7286'...Node stack: - adoring-wiles-7286:core-node (/Users/tuatini/workspace/peppy) (1 instance: ["happy-tu-8997"]) - fake_openarm01_controller:0.1.0 (/Users/tuatini/.peppy/nodes/fake_openarm01_controller_0.1.0_d7dd45) (1 instance: ["the_nervous_system"]) - fake_robot_brain:0.1.0 (/Users/tuatini/.peppy/nodes/fake_robot_brain_0.1.0_4eb897) (1 instance: ["the_brain"]) - fake_uvc_camera:0.1.0 (/Users/tuatini/.peppy/nodes/fake_uvc_camera_0.1.0_89ce12) (2 instances: ["camera_front", "camera_rear"]) - fake_video_reconstruction:0.1.0 (/Users/tuatini/.peppy/nodes/fake_video_reconstruction_0.1.0_08320a) (1 instance: ["video_reconstruction_1"])Dependencies: - fake_robot_brain:0.1.0 -> fake_openarm01_controller:0.1.0 - fake_robot_brain:0.1.0 -> fake_uvc_camera:0.1.0 - fake_video_reconstruction:0.1.0 -> fake_uvc_camera:0.1.0The output confirms that all nodes have been added to the stack along with their dependency relationships.