This project provides a setup for running and deploying Substrate-based nodes locally or on virtual machines. It includes Docker configuration for ease of use and flexibility.
- Run multiple Substrate nodes locally with
docker-compose
. - Deploy nodes to remote virtual machines using a simple deployment script.
- Customize node configurations for development or testing.
- Docker
- Docker Compose
- Rust (if building custom binaries)
- SCP and SSH (for VM deployment)
1. Clone the repository:
git clone <repository-url>
cd devnet-deploy
2. Build and start the nodes:
./deploy.sh local
3. Check the running containers:
docker ps
4. Access the logs for a specific node:
docker logs <container_name>
Nodes will be accessible via the following ports:
- Node 1: RPC (9933), WS (9944), P2P (30333)
- Node 2: RPC (9934), WS (9945), P2P (30334)
- Node 3: RPC (9935), WS (9946), P2P (30335)
1. Ensure SSH access to the VM is configured.
2. Run the deployment script:
./deploy.sh vm <VM_IP> <NODE_DIR>
Replace:
- <VM_IP> with the IP address of the virtual machine.
- <NODE_DIR> with the path to the node configuration (e.g., vm/node1).
3. Verify the node is running on the VM:
ssh user@<VM_IP> docker ps
1. Modify the Dockerfile to include your own binary or configuration files.
2. Update the docker-compose.yml or VM-specific configuration to reflect custom changes.
docker-compose down
ssh user@<VM_IP> docker stop <container_id> && docker rm <container_id>
1. Check logs using docker logs <container_name>.
- Port conflicts:
2.Modify ports in docker-compose.yml or VM configuration to avoid conflicts.
- Deployment script errors:
Ensure the VM has Docker installed and the user has sufficient permissions.