kolla-ansible/tests/deploy_aio.sh
Martin André 6190411d19 Improve ansible deployment failure reporting
Change-Id: I73395afa2a2d8f3dc835e010e3b1959ec725da2a
Closes-Bug: #1525102
Co-Authored-By: Paul Bourke <paul.bourke@oracle.com>
2015-12-11 16:48:14 +09:00

39 lines
900 B
Bash
Executable File

#!/bin/bash
set -o xtrace
set -o errexit
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
function print_failure {
docker ps -a
for failed in $(docker ps -a --format "{{.Names}}" --filter status=exited); do
docker logs --tail=all $failed
done
echo "FAILED"
exit 1
}
# Populate globals.yml
cat << EOF > /etc/kolla/globals.yml
---
kolla_base_distro: "$1"
kolla_install_type: "$2"
kolla_internal_address: "169.254.169.10"
docker_pull_policy: "missing"
docker_restart_policy: "no"
network_interface: "eth0"
neutron_external_interface: "fake_interface"
EOF
# Create dummy interface for neutron
ip l a fake_interface type dummy
# Actually do the deployment
tools/kolla-ansible deploy || print_failure
# TODO(SamYaple): Actually validate that all containers are started
docker ps -a
# TODO(SamYaple): Actually do functional testing of OpenStack