- Create a new project in GCP
- Enable Compute VM, Kubernetes, Filestore, Memorystore APIs
-
Create a Filestore Instance
-
Create a Memorystore Instance
-
Create a Kubernetes cluster with Filestore CSI
gcloud container clusters create CLUSTER_NAME \ --addons=GcpFilestoreCsiDriver \ --cluster-version=1.2.1
Clone this repo in GCP cloud shell, and execute below command. Make sure you edit the csi configurations and storage capacity in the 2 .yaml files.
cd infra
gcloud container clusters get-credentials $cluster-name --location=$region
kubectl apply -f filestore-pv.yaml
kubectl apply -f filestore-pvc.yaml
First, allocate 4 static IP address for the load balancer of frontend, middleware, llm-agent and scheduler.
gcloud compute addresses create frontend/middleware/llm/scheduler \
--global \
--ip-version IPV4
gcloud compute addresses describe frontend/middleware/llm/scheduler
Then, modify the loadBalancerIP field in all 4 service.yaml to reflect above.
cd infra
gcloud container clusters get-credentials $cluster-name --location=$region
kubectl apply -f frontend-deployment.yaml
kubectl apply -f frontend-service.yaml
cd infra
gcloud container clusters get-credentials $cluster-name --location=$region
kubectl apply -f middleware-deployment.yaml
kubectl apply -f middleware-service.yaml
cd infra
gcloud container clusters get-credentials $cluster-name --location=$region
kubectl apply -f llm-deployment.yaml
kubectl apply -f llm-service.yaml
First, change the REDIS_HOSTNAME field in scheduler/config.py to reflect your actual Memorystore Instance.
Then, execute below command.
cd infra
gcloud container clusters get-credentials $cluster-name --location=$region
kubectl apply -f scheduler-service-account.yaml
kubectl apply -f scheduler-role.yaml
kubectl apply -f scheduler-role-binding.yaml
kubectl apply -f scheduler-deployment.yaml
kubectl apply -f scheduler-service.yaml