Updated: June 7, 2022
This guide is to get you setup with the tools you'll need for development.
- Install Docker Engine.
- Carry out the post install steps, link.
- Install kubectl.
Alternatively, simply install Docker Desktop and enable Kubernetes.
- Install Docker Desktop.
- Enable Kubernetes via Docker Desktop, link.
Installing Java 11 can vary depending on your operating system and chosen methodology. The recommended version to install is OpenJDK 11.
Installing via DNF is the recommended method for Fedora Linux. Instructions for that can be found here.
Installing via Homebrew is the recommended method for Mac, though it can be used for other operating systems as well. To install OpenJDK 11, go here.
SDKMan is a cross-platform tool for managing SDK versions. Instructions for using it are here. As with the other methods, OpenJDK 11 is the recommended Java version to install. For instances where that is not an option, other quality JDK 11 implementations (e.g., Coretto Java 11, Liberica Java 11, or Zulu Java 11) will suffice.
Install the latest version of SBT in order to compile the code base and run unit tests.
After SBT is installed, it needs to be configured. The instructions for that are in CONTRIBUTING.md.
On Linux, you can follow the instructions provided by SBT, link.
On Mac OS, SBT provides instructions here. It can be installed via Homebrew as well. It is also recommended that SBTEnv be installed as well, link. It can help configure the SBT environment.
- sbt
- Docker Desktop with Kubernetes enabled
- Skaffold CLI
- AWS CLI version 2
aws configure # requires AWS Access Key(s)
aws eks --region us-west-1 update-kubeconfig --name eks-dev
kubectl config rename-context $(kubectl config current-context) eks-dev
IAM_USER=$(aws sts get-caller-identity --query Arn --output text | sed 's/.*\///g')
kubectl create namespace $IAM_USER
kubectl config set-context --current --namespace=$IAM_USER
kubectl get pods
Should return:
No resources found in <your-namespace-name> namespace.
brew install docker-credential-helper-ecr
Add this to your ~/.docker/config.json
-- if there is already a config.json file then only add
the credHelpers property.
{
"credHelpers": {
"public.ecr.aws": "ecr-login",
"150340915792.dkr.ecr.us-west-1.amazonaws.com": "ecr-login"
}
}
skaffold config set default-repo 150340915792.dkr.ecr.us-west-1.amazonaws.com
docker image ls 150340915792.dkr.ecr.us-west-1.amazonaws.com/l0-validator
Should list existing l0-validator images.
skaffold dev --trigger manual --tail=false
You should see docker images successfully uploaded to the container registry and then kubernetes resources successfully deployed on the EKS cluster. Open grafana to monitor the L0 and L1 clusters performance http://localhost:3000.
To access the API of individual pods you can use an http proxy. First get the IP address of a pod in a cluster.
kubectl get pods -o wide
Then set the env variable http_proxy
and use curl to query a pod.
export http_proxy=8080
curl <pod-ip-address>:9000/cluster/info
Activate profiles using option -p
. Profiles can also be manually deactivated by prefixing the profile name with -
.
skaffold dev -p foo,-bar
- chaos - inject chaos experiments into the cluster (like a failure of some number of pods)