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:
Kevin Carter 2015-10-16 22:22:14 -05:00
parent fc9807660d
commit a6fffe08e4
2 changed files with 58 additions and 1 deletions

View File

@ -29,6 +29,8 @@ aodh_venv_enabled: true
# system path used when the installing.
aodh_bin: "{{ aodh_venv_bin }}"
aodh_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/aodh.tgz
## System info
aodh_system_user_name: aodh
aodh_system_group_name: aodh
@ -85,6 +87,7 @@ aodh_apt_packages:
# aodh packages that must be installed before anything else
aodh_requires_pip_packages:
- virtualenv
- virtualenv-tools
- python-keystoneclient # Keystoneclient needed to OSA keystone lib
# Common pip packages

View File

@ -43,6 +43,58 @@
- aodh-install
- aodh-pip-packages
- name: Attempt venv download
get_url:
url: "{{ aodh_venv_download_url }}"
dest: "/var/cache/{{ aodh_venv_download_url | basename }}"
ignore_errors: true
register: get_venv
when: aodh_venv_enabled | bool
tags:
- aodh-install
- aodh-pip-packages
- name: Set aodh get_venv fact
set_fact:
aodh_get_venv: "{{ get_venv }}"
when: aodh_venv_enabled | bool
tags:
- aodh-install
- aodh-pip-packages
- name: Create aodh venv dir
file:
path: "{{ aodh_venv_bin | dirname }}"
state: directory
when:
- aodh_venv_enabled | bool
- aodh_get_venv | success
tags:
- aodh-install
- aodh-pip-packages
- name: Unarchive pre-built venv
unarchive:
src: "/var/cache/{{ aodh_venv_download_url | basename }}"
dest: "{{ aodh_venv_bin | dirname }}"
copy: "no"
when:
- aodh_venv_enabled | bool
- aodh_get_venv | success
tags:
- aodh-install
- aodh-pip-packages
- name: Update virtualenv path
command: >
virtualenv-tools --update-path=auto {{ aodh_venv_bin | dirname }}
when:
- aodh_venv_enabled | bool
- aodh_get_venv | success
tags:
- aodh-install
- aodh-pip-packages
- name: Install pip packages (venv)
pip:
name: "{{ item }}"
@ -56,7 +108,9 @@
delay: 2
with_items:
- "{{ aodh_pip_packages }}"
when: aodh_venv_enabled | bool
when:
- aodh_venv_enabled | bool
- aodh_get_venv | failed
tags:
- aodh-install
- aodh-pip-packages