Run prombench tests in Google Kubernetes Engine.
-
Create a new project on Google Cloud.
-
Create a Service Account on GKE with role
Kubernetes Engine Service Agent
&Kubernetes Engine Admin
. If using gcloud cli add theroles/container.admin
androles/iam.serviceAccountUser
roles to the GCP serviceAccount and download the json file. -
Set the following 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
Collecting, monitoring and displaying the test results and logs
- [Optional] If used with the Github integration generate a GitHub auth token.
- Login with the Prombot account and generate a new auth token.
- With 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 when 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
- Deploy the nginx-ingress-controller, Prometheus-Meta, Loki, Grafana, Alertmanager & Github Notifier.
make cluster_resource_apply
- The output will show the ingress IP which will be used to point the domain name to. Alternatively you can see it from the GKE/Services tab.
- Set the
A record
for<DOMAIN_NAME>
to point tonginx-ingress-controller
IP address. - The services will be accessible at:
- 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 following environment variables.
export RELEASE=<master/main or any prometheus release(ex: v2.3.0) >
export PR_NUMBER=<PR to benchmark against the selected $RELEASE>
- Create the nodepools for the k8s objects
make node_create
- Deploy the k8s objects
make resource_apply
- Set the following 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>
- To delete just the nodepool (while keeping the cluster's main node intact), run:
make clean
- To delete everything (complete teardown of the entire cluster and all the resources), run:
make cluster_delete