Respect Kolla upper constraints in virtual envs

This commit is contained in:
Doug Szumski 2018-02-22 12:43:10 +00:00
parent 0429d616ff
commit 7dd01adae9
5 changed files with 15 additions and 4 deletions

View File

@ -271,6 +271,9 @@ kolla_external_fqdn_cert:
# Whether debug logging is enabled.
kolla_openstack_logging_debug: "False"
# Upper constraints file for the stable/pike branch of Kolla
kolla_upper_constraints_file: "https://raw.githubusercontent.com/openstack/requirements/stable/pike/upper-constraints.txt"
###############################################################################
# Kolla feature flag configuration.

View File

@ -26,5 +26,6 @@
pip:
name: docker
state: latest
extra_args: "-c {{ kolla_upper_constraints_file }}"
virtualenv: "{{ virtualenv is defined | ternary(virtualenv, omit) }}"
become: "{{ virtualenv is not defined }}"

View File

@ -18,6 +18,7 @@
pip:
name: docker
state: latest
extra_args: "-c {{ kolla_upper_constraints_file }}"
virtualenv: "{{ virtualenv is defined | ternary(virtualenv, omit) }}"
become: "{{ virtualenv is not defined }}"

View File

@ -58,6 +58,7 @@
pip:
requirements: "{{ kolla_ansible_venv }}/requirements.txt"
state: present
extra_args: "-c {{ kolla_upper_constraints_file }}"
virtualenv: "{{ kolla_ansible_venv }}"
# This is a workaround for the lack of a python package for libselinux-python

View File

@ -51,17 +51,22 @@
with_items:
- { name: pip }
- name: Ensure Python package docker-py is absent
# In version 2.0.0, docker renamed the docker-py python package to docker.
# Kolla requires the docker package rather than the docker-py package.
pip:
name: docker-py
state: absent
virtualenv: "{{ kolla_venv }}"
- name: Ensure required Python packages are installed
pip:
name: "{{ item.name }}"
version: "{{ item.version | default(omit) }}"
state: "{{ item.state | default('present') }}"
virtualenv: "{{ kolla_venv }}"
extra_args: "-c {{ kolla_upper_constraints_file }}"
with_items:
# In version 2.0.0, docker renamed the docker-py python package to docker.
# Kolla requires the docker package rather than the docker-py package.
- name: docker-py
state: absent
- name: docker
# Intall Kolla from source.
- name: "{{ kolla_source_path }}"