@@ -25,7 +25,7 @@ MINIKUBE_START_RETRIES=3
2525MINIKUBE_START_BACKOFF=5
2626RESULT_HASH=" e682ec6622b5e83f2eb614617d5ab2cf"
2727MINIKUBE_VERSION=" v1.8.2"
28- MINIKUBE_PATH=" /usr/local/bin/minikube-$MINIKUBE_VERSION "
28+ MINIKUBE_PATH=$( [ " ${OS_TYPE} " != " linux " ] && echo " minikube " || echo " /usr/local/bin/minikube-$MINIKUBE_VERSION " )
2929
3030NON_LINUX_ENV_NOTE=" ****** Please start/stop minikube manually in non-linux environment. ******"
3131
@@ -97,8 +97,9 @@ function start_kubernetes {
9797 exit 1
9898 fi
9999 # Mount Flink dist into minikube virtual machine because we need to mount hostPath as usrlib
100- minikube mount $FLINK_DIR :$FLINK_DIR &
100+ $MINIKUBE_PATH mount $FLINK_DIR :$FLINK_DIR &
101101 export minikube_mount_pid=$!
102+ echo " The mounting process is running with pid $minikube_mount_pid "
102103 else
103104 setup_kubernetes_for_linux
104105 if ! retry_times ${MINIKUBE_START_RETRIES} ${MINIKUBE_START_BACKOFF} start_kubernetes_if_not_running; then
@@ -112,6 +113,7 @@ function start_kubernetes {
112113function stop_kubernetes {
113114 if [[ " ${OS_TYPE} " != " linux" ]]; then
114115 echo " $NON_LINUX_ENV_NOTE "
116+ echo " Killing mounting process $minikube_mount_pid "
115117 kill $minikube_mount_pid 2> /dev/null
116118 else
117119 echo " Stopping minikube ..."
@@ -178,21 +180,9 @@ function cleanup {
178180 stop_kubernetes
179181}
180182
181- function setConsoleLogging {
182- cat >> $FLINK_DIR /conf/log4j.properties << END
183- rootLogger.appenderRef.console.ref = ConsoleAppender
184-
185- # Log all infos to the console
186- appender.console.name = ConsoleAppender
187- appender.console.type = CONSOLE
188- appender.console.layout.type = PatternLayout
189- appender.console.layout.pattern = %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%t] %-60c %x - %m%n
190- END
191- }
192-
193183function get_host_machine_address {
194184 if [[ " ${OS_TYPE} " != " linux" ]]; then
195- echo $( minikube ssh " route -n | grep ^0.0.0.0 | awk '{ print \$ 2 }' | tr -d '[:space:]'" )
185+ echo $( $MINIKUBE_PATH ssh " route -n | grep ^0.0.0.0 | awk '{ print \$ 2 }' | tr -d '[:space:]'" )
196186 else
197187 echo " localhost"
198188 fi
0 commit comments