Add Consul support to 'OneClick' deployment.
[oom.git] / kubernetes / config / docker / init / src / config / consul / consul-agent-config / scripts / gremlin-script.sh
1
2 NAME=$(/consul/config/bin/kubectl -n onap-aai get pod | grep -o "gremlin[^[:space:]]*")
3
4 if [ -n "$NAME" ]; then
5    if /consul/config/bin/kubectl -n onap-aai exec -it $NAME -- ps -efww | grep 'java' | grep 'gremlin-server' > /dev/null; then
6
7       echo Success. Gremlin Server process is running. 2>&1
8       exit 0
9    else
10       echo Failed. Gremlin Server process is not running. 2>&1
11       exit 1
12    fi
13 else
14    echo Failed. Gremlin Server container is offline. 2>&1
15    exit 1
16 fi