Run Prombench tests in Google Kubernetes Engine (GKE).
-
Create a New Project: Start by creating a new project on Google Cloud.
-
Create a Service Account:
- Create a Service Account on GKE with the roles:
Kubernetes Engine Service Agent
Kubernetes Engine Admin
- If using the
gcloud
CLI, add the following roles to the GCP Service Account: - Download the JSON file for the service account.
- Create a Service Account on GKE with the roles:
-
Set Environment Variables and Deploy the Cluster:
export GKE_PROJECT_ID=<google-cloud project-id> export CLUSTER_NAME=prombench export ZONE=us-east1-b export AUTH_FILE=<path to service-account.json> export PROVIDER=gke make cluster_create
Note: These components are responsible for collecting, monitoring, and displaying test results and logs.
-
Optional GitHub Integration:
- If used with GitHub integration, generate a GitHub auth token:
- Login with the Prombot account and generate a new auth token.
- Required permissions:
public_repo
,read:org
,write:discussion
.
export SERVICEACCOUNT_CLIENT_EMAIL=<client-email present in service-account.json> export GRAFANA_ADMIN_PASSWORD=password export DOMAIN_NAME=prombench.prometheus.io # Can be set to any other custom domain or an empty string if not used with the GitHub integration. export OAUTH_TOKEN=<generated token from GitHub or set to an empty string " "> export WH_SECRET=<GitHub webhook secret> export GITHUB_ORG=prometheus export GITHUB_REPO=prometheus
- If used with GitHub integration, generate a GitHub auth token:
-
Deploy the Monitoring Components:
- This step will deploy the nginx-ingress-controller, Prometheus-Meta, Loki, Grafana, Alertmanager, and GitHub Notifier.
make cluster_resource_apply
-
Configure DNS:
- The output will display the ingress IP. Use this IP to point the domain name.
- Set the
A record
for<DOMAIN_NAME>
to point to thenginx-ingress-controller
IP address.
-
Access the Services:
- Grafana:
http://<DOMAIN_NAME>/grafana
- Prometheus:
http://<DOMAIN_NAME>/prometheus-meta
- Logs:
http://<DOMAIN_NAME>/grafana/explore
- Profiles:
http://<DOMAIN_NAME>/profiles
- Grafana:
-
Set the Environment Variables:
export RELEASE=<master/main or any Prometheus release (e.g., v2.3.0)> export PR_NUMBER=<PR to benchmark against the selected $RELEASE>
-
Create Node Pools for Kubernetes Objects:
make node_create
-
Deploy the Kubernetes Objects:
make resource_apply
-
Set the Environment Variables:
export GKE_PROJECT_ID=<google-cloud project-id> export CLUSTER_NAME=prombench export ZONE=us-east1-b export AUTH_FILE=<path to service-account.json> export PROVIDER=gke export PR_NUMBER=<PR to benchmark against the selected $RELEASE>
-
Delete Node Pools (Keeping the Main Node Intact):
make clean
-
Delete Everything (Complete Teardown):
make cluster_delete