Reduce gate resource usage

Change-Id: Ic6cd45ec708efe4f573e19f3bc910717ac3b4fbb
Partially-Implements: blueprint functional-testing-gate
This commit is contained in:
SamYaple 2016-02-14 23:36:52 +00:00
parent 525c8d241a
commit 2c45bef065
2 changed files with 40 additions and 9 deletions

View File

@ -45,10 +45,9 @@ _PROFILE_OPTS = [
'openvswitch', 'rabbitmq', 'rsyslog'], 'openvswitch', 'rabbitmq', 'rsyslog'],
help='Default images'), help='Default images'),
cfg.ListOpt('gate', cfg.ListOpt('gate',
default=['ceph', 'cinder', 'glance', 'haproxy', 'heat', default=['glance', 'haproxy', 'keepalived', 'keystone',
'horizon', 'keepalived', 'keystone', 'kolla-toolbox', 'kolla-toolbox', 'mariadb', 'memcached', 'neutron',
'mariadb', 'memcached', 'neutron', 'nova', 'nova', 'openvswitch', 'rabbitmq', 'rsyslog'],
'openvswitch', 'rabbitmq', 'rsyslog'],
help='Gate images'), help='Gate images'),
cfg.ListOpt('mesos', cfg.ListOpt('mesos',
default=['chronos', 'marathon', 'mesos-master', 'mesos-slave', default=['chronos', 'marathon', 'mesos-master', 'mesos-slave',

View File

@ -5,6 +5,9 @@ set -o errexit
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
export KOLLA_BASE=$1
export KOLLA_TYPE=$2
function check_failure { function check_failure {
docker ps -a docker ps -a
failed_containers=$(docker ps -a --format "{{.Names}}" --filter status=exited) failed_containers=$(docker ps -a --format "{{.Names}}" --filter status=exited)
@ -13,25 +16,54 @@ function check_failure {
docker logs --tail all ${failed} docker logs --tail all ${failed}
done done
journalctl --no-pager -u docker.service || :
cat /var/log/upstart/docker.log || :
if [[ -n ${failed_containers} ]]; then if [[ -n ${failed_containers} ]]; then
echo 'FAILED' echo 'FAILED'
exit 1 exit 1
fi fi
} }
trap check_failure EXIT function write_configs {
mkdir -p /etc/kolla/config
# Populate globals.yml cat << EOF > /etc/kolla/globals.yml
cat << EOF > /etc/kolla/globals.yml
--- ---
kolla_base_distro: "$1" kolla_base_distro: "${KOLLA_BASE}"
kolla_install_type: "$2" kolla_install_type: "${KOLLA_TYPE}"
kolla_internal_address: "169.254.169.10" kolla_internal_address: "169.254.169.10"
docker_restart_policy: "never" docker_restart_policy: "never"
network_interface: "eth0" network_interface: "eth0"
neutron_external_interface: "fake_interface" neutron_external_interface: "fake_interface"
enable_horizon: "no"
enable_heat: "no"
EOF EOF
cat << EOF > /etc/kolla/config/nova.conf
[DEFAULT]
osapi_compute_workers = 1
[conductor]
workers = 1
EOF
cat << EOF > /etc/kolla/config/glance.conf
[DEFAULT]
workers = 1
EOF
cat << EOF > /etc/kolla/config/neutron.conf
[DEFAULT]
api_workers = 1
metadata_workers = 1
EOF
}
trap check_failure EXIT
write_configs
# Create dummy interface for neutron # Create dummy interface for neutron
ip l a fake_interface type dummy ip l a fake_interface type dummy