-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetenv.sh
executable file
·56 lines (52 loc) · 1.38 KB
/
setenv.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
##### Terminal Colors - START
red=$'\e[1;31m'
grn=$'\e[1;32m'
yel=$'\e[1;33m'
blu=$'\e[1;34m'
mag=$'\e[1;35m'
cyn=$'\e[1;36m'
end=$'\e[0m'
coffee=$'\xE2\x98\x95'
coffee3="${coffee} ${coffee} ${coffee}"
##### Terminal Colors - END
###### Variable section - START
CURRENT_DIRECTORY=
PROFILE_OPTION=$1
TRUSTSTORE=$2
TRUSTSTORE_PWD=
CONTAINER_IMAGE_NAME=robipozzi-kafkastreams-temperatures
CONTAINER_IMAGE_VERSION=1.0
CONTAINER_NAME=robipozzi-kafkastreams-temperatures
DOCKER_HUB_ID=robipozzi
###### Variable section - END
##### Function section - START
printProfile()
{
echo ${grn}Select Kafka cluster run platform : ${end}
echo "${grn}1. Localhost${end}"
echo "${grn}2. Localhost (SSL enabled)${end}"
echo "${grn}3. Confluent${end}"
read PROFILE_OPTION
setProfile
}
setProfile()
{
case $PROFILE_OPTION in
1) printf "\n${grn}Kafka cluster is on localhost, going with default profile ...${end}\n"
;;
2) printf "\n${grn}Kafka cluster is on localhost with SSL enabled, going with ssl profile ...${end}\n"
;;
3) printf "\n${grn}Kafka cluster is running on Confluent, going with confluent profile ...${end}\n"
;;
*) printf "\n${red}No valid option selected${end}\n"
printProfile
;;
esac
}
inputTruststorePassword()
{
###### Set truststore password
echo ${grn}Enter truststore password : ${end}
read -s TRUSTSTORE_PWD
}
##### Function section - END