Use upper-constraints file in developer mode
This commit adds the following new variables: horizon_requirements_git_repo horizon_requirements_git_install_branch When in developer mode, This repo is then cloned in horizon_install.yml and used as an upper constraint in the functional test to avoid us installing and running into issues resulting from uncapped dependencies being installed. This commit also changes the pip_install_options fact name in horizon_install.yml to pip_install_options_fact. This allows us to maintain the existing pip_install_options variable without overwriting it with options when in developer mode, which ultimately means we can have multiple services running in a container use a combination of *_developer_mode: true and *_developer_mode: false. At the moment, if a service writes pip_install_options fact with the constraints options, those options will persist to other services running in the container even if *_developer_mode: false. Change-Id: If481de123073e46825cd5816062f08332d2d98fb
This commit is contained in:
parent
bfabfab93f
commit
e672a26592
@ -20,6 +20,8 @@ verbose: True
|
||||
horizon_git_repo: https://git.openstack.org/openstack/horizon
|
||||
horizon_git_install_branch: master
|
||||
horizon_developer_mode: false
|
||||
horizon_requirements_git_repo: https://git.openstack.org/openstack/requirements
|
||||
horizon_requirements_git_install_branch: master
|
||||
horizon_developer_constraints:
|
||||
- "git+{{ horizon_git_repo }}@{{ horizon_git_install_branch }}#egg=horizon"
|
||||
|
||||
|
@ -43,15 +43,37 @@
|
||||
- horizon-install
|
||||
- horizon-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: "{{ horizon_requirements_git_repo }}"
|
||||
dest: "/opt/requirements"
|
||||
clone: yes
|
||||
update: yes
|
||||
version: "{{ horizon_requirements_git_install_branch }}"
|
||||
when:
|
||||
- horizon_developer_mode | bool
|
||||
tags:
|
||||
- horizon-install
|
||||
- horizon-pip-packages
|
||||
|
||||
- name: Add constraints to pip_install_options fact for developer mode
|
||||
set_fact:
|
||||
pip_install_options_fact: "{{ pip_install_options|default('') }} --constraint /opt/developer-pip-constraints.txt --constraint /opt/requirements/upper-constraints.txt"
|
||||
when:
|
||||
- horizon_developer_mode | bool
|
||||
tags:
|
||||
- horizon-install
|
||||
- horizon-pip-packages
|
||||
|
||||
- name: Set pip_install_options_fact when not in developer mode
|
||||
set_fact:
|
||||
pip_install_options_fact: "{{ pip_install_options|default('') }}"
|
||||
when:
|
||||
- not horizon_developer_mode | bool
|
||||
tags:
|
||||
- horizon-install
|
||||
- horizon-pip-packages
|
||||
|
||||
- name: Install apt packages
|
||||
apt:
|
||||
pkg: "{{ item }}"
|
||||
@ -69,7 +91,7 @@
|
||||
pip:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
extra_args: "{{ pip_install_options|default('') }}"
|
||||
extra_args: "{{ pip_install_options_fact }}"
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
@ -186,7 +208,7 @@
|
||||
state: present
|
||||
virtualenv: "{{ horizon_venv_bin | dirname }}"
|
||||
virtualenv_site_packages: "no"
|
||||
extra_args: "{{ pip_install_options|default('') }}"
|
||||
extra_args: "{{ pip_install_options_fact }}"
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
@ -203,7 +225,7 @@
|
||||
pip:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
extra_args: "{{ pip_install_options|default('') }}"
|
||||
extra_args: "{{ pip_install_options_fact }}"
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
|
@ -93,6 +93,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"
|
||||
@ -116,6 +117,8 @@
|
||||
internal_lb_vip_address: 10.100.100.102
|
||||
horizon_developer_mode: true
|
||||
horizon_venv_tag: "testing"
|
||||
horizon_git_install_branch: 18f1605bddd428a014d0e43ef52d1af6305e1e03
|
||||
horizon_requirements_git_install_branch: 332278d456e06870150835564342570ec9d5f5a0
|
||||
horizon_galera_address: 10.100.100.101
|
||||
horizon_rabbitmq_password: "secrete"
|
||||
horizon_rabbitmq_userid: horizon
|
||||
|
Loading…
x
Reference in New Issue
Block a user