Use upper-constraints file in developer mode

Last week, keystone was failing to install in developer mode due to us
not specifying upper constraints.  This was due to an upcapped version
of pysaml2 being installed which is causing problems.  This commit first
clones the requirements repo and then uses the upper constraints file
when installing packages.

Note that we only update pip_install_options when in developer mode if
the constraints aren't already set.  This is because in developer mode
you could have a container with multiple services running on it and the
pip_install_options fact would get updated when already set, resulting
in pip failing to install packages.

Change-Id: I270d7a37541d497ee0e1a576d5fda6f38dd2cb4c
Partial-Bug: #1553960
This commit is contained in:
Matt Thompson 2016-03-14 14:45:07 +00:00
parent 404b9e2a8b
commit fda42ebd9a
3 changed files with 22 additions and 3 deletions

View File

@ -22,6 +22,8 @@ cache_timeout: 600
glance_git_repo: https://git.openstack.org/openstack/glance
glance_git_install_branch: master
glance_requirements_git_repo: https://git.openstack.org/openstack/requirements
glance_requirements_git_install_branch: master
glance_developer_mode: false
glance_developer_constraints:
- "git+{{ glance_git_repo }}@{{ glance_git_install_branch }}#egg=glance"

View File

@ -43,15 +43,30 @@
- glance-install
- glance-pip-packages
- name: Set constraint file fact for developer mode
set_fact:
pip_install_options: "{{ pip_install_options|default('') }} --constraint /opt/developer-pip-constraints.txt"
- name: Clone requirements git repository
git:
repo: "{{ glance_requirements_git_repo }}"
dest: "/opt/requirements"
clone: yes
update: yes
version: "{{ glance_requirements_git_install_branch }}"
when:
- glance_developer_mode | bool
tags:
- glance-install
- glance-pip-packages
- name: Add constraints to pip_install_options fact for developer mode
set_fact:
pip_install_options: "{{ pip_install_options|default('') }} --constraint /opt/developer-pip-constraints.txt --constraint /opt/requirements/upper-constraints.txt"
when:
- glance_developer_mode | bool
- "'/opt/developer-pip-constraints.txt' not in pip_install_options|default('')"
- "'/opt/requirements/upper-constraints.txt' not in pip_install_options|default('')"
tags:
- glance-install
- glance-pip-packages
- name: Install apt packages
apt:
pkg: "{{ item }}"

View File

@ -201,6 +201,7 @@
keystone_venv_tag: "testing"
keystone_developer_mode: true
keystone_git_install_branch: a55128044f763f5cfe2fdc57c738eaca97636448
keystone_requirements_git_install_branch: 332278d456e06870150835564342570ec9d5f5a0
keystone_auth_admin_token: "SuperSecreteTestToken"
keystone_auth_admin_password: "SuperSecretePassword"
keystone_service_password: "secrete"
@ -296,6 +297,7 @@
glance_venv_tag: "testing"
glance_developer_mode: true
glance_git_install_branch: 7d5c3710ce2739a8ac356208d4e104f2ce3ec9ab
glance_requirements_git_install_branch: 332278d456e06870150835564342570ec9d5f5a0
glance_service_password: "secrete"
glance_profiler_hmac_key: "secrete"
openrc_os_password: "{{ keystone_auth_admin_password }}"