mirror of
https://github.com/hanzoai/bootnode.git
synced 2026-10-25 02:31:30 +00:00
Update backup node configurations
This commit is contained in:
@@ -3,7 +3,7 @@ export KUBECONFIG=config/cluster.yaml
|
||||
sha1 := $(shell git rev-parse --short=8 HEAD)
|
||||
geth := /go-ethereum/build/bin/geth --datadir=/ethereum
|
||||
net ?= testnet
|
||||
cfg := geth/config/$(net)
|
||||
cfg := config/$(net)
|
||||
|
||||
all: deploy
|
||||
|
||||
@@ -15,10 +15,15 @@ deploy: build
|
||||
|
||||
create: build create-volume create-pod
|
||||
|
||||
# Setup a high-performance persistent disk. Use SSDs, and at least 500 GB of storage for adequate IO performance
|
||||
# Ensure proper flags for ext4:
|
||||
# mkfs.ext4 -m 0 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/sdb
|
||||
create-disk:
|
||||
gcloud compute disks create --size=500GB --type=pd-ssd --zone=us-central1-a geth-$(net)-data
|
||||
|
||||
create-volume:
|
||||
kubectl apply -f $(cfg)/sc.yaml
|
||||
kubectl apply -f $(cfg)/pvc-ssd.yaml
|
||||
gcloud compute disks create --size=4000GB --type=pd-ssd --zone=us-central1-a geth-$(net)-chaindata
|
||||
|
||||
create-pod:
|
||||
kubectl apply -f $(cfg)/pod.yaml
|
||||
@@ -60,6 +65,7 @@ add-gcr-key:
|
||||
get-credentials:
|
||||
gcloud container clusters get-credentials ethereum --zone us-central1-a --project hanzo-ai
|
||||
|
||||
# Default to whatever zone you launched your cluster in to reduce key strokes
|
||||
region-zone-defaults:
|
||||
gcloud compute project-info add-metadata --metadata=google-compute-default-region=us-central1
|
||||
gcloud compute project-info add-metadata --metadata=google-compute-default-zone=us-central1-a
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: geth-mainnet
|
||||
name: geth-mainnet-backup
|
||||
spec:
|
||||
nodeSelector:
|
||||
cloud.google.com/gke-nodepool: geth-default
|
||||
containers:
|
||||
- name: geth-mainnet
|
||||
- name: geth-mainnet-backup
|
||||
image: gcr.io/hanzo-ai/geth:latest
|
||||
resources:
|
||||
requests:
|
||||
@@ -26,13 +26,13 @@ spec:
|
||||
volumeMounts:
|
||||
- mountPath: '/ethereum'
|
||||
name: geth-mainnet-pv
|
||||
# volumeMounts:
|
||||
# - mountPath: '/ethereum-ssd'
|
||||
# name: geth-mainnet-ssd-pv
|
||||
volumeMounts:
|
||||
- mountPath: '/data'
|
||||
name: geth-mainnet-data-pv
|
||||
volumes:
|
||||
- name: geth-mainnet-pv
|
||||
persistentVolumeClaim:
|
||||
claimName: geth-mainnet-pvc
|
||||
# - name: geth-mainnet-ssd-pv
|
||||
# persistentVolumeClaim:
|
||||
# claimName: geth-mainnet-ssd-pvc
|
||||
- name: geth-mainnet-ssd-pv
|
||||
persistentVolumeClaim:
|
||||
claimName: geth-mainnet-data-pvc
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: geth-mainnet-data-pvc
|
||||
spec:
|
||||
storageClassName: ssd-retain-sc
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
- ReadOnlyMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 500G
|
||||
@@ -1,15 +1,20 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: geth-testnet
|
||||
name: geth-testnet-backup
|
||||
spec:
|
||||
nodeSelector:
|
||||
cloud.google.com/gke-nodepool: geth-default
|
||||
containers:
|
||||
- name: geth-testnet
|
||||
- name: geth-testnet-backup
|
||||
image: gcr.io/hanzo-ai/geth:latest
|
||||
resources:
|
||||
requests:
|
||||
cpu: 1
|
||||
memory: 4Gi
|
||||
limits:
|
||||
cpu: 2
|
||||
memory: 6Gi
|
||||
command:
|
||||
- /go-ethereum/build/bin/geth
|
||||
args:
|
||||
@@ -25,7 +30,12 @@ spec:
|
||||
volumeMounts:
|
||||
- mountPath: '/ethereum'
|
||||
name: geth-testnet-pv
|
||||
- mountPath: '/data'
|
||||
name: geth-testnet-data-pv
|
||||
volumes:
|
||||
- name: geth-testnet-pv
|
||||
persistentVolumeClaim:
|
||||
claimName: geth-testnet-pvc
|
||||
- name: geth-testnet-data-pv
|
||||
persistentVolumeClaim:
|
||||
claimName: geth-testnet-data-pvc
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: geth-testnet-data-pvc
|
||||
spec:
|
||||
storageClassName: ssd-retain-sc
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
- ReadOnlyMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 500G
|
||||
Reference in New Issue
Block a user