Skip to content

aeweda/ethereum-node-infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Disclaimer

I haven't worked with Kubernetes before so this was a learning excercise but it was fun, most of my experience is with ECS & AWS not GCP/Kubernetes

Approach

Based on the requirements i added 2 deployment methodologies

Local

in the local folder, simple docker compose setup that will spin up a geth node connecting to sepolia testnet

Readme provided inside the folder with instructions

Cloud

this is where it gets more complicated, i've added a deployment with pulumi & kubernetes to GKE on GCP

Readme provided inside the folder with diagrams / instructions

Time Distrbution

Day 1

just evaluating the task & getting a sense for what's needed, i ended up implementing the local approach

Day 2

i started reading on how to configure kubernetes for stateful applications & how to deal with it inside pulumi (interactions), i decided to also incorporate kustomize

Day 3

messing around with kustomize / creating a base template & production overlay, by the end i realized that i unnecessarily increased the complexity for job task evaluation & needed to take a step back

Day 4

migrated everything back to pure kubernetes yaml files & started working on pulumi deployment, i wanted a clean structure so i started abstracting some of the components & injecting the dependencies for easier up and destroy when i'm done

I've also added support for prometheus/grafana/loki with helm charts in anticipation of using them later on + configured an ingress controller to access grafana with an assigned ip

Day 5

started by creating a readme to document everything then a deployment script and a GHA pipeline, the script was for me to mess around with and for if someone wants to evaluate everything they don't have to depend on a pipeline.

finally started testing the deployment & faced quite a bit of issues

  • Needing to enable a few APIs (because new account)
  • GCP imposed quota limits
  • Realizing i need google-cloud-cli-gke-gcloud-auth-plugin to get pulumi to connect to the cluster
  • Nodepools spawning in multiple regions (good for scaling bad for an account with resource limits)
  • Some dependency issues where some resources would be created before nodepools are done spawning up
  • Wrestling with pbd,(min nodes & Rolling updates)
  • Getting kubeconfig working inside pulumi & finally some port conflicts for the geth node making it fail to start
  • Tried to implmenet a VPA to address scaling question for a statetful app but ran out of time
  • too little peer count for syncing the node + it's not configured for post merge, couldn't find time to fix this

Evaluation

you can evaluate that everything is up and running by going to

Grafana admin/admin123

i've left the environment up and running but will most likely have to bring it down if it's cost gets high

Retrospect

I wish i had more time with this task to polish it more & i even wanted to try my hand at a multi-cloud approach if i had the chance but that would be completely out of scope and would require a lot more time which i didn't have.

Granted i'm sure i must've made mistakes and relied on some AI tools a bit too much at the begining to learn fast but all in all it was a fun experience.

About

oumla-task

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published