From 27ee3973a7e95db3f3f6c43c0d514f332b7d1602 Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Thu, 1 Dec 2016 18:50:42 +0800 Subject: [PATCH] Install ansible with OpenStack requirements constrains OpenStack requirements constrains is well tested. Use it in case of installing upstream broken package. This also fixes latest requests 2.12.2 break docker-py, which makes kolla gate red. Change-Id: I3e4ec4af2a6e1280313733e8f31f2eea7669dbc1 --- tools/setup_gate.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/tools/setup_gate.sh b/tools/setup_gate.sh index 067370d1ca..d5e61ef2da 100755 --- a/tools/setup_gate.sh +++ b/tools/setup_gate.sh @@ -12,22 +12,28 @@ NODEPOOL_MIRROR_HOST=${NODEPOOL_MIRROR_HOST:-mirror.$NODEPOOL_REGION.$NODEPOOL_C NODEPOOL_MIRROR_HOST=$(echo $NODEPOOL_MIRROR_HOST|tr '[:upper:]' '[:lower:]') NODEPOOL_PYPI_MIRROR=${NODEPOOL_PYPI_MIRROR:-http://$NODEPOOL_MIRROR_HOST/pypi/simple} +GIT_PROJECT_DIR=$(mktemp -d) + # Just for mandre :) if [[ ! -f /etc/sudoers.d/jenkins ]]; then echo "jenkins ALL=(:docker) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/jenkins fi -function build_image { - KOLLA_DIR=$(mktemp -d) +function clone_repos { cat > /tmp/clonemap <=2" "docker-py>=1.6.0" "python-openstackclient" "python-neutronclient" + sudo -H pip install -U -c ${GIT_PROJECT_DIR}/requirements/upper-constraints.txt "ansible>=2" "docker-py>=1.6.0" "python-openstackclient" "python-neutronclient" detect_distro setup_inventory @@ -146,7 +152,7 @@ function setup_ansible { # Record the running state of the environment as seen by the setup module ansible all -i ${RAW_INVENTORY} -m setup > /tmp/logs/ansible/initial-setup - sudo pip install ara + sudo pip install -c ${GIT_PROJECT_DIR}/requirements/upper-constraints.txt ara sudo mkdir /etc/ansible sudo tee /etc/ansible/ansible.cfg<