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
This commit is contained in:
parent
0d234fe910
commit
27ee3973a7
@ -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_MIRROR_HOST=$(echo $NODEPOOL_MIRROR_HOST|tr '[:upper:]' '[:lower:]')
|
||||||
NODEPOOL_PYPI_MIRROR=${NODEPOOL_PYPI_MIRROR:-http://$NODEPOOL_MIRROR_HOST/pypi/simple}
|
NODEPOOL_PYPI_MIRROR=${NODEPOOL_PYPI_MIRROR:-http://$NODEPOOL_MIRROR_HOST/pypi/simple}
|
||||||
|
|
||||||
|
GIT_PROJECT_DIR=$(mktemp -d)
|
||||||
|
|
||||||
# Just for mandre :)
|
# Just for mandre :)
|
||||||
if [[ ! -f /etc/sudoers.d/jenkins ]]; then
|
if [[ ! -f /etc/sudoers.d/jenkins ]]; then
|
||||||
echo "jenkins ALL=(:docker) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/jenkins
|
echo "jenkins ALL=(:docker) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/jenkins
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function build_image {
|
function clone_repos {
|
||||||
KOLLA_DIR=$(mktemp -d)
|
|
||||||
cat > /tmp/clonemap <<EOF
|
cat > /tmp/clonemap <<EOF
|
||||||
clonemap:
|
clonemap:
|
||||||
- name: openstack/kolla
|
- name: openstack/kolla
|
||||||
dest: ${KOLLA_DIR}
|
dest: ${GIT_PROJECT_DIR}/kolla
|
||||||
|
- name: openstack/requirements
|
||||||
|
dest: ${GIT_PROJECT_DIR}/requirements
|
||||||
EOF
|
EOF
|
||||||
/usr/zuul-env/bin/zuul-cloner -m /tmp/clonemap --workspace "$(pwd)" \
|
/usr/zuul-env/bin/zuul-cloner -m /tmp/clonemap --workspace "$(pwd)" \
|
||||||
--cache-dir /opt/git git://git.openstack.org \
|
--cache-dir /opt/git git://git.openstack.org \
|
||||||
openstack/kolla
|
openstack/kolla openstack/requirements
|
||||||
pushd "${KOLLA_DIR}"
|
}
|
||||||
|
|
||||||
|
function build_image {
|
||||||
|
pushd "${GIT_PROJECT_DIR}/kolla"
|
||||||
sudo tox -e "build-${BASE_DISTRO}-${INSTALL_TYPE}"
|
sudo tox -e "build-${BASE_DISTRO}-${INSTALL_TYPE}"
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
@ -138,7 +144,7 @@ function setup_ansible {
|
|||||||
mkdir /tmp/kolla
|
mkdir /tmp/kolla
|
||||||
|
|
||||||
# TODO(SamYaple): Move to virtualenv
|
# TODO(SamYaple): Move to virtualenv
|
||||||
sudo -H pip install -U "ansible>=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
|
detect_distro
|
||||||
|
|
||||||
setup_inventory
|
setup_inventory
|
||||||
@ -146,7 +152,7 @@ function setup_ansible {
|
|||||||
# Record the running state of the environment as seen by the setup module
|
# 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
|
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 mkdir /etc/ansible
|
||||||
sudo tee /etc/ansible/ansible.cfg<<EOF
|
sudo tee /etc/ansible/ansible.cfg<<EOF
|
||||||
[defaults]
|
[defaults]
|
||||||
@ -170,6 +176,7 @@ function setup_logging {
|
|||||||
|
|
||||||
setup_logging
|
setup_logging
|
||||||
tools/dump_info.sh
|
tools/dump_info.sh
|
||||||
|
clone_repos
|
||||||
setup_workaround_broken_nodepool
|
setup_workaround_broken_nodepool
|
||||||
setup_ssh
|
setup_ssh
|
||||||
setup_ansible
|
setup_ansible
|
||||||
|
Loading…
Reference in New Issue
Block a user