Implement shippable venvs
The change builds venvs in a single repo container and then ships them to to all targets. The built venvs will be within the repo servers and will allow for faster deployments, upgrades, and more consistent deployments for the life cycle of the deployment. This will create a versioned tarball that will allow for greater visablility into the build process as well as giving deployers/developers the ability to compair a release in place. Change-Id: Ieef0b89ebc009d1453c99e19e53a36eb2d70edae Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
51dfadc1e2
commit
72833f3a9c
@ -29,6 +29,8 @@ horizon_venv_enabled: true
|
||||
# system path used when the installing.
|
||||
horizon_bin: "{{ horizon_venv_bin }}"
|
||||
|
||||
horizon_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/horizon.tgz
|
||||
|
||||
## System info
|
||||
horizon_system_user_name: horizon
|
||||
horizon_system_group_name: www-data
|
||||
@ -137,6 +139,7 @@ horizon_apt_packages:
|
||||
# horizon packages that must be installed before anything else
|
||||
horizon_requires_pip_packages:
|
||||
- virtualenv
|
||||
- virtualenv-tools
|
||||
- python-keystoneclient # Keystoneclient needed to OSA keystone lib
|
||||
|
||||
horizon_pip_packages:
|
||||
|
@ -50,7 +50,9 @@
|
||||
delay: 2
|
||||
with_items:
|
||||
- "{{ horizon_pip_packages }}"
|
||||
when: horizon_venv_enabled | bool
|
||||
when:
|
||||
- horizon_venv_enabled | bool
|
||||
- horizon_get_venv | failed
|
||||
tags:
|
||||
- horizon-pip-packages
|
||||
|
||||
|
@ -71,6 +71,58 @@
|
||||
tags:
|
||||
- horizon-pip-packages
|
||||
|
||||
- name: Attempt venv download
|
||||
get_url:
|
||||
url: "{{ horizon_venv_download_url }}"
|
||||
dest: "/var/cache/{{ horizon_venv_download_url | basename }}"
|
||||
ignore_errors: true
|
||||
register: get_venv
|
||||
when: horizon_venv_enabled | bool
|
||||
tags:
|
||||
- horizon-install
|
||||
- horizon-pip-packages
|
||||
|
||||
- name: Set horizon get_venv fact
|
||||
set_fact:
|
||||
horizon_get_venv: "{{ get_venv }}"
|
||||
when: horizon_venv_enabled | bool
|
||||
tags:
|
||||
- horizon-install
|
||||
- horizon-pip-packages
|
||||
|
||||
- name: Create horizon venv dir
|
||||
file:
|
||||
path: "{{ horizon_venv_bin | dirname }}"
|
||||
state: directory
|
||||
when:
|
||||
- horizon_venv_enabled | bool
|
||||
- horizon_get_venv | success
|
||||
tags:
|
||||
- horizon-install
|
||||
- horizon-pip-packages
|
||||
|
||||
- name: Unarchive pre-built venv
|
||||
unarchive:
|
||||
src: "/var/cache/{{ horizon_venv_download_url | basename }}"
|
||||
dest: "{{ horizon_venv_bin | dirname }}"
|
||||
copy: "no"
|
||||
when:
|
||||
- horizon_venv_enabled | bool
|
||||
- horizon_get_venv | success
|
||||
tags:
|
||||
- horizon-install
|
||||
- horizon-pip-packages
|
||||
|
||||
- name: Update virtualenv path
|
||||
command: >
|
||||
virtualenv-tools --update-path=auto {{ horizon_venv_bin | dirname }}
|
||||
when:
|
||||
- horizon_venv_enabled | bool
|
||||
- horizon_get_venv | success
|
||||
tags:
|
||||
- horizon-install
|
||||
- horizon-pip-packages
|
||||
|
||||
- name: Create horizon venv
|
||||
pip:
|
||||
name: "{{ item }}"
|
||||
@ -80,8 +132,11 @@
|
||||
extra_args: "{{ pip_install_options|default('') }}"
|
||||
with_items:
|
||||
- "{{ horizon_requires_pip_packages }}"
|
||||
when: horizon_venv_enabled | bool
|
||||
when:
|
||||
- horizon_venv_enabled | bool
|
||||
- horizon_get_venv | failed
|
||||
tags:
|
||||
- horizon-install
|
||||
- horizon-pip-packages
|
||||
|
||||
- name: Create horizon links for venv
|
||||
@ -96,6 +151,7 @@
|
||||
dest: "{{ horizon_lib_dir }}"
|
||||
when: horizon_venv_enabled | bool
|
||||
tags:
|
||||
- horizon-install
|
||||
- horizon-configs
|
||||
|
||||
- name: Create static horizon dir
|
||||
|
Loading…
Reference in New Issue
Block a user