Deployment Guide
Eden Deployment Guide
This document outlines the steps required to deploy Eden in your preferred environment, including AWS, Google Cloud Platform (GCP), Microsoft Azure, and on-premise installations.
Table of ContentsCopied!
Deployment OptionsCopied!
Eden can be deployed using one of the following methods:
-
Kubernetes Deployment - Recommended for production environments
-
Docker Compose Deployment - Suitable for development, testing, or smaller deployments
-
Custom Docker Deployment - For environments with specialized requirements
Choose the option that best fits your infrastructure and requirements.
PrerequisitesCopied!
Common Requirements
-
Docker installed
-
Access credentials to our private repository
-
Image pull secrets configured (for Kubernetes deployments)
Cloud-Specific Requirements
-
AWS: Amazon EKS cluster (for Kubernetes deployment)
-
GCP: Google Kubernetes Engine (GKE) cluster (for Kubernetes deployment)
-
Azure: Azure Kubernetes Service (AKS) cluster (for Kubernetes deployment)
-
On-Premise: Kubernetes cluster or Docker environment
Environment SetupCopied!
AWS (EKS)
# Install AWS CLI if not already installed
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip && sudo ./aws/install
# Configure AWS CLI
aws configure
# Install eksctl if not already installed
curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/eksctl /usr/local/bin
# Create EKS cluster (if not already created)
eksctl create cluster --name eden-cluster --region us-west-2 --nodes 2
GCP (GKE)
# Install Google Cloud SDK if not already installed
curl https://sdk.cloud.google.com | bash
exec -l $SHELL
gcloud init
# Create GKE cluster (if not already created)
gcloud container clusters create eden-cluster --zone us-central1-a --num-nodes=2
gcloud container clusters get-credentials eden-cluster --zone us-central1-a
Azure (AKS)
# Install Azure CLI if not already installed
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
az login
# Create AKS cluster (if not already created)
az group create --name eden-resource-group --location eastus
az aks create --resource-group eden-resource-group --name eden-cluster --node-count 2
az aks get-credentials --resource-group eden-resource-group --name eden-cluster
On-Premise
For on-premise deployment, ensure you have:
-
A Kubernetes cluster installed (e.g., using k3s, Rancher, or kubeadm)
-
A private registry or direct internet access to pull images
-
Load balancer or Ingress controller for external access
Option 1: Docker Build and Docker Compose DeploymentCopied!
This option is suitable for development environments, testing, or smaller production deployments.
Step 1: Access to Private Repository
Before deploying Eden, you'll need to obtain access to our private repository. Please contact your Eden account representative to receive:
-
Repository access credentials
-
Repository URL
-
Source code package or Git repository access
Step 2: Building Docker Images
There are two approaches to building the Docker images:
Option A: Use Pre-built Images from Our Private Repository
# Log in to the private repository
docker login <PRIVATE_REPO_URL> -u <YOUR_USERNAME> -p <YOUR_PASSWORD>
# Pull the pre-built images
docker pull <PRIVATE_REPO_URL>/eden-relay:latest
docker pull <PRIVATE_REPO_URL>/eden-engine:latest
docker pull <PRIVATE_REPO_URL>/eden-load-balancer:latest
docker pull <PRIVATE_REPO_URL>/eden-request-client:latest
Option B: Build Images from Source
If you have access to the source code:
# Clone the repository (if you have Git access)
git clone <REPOSITORY_URL>
cd eden
# Or unpack the source code package provided by your Eden representative
# tar -xzf eden-source.tar.gz
# cd eden
# Build the Docker images
docker build -t eden_engine --target engine .
docker build -t eden_relay_service --target relay_service .
docker build -t eden_load_balancer --target load_balancer .
docker build -t eden_request_client --target request_client .
Step 3: Configure Docker Compose
Create a docker-compose.yaml
file or use the template provided by your Eden representative. Here's a basic example:
x-service-logging: &service_logging
RUST_BACKTRACE: 1
RUST_LOG: info
services:
redis:
image: "redis"
ports:
- "6379:6379"
networks:
eden-network:
ipv4_address: 172.24.2.252
postgres:
image: "postgres:16"
ports:
- "5432:5432"
volumes:
- ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
eden-network:
ipv4_address: 172.24.2.249
environment:
POSTGRES_PASSWORD: <YOUR_SECURE_PASSWORD>
relay:
image: eden_relay_service
depends_on:
- redis
- engine
environment:
<<: *service_logging
RUST_MIN_STACK: 16000000
ENGINE_HOST: 172.24.2.2
RELAY_PORT: 8000
RELAY_ENGINE: 172.24.2.2:8001
REDIS_HOST: 172.24.2.252
POSTGRES_HOST: 172.24.2.249
POSTGRES_PASSWORD: <YOUR_SECURE_PASSWORD>
RELAY_JWT_SECRET: <YOUR_SECURE_JWT_SECRET>
ports:
- "8000:8000"
networks:
eden-network:
ipv4_address: 172.24.2.1
restart: unless-stopped
engine:
image: eden_engine
depends_on:
- redis
- postgres
environment:
<<: *service_logging
ENGINE_HOST: 0.0.0.0
ENGINE_PORT: 8001
ENGINE_DB_HOST: 172.24.2.252
ENGINE_DB_PORT: 6379
REDIS_HOST: 172.24.2.252
POSTGRES_HOST: 172.24.2.249
POSTGRES_PASSWORD: <YOUR_SECURE_PASSWORD>
RUST_BACKTRACE: full
ports:
- "8001:8001"
networks:
eden-network:
ipv4_address: 172.24.2.2
restart: unless-stopped
networks:
eden-network:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.24.2.0/24
gateway: 172.24.2.254
Step 4: Set Up Required Files and Directories
Create the necessary directory structure and files:
# Create postgres directory and initialization script
mkdir -p postgres
touch postgres/init.sql
# Add your database initialization script content to init.sql
echo "CREATE USER datadog WITH PASSWORD 'password';" > postgres/init.sql
echo "GRANT pg_monitor TO datadog;" >> postgres/init.sql
Step 5: Start the Services
Launch the Eden services using Docker Compose:
# Start all services
docker-compose up -d
# Check the service status
docker-compose ps
# View logs
docker-compose logs -f
Step 6: Verify Deployment
Ensure all services are running correctly:
# Check service status
docker-compose ps
# Test the relay service
curl http://localhost:8000/health
# View logs from a specific service
docker-compose logs relay
Option 2: Kubernetes DeploymentCopied!
This option is recommended for production environments across cloud providers or on-premise installations.
Step 1: Access to Private Repository
Before deploying Eden, you'll need to obtain access to our private repository:
# Log in to the private repository
docker login <PRIVATE_REPO_URL> -u <YOUR_USERNAME> -p <YOUR_PASSWORD>
# Create a Kubernetes secret for pulling images
kubectl create secret docker-registry eden-registry-cred \
--docker-server=<PRIVATE_REPO_URL> \
--docker-username=<YOUR_USERNAME> \
--docker-password=<YOUR_PASSWORD> \
--docker-email=<YOUR_EMAIL>
Step 2: Configure Environment
AWS (EKS)
# Install AWS CLI if not already installed
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip && sudo ./aws/install
# Configure AWS CLI
aws configure
# Install eksctl if not already installed
curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/eksctl /usr/local/bin
# Create EKS cluster (if not already created)
eksctl create cluster --name eden-cluster --region us-west-2 --nodes 2
GCP (GKE)
# Install Google Cloud SDK if not already installed
curl https://sdk.cloud.google.com | bash
exec -l $SHELL
gcloud init
# Create GKE cluster (if not already created)
gcloud container clusters create eden-cluster --zone us-central1-a --num-nodes=2
gcloud container clusters get-credentials eden-cluster --zone us-central1-a
Azure (AKS)
# Install Azure CLI if not already installed
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
az login
# Create AKS cluster (if not already created)
az group create --name eden-resource-group --location eastus
az aks create --resource-group eden-resource-group --name eden-cluster --node-count 2
az aks get-credentials --resource-group eden-resource-group --name eden-cluster
On-Premise
For on-premise deployment, ensure you have a Kubernetes cluster installed (e.g., using k3s, Rancher, or kubeadm).
Step 3: Create Kubernetes Secrets
# Create secrets for database credentials
kubectl create secret generic db-credentials \
--from-literal=username=postgres \
--from-literal=password=<YOUR_SECURE_PASSWORD>
# Create secrets for JWT authentication
kubectl create secret generic jwt-secret \
--from-literal=jwt-secret=<YOUR_SECURE_JWT_SECRET>
Step 4: Deploy Redis and PostgreSQL
# Create Redis deployment
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
labels:
app: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: redis
ports:
- containerPort: 6379
---
apiVersion: v1
kind: Service
metadata:
name: redis
spec:
selector:
app: redis
ports:
- port: 6379
targetPort: 6379
EOF
# Create PostgreSQL deployment
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres
labels:
app: postgres
spec:
replicas: 1
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
containers:
- name: postgres
image: postgres:16
ports:
- containerPort: 5432
env:
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: db-credentials
key: password
volumeMounts:
- name: init-script
mountPath: /docker-entrypoint-initdb.d
volumes:
- name: init-script
configMap:
name: postgres-init
---
apiVersion: v1
kind: Service
metadata:
name: postgres
spec:
selector:
app: postgres
ports:
- port: 5432
targetPort: 5432
EOF
# Create PostgreSQL initialization script
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
name: postgres-init
data:
init.sql: |
CREATE USER datadog WITH PASSWORD 'password';
GRANT pg_monitor TO datadog;
EOF
Step 5: Deploy Eden Components
Create deployment YAML files for the Engine and Relay services:
# Create Engine deployment
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: Deployment
metadata:
name: engine
labels:
app: engine
spec:
replicas: 1
selector:
matchLabels:
app: engine
template:
metadata:
labels:
app: engine
spec:
containers:
- name: engine
image: <PRIVATE_REPO_URL>/eden-engine:latest
ports:
- containerPort: 8001
env:
- name: ENGINE_HOST
value: "0.0.0.0"
- name: ENGINE_PORT
value: "8001"
- name: ENGINE_DB_HOST
value: "redis"
- name: ENGINE_DB_PORT
value: "6379"
- name: REDIS_HOST
value: "redis"
- name: POSTGRES_HOST
value: "postgres"
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: db-credentials
key: password
- name: RUST_BACKTRACE
value: "full"
- name: RUST_LOG
value: "info"
imagePullSecrets:
- name: eden-registry-cred
---
apiVersion: v1
kind: Service
metadata:
name: engine
spec:
selector:
app: engine
ports:
- port: 8001
targetPort: 8001
EOF
# Create Relay deployment
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: Deployment
metadata:
name: relay
labels:
app: relay
spec:
replicas: 1
selector:
matchLabels:
app: relay
template:
metadata:
labels:
app: relay
spec:
containers:
- name: relay
image: <PRIVATE_REPO_URL>/eden-relay:latest
ports:
- containerPort: 8000
env:
- name: RELAY_PORT
value: "8000"
- name: RELAY_ENGINE
value: "engine:8001"
- name: REDIS_HOST
value: "redis"
- name: POSTGRES_HOST
value: "postgres"
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: db-credentials
key: password
- name: RELAY_JWT_SECRET
valueFrom:
secretKeyRef:
name: jwt-secret
key: jwt-secret
- name: RUST_MIN_STACK
value: "16000000"
- name: RUST_LOG
value: "info"
imagePullSecrets:
- name: eden-registry-cred
---
apiVersion: v1
kind: Service
metadata:
name: relay
spec:
selector:
app: relay
ports:
- port: 8000
targetPort: 8000
EOF
Step 6: Expose Services
Configure external access based on your environment:
For AWS (EKS), GCP (GKE), or Azure (AKS)
# Create a LoadBalancer service
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Service
metadata:
name: eden-lb
spec:
type: LoadBalancer
selector:
app: relay
ports:
- port: 80
targetPort: 8000
EOF
# Get the external IP or hostname
kubectl get service eden-lb
For On-Premise
# Create a NodePort service
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Service
metadata:
name: eden-nodeport
spec:
type: NodePort
selector:
app: relay
ports:
- port: 8000
targetPort: 8000
nodePort: 30080
EOF
# Access via <NODE_IP>:30080
kubectl get nodes -o wide
Option 3: Building from Source with DockerfileCopied!
For customers who need to customize the Eden components or want to build the images themselves, this option provides step-by-step instructions.
Step 1: Access Source Code
Obtain the source code from your Eden account representative. You will receive:
-
Source code package or Git repository access
-
Build instructions and dependencies
Step 2: Prepare the Build Environment
# Create a directory for the build
mkdir -p eden-build
cd eden-build
# Unpack the source code
tar -xzf eden-source.tar.gz
# OR clone the repository
# git clone <REPOSITORY_URL>
Step 3: Review and Customize the Dockerfile
The Dockerfile should look similar to this:
# If there are problems compiling, make sure to run "docker pull rust"
# Rust 1.81 is the minimal version needed to build this image
FROM rust AS build
RUN apt-get update && apt-get -y install protobuf-compiler cmake
# Create project structure and build the images
# ... [directory setup and cargo commands] ...
# Build for release
RUN cargo build --release --bin=engine --package=engine --no-default-features --features full
RUN cargo build --release --bin=relay-service --package=relay-service --no-default-features --features full
RUN cargo build --release --bin=load-balancer --package=load-balancer
RUN cargo build --release --bin=request-client --package=request-client
# Create optimized images
FROM rust:slim AS engine
COPY --from=build /eden/target/release/engine ./engine
COPY --from=build /eden/communication/tls /eden/communication/tls
EXPOSE 8001
ENTRYPOINT ["./engine"]
FROM rust:slim AS relay_service
COPY --from=build /eden/target/release/relay-service ./relay-service
COPY --from=build /eden/communication/tls /eden/communication/tls
EXPOSE 8000
ENTRYPOINT ["./relay-service"]
FROM rust:slim AS load_balancer
COPY --from=build /eden/target/release/load-balancer ./load-balancer
EXPOSE 7998-7999
ENTRYPOINT ["./load-balancer"]
FROM rust:slim AS request_client
COPY --from=build /eden/target/release/request-client ./request-client
EXPOSE 7999
ENTRYPOINT ["./request-client"]
You can customize this Dockerfile to fit your requirements, such as adding environment-specific configurations or security patches.
Step 4: Build the Docker Images
# Build all images
docker build -t eden_engine --target engine .
docker build -t eden_relay_service --target relay_service .
docker build -t eden_load_balancer --target load_balancer .
docker build -t eden_request_client --target request_client .
# Verify the images were created
docker images | grep eden_
Step 5: Tag and Push to Your Registry (Optional)
If you want to use the images in a Kubernetes cluster or share them across multiple servers:
# Tag the images
docker tag eden_engine <YOUR_REGISTRY>/eden_engine:latest
docker tag eden_relay_service <YOUR_REGISTRY>/eden_relay_service:latest
docker tag eden_load_balancer <YOUR_REGISTRY>/eden_load_balancer:latest
docker tag eden_request_client <YOUR_REGISTRY>/eden_request_client:latest
# Push to your registry
docker push <YOUR_REGISTRY>/eden_engine:latest
docker push <YOUR_REGISTRY>/eden_relay_service:latest
docker push <YOUR_REGISTRY>/eden_load_balancer:latest
docker push <YOUR_REGISTRY>/eden_request_client:latest
Step 6: Deploy Using Docker Compose or Kubernetes
After building the images, you can deploy them using either Option 1 (Docker Compose) or Option 2 (Kubernetes) from this guide, depending on your environment requirements.
Step 5: Configure and Apply Deployment FilesCopied!
Download the deployment YAML templates provided by your Eden representative.
Update the deployment YAML files with your environment-specific configuration:
# Edit the relay deployment configuration
vi kubernetes/relay-deployment.yaml
# Make sure to add the image pull secret to the deployment
# Add this under spec.template.spec:
# imagePullSecrets:
# - name: eden-registry-cred
# Edit the engine deployment configuration
vi kubernetes/engine-deployment.yaml
# Also add the image pull secret here
Ensure image paths in the deployment files point to your private repository:
# Example - change this:
image: public.ecr.aws/o0d1e1m7/eden-relay:latest
# To this:
image: <PRIVATE_REPO_URL>/eden-relay:latest
Apply the deployment files:
kubectl apply -f kubernetes/relay-deployment.yaml
kubectl apply -f kubernetes/engine-deployment.yaml
Step 6: Configure External AccessCopied!
AWS (EKS)
# Create an AWS Load Balancer
kubectl apply -f kubernetes/aws-lb-service.yaml
# Get the external IP/hostname
kubectl get service eden-lb
GCP (GKE)
# Create a GCP Load Balancer
kubectl apply -f kubernetes/gcp-lb-service.yaml
# Get the external IP
kubectl get service eden-lb
Azure (AKS)
# Create an Azure Load Balancer
kubectl apply -f kubernetes/azure-lb-service.yaml
# Get the external IP
kubectl get service eden-lb
On-Premise
For on-premise deployments, choose one of these options:
Option 1: NodePort
# Apply NodePort service configuration
kubectl apply -f kubernetes/nodeport-service.yaml
# Access via <NODE_IP>:<NODE_PORT>
kubectl get service eden-nodeport
Option 2: Install Ingress Controller (e.g., NGINX)
# Install NGINX Ingress Controller
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.0/deploy/static/provider/baremetal/deploy.yaml
# Apply Ingress resource
kubectl apply -f kubernetes/eden-ingress.yaml
Step 7: Verify DeploymentCopied!
Check if all pods are running correctly:
kubectl get pods
kubectl get services
TroubleshootingCopied!
Common Issues
Image Pull Errors
If you see ImagePullBackOff
or ErrImagePull
errors:
# Check if the pod has image pull errors
kubectl describe pod <pod-name>
# Verify your image pull secret is correct
kubectl get secret eden-registry-cred -o yaml
# Recreate the image pull secret if needed
kubectl delete secret eden-registry-cred
kubectl create secret docker-registry eden-registry-cred \
--docker-server=<PRIVATE_REPO_URL> \
--docker-username=<YOUR_USERNAME> \
--docker-password=<YOUR_PASSWORD> \
--docker-email=<YOUR_EMAIL>
Permission Issues
If you encounter permission issues with Kubernetes:
# Check if your current user/service account has sufficient permissions
kubectl auth can-i create deployments
kubectl auth can-i create services
Network Connectivity Issues
For issues with pod-to-pod communication:
# Check if pods can communicate
kubectl run test-network --rm -it --image=busybox -- ping <service-name>
# Check if services are properly defined
kubectl get services
Environment-Specific Issues
AWS EKS
# Check EKS cluster status
aws eks describe-cluster --name eden-cluster --region us-west-2
# Check node status
kubectl get nodes
GCP GKE
# Check GKE cluster status
gcloud container clusters describe eden-cluster --zone us-central1-a
# Check firewall rules
gcloud compute firewall-rules list | grep eden
Azure AKS
# Check AKS cluster status
az aks show --resource-group eden-resource-group --name eden-cluster
# Check AKS service principal/managed identity
az aks show --resource-group eden-resource-group --name eden-cluster --query servicePrincipalProfile
On-Premise
# Check node status and readiness
kubectl describe nodes
# Verify storage provisioners are working
kubectl get storageclass
If you need further assistance, please contact our support team at support@example.com with the following information:
-
Environment details
-
Error messages
-
Pod logs
-
Kubernetes events (
kubectl get events
)
Advanced ConfigurationsCopied!
Adding Datadog Monitoring
Eden can be configured to work with Datadog for monitoring and observability. Below is an example configuration for Docker Compose:
services:
# ... other services ...
dd-agent:
cgroup: host
pid: host
image: datadog/agent
environment:
DD_SITE: datadoghq.com
DD_OTLP_CONFIG_RECEIVER_PROTOCOLS_GRPC_ENDPOINT: 0.0.0.0:4317
env_file:
- ./datadog-api-key
ports:
- "4317:4317"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/proc/:/host/proc/:ro"
- "/sys/fs/cgroup/:/host/sys/fs/cgroup:ro"
networks:
eden-network:
ipv4_address: 172.24.2.248
labels:
- com.datadoghq.ad.check_names=["postgres", "redis"]
- com.datadoghq.ad.init_configs=[{}, {}]
- com.datadoghq.ad.instances=[{"host":"172.24.2.249", "port":5432,"username":"datadog","password":"password"}, {"host":"172.24.2.252", "port":6379}]
To use Datadog monitoring:
-
Create a file named
datadog-api-key
with your Datadog API key:DD_API_KEY=<YOUR_DATADOG_API_KEY>
-
Update your Eden services to use the Datadog OTLP collector:
environment: # ... other environment variables ... RELAY_OTLP_COLLECTOR: http://172.24.2.248:4317 ENGINE_OTLP_COLLECTOR: http://172.24.2.248:4317
Configuring Load Balancer for SSL/TLS
For production deployments, it's recommended to configure SSL/TLS:
services:
load-balancer:
image: eden_load_balancer
depends_on:
- relay
environment:
EDEN_LB_RELAY: 172.24.2.1:8000
EDEN_LB_OTLP_COLLECTOR: http://172.24.2.248:4317
RUST_BACKTRACE: full
ports:
- "7999:7999"
- "7998:7998"
volumes:
- ./load_balancer/certs:/eden/load_balancer/certs
networks:
eden-network:
ipv4_address: 172.24.2.247
To set up SSL/TLS:
-
Create a directory for certificates:
mkdir -p load_balancer/certs
-
Place your SSL/TLS certificates in this directory:
load_balancer/certs/server.crt load_balancer/certs/server.key
High Availability Configuration
For production environments, consider these high availability settings:
Kubernetes HA Configuration
spec:
replicas: 3 # Multiple replicas for redundancy
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 1
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- eden-relay # or eden-engine
topologyKey: "kubernetes.io/hostname"
Docker Swarm HA Configuration
version: '3.8'
services:
relay:
# ... other configuration ...
deploy:
replicas: 3
update_config:
parallelism: 1
delay: 10s
restart_policy:
condition: on-failure
Environment Variables Reference (continued)
Load Balancer Service
Variable |
Description |
Default |
---|---|---|
EDEN_LB_RELAY |
Relay service address |
relay:8000 |
EDEN_LB_OTLP_COLLECTOR |
OTLP collector URL for telemetry |
|
RUST_BACKTRACE |
Rust backtrace level |
1 |
RUST_LOG |
Logging level |
info |
Database Configuration
PostgreSQL
The Eden system uses PostgreSQL for persistent storage. Here are some recommended configurations:
-- Example PostgreSQL initialization script
CREATE USER eden WITH PASSWORD '<secure_password>';
GRANT ALL PRIVILEGES ON DATABASE eden TO eden;
-- For monitoring (optional)
CREATE USER datadog WITH PASSWORD '<monitor_password>';
GRANT pg_monitor TO datadog;
-- Performance tuning for production
ALTER SYSTEM SET max_connections = '100';
ALTER SYSTEM SET shared_buffers = '1GB';
ALTER SYSTEM SET effective_cache_size = '3GB';
ALTER SYSTEM SET work_mem = '32MB';
ALTER SYSTEM SET maintenance_work_mem = '256MB';
ALTER SYSTEM SET random_page_cost = '1.1';
ALTER SYSTEM SET effective_io_concurrency = '200';
ALTER SYSTEM SET wal_buffers = '16MB';
ALTER SYSTEM SET min_wal_size = '1GB';
ALTER SYSTEM SET max_wal_size = '4GB';
ALTER SYSTEM SET checkpoint_completion_target = '0.9';
ALTER SYSTEM SET default_statistics_target = '100';
Redis
Redis is used for caching and temporary storage:
# Example Redis configuration
maxmemory 2gb
maxmemory-policy allkeys-lru
appendonly yes
appendfsync everysec
Scaling Configurations
For larger deployments, consider these scaling parameters:
# Engine service scaling parameters
environment:
ENGINE_MAX_CONNECTIONS: 1000
ENGINE_WORKER_THREADS: 8
ENGINE_MAX_CONCURRENT_TASKS: 32
# Relay service scaling parameters
environment:
RELAY_MAX_CONNECTIONS: 5000
RELAY_WORKER_THREADS: 16
RELAY_CONNECTION_TIMEOUT_SEC: 60
MaintenanceCopied!
Backup and Restore
PostgreSQL Backup
# Create a backup
pg_dump -h postgres -U postgres -d eden > eden_backup_$(date +%Y%m%d).sql
# In Kubernetes
kubectl exec -it $(kubectl get pods -l app=postgres -o jsonpath="{.items[0].metadata.name}") -- \
pg_dump -U postgres -d eden > eden_backup_$(date +%Y%m%d).sql
PostgreSQL Restore
# Restore from backup
psql -h postgres -U postgres -d eden < eden_backup_20250101.sql
# In Kubernetes
kubectl exec -it $(kubectl get pods -l app=postgres -o jsonpath="{.items[0].metadata.name}") -- \
psql -U postgres -d eden < eden_backup_20250101.sql
Redis Backup
# Create a backup
redis-cli -h redis SAVE
# In Kubernetes
kubectl exec -it $(kubectl get pods -l app=redis -o jsonpath="{.items[0].metadata.name}") -- \
redis-cli SAVE
Updating Eden Components
Docker Compose Updates
# Pull new images
docker pull <PRIVATE_REPO_URL>/eden-relay:latest
docker pull <PRIVATE_REPO_URL>/eden-engine:latest
# Restart services
docker-compose down
docker-compose up -d
Kubernetes Updates
# Update image references
kubectl set image deployment/relay relay=<PRIVATE_REPO_URL>/eden-relay:new-version
kubectl set image deployment/engine engine=<PRIVATE_REPO_URL>/eden-engine:new-version
# Or perform a rolling restart
kubectl rollout restart deployment relay
kubectl rollout restart deployment engine
# Monitor the rollout
kubectl rollout status deployment relay
kubectl rollout status deployment engine
Health Checks and Monitoring
Basic Health Check
# Check relay service
curl http://<relay-service-address>:8000/health
# Check engine service
curl http://<engine-service-address>:8001/health
Integration with Monitoring Systems
Eden components expose the following monitoring endpoints:
-
Prometheus Metrics:
http://<service-address>:<port>/metrics
-
Health Check:
http://<service-address>:<port>/health
-
OTLP Telemetry: Sent to the configured OTLP collector
TroubleshootingCopied!
Common Issues and Solutions
Connection Issues Between Components
Symptom: Relay service cannot connect to the engine service
Solution:
-
Verify network connectivity:
# In Docker Composedocker-compose exec relay ping engine# In Kuberneteskubectl exec -it $(kubectl get pods -l app=relay -o jsonpath="{.items[0].metadata.name}") -- \ curl -v http://engine:8001/health
-
Check environment variables:
# Verify RELAY_ENGINE settingdocker-compose exec relay env | grep RELAY_ENGINE# In Kuberneteskubectl describe pod $(kubectl get pods -l app=relay -o jsonpath="{.items[0].metadata.name}")
Database Connection Issues
Symptom: Services cannot connect to PostgreSQL or Redis
Solution:
-
Check database credentials:
# Test PostgreSQL connectionPGPASSWORD=<password> psql -h <postgres-host> -U postgres -c "SELECT 1"# Test Redis connectionredis-cli -h <redis-host> PING
-
Verify environment variables:
# Check PostgreSQL and Redis settingsdocker-compose exec relay env | grep -E "POSTGRES|REDIS"
Performance Issues
Symptom: Slow response times or high CPU/memory usage
Solution:
-
Check resource usage:
# In Dockerdocker stats# In Kuberneteskubectl top pods
-
Increase resources:
# Kubernetes exampleresources: requests: memory: "2Gi" cpu: "1" limits: memory: "4Gi" cpu: "2"
-
Enable performance logging:
environment: RUST_LOG: "info,eden_core=debug"
Log Analysis
Viewing Logs
# Docker Compose
docker-compose logs -f relay
# Kubernetes
kubectl logs -f $(kubectl get pods -l app=relay -o jsonpath="{.items[0].metadata.name}")
Common Error Messages
Error Message |
Possible Cause |
Solution |
---|---|---|
|
Service is down or unreachable |
Check service status and networking |
|
Incorrect database credentials |
Verify username/password in environment variables |
|
Database overloaded or unreachable |
Check database status and connectivity |
|
Incorrect JWT secret |
Verify RELAY_JWT_SECRET matches across services |
|
Insufficient resources |
Increase memory allocation |
Getting Support
If you encounter issues that cannot be resolved using this guide, please contact our support team:
-
Email: support@example.com
-
Support Portal: https://support.example.com
-
Documentation: https://docs.example.com/eden
When contacting support, please include:
-
Deployment environment details
-
Error messages and logs
-
Steps to reproduce the issue
-
Recent changes to your configurationredDuringSchedulingIgnoredDuringExecution:
-
weight: 100 podAffinityTerm: labelSelector: matchExpressions: - key: app operator: In values: - eden-relay # or eden-engine topologyKey: "kubernetes.io/hostname"
-
### Resource Requirements
The following are recommended minimum resource requirements for each component:
#### Eden Relay
- CPU: 2 cores
- Memory: 4Gi
- Storage: 20Gi
#### Eden Engine
- CPU: 4 cores
- Memory: 8Gi
- Storage: 50Gi
#### Redis
- CPU: 1 core
- Memory: 2Gi
- Storage: 10Gi
#### PostgreSQL
- CPU: 2 cores
- Memory: 4Gi
- Storage: 100Gi
For detailed performance tuning and advanced configuration options, please refer to our extended documentation or contact your Eden representative for personalized guidance.