Merge "Enable developer mode"
This commit is contained in:
commit
605a6c1fe5
@ -23,6 +23,25 @@ verbose: True
|
|||||||
## APT Cache options
|
## APT Cache options
|
||||||
cache_timeout: 600
|
cache_timeout: 600
|
||||||
|
|
||||||
|
neutron_git_repo: https://git.openstack.org/openstack/neutron
|
||||||
|
neutron_git_install_branch: master
|
||||||
|
|
||||||
|
neutron_fwaas_git_repo: https://git.openstack.org/openstack/neutron-fwaas
|
||||||
|
neutron_fwaas_git_install_branch: master
|
||||||
|
|
||||||
|
neutron_lbaas_git_repo: https://git.openstack.org/openstack/neutron-lbaas
|
||||||
|
neutron_lbaas_git_install_branch: master
|
||||||
|
|
||||||
|
neutron_vpnaas_git_repo: https://git.openstack.org/openstack/neutron-vpnaas
|
||||||
|
neutron_vpnaas_git_install_branch: master
|
||||||
|
|
||||||
|
neutron_developer_mode: false
|
||||||
|
neutron_developer_constraints:
|
||||||
|
- "git+{{ neutron_git_repo }}@{{ neutron_git_install_branch }}#egg=neutron"
|
||||||
|
- "git+{{ neutron_fwaas_git_repo }}@{{ neutron_fwaas_git_install_branch }}#egg=neutron-fwaas"
|
||||||
|
- "git+{{ neutron_lbaas_git_repo }}@{{ neutron_lbaas_git_install_branch }}#egg=neutron-lbaas"
|
||||||
|
- "git+{{ neutron_vpnaas_git_repo }}@{{ neutron_vpnaas_git_install_branch }}#egg=neutron-vpnaas"
|
||||||
|
|
||||||
# Name of the virtual env to deploy into
|
# Name of the virtual env to deploy into
|
||||||
neutron_venv_tag: untagged
|
neutron_venv_tag: untagged
|
||||||
neutron_venv_bin: "/openstack/venvs/neutron-{{ neutron_venv_tag }}/bin"
|
neutron_venv_bin: "/openstack/venvs/neutron-{{ neutron_venv_tag }}/bin"
|
||||||
|
@ -33,4 +33,6 @@ dependencies:
|
|||||||
- apt_package_pinning
|
- apt_package_pinning
|
||||||
- galera_client
|
- galera_client
|
||||||
- openstack_openrc
|
- openstack_openrc
|
||||||
- pip_lock_down
|
- role: pip_lock_down
|
||||||
|
when:
|
||||||
|
- not neutron_developer_mode | bool
|
||||||
|
@ -72,6 +72,28 @@
|
|||||||
- neutron-install
|
- neutron-install
|
||||||
- neutron-apt-packages
|
- neutron-apt-packages
|
||||||
|
|
||||||
|
- name: Create developer mode constraint file
|
||||||
|
copy:
|
||||||
|
dest: "/opt/developer-pip-constraints.txt"
|
||||||
|
content: |
|
||||||
|
{% for item in neutron_developer_constraints %}
|
||||||
|
{{ item }}
|
||||||
|
{% endfor %}
|
||||||
|
when:
|
||||||
|
- neutron_developer_mode | bool
|
||||||
|
tags:
|
||||||
|
- neutron-install
|
||||||
|
- neutron-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"
|
||||||
|
when:
|
||||||
|
- neutron_developer_mode | bool
|
||||||
|
tags:
|
||||||
|
- neutron-install
|
||||||
|
- neutron-pip-packages
|
||||||
|
|
||||||
- name: Install requires pip packages
|
- name: Install requires pip packages
|
||||||
pip:
|
pip:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
@ -90,7 +112,9 @@
|
|||||||
stat:
|
stat:
|
||||||
path: "/var/cache/{{ neutron_venv_download_url | basename }}"
|
path: "/var/cache/{{ neutron_venv_download_url | basename }}"
|
||||||
get_md5: False
|
get_md5: False
|
||||||
when: neutron_venv_enabled | bool
|
when:
|
||||||
|
- not neutron_developer_mode | bool
|
||||||
|
- neutron_venv_enabled | bool
|
||||||
register: local_venv_stat
|
register: local_venv_stat
|
||||||
tags:
|
tags:
|
||||||
- neutron-install
|
- neutron-install
|
||||||
@ -100,7 +124,9 @@
|
|||||||
uri:
|
uri:
|
||||||
url: "{{ neutron_venv_download_url | replace('tgz', 'checksum') }}"
|
url: "{{ neutron_venv_download_url | replace('tgz', 'checksum') }}"
|
||||||
return_content: True
|
return_content: True
|
||||||
when: neutron_venv_enabled | bool
|
when:
|
||||||
|
- not neutron_developer_mode | bool
|
||||||
|
- neutron_venv_enabled | bool
|
||||||
register: remote_venv_checksum
|
register: remote_venv_checksum
|
||||||
tags:
|
tags:
|
||||||
- neutron-install
|
- neutron-install
|
||||||
@ -119,6 +145,7 @@
|
|||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
register: get_venv
|
register: get_venv
|
||||||
when:
|
when:
|
||||||
|
- not neutron_developer_mode | bool
|
||||||
- neutron_venv_enabled | bool
|
- neutron_venv_enabled | bool
|
||||||
- (local_venv_stat.stat.exists == False or
|
- (local_venv_stat.stat.exists == False or
|
||||||
{{ local_venv_stat.stat.checksum is defined and local_venv_stat.stat.checksum != remote_venv_checksum.content | trim }})
|
{{ local_venv_stat.stat.checksum is defined and local_venv_stat.stat.checksum != remote_venv_checksum.content | trim }})
|
||||||
@ -150,6 +177,7 @@
|
|||||||
path: "{{ neutron_venv_bin | dirname }}"
|
path: "{{ neutron_venv_bin | dirname }}"
|
||||||
state: directory
|
state: directory
|
||||||
when:
|
when:
|
||||||
|
- not neutron_developer_mode | bool
|
||||||
- neutron_venv_enabled | bool
|
- neutron_venv_enabled | bool
|
||||||
- neutron_get_venv | changed
|
- neutron_get_venv | changed
|
||||||
tags:
|
tags:
|
||||||
@ -162,6 +190,7 @@
|
|||||||
dest: "{{ neutron_venv_bin | dirname }}"
|
dest: "{{ neutron_venv_bin | dirname }}"
|
||||||
copy: "no"
|
copy: "no"
|
||||||
when:
|
when:
|
||||||
|
- not neutron_developer_mode | bool
|
||||||
- neutron_venv_enabled | bool
|
- neutron_venv_enabled | bool
|
||||||
- neutron_get_venv | changed
|
- neutron_get_venv | changed
|
||||||
notify: Restart neutron services
|
notify: Restart neutron services
|
||||||
@ -173,6 +202,7 @@
|
|||||||
command: >
|
command: >
|
||||||
virtualenv-tools --update-path=auto {{ neutron_venv_bin | dirname }}
|
virtualenv-tools --update-path=auto {{ neutron_venv_bin | dirname }}
|
||||||
when:
|
when:
|
||||||
|
- not neutron_developer_mode | bool
|
||||||
- neutron_venv_enabled | bool
|
- neutron_venv_enabled | bool
|
||||||
- neutron_get_venv | success
|
- neutron_get_venv | success
|
||||||
tags:
|
tags:
|
||||||
@ -193,7 +223,7 @@
|
|||||||
with_items: neutron_pip_packages
|
with_items: neutron_pip_packages
|
||||||
when:
|
when:
|
||||||
- neutron_venv_enabled | bool
|
- neutron_venv_enabled | bool
|
||||||
- neutron_get_venv | failed
|
- neutron_get_venv | failed or neutron_developer_mode | bool
|
||||||
notify: Restart neutron services
|
notify: Restart neutron services
|
||||||
tags:
|
tags:
|
||||||
- neutron-install
|
- neutron-install
|
||||||
@ -209,9 +239,10 @@
|
|||||||
retries: 5
|
retries: 5
|
||||||
delay: 2
|
delay: 2
|
||||||
with_items: neutron_pip_packages
|
with_items: neutron_pip_packages
|
||||||
when: not neutron_venv_enabled | bool
|
when:
|
||||||
|
- not neutron_developer_mode | bool
|
||||||
|
- not neutron_venv_enabled | bool
|
||||||
notify: Restart neutron services
|
notify: Restart neutron services
|
||||||
tags:
|
tags:
|
||||||
- neutron-install
|
- neutron-install
|
||||||
- neutron-pip-packages
|
- neutron-pip-packages
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user