Environmental Sustainability x Cloud-Native: How to measure the energy consumption of cloud-native processes
This project aims to measure and compare the energy consumption of snowflake clusters versus that of Flux-based GitOps clusters.
Another aim is to create a reference architecture for measuring the energy consumption of cloud-native processes using cloud-native tools.
The focus here is on energy usage rather than, for example, marginal emissions estimates. That being said, energy metrics could be used to deduce carbon emissions.
This project could be used as the base model for conducting Life Cycle Assessment (LCAs) of any cloud-native software that runs on a Pod.
For Linux users, create a cluster directly with minikube.
For MacOS user, the dependencies are:
brew install --cask virtualbox
brew install --cask vagrant
Then, use this Vagrantfile, and spin up a microVM with Flintlock:
vagrant up
vagrant ssh
Note: The Vagrantfile allocates 8GB for the microVM. The microVM itself is very lightweight but the cluster that will be allocated 6GB. Ensure you have enough RAM.
First, create a minikube cluster:
minikube start --container-runtime=containerd --memory=6g --bootstrapper=kubeadm --extra-config=kubelet.authentication-token-webhook=true --extra-config=kubelet.authorization-mode=Webhook --extra-config=scheduler.bind-address=0.0.0.0 --extra-config=controller-manager.bind-address=0.0.0.0
minikube addons disable metrics-server
You will need to install kube-prometheus and kepler on your cluster.
To do this in a GitOps way, bootstrap Flux on your cluster.
Then, copy the Flux manifests for kube-prometheus and kepler to your config repo. Flux will automatically reconcile these for you.
### Example: Use Equinix for the Baremetal Host Liquid Metal can be used to create microVMs on any baremetal machine.
Follow thse instructions for how to use Equinix as a host baremetal machine.
Use this Terraform manifest, which contains the necessary configuration to be used as a host for Kepler.
Set up a Kubernetes management cluster locally with CAPI. Then, set up more clusters hosted on microVMs with CAPMVM.