Skip to content

Latest commit

 

History

History
108 lines (71 loc) · 2.79 KB

File metadata and controls

108 lines (71 loc) · 2.79 KB

Edge Node Developers Guide

Development Environment Setup

Container Setup

This guide provides step-by-step instructions for setting up a development environment for the Holochain Edge Node container. The container is built using Wolfi Base and includes all necessary tools for developing, testing, and running Holochain applications.

Prerequisites

  • Docker installed and running on your system
  • Git (for cloning the repository)
  • Basic knowledge of Docker commands and containers

Development Environment Setup

  1. Clone the Repository
git clone https://github.com/Holo-Host/edgenode.git
cd edgenode
  1. Build the Docker Image

The container is defined in docker/Dockerfile. To build the image locally:

cd docker
docker build -t local-edgenode .
cd ..
  1. Run the Container in Development Mode

For development, you'll want to run the container with interactive shell access and persistent storage:

# Create a directory for persistent data
mkdir -p ./holo-data-dev

# Run the container in interactive mode
docker run --name edgenode-dev -it \
  -v $(pwd)/holo-data-dev:/data \
  -p 4444:4444 \
  local-edgenode
  1. Access the Container Shell

Once the container is running, access it interactively:

docker exec -it edgenode-dev /bin/sh

Inside the container, switch to the nonroot user:

su - nonroot

ISO Setup

HolOS is a minimal Linux distribution specifically designed to run Holochain containers. It's built using the Buildroot system, creating a complete Linux system from source code.

Prerequisites

  • Basic knowledge of Makefiles and the build process.

Development Environment Setup

The Makefile automates the following steps:

  1. Downloads Buildroot source
  2. Builds the Rust-based holos-config tool
  3. Copies configuration files and overlays
  4. Builds the Linux kernel with custom configuration
  5. Creates initramfs (rootfs.cpio.gz)
  6. Assembles everything into a hybrid ISO image

The system can be used in several ways:

  1. Boot from USB/CD: Write the ISO to a bootable device
  2. PXE Boot: Use the kernel and initrd from the boot/ directory
  3. Virtual Machine: Use make run to boot in KVM with QEMU

happ_config_file Utility Setup

Prerequisites

  1. Rust Programming Language: The project requires Rust to be installed on your system. You can install Rust by following the instructions at rustup.rs.
  2. Cargo: Cargo is Rust's package manager and build tool. It comes bundled with the Rust installation.

Setup Steps

  1. Navigate to the project directory:
cd tools/happ_config_file
  1. Build the project:
cargo build --release

This will compile the project and create the binary at target/release/happ_config_file.