Commit f3825bc9 by Joel Barciauskas Committed by Joel Barciauskas

Print logs from container after failed healthcheck and only shallow

clone to save space
parent bddea86c
......@@ -6,7 +6,7 @@ python:
- "3.5"
env:
- DEVSTACK_WORKSPACE=/tmp DOCKER_COMPOSE_VERSION=1.13.0
- DEVSTACK_WORKSPACE=/tmp DOCKER_COMPOSE_VERSION=1.13.0 SHALLOW_CLONE=1
services:
- docker
......
......@@ -33,7 +33,11 @@ do
if [ -d "$name" ]; then
printf "The [%s] repo is already checked out. Continuing.\n" $name
else
git clone $repo
if [ "$SHALLOW_CLONE" -eq 1 ]; then
git clone --depth=1 $repo
else
git clone $repo
fi
fi
done
cd - &> /dev/null
set -e
set -x
echo "Checking LMS heartbeat:"
curl http://localhost:18000/heartbeat # LMS
curl http://localhost:18000/heartbeat
if [[ $? -ne 0 ]]; then
docker-compose logs
exit 2
fi
echo
echo "Checking Studio heartbeat:"
curl http://localhost:18010/heartbeat # Studio
if [[ $? -ne 0 ]]; then
docker-compose logs
exit 2
fi
echo
echo "Checking ecommerce health:"
curl http://localhost:18130/health/ # Ecommerce
if [[ $? -ne 0 ]]; then
docker-compose logs
exit 2
fi
echo
echo "Checking discovery health:"
curl http://localhost:18381/health/ # Discovery
if [[ $? -ne 0 ]]; then
docker-compose logs
exit 2
fi
......@@ -42,7 +42,6 @@ docker exec -i edx.devstack.mongo mongo < mongo-provision.js
# Nothing special needed for studio
docker-compose $DOCKER_COMPOSE_FILES up -d studio
./provision-ecommerce.sh
./provision-discovery.sh
./provision-credentials.sh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment