kolla/tests/deploy_kolla.sh
Sam Yaple f39bb2ee13 In gate functional testing
This runs the ansible playbooks to completion.

It does not validate that OpenStack is working yet, but it will ensure
Ansible did not break.

Additional gates will be needed for this and there is a patch in
project-config to handle that.

Change-Id: I7a24a704023cc8f19d42844636e9cb512060f693
backport: liberty
Partially-Implements: blueprint functional-testing-gate
2015-10-20 19:15:33 +00:00

46 lines
1.0 KiB
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
docker logs bootstrap_keystone
echo "FAILED"
exit 1
}
# Setup ssh key as required
ssh-keygen -f kolla-ssh -N ""
cat kolla-ssh.pub | tee /root/.ssh/authorized_keys
# Install Ansible and docker-py
pip install "ansible<2" docker-py
pip freeze | egrep "docker|ansible"
# Setup configs
cp -a etc/kolla /etc/
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