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
770d498469
commit
a32e2981bb
|
@ -19,6 +19,7 @@ is_metal: true
|
|||
## Verbosity Options
|
||||
debug: False
|
||||
verbose: True
|
||||
tempest_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/tempest.tgz
|
||||
tempest_fatal_deprecations: False
|
||||
|
||||
tempest_private_subnet_cidr: "192.168.74.0/24"
|
||||
|
@ -71,6 +72,17 @@ tempest_volume_multi_backend_enabled: False
|
|||
tempest_main_group: tempest_all
|
||||
|
||||
tempest_requires_pip_packages:
|
||||
- python-glanceclient
|
||||
- python-keystoneclient
|
||||
- python-neutronclient
|
||||
- python-novaclient
|
||||
- virtualenv
|
||||
- virtualenv-tools
|
||||
|
||||
tempest_pip_packages:
|
||||
- fixtures
|
||||
- junitxml
|
||||
- nose
|
||||
- oslo.serialization
|
||||
- python-ceilometerclient
|
||||
- python-cinderclient
|
||||
|
@ -81,17 +93,12 @@ tempest_requires_pip_packages:
|
|||
- python-neutronclient
|
||||
- python-novaclient
|
||||
- python-openstackclient
|
||||
- python-subunit
|
||||
- python-swiftclient
|
||||
- virtualenv
|
||||
|
||||
tempest_pip_packages:
|
||||
- fixtures
|
||||
- nose
|
||||
- tempest-lib
|
||||
- testrepository
|
||||
- testscenarios
|
||||
- testtools
|
||||
- python-subunit
|
||||
- junitxml
|
||||
|
||||
# Please update SHA in tempest_images below when changing the cirros version.
|
||||
cirros_version: 0.3.4
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- include: tempest_install.yml
|
||||
|
||||
- include: tempest_resources.yml
|
||||
when: >
|
||||
inventory_hostname == groups[tempest_main_group][0]
|
||||
|
@ -22,7 +24,6 @@
|
|||
when: >
|
||||
inventory_hostname != groups[tempest_main_group][0]
|
||||
|
||||
- include: tempest_install.yml
|
||||
- include: tempest_post_install.yml
|
||||
|
||||
- name: Flush handlers
|
||||
|
|
|
@ -26,7 +26,8 @@
|
|||
- "{{ tempest_requires_pip_packages }}"
|
||||
tags:
|
||||
- tempest-pip-requires-packages
|
||||
- tempest-pip-install
|
||||
- tempest-install
|
||||
- tempest-pip-packages
|
||||
|
||||
- name: Get tempest from git
|
||||
git:
|
||||
|
@ -42,17 +43,83 @@
|
|||
- tempest-git-clone
|
||||
- tempest-pip-install
|
||||
|
||||
- name: Install pip packages for tempest
|
||||
- name: Attempt venv download
|
||||
get_url:
|
||||
url: "{{ tempest_venv_download_url }}"
|
||||
dest: "/var/cache/{{ tempest_venv_download_url | basename }}"
|
||||
ignore_errors: true
|
||||
register: get_venv
|
||||
tags:
|
||||
- tempest-install
|
||||
- tempest-pip-packages
|
||||
|
||||
- name: Set tempest get_venv fact
|
||||
set_fact:
|
||||
tempest_get_venv: "{{ get_venv }}"
|
||||
tags:
|
||||
- tempest-install
|
||||
- tempest-pip-packages
|
||||
|
||||
- name: Create tempest venv dir
|
||||
file:
|
||||
path: "{{ tempest_git_dest }}"
|
||||
state: directory
|
||||
when:
|
||||
- tempest_get_venv | success
|
||||
tags:
|
||||
- tempest-install
|
||||
- tempest-pip-packages
|
||||
|
||||
- name: Unarchive pre-built venv
|
||||
unarchive:
|
||||
src: "/var/cache/{{ tempest_venv_download_url | basename }}"
|
||||
dest: "{{ tempest_git_dest }}"
|
||||
copy: "no"
|
||||
when:
|
||||
- tempest_get_venv | success
|
||||
tags:
|
||||
- tempest-install
|
||||
- tempest-pip-packages
|
||||
|
||||
- name: Update virtualenv path
|
||||
command: >
|
||||
virtualenv-tools --update-path=auto {{ tempest_git_dest }}
|
||||
when:
|
||||
- tempest_get_venv | success
|
||||
tags:
|
||||
- tempest-install
|
||||
- tempest-pip-packages
|
||||
|
||||
- name: Install pip packages for tempest (prebuilt venv)
|
||||
pip:
|
||||
name: "{{ item }}"
|
||||
name: "{{ tempest_git_dest }}"
|
||||
state: present
|
||||
virtualenv: "{{ tempest_git_dest }}"
|
||||
virtualenv_site_packages: "yes"
|
||||
virtualenv_site_packages: "no"
|
||||
extra_args: "{{ tempest_pip_instructions }}"
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
when:
|
||||
- tempest_get_venv | success
|
||||
tags:
|
||||
- tempest-pip-packages
|
||||
- tempest-pip-install
|
||||
|
||||
- name: Install pip packages for tempest (no prebuilt venv)
|
||||
pip:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
virtualenv: "{{ tempest_git_dest }}"
|
||||
virtualenv_site_packages: "no"
|
||||
extra_args: "{{ tempest_pip_instructions }}"
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
when:
|
||||
- tempest_get_venv | failed
|
||||
with_items:
|
||||
- "{{ tempest_pip_packages }}"
|
||||
- "{{ tempest_git_dest }}"
|
||||
|
|
Loading…
Reference in New Issue