We need a Kubernetes cluster. Locally we stick with Minikube and in the cloud we use our self-rolled cluster on AWS.
You can install Minikube with homebrew:
brew cask install minikube
Start Minikube and create the StorageClass which we will need later:
minikube start --memory 5120 --cpus=4
kubectl apply -f minikube-general-storageclass.yaml
As for the cloud, we use AWS. In order to bootstrap and administrate clusters on AWS we use the kops tool, although via our opinionated wrapper k8s-aws.
We also need kubectl. You can also install with homebrew:
brew install kubectl
You will need envsubst for generating the Kubernetes manifest files. It's part of the gettext package which you can install e.g. with homebrew on macOS:
brew install gettext
brew link --force gettext
In order to generate our Kubernetes manifests, beneath kubernetes/, run ./generate-manifests.py
.
./kubectl apply -f kubernetes/
./kubectl port-forward <ethstats-pod-id> 3000:3000
Open your web browser and navigate to localhost:3000. You should see that the authority nodes are mining blocks.
Once you are done, you can delete the Kubernetes resources:
./kubectl delete -f kubernetes/
To fully delete the blockchain you also need to delete the geth folders in the authority1 and authority2 directories.
Learn more about Coder Society, a network of cutting edge developers, designers and product engineers at https://codersociety.com