-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
35 lines (23 loc) · 1.04 KB
/
Copy pathsetup.sh
File metadata and controls
35 lines (23 loc) · 1.04 KB
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
32
33
34
35
#!/bin/bash
echo "Setting up Elasticsearch"
# apply elasticsearch manifests
kubectl apply -f elasticsearch-pvc.yaml
kubectl apply -f elasticsearch.yaml
kubectl apply -f elasticsearch-service.yaml
echo "Creating pod...."
# wait for Elasticsearch pods to be in the "Running" state
kubectl wait --for=condition=Ready pod -l app=elasticsearch --timeout=300s
echo "Setting up Ingestor"
# apply ingestor manifests
kubectl apply -f aiohttp-log-ingestor-deployment.yaml
kubectl apply -f aiohttp-log-ingestor-service.yaml
kubectl apply -f ingestor-hpa.yaml
echo "Creating pod...."
# wait for Ingestor pods to be in the "Running" state
kubectl wait --for=condition=Ready pod -l app=aiohttp-log-ingestor --timeout=300s
echo "Ingestors up and running"
#Port forwarding for elasticsearch-service to localhost:9200
kubectl port-forward service/elasticsearch-service 9200:9200 &
# Port forwarding for aiohttp-log-ingestor to localhost:3000
kubectl port-forward service/aiohttp-log-ingestor 3000:3000 &
echo " Ingestors open at Port number 3000 and, endpoint "/ingest-log"