-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
31 lines (23 loc) · 849 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
NAME = continuous-testing
VERSION = 1.0.0
GCP = gcloud
ZONE = europe-west1-b
K8S = kubectl
.PHONY: info
info:
@echo "Continunous Testing of Microservices on K8s"
prepare:
@$(GCP) config set compute/zone $(ZONE)
@$(GCP) config set container/use_client_certificate False
cluster:
@echo "Create GKE Cluster"
# --[no-]enable-basic-auth --[no-]issue-client-certificate
@$(GCP) container clusters create $(NAME) --num-nodes=5 --enable-autoscaling --min-nodes=5 --max-nodes=10
@$(K8S) create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=$$(gcloud config get-value core/account)
@$(K8S) cluster-info
gcloud-login:
@$(GCP) auth application-default login
access-token:
@$(GCP) config config-helper --format=json | jq .credential.access_token
destroy:
@$(GCP) container clusters delete $(NAME) --async --quiet