-
Notifications
You must be signed in to change notification settings - Fork 1
/
prepare-demo-environment.sh
executable file
·75 lines (64 loc) · 1.97 KB
/
prepare-demo-environment.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
68
69
70
71
72
73
74
75
#
#
#
export WORKDIR=$(pwd)
echo $WORKDIR
#############################################################################
##
## BOOTSTRAP PHASE
##
#
# Clone the two projects this work depends on
#
##cd ..
##git clone https://github.com/semanpix/kafka-streams-examples
##git clone https://github.com/jeanlouisboudart/kafka-platform-prometheus
#############################################################################
#
# PATH to kafka-streams-examples project:
#
export KAFKA_STREAMS_EXAMPLES_PROJECT_PATH=./../kafka-streams-examples
#
# PATH to kafka-platform-prometheus project:
#
export KAFKA_PROMETHEUS_PROJECT_PATH=./../kafka-platform-prometheus
#############################################################################
#
# Build Kafka-Streams-Examples and grab a copy of the UBER JAR
#
cd $KAFKA_STREAMS_EXAMPLES_PROJECT_PATH
mvn clean compile package install assembly:single -DskipTests
cp target/.*jar $WORKDIR/lib
#############################################################################
#
cd $WORKDIR
ls lib
#############################################################################
#
# copy our modified docker-compose.yml file into the cluster-operations-directory
#
cp docker-compose.yml $KAFKA_PROMETHEUS_PROJECT_PATH
#############################################################################
#
# Create the kstreams-perf-test docker image
#
##
## !!! WARNING !!! THE IMAGE MAY CONTAIN SENSITIVE INFORMATION
##
## >>> CCloud credentials are stored in the ccloud.props file.
## >>> We work on a version with encrypted config files.
##
mvn clean compile package assembly:single
docker build . -t kstreams-perf-test-app
#############################################################################
#
# Update / Start the environment
#
cd $KAFKA_PROMETHEUS_PROJECT_PATH
docker-compose up -d
echo
echo '#####################################'
echo '# Environment is READY for the next #'
echo '# round of experiments #'
echo '#####################################'
echo