Merge pull request #129 from stackhpc/bugfix/use_upper_constraints
Respect Kolla upper constraints in virtual envs
This commit is contained in:
commit
a1aa07c6d4
|
@ -3,6 +3,8 @@
|
|||
hosts: docker
|
||||
tags:
|
||||
- docker
|
||||
vars:
|
||||
- docker_upper_constraints_file: "{{ kolla_upper_constraints_file }}"
|
||||
roles:
|
||||
- role: docker
|
||||
docker_daemon_mtu: "{{ public_net_name | net_mtu | default }}"
|
||||
|
|
|
@ -278,6 +278,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.
|
||||
|
||||
|
|
|
@ -26,5 +26,6 @@
|
|||
pip:
|
||||
name: docker
|
||||
state: latest
|
||||
extra_args: "{% if kolla_upper_constraints_file %}-c {{ kolla_upper_constraints_file }}{% endif %}"
|
||||
virtualenv: "{{ virtualenv is defined | ternary(virtualenv, omit) }}"
|
||||
become: "{{ virtualenv is not defined }}"
|
||||
|
|
|
@ -33,3 +33,7 @@ docker_registry_ca:
|
|||
|
||||
# MTU to pass through to containers not using net=host
|
||||
docker_daemon_mtu: 1500
|
||||
|
||||
# Upper constraints file which is passed to pip when installing packages
|
||||
# into a venv.
|
||||
docker_upper_constraints_file:
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
pip:
|
||||
name: docker
|
||||
state: latest
|
||||
extra_args: "{% if docker_upper_constraints_file %}-c {{ docker_upper_constraints_file }}{% endif %}"
|
||||
virtualenv: "{{ virtualenv is defined | ternary(virtualenv, omit) }}"
|
||||
become: "{{ virtualenv is not defined }}"
|
||||
|
||||
|
|
|
@ -19,6 +19,10 @@ kolla_ansible_venv: "{{ ansible_env['PWD'] }}/kolla-venv"
|
|||
# remotely on the target nodes. If None, no virtualenv will be used.
|
||||
kolla_ansible_target_venv:
|
||||
|
||||
# Upper constraints file which is passed to pip when installing packages
|
||||
# into the kolla-ansible venv.
|
||||
kolla_upper_constraints_file:
|
||||
|
||||
# Password to use to encrypt the passwords.yml file.
|
||||
kolla_ansible_vault_password:
|
||||
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
pip:
|
||||
requirements: "{{ kolla_ansible_venv }}/requirements.txt"
|
||||
state: present
|
||||
extra_args: "{% if kolla_upper_constraints_file %}-c {{ kolla_upper_constraints_file }}{% endif %}"
|
||||
virtualenv: "{{ kolla_ansible_venv }}"
|
||||
|
||||
# This is a workaround for the lack of a python package for libselinux-python
|
||||
|
|
|
@ -15,6 +15,10 @@ kolla_source_version:
|
|||
# Virtualenv directory where Kolla will be installed.
|
||||
kolla_venv: "{{ ansible_env['PWD'] }}/kolla-venv"
|
||||
|
||||
# Upper constraints file which is passed to pip when installing packages
|
||||
# into the kolla venv.
|
||||
kolla_upper_constraints_file:
|
||||
|
||||
# Directory where Kolla config files will be installed.
|
||||
kolla_build_config_path:
|
||||
|
||||
|
|
|
@ -51,18 +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: "{% if kolla_upper_constraints_file %}-c {{ kolla_upper_constraints_file }}{% endif %}"
|
||||
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 }}"
|
||||
install: "{{ kolla_ctl_install_type == 'source' }}"
|
||||
|
@ -70,7 +74,4 @@
|
|||
- name: "kolla"
|
||||
version: "{{ kolla_openstack_release }}"
|
||||
install: "{{ kolla_ctl_install_type == 'binary' }}"
|
||||
# Required for kolla-genpwd.
|
||||
- name: PyYAML
|
||||
version: "3.12"
|
||||
when: item.install | default(True) | bool
|
||||
|
|
Loading…
Reference in New Issue