-
Notifications
You must be signed in to change notification settings - Fork 20
/
up
executable file
·49 lines (38 loc) · 1.46 KB
/
up
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
set -e
BASEDIR=$(dirname "$(readlink -f $0)")
DOCKERDIR="$BASEDIR"
if [ -z "$DOCKER_STACK" ]; then
DOCKER_STACK="$DOCKERDIR/docker-compose.yml"
fi
line() {
echo -e "\n----------------------------------------------------------------------------------------------------------------------------------------\n"
}
banner() {
line
echo -e " __ __ __ ___ __ ___ ______ __ __ "
echo -e " | | | | | |/ / | |/ / / __ \ | | | | "
echo -e " | | | | | ' / | ' / | | | | | | | | "
echo -e ".--. | | | | | < | < | | | | | | | | "
echo -e "| \`--' | | | | . \ | . \ | \`--' | | \`--' | "
echo -e " \______/ |__| |__|\__\ |__|\__\ \______/ \______/ "
echo ""
echo " Powered by Apache Kafka!"
line
}
banner
echo -e "\n🐳 Stopping previous Kafka Docker-Compose stacks..."
(cd "$BASEDIR"; docker-compose -f "$DOCKER_STACK" down --remove-orphans)
echo -e "\n🐳 Starting Kafka Docker-Compose stack..."
(cd "$BASEDIR"; docker-compose -f "$DOCKER_STACK" up -d)
line
if ! command -v jikkou &> /dev/null
then
echo "jikkou could not be found. For installation instructions: https://github.com/streamthoughts/jikkou"
exit
else
echo -e "🚀 Woohoo! $(jikkou --version) is already installed on your machine. Enjoy!"
fi
echo -e "\n Use the below client config properties for connecting to Kafka:"
echo -e "\tbootstrap.servers=localhost:9092"
exit 0