f6e1500631
Add new role to build overcloud and undercloud images. This role can either operate directly against a host (direct) or setup a build environment inside of a libvirt guest using libguestfs-tools (isolated). It starts by creating the overcloud images from the provided yaml files. It then uses the convert-image role from tripleo-quickstart to turn the overcloud-full.qcow2 image into an undercloud image. Finally, it injects the previously created overcloud-full and ironic-python-agent images into this new undercloud image. It is important to note that this process changes the type of undercloud image produced. With the previous method we produced a whole disk image for the undercloud, however by converting an overcloud image we get a partition image for the undercloud. This is because the overcloud image itself is a partition image. The libvirt role in tripleo-quickstart handles this transparently, and RDO is already producing the master image this way. However, if we switch older releases to this method, external consumers of the undercloud image not using tripleo-quickstart for libvirt provisioning will be broken. Change-Id: I7df1083291aa36cfef4aaacf9e345300ab5f4ed3
32 lines
563 B
YAML
32 lines
563 B
YAML
---
|
|
|
|
- name: Add the virthost to the inventory
|
|
hosts: localhost
|
|
tasks:
|
|
- name: Add virthost
|
|
add_host:
|
|
name: "{{ virthost }}"
|
|
groups: "virthost"
|
|
ansible_fqdn: "{{ virthost }}"
|
|
ansible_user: "root"
|
|
ansible_host: "{{ virthost }}"
|
|
tags:
|
|
- provision
|
|
|
|
- name: Inventory the virthost
|
|
hosts: localhost
|
|
gather_facts: yes
|
|
roles:
|
|
- tripleo-inventory
|
|
tags:
|
|
- provision
|
|
|
|
- include: teardown-provision.yml
|
|
|
|
- include: provision.yml
|
|
|
|
- name: Build images
|
|
hosts: virthost
|
|
roles:
|
|
- build-images
|