-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·29 lines (21 loc) · 919 Bytes
/
run.sh
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
#!/bin/sh
dir=$(dirname "$0")
mkdir -p /tmp/fluent-bit-test
echo " --- [start cluster] ---"
kind create cluster --config "$dir"/kind-config.yml --wait 5m --name fluent-bit-test
if [ "$(kubectl config current-context)" != "kind-fluent-bit-test" ]
then
echo "kubectl context is not set to kind-fluent-bit-test"
exit 1
fi
# build and load log-app docker image
docker build -t fluent-bit-test/log-app:test "$dir"/log-app/.
kind load docker-image fluent-bit-test/log-app:test --name fluent-bit-test
docker build -t fluent-bit-test/fluent-bit-test:test "$dir"/out-plugin/.
kind load docker-image fluent-bit-test/fluent-bit-test:test --name fluent-bit-test
# install fluent-bit
helm repo add fluent https://fluent.github.io/helm-charts
helm repo update fluent
helm install --values "$dir"/values.yml fluent-bit fluent/fluent-bit
helm install log-app "$dir"/log-app/charts/log-app
echo " --- [cluster running] ---"