infra
is a CLI tool designed to create, scale, and delete Kubernetes clusters and deploy manifest files. It supports GKE, kind, and EKS, and is designed to be easily extendable for additional providers.
Files passed to infra
will be parsed using Go templates. To skip parsing and load the file as is, use the noparse
suffix.
- Parsed File:
somefile.yaml
- Non-Parsed File:
somefile_noparse.yaml
usage: infra [<flags>] <command> [<args> ...]
The prometheus/test-infra deployment tool
Flags:
-h, --help Show context-sensitive help (also try --help-long and --help-man).
-f, --file=FILE ... YAML file or folder describing the parameters for the object that will be deployed.
-v, --vars=VARS ... Substitutes the token holders in the YAML file. Follows standard Go template formatting (e.g., {{ .hashStable }}).
-
gke info
gke info -v hashStable:COMMIT1 -v hashTesting:COMMIT2
-
gke cluster create
gke cluster create -a service-account.json -f FileOrFolder
-
gke cluster delete
gke cluster delete -a service-account.json -f FileOrFolder
-
gke nodes create
gke nodes create -a service-account.json -f FileOrFolder
-
gke nodes delete
gke nodes delete -a service-account.json -f FileOrFolder
-
gke nodes check-running
gke nodes check-running -a service-account.json -f FileOrFolder
-
gke nodes check-deleted
gke nodes check-deleted -a service-account.json -f FileOrFolder
-
gke resource apply
gke resource apply -a service-account.json -f manifestsFileOrFolder \ -v GKE_PROJECT_ID:test -v ZONE:europe-west1-b -v CLUSTER_NAME:test \ -v hashStable:COMMIT1 -v hashTesting:COMMIT2
-
gke resource delete
gke resource delete -a service-account.json -f manifestsFileOrFolder \ -v GKE_PROJECT_ID:test -v ZONE:europe-west1-b -v CLUSTER_NAME:test \ -v hashStable:COMMIT1 -v hashTesting:COMMIT2
-
kind info
kind info -v hashStable:COMMIT1 -v hashTesting:COMMIT2
-
kind cluster create
kind cluster create -f File -v PR_NUMBER:$PR_NUMBER -v CLUSTER_NAME:$CLUSTER_NAME
-
kind cluster delete
kind cluster delete -f File -v PR_NUMBER:$PR_NUMBER -v CLUSTER_NAME:$CLUSTER_NAME
-
kind resource apply
kind resource apply -f manifestsFileOrFolder -v hashStable:COMMIT1 -v hashTesting:COMMIT2
-
kind resource delete
kind resource delete -f manifestsFileOrFolder -v hashStable:COMMIT1 -v hashTesting:COMMIT2
-
eks info
eks info -v hashStable:COMMIT1 -v hashTesting:COMMIT2
-
eks cluster create
eks cluster create -a credentials -f FileOrFolder
-
eks cluster delete
eks cluster delete -a credentials -f FileOrFolder
-
eks nodes create
eks nodes create -a authFile -f FileOrFolder -v ZONE:eu-west-1 -v CLUSTER_NAME:test \ -v EKS_SUBNET_IDS:subnetId1,subnetId2,subnetId3
-
eks nodes delete
eks nodes delete -a authFile -f FileOrFolder -v ZONE:eu-west-1 -v CLUSTER_NAME:test \ -v EKS_SUBNET_IDS:subnetId1,subnetId2,subnetId3
-
eks nodes check-running
eks nodes check-running -a credentials -f FileOrFolder -v ZONE:eu-west-1 -v CLUSTER_NAME:test \ -v EKS_SUBNET_IDS:subnetId1,subnetId2,subnetId3
-
eks nodes check-deleted
eks nodes check-deleted -a authFile -f FileOrFolder -v ZONE:eu-west-1 -v CLUSTER_NAME:test \ -v EKS_SUBNET_IDS:subnetId1,subnetId2,subnetId3
-
eks resource apply
eks resource apply -a credentials -f manifestsFileOrFolder -v hashStable:COMMIT1 -v hashTesting:COMMIT2
-
eks resource delete
eks resource delete -a credentials -f manifestsFileOrFolder -v hashStable:COMMIT1 -v hashTesting:COMMIT2
To build the Docker image for infra
, use the following command:
docker build -t prominfra/infra:master .