Skip to content

Commit 1cbf92f

Browse files
authored
[FEAT] Terraform Quickstart Tutorials for Google GKE (#250)
* complete guide with gke terraform Signed-off-by: falconlee236 <[email protected]> * finish lint and proudction-stack gke terrafom support Signed-off-by: falconlee236 <[email protected]> * add observlity stack Signed-off-by: falconlee236 <[email protected]> * add variable with gpu node pool settings Signed-off-by: falconlee236 <[email protected]> * add gpu variable and machine variable to customize node resource Signed-off-by: falconlee236 <[email protected]> * add add in the Readme about choosing the GPUs I want to use in the beginning or the model I want to deploy Signed-off-by: falconlee236 <[email protected]> --------- Signed-off-by: falconlee236 <[email protected]>
1 parent 474c3bb commit 1cbf92f

File tree

17 files changed

+1226
-0
lines changed

17 files changed

+1226
-0
lines changed

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,46 @@ helm/examples
9999
src/vllm_router/_version.py
100100

101101
/tutorials/assets/private.yaml
102+
103+
104+
# terraform
105+
# Local .terraform directories
106+
**/.terraform/*
107+
108+
# .tfstate files
109+
*.tfstate
110+
*.tfstate.*
111+
112+
# Crash log files
113+
crash.log
114+
crash.*.log
115+
116+
# Exclude all .tfvars files, which are likely to contain sensitive data, such as
117+
# password, private keys, and other secrets. These should not be part of version
118+
# control as they are data points which are potentially sensitive and subject
119+
# to change depending on the environment.
120+
*.tfvars
121+
*.tfvars.json
122+
123+
# Ignore override files as they are usually used to override resources locally and so
124+
# are not checked in
125+
override.tf
126+
override.tf.json
127+
*_override.tf
128+
*_override.tf.json
129+
130+
# Ignore transient lock info files created by terraform apply
131+
.terraform.tfstate.lock.info
132+
133+
# Include override files you do wish to add to version control using negated pattern
134+
# !example_override.tf
135+
136+
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
137+
# example: *tfplan*
138+
139+
# Ignore CLI configuration files
140+
.terraformrc
141+
terraform.rc
142+
143+
# google cloud platform
144+
credentials.json

tutorials/terraform/gke/Makefile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
RED = $(shell tput -Txterm setab 1 && tput -Txterm setaf 0)
2+
GREEN = $(shell tput -Txterm setab 2 && tput -Txterm setaf 0)
3+
PURPLE = $(shell tput -Txterm setab 5 && tput -Txterm setaf 7)
4+
RESET = $(shell tput -Txterm sgr0)
5+
CLUSTER_NAME = production-stack
6+
REGION = us-central1-a
7+
8+
9+
all: create
10+
11+
create: create-gke-infra create-helm-chart
12+
13+
create-gke-infra:
14+
@echo ""
15+
@echo "$(GREEN) create gke infra $(RESET)"
16+
@cd gke-infrastructure && terraform init
17+
@cd gke-infrastructure && terraform apply -auto-approve
18+
19+
create-helm-chart:
20+
@echo ""
21+
@echo "$(GREEN) create helm chart $(RESET)"
22+
gcloud container clusters get-credentials $(CLUSTER_NAME) --region=$(REGION)
23+
@cd production-stack && terraform init
24+
@cd production-stack && terraform apply -auto-approve
25+
26+
27+
destroy-gke-infra:
28+
@echo ""
29+
@echo "$(PURPLE) destroy gke infra $(RESET)"
30+
@cd gke-infrastructure && terraform init
31+
@cd gke-infrastructure && terraform destroy -auto-approve
32+
33+
destroy-helm-chart:
34+
@echo ""
35+
@echo "$(PURPLE) destroy helm chart $(RESET)"
36+
@cd production-stack && terraform init
37+
@cd production-stack && terraform destroy -auto-approve
38+
39+
clean: destroy-helm-chart
40+
41+
fclean: destroy-helm-chart destroy-gke-infra
42+
43+
.PHONY: all create init clean fclean

0 commit comments

Comments
 (0)