Skip to main content
Version: Next

Advanced Configuration

This guide covers advanced features and configuration options for Merobox.

Overview

Merobox provides several advanced configuration options organized into specialized areas:

Quick Reference

Common Configuration Patterns

# Basic workflow configuration
nodes:
count: 3
image: ghcr.io/calimero-network/merod:latest
chain_id: testnet-1
prefix: calimero-node

CLI Configuration

# Core configuration
merobox run --count 3 --image ghcr.io/calimero-network/merod:edge

# Network settings
merobox run --count 3 --base-port 3000 --base-rpc-port 4000

Configuration Best Practices

1. Environment-Specific Configuration

Use different configurations for different environments:

# Development
development:
nodes:
count: 2
image: ghcr.io/calimero-network/merod:edge

# Production
production:
nodes:
count: 5
image: ghcr.io/calimero-network/merod:latest

2. Resource Planning

Plan resources based on your workload:

  • CPU: 0.5-2.0 cores per node depending on workload
  • Memory: 1-4GB per node for typical applications
  • Storage: 10-100GB depending on data requirements
  • Network: Consider bandwidth and latency requirements

3. Security Considerations

Implement security best practices:

  • Use non-root users
  • Enable read-only filesystems where possible
  • Drop unnecessary capabilities
  • Implement network segmentation
  • Use secrets management
  • Enable audit logging

4. Monitoring and Observability

Set up basic monitoring:

# Basic monitoring
monitoring:
enabled: true
metrics:
- cpu_usage
- memory_usage
- disk_usage
- network_io

Troubleshooting Advanced Issues

Debug Mode

Enable comprehensive debugging:

# Enable debug logging
export LOG_LEVEL=DEBUG

# Run with verbose output
merobox bootstrap run workflow.yml --verbose

# Enable Docker debug
export DOCKER_BUILDKIT=0
export DOCKER_CLI_EXPERIMENTAL=enabled

Performance Profiling

Profile Merobox performance:

# Monitor resource usage
docker stats $(docker ps -q --filter "name=calimero-")

# Analyze logs
merobox logs calimero-node-1 | grep -E "(ERROR|WARN|PERF)"

Network Diagnostics

Diagnose network issues:

# Check Docker networks
docker network ls
docker network inspect calimero-web

# Test connectivity
docker exec calimero-node-1 ping calimero-node-2

# Check port binding
netstat -tulpn | grep -E "(2428|2528)"

Best Practices for Advanced Usage

Production Deployment

  1. Resource Planning: Allocate appropriate resources for your workload
  2. Security: Implement proper security measures and access controls
  3. Monitoring: Set up comprehensive monitoring and alerting
  4. Backup: Implement regular backup and recovery procedures
  5. Documentation: Maintain detailed documentation of your configuration

Development Workflow

  1. Environment Isolation: Use separate environments for different stages
  2. Version Control: Track configuration changes in version control
  3. Testing: Implement comprehensive testing at all levels
  4. CI/CD Integration: Integrate Merobox into your CI/CD pipeline
  5. Code Review: Review configuration changes before deployment

Performance Optimization

  1. Resource Tuning: Optimize resource allocation based on usage patterns
  2. Caching: Implement appropriate caching strategies
  3. Parallelization: Use parallel execution where possible
  4. Monitoring: Continuously monitor and optimize performance
  5. Scaling: Implement auto-scaling based on demand

Next Steps

Now that you understand advanced configuration:

Was this page helpful?
Need some help? Check Support page