ObolNetwork / charon-k8s-distributed-validator-cluster

A set of Kubernetes manifests for deploying Distributed Validator Clusters.
3 stars 0 forks source link
charon kubernetes

Obol Logo

CharonxK8s

This repository contains Kubernetes manifests to deploy a charon cluster.

Please follow the following instructions to deploy a charon cluster to Kubernetes.

Prerequisites

Ensure having docker, a functional Kubernetes cluster and kubectl installed.

Deployment Steps

Cluster Configuration

cp ./envs/.env.sample ./envs/<cluster_name>.env

Edit the required configruation values in the .env file.

Generate Validators Keystores

# Enter required validator addresses
WITHDRAWAL_ADDR=<ENTER YOUR WITHDRAWAL ADDRESS HERE>
FEE_RECIPIENT_ADDR=<ENTER YOUR FEE RECIPIENT ADDRESS HERE>

# Create a distributed validator cluster
docker run --rm -v "$(pwd):/opt/charon" obolnetwork/charon:v1.0.0 create cluster --name="mycluster" --withdrawal-addresses="${WITHDRAWAL_ADDR}" --fee-recipient-addresses="${FEE_RECIPIENT_ADDR}" --nodes 6 --threshold 5

# rename cluster directory to the <cluster_name>
mv .charon/cluster .charon/mycluster

Upload Cluster Config to EKS

aws s3 cp --recursive .charon/<cluster_name>/ s3://charon-clusters-config/<cluster_name>/
aws s3 cp .env s3://charon-clusters-config/<cluster_name>/<cluster_name>.env

OR

Upload Cluster Config to GCP (if setting up canary on GCP)

gcloud storage cp -r .charon/<cluster_name>/ gs://charon-clusters-config/<cluster_name>/
gcloud storage cp .env gs://charon-clusters-config/<cluster_name>/<cluster_name>.env

Generate Lighthouse validators definitions

./scripts/create-lighthouse-validators-definitions.sh <cluster-name>

Generate Lodestar validators definitions

./scripts/create-lodestar-validators-definitions.sh <cluster-name>

Create Kubernetes Secrets

./scripts/create-k8s-secrets.sh <cluster-name>

Deploy Charon Cluster

./scripts/deploy-cluster-with-charon-tag.sh <cluster-name> <commit-sha>

Deploy Charon Performance Cluster

./scripts/deploy-cluster-with-charon-tag-perf.sh <cluster-name> <commit-sha>