Add a tasks to download amphora image for octavia deployments
This patch adds a task to download the Octavia Amphora image to the working directory on the undercloud so that it can be pulled in by the Octavia overcloud deployment tasks. Change-Id: Ie387f1274059ec80d19c5ef0bf9aed7a3a999e2a
This commit is contained in:
parent
0b62606370
commit
4612cf32f1
@ -26,6 +26,15 @@
|
||||
tags:
|
||||
- validate-undercloud
|
||||
|
||||
- name: Download amphora image for octavia
|
||||
hosts: undercloud
|
||||
gather_facts: false
|
||||
tags:
|
||||
- octavia
|
||||
roles:
|
||||
- {role: octavia-amphora-download,
|
||||
when: download_amphora is defined and download_amphora|bool}
|
||||
|
||||
- name: Build images for quickstart
|
||||
hosts: undercloud
|
||||
gather_facts: false
|
||||
|
@ -26,6 +26,15 @@
|
||||
tags:
|
||||
- build
|
||||
|
||||
- name: Download amphora image for octavia
|
||||
hosts: undercloud
|
||||
gather_facts: false
|
||||
roles:
|
||||
- {role: octavia-amphora-download,
|
||||
when: download_amphora is defined and download_amphora|bool}
|
||||
tags:
|
||||
- octavia
|
||||
|
||||
# NOTE(aschultz): nested virt causes problems in CI so we default to qemu
|
||||
# and do not do the dynamic virt lookup.
|
||||
- name: Deploy Standalone
|
||||
|
@ -85,6 +85,15 @@
|
||||
roles:
|
||||
- validate-undercloud
|
||||
|
||||
- name: Download amphora image for octavia
|
||||
hosts: undercloud
|
||||
gather_facts: false
|
||||
tags:
|
||||
- octavia
|
||||
roles:
|
||||
- {role: octavia-amphora-download,
|
||||
when: download_amphora is defined and download_amphora|bool}
|
||||
|
||||
- name: Set Libvirt type
|
||||
hosts: overcloud
|
||||
roles:
|
||||
|
@ -38,3 +38,12 @@
|
||||
roles:
|
||||
- {role: tripleo-validations,
|
||||
when: run_tripleo_validations|bool or run_tripleo_validations_negative_tests|bool}
|
||||
|
||||
- name: Download amphora image for octavia
|
||||
hosts: undercloud
|
||||
gather_facts: false
|
||||
tags:
|
||||
- octavia
|
||||
roles:
|
||||
- {role: octavia-amphora-download,
|
||||
when: download_amphora is defined and download_amphora|bool}
|
||||
|
43
roles/octavia-amphora-download/README.md
Normal file
43
roles/octavia-amphora-download/README.md
Normal file
@ -0,0 +1,43 @@
|
||||
Octavia-amphora-download
|
||||
========================
|
||||
|
||||
An Ansible role to download Octavia amphora images to be used in CI or scripted deployments.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
This playbook expects a supported version of Ansible and working Internet access.
|
||||
|
||||
Role Variables:
|
||||
---------------
|
||||
|
||||
- target\_dir <'$HOME'> -- location to store the downloaded image
|
||||
- amphora\_url -- url of image to download. If not provided a default location based on branch is used.
|
||||
|
||||
Dependenncies
|
||||
-------------
|
||||
|
||||
No dependencies
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
Download the amphora image for the stein branch to foo's home directory:
|
||||
|
||||
- hosts: undercloud
|
||||
vars:
|
||||
release: "stein"
|
||||
target_dir: "/home/foo"
|
||||
roles:
|
||||
- octavia-amphora-dowload
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Apache 2.0
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
RDO-CI Team
|
2
roles/octavia-amphora-download/defaults/main.yml
Normal file
2
roles/octavia-amphora-download/defaults/main.yml
Normal file
@ -0,0 +1,2 @@
|
||||
---
|
||||
target_dir: "{{ working_dir }}"
|
17
roles/octavia-amphora-download/tasks/main.yml
Normal file
17
roles/octavia-amphora-download/tasks/main.yml
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
- name: Set the download url if amphora_url provided
|
||||
set_fact:
|
||||
download_url: "{{ amphora_url }}"
|
||||
when:
|
||||
amphora_url is defined and ((amphora_url | length) > 0)
|
||||
|
||||
- name: Set the download url to specified release branch if amphora_url not provided
|
||||
set_fact:
|
||||
download_url: "https://images.rdoproject.org/octavia/{{ release }}/amphora-x64-haproxy-centos.qcow2"
|
||||
when:
|
||||
download_url is not defined
|
||||
|
||||
- name: Download the amphora
|
||||
get_url:
|
||||
url: "{{ download_url }}"
|
||||
dest: "{{ target_dir }}/amphora.qcow2"
|
Loading…
Reference in New Issue
Block a user