2025-06-26 11:48:33 +00:00
# DataHaven Deployment
2025-10-06 16:12:55 +00:00
This directory contains Helm charts and configurations for deploying DataHaven nodes and relayers to Kubernetes clusters across various environments (local development, staging, production).
2025-06-26 11:48:33 +00:00
## Directory Structure
```
deploy/
├── charts/ # Helm charts
│ ├── node/ # Node chart
│ │ └── datahaven/ # DataHaven-specific node configurations
│ │ ├── dh-bootnode.yaml
│ │ └── dh-validator.yaml
│ └── relay/ # Relay chart
│ └── snowbridge/ # Snowbridge-specific relay configurations
│ ├── dh-beacon-relay.yaml # Beacon chain relay
│ ├── dh-beefy-relay.yaml # BEEFY consensus relay
│ └── dh-execution-relay.yaml # Execution layer relay
├── environments/ # Environment-specific configurations
│ ├── local/ # Local development environment
│ │ └── values.yaml
│ ├── stagenet/ # Staging environment
│ └── values.yaml
└── scripts/ # Deployment scripts
```
## Prerequisites
- Kubernetes cluster
- kubectl configured
- Helm 3.x installed
## Deployment
feat: ✨ Enhanced Helm deployment with ingress management and solochain support (#115)
This PR enhances the Helm-based deployment system with several key
improvements organized into the following areas:
## New Features
### Ingress Management
- **Ingress per replica**: Added `ingress-per-replica` chart template
that automatically generates an ingress for each node replica, exposing
individual pod instances
- **Traefik integration**: Added chart values to deploy Traefik as the
ingress controller for local K8s clusters, enabling proper ingress
testing (requires adding names to `/etc/hosts`)
### Solochain Support
- **New relay chart**: Added dedicated Helm chart for Solochain relay
deployment
- **CLI integration**: Updated DataHaven CLI to deploy both Execution
and Solochain relayers
## Configuration Improvements
### Environment Structure
- **Modular configs**: Refactored environmental configurations from
single `values.yaml` files into separate component-specific overrides
for better organization
### Node Configuration
- **Base config updates**: Improved base configurations for bootnode and
validator nodes
- **Network protocol**: Reverted from litep2p back to libp2p to resolve
node communication issues on Stagenet
- **Archive node routing**: In Stagenet, relayers now connect to the
bootnode (configured as archive node) instead of validator nodes
## Storage & Deployment
### Persistent Storage
- **Relayer database**: Added support for persistent volumes to store
relayer databases instead of using ephemeral storage
### Deployment Scripts
- **Documentation cleanup**: Removed obsolete test deploy.sh script and
updated the deployment README with clearer instructions
These changes provide a more robust, scalable, and maintainable
deployment system for DataHaven infrastructure.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added support for deploying new relayer types: Solochain and Execution
relayers, with dedicated configuration and secret management.
* Introduced per-replica ingress configuration for node deployments,
allowing each replica to have its own ingress resource and hostname.
* Added persistent storage options for relay data, configurable via
storage path, class, and size.
* Added new deployment configuration files for local and stagenet
environments, including Traefik ingress controller setup.
* Introduced a new relay category, "Solochain Relayers," for standalone
chain operations and cross-chain communication.
* **Improvements**
* Updated deployment configurations to use container-specific
environment YAML files for more granular control.
* Enhanced relay and node configurations with new flags and backend
options, including dynamic peer ID generation and automatic bootnode
discovery.
* Updated relayer endpoints to consistently use the bootnode for
connections.
* Refined relay configuration files for improved structure, clarity, and
endpoint management.
* **Bug Fixes**
* Corrected deployment logic to reference the correct
environment-specific configuration files during Helm deployments.
* **Documentation**
* Simplified and updated deployment documentation to focus on CLI-based
deployment, removing outdated manual instructions and adding a concise
overview of components and relayer types.
* **Chores**
* Removed deprecated deployment scripts and outdated configuration files
to streamline the deployment process.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
2025-08-11 11:30:01 +00:00
The recommended way to deploy is using the DataHaven CLI with the deploy command:
2025-06-26 11:48:33 +00:00
```bash
feat: ✨ Enhanced Helm deployment with ingress management and solochain support (#115)
This PR enhances the Helm-based deployment system with several key
improvements organized into the following areas:
## New Features
### Ingress Management
- **Ingress per replica**: Added `ingress-per-replica` chart template
that automatically generates an ingress for each node replica, exposing
individual pod instances
- **Traefik integration**: Added chart values to deploy Traefik as the
ingress controller for local K8s clusters, enabling proper ingress
testing (requires adding names to `/etc/hosts`)
### Solochain Support
- **New relay chart**: Added dedicated Helm chart for Solochain relay
deployment
- **CLI integration**: Updated DataHaven CLI to deploy both Execution
and Solochain relayers
## Configuration Improvements
### Environment Structure
- **Modular configs**: Refactored environmental configurations from
single `values.yaml` files into separate component-specific overrides
for better organization
### Node Configuration
- **Base config updates**: Improved base configurations for bootnode and
validator nodes
- **Network protocol**: Reverted from litep2p back to libp2p to resolve
node communication issues on Stagenet
- **Archive node routing**: In Stagenet, relayers now connect to the
bootnode (configured as archive node) instead of validator nodes
## Storage & Deployment
### Persistent Storage
- **Relayer database**: Added support for persistent volumes to store
relayer databases instead of using ephemeral storage
### Deployment Scripts
- **Documentation cleanup**: Removed obsolete test deploy.sh script and
updated the deployment README with clearer instructions
These changes provide a more robust, scalable, and maintainable
deployment system for DataHaven infrastructure.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added support for deploying new relayer types: Solochain and Execution
relayers, with dedicated configuration and secret management.
* Introduced per-replica ingress configuration for node deployments,
allowing each replica to have its own ingress resource and hostname.
* Added persistent storage options for relay data, configurable via
storage path, class, and size.
* Added new deployment configuration files for local and stagenet
environments, including Traefik ingress controller setup.
* Introduced a new relay category, "Solochain Relayers," for standalone
chain operations and cross-chain communication.
* **Improvements**
* Updated deployment configurations to use container-specific
environment YAML files for more granular control.
* Enhanced relay and node configurations with new flags and backend
options, including dynamic peer ID generation and automatic bootnode
discovery.
* Updated relayer endpoints to consistently use the bootnode for
connections.
* Refined relay configuration files for improved structure, clarity, and
endpoint management.
* **Bug Fixes**
* Corrected deployment logic to reference the correct
environment-specific configuration files during Helm deployments.
* **Documentation**
* Simplified and updated deployment documentation to focus on CLI-based
deployment, removing outdated manual instructions and adding a concise
overview of components and relayer types.
* **Chores**
* Removed deprecated deployment scripts and outdated configuration files
to streamline the deployment process.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
2025-08-11 11:30:01 +00:00
cd test & & bun cli deploy --e < environment >
2025-06-26 11:48:33 +00:00
```
Example:
```bash
feat: ✨ Enhanced Helm deployment with ingress management and solochain support (#115)
This PR enhances the Helm-based deployment system with several key
improvements organized into the following areas:
## New Features
### Ingress Management
- **Ingress per replica**: Added `ingress-per-replica` chart template
that automatically generates an ingress for each node replica, exposing
individual pod instances
- **Traefik integration**: Added chart values to deploy Traefik as the
ingress controller for local K8s clusters, enabling proper ingress
testing (requires adding names to `/etc/hosts`)
### Solochain Support
- **New relay chart**: Added dedicated Helm chart for Solochain relay
deployment
- **CLI integration**: Updated DataHaven CLI to deploy both Execution
and Solochain relayers
## Configuration Improvements
### Environment Structure
- **Modular configs**: Refactored environmental configurations from
single `values.yaml` files into separate component-specific overrides
for better organization
### Node Configuration
- **Base config updates**: Improved base configurations for bootnode and
validator nodes
- **Network protocol**: Reverted from litep2p back to libp2p to resolve
node communication issues on Stagenet
- **Archive node routing**: In Stagenet, relayers now connect to the
bootnode (configured as archive node) instead of validator nodes
## Storage & Deployment
### Persistent Storage
- **Relayer database**: Added support for persistent volumes to store
relayer databases instead of using ephemeral storage
### Deployment Scripts
- **Documentation cleanup**: Removed obsolete test deploy.sh script and
updated the deployment README with clearer instructions
These changes provide a more robust, scalable, and maintainable
deployment system for DataHaven infrastructure.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added support for deploying new relayer types: Solochain and Execution
relayers, with dedicated configuration and secret management.
* Introduced per-replica ingress configuration for node deployments,
allowing each replica to have its own ingress resource and hostname.
* Added persistent storage options for relay data, configurable via
storage path, class, and size.
* Added new deployment configuration files for local and stagenet
environments, including Traefik ingress controller setup.
* Introduced a new relay category, "Solochain Relayers," for standalone
chain operations and cross-chain communication.
* **Improvements**
* Updated deployment configurations to use container-specific
environment YAML files for more granular control.
* Enhanced relay and node configurations with new flags and backend
options, including dynamic peer ID generation and automatic bootnode
discovery.
* Updated relayer endpoints to consistently use the bootnode for
connections.
* Refined relay configuration files for improved structure, clarity, and
endpoint management.
* **Bug Fixes**
* Corrected deployment logic to reference the correct
environment-specific configuration files during Helm deployments.
* **Documentation**
* Simplified and updated deployment documentation to focus on CLI-based
deployment, removing outdated manual instructions and adding a concise
overview of components and relayer types.
* **Chores**
* Removed deprecated deployment scripts and outdated configuration files
to streamline the deployment process.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
2025-08-11 11:30:01 +00:00
cd test & & bun cli deploy --e local
2025-06-26 11:48:33 +00:00
```
Available environments:
- `local` : Local development environment (minimal resources)
- `stagenet` : Staging environment for pre-release testing
## Environment Details
### Local
2025-10-06 16:12:55 +00:00
- **Purpose**: Local development and testing
- **Replicas**: 1 (bootnode + validator)
- **Resources**: Minimal (256Mi memory, 100m CPU)
- **Image**: Local Docker builds (`datahavenxyz/datahaven:local`)
- **Storage**: Small persistence (1-5Gi)
- **Network**: Single-node network with fast block times
2025-06-26 11:48:33 +00:00
### Stagenet
2025-10-06 16:12:55 +00:00
- **Purpose**: Pre-production testing and staging
- **Replicas**: 2+ validators
- **Resources**: Medium (512Mi memory, 200m CPU)
- **Image**: Stagenet tags from DockerHub
- **Storage**: 20Gi+ persistent volumes
- **Network**: Multi-validator network simulating production
2025-06-26 11:48:33 +00:00
## Configuration Structure
The configuration is organized in layers, with later layers overriding earlier ones:
1. Base Configurations (`charts/node/datahaven/`):
- Base configurations for DataHaven nodes
- Default values for bootnode and validator
2. Environment-Specific Configurations (`environments/< env > /values.yaml`):
- Environment-specific settings
- Resource configurations
- Image tags
- Replica counts
- Storage configurations
The deployment process:
1. Loads base configurations from the respective chart directories
2. Applies environment-specific overrides from `environments/<env>/values.yaml`
3. Deploys the components with the merged configuration
## Components
### Nodes
- **Bootnode**: Entry point for the network
- **Validator**: Validates transactions and produces blocks
2025-10-06 16:12:55 +00:00
### Relays (Snowbridge)
- **Beacon Relay**: Relays Ethereum beacon chain finality to DataHaven
- **BEEFY Relay**: Relays DataHaven BEEFY finality proofs to Ethereum
- **Execution Relay**: Relays Ethereum execution layer messages to DataHaven
- **Solochain Relayers**: Relays DataHaven chain operations to the DataHaven AVS
These relayers enable trustless bidirectional token and message passing between Ethereum and DataHaven.
## Development Workflow
1. **Local Testing** :
```bash
cd test
bun cli launch # Starts local network without K8s
```
2. **K8s Deployment** :
```bash
cd test
bun cli deploy --e local
```
3. **Building Local Images** :
```bash
cd test
bun build:docker:operator # Builds datahavenxyz/datahaven:local
```
4. **Updating Configurations** :
- Modify `environments/<env>/values.yaml` for environment-specific changes
- Modify chart templates in `charts/` for structural changes
- Redeploy with `bun cli deploy --e <env>`
## Troubleshooting
- **Pods not starting**: Check logs with `kubectl logs <pod-name>`
- **Image pull failures**: Verify Docker registry access and image tags
- **Persistent volume issues**: Ensure storage class is available with `kubectl get sc`
- **Network connectivity**: Check service endpoints with `kubectl get svc`
For more detailed deployment and testing workflows, see the [test directory ](../test/README.md ).