-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy_inline.sh
More file actions
executable file
·27 lines (21 loc) · 986 Bytes
/
Copy pathdeploy_inline.sh
File metadata and controls
executable file
·27 lines (21 loc) · 986 Bytes
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
#!/bin/bash
echo "1. Building Payment Gateway image..."
eval $(minikube docker-env)
docker build -t allocknguyen/payment-gateway:v1 -f payment_gateway/Dockerfile .
echo "2. Deploying Payment Gateway to Kubernetes..."
kubectl apply -f infra/gateway/deployment.yaml
echo "3. Updating ConfigMap for Data Generator..."
kubectl delete configmap generator-script -n stream --ignore-not-found
kubectl create configmap generator-script \
--from-file=data-generator.py=infra/data-generator/data-generator.py \
-n stream
echo "4. Stopping old Data Generator..."
kubectl delete -f infra/data-generator/generator-pod.yaml --ignore-not-found
echo "5. Waiting for Payment Gateway to be ready..."
kubectl wait --for=condition=Ready pod -l app=payment-gateway -n stream --timeout=300s
echo "6. Starting Inline Benchmark (Port-forwarding)..."
kubectl port-forward svc/payment-gateway-service 8000:8000 -n stream > /dev/null 2>&1 &
PF_PID=$!
sleep 3
python run_inline_benchmark.py
kill $PF_PID