-
Notifications
You must be signed in to change notification settings - Fork 24
/
local_dev.sh
executable file
·67 lines (56 loc) · 1.93 KB
/
local_dev.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/sh
#set -xv
Requirement="HBase/Hdfs/ZK/Kafka/Mysql/Prometheus/PushGateway"
echo "### Welcome! Your can use this script to build your local development environment.
Your should have cloned this git repository. Then your need:
1. Java 8+
2. Maven 3.5+
3. Docker
Run 'mvn clean install' first to compile all codes.
"
while true; do
echo "#### choose the profile you want to build: [Input the number]
[1]. All in One: whole etrace project (include front-end and back-end services) and related requirements ($Requirement)
[2]. Only front-end project
[3]. all back-end projects (collector, consumer, stream, api) and related requirements ($Requirement)
[4]. All related requirements ($Requirement)
[5]. Only Mysql
[7]. Prometheus and Grafana.
[8]. Debug Etrace back-end services.
[9]. Clean all orphan docker service (todo)
[0]. exit
Input number: "
read -r num
case $num in
[1]*) echo 1 ;;
[2]*)
echo "todo: run yarn start"
;;
[3]*)
docker-compose -f docker-compose-etrace.yml build
docker-compose -f docker-compose-etrace.yml -f docker-compose-mysql.yml -f docker-compose-kafka-hadoop.yml -f docker-compose-prometheus-grafana.yml up
;;
[4]*)
docker-compose -f docker-compose-mysql.yml -f docker-compose-kafka-hadoop.yml -f docker-compose-prometheus-grafana.yml up
;;
[5]*)
docker-compose -f docker-compose-mysql.yml up
;;
[7]*)
echo "docker-compose -f docker-compose-prometheus-grafana.yml up"
docker-compose -f docker-compose-prometheus-grafana.yml up
;;
[8]*)
# mvn clean install
docker-compose -f docker-compose-etrace.yml build
docker-compose -f docker-compose-etrace.yml up
;;
[9]*)
docker-compose -f docker-compose-etrace.yml -f docker-compose-mysql.yml -f docker-compose-kafka-hadoop.yml -f docker-compose-prometheus-grafana.yml down --remove-orphans
docker image prune
;;
[0]*) exit ;;
[q]*) exit ;;
*) echo "Only number accepted!" ;;
esac
done