Skip to content

A set of Kubernetes manifests for deploying Distributed Validator Clusters.

Notifications You must be signed in to change notification settings

ObolNetwork/charon-k8s-distributed-validator-cluster

Repository files navigation

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. Install jq package

brew install jq 

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 ./envs/<cluster_name>.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 for performance cluster (for any cluster which has more than 10 validators)

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

Create Kubernetes Secrets

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

Deploy Charon Performance Cluster (for any cluster which has more than 10 validators)

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

Deploy Charon Cluster

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

About

A set of Kubernetes manifests for deploying Distributed Validator Clusters.

Topics

Resources

Stars

Watchers

Forks

Languages