diff --git a/manifests/repos.pp b/manifests/repos.pp index a1eeceb95..729b95de1 100644 --- a/manifests/repos.pp +++ b/manifests/repos.pp @@ -14,6 +14,7 @@ class openstack_integration::repos { release => 'newton', repo => 'updates', package_require => true, + uca_location => $::ubuntu_mirror_host, } } # Ceph is both packaged on UCA & ceph.com diff --git a/run_tests.sh b/run_tests.sh index d8962ba24..90ff30a26 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -21,6 +21,20 @@ export PUPPET_ARGS="${PUPPET_ARGS} --detailed-exitcodes --color=false --test --t export SCRIPT_DIR=$(cd `dirname $0` && pwd -P) export DISTRO=$(lsb_release -c -s) +# NOTE(pabelanger): Setup facter to know about AFS mirror. +if [ -f /etc/nodepool/provider ]; then + source /etc/nodepool/provider + NODEPOOL_MIRROR_HOST=${NODEPOOL_MIRROR_HOST:-mirror.$NODEPOOL_REGION.$NODEPOOL_CLOUD.openstack.org} + NODEPOOL_MIRROR_HOST=$(echo $NODEPOOL_MIRROR_HOST|tr '[:upper:]' '[:lower:]') + CENTOS_MIRROR_HOST=${NODEPOOL_MIRROR_HOST} + UBUNTU_MIRROR_HOST="${NODEPOOL_MIRROR_HOST}/ubuntu-cloud-archive" +else + CENTOS_MIRROR_HOST='mirror.centos.org' + UBUNTU_MIRROR_HOST='ubuntu-cloud.archive.canonical.com/ubuntu' +fi +export FACTER_centos_mirror_host="http://${CENTOS_MIRROR_HOST}" +export FACTER_ubuntu_mirror_host="http://${UBUNTU_MIRROR_HOST}" + if [ $PUPPET_MAJ_VERSION == 4 ]; then export PATH=${PATH}:/opt/puppetlabs/bin export PUPPET_RELEASE_FILE=puppetlabs-release-pc1