Skip to content
This repository was archived by the owner on Jul 18, 2024. It is now read-only.

Commit 63d8e0c

Browse files
Merge pull request #13 from IBM/bx-show-logs
Bluemix toolchain - show logs when it exits
2 parents 897d8ff + 6eb0418 commit 63d8e0c

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

scripts/deploy-to-bluemix/deploy.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,21 @@ echo "Creating GameOn App"
55
IP_ADDR=$(bx cs workers $CLUSTER_NAME | grep normal | awk '{ print $2 }')
66
if [ -z $IP_ADDR ]; then
77
echo "$CLUSTER_NAME not created or workers not ready"
8+
echo "Running clusters are: "
9+
bx cs clusters
10+
echo "Running workers of $CLUSTER_NAME"
11+
bx cs workers $CLUSTER_NAME
812
exit 1
913
fi
1014

1115
echo -e "Configuring vars"
1216
exp=$(bx cs cluster-config $CLUSTER_NAME | grep export)
1317
if [ $? -ne 0 ]; then
1418
echo "Cluster $CLUSTER_NAME not created or not ready."
19+
echo "Running workers of $CLUSTER_NAME"
20+
bx cs workers $CLUSTER_NAME
21+
echo "Cluster-config of $CLUSTER_NAME"
22+
bx cs cluster-config $CLUSTER_NAME
1523
exit 1
1624
fi
1725
eval "$exp"
@@ -46,12 +54,14 @@ do
4654
keystore=$(kubectl logs setup | grep Import | awk '{print $4}')
4755
if [ "$keystore" = "104" ]
4856
then
49-
echo "Setup successfull"
57+
kubectl logs setup
58+
echo "Setup successful"
5059
break
5160
fi
5261
if [ $TRIES -eq 10 ]
5362
then
5463
echo "Failed setting up keystore values."
64+
kubectl logs setup
5565
exit 1
5666
fi
5767
TRIES=$((TRIES+1))
@@ -93,6 +103,7 @@ code=$(curl -sw '%{http_code}' http://$IP_ADDR:31200/health -o /dev/null)
93103
if [ $TRIES -eq 10 ]
94104
then
95105
echo "Failed setting up controlplane."
106+
kubectl logs $(kubectl get pods | grep controller | awk '{print $1}')
96107
exit 1
97108
fi
98109
TRIES=$((TRIES+1))
@@ -110,6 +121,7 @@ code=$(curl -sw '%{http_code}' http://$IP_ADDR:31300/uptime -o /dev/null)
110121
if [ $TRIES -eq 10 ]
111122
then
112123
echo "Failed setting up controlplane."
124+
kubectl logs $(kubectl get pods | grep registry | awk '{print $1}')
113125
exit 1
114126
fi
115127
TRIES=$((TRIES+1))

0 commit comments

Comments
 (0)