tripleo-quickstart-extras/roles/build-images
Sorin Sbarnea 72141b7fab Adopt yamllint strict linting
Upgrades yamllint to latest version and adots use of its strict
checking.

Fix all known problems reported by yamllint so we don't have to do
that while touching these files.

Change-Id: I4bdc520d9e2aff086c4b463718bc1e053261a4f5
Story: https://tree.taiga.io/project/tripleo-ci-board/task/381
2018-11-26 12:37:21 +00:00
..
defaults Add quickstart-* repos to build-images role 2017-08-21 11:35:28 +02:00
meta Adopt yamllint strict linting 2018-11-26 12:37:21 +00:00
tasks Adopt yamllint strict linting 2018-11-26 12:37:21 +00:00
templates build-images: adjust workaround for libguestfs 2017-09-12 17:42:14 +02:00
README.md Add documentation on how to build a hardened image 2017-06-06 14:58:00 +02:00

build-images

An Ansible role for building TripleO undercloud and overcloud images. The 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.

Requirements

  • convert-image role from tripleo-quickstart (if building an undercloud image)
  • fetch-images role from tripleo-quickstart (if using isolated build)
  • modify-image role from tripleo-quickstart-extras
  • repo-setup role from tripleo-quickstart-extras

Role Variables

  • images_working_dir -- Directory on the host where images and logs will be placed
  • images_destroy_working_dir -- Whether to destroy the previous image directory before starting. (Default true)
  • overcloud_image_build_script -- Template used for the overcloud image build
  • overcloud_image_build_log -- Log file for output from the image build script.
  • build_image_isolated -- Whether to use libguestfs to create an isolated build environment. (Default true)
  • build_isolation_image_url -- URL for image to use as the isolated build environment. (Currently requires an .md5 file in the same location because the fetch-images role from quickstart is used to get the image)
  • build_undercloud -- Whether to build an undercloud image. (Default true)
  • package_images -- Whether to create tarballs and md5s for all of the produced images. (Default true)
  • overcloud_repo_paths -- List of repo paths that will be passed to DIB for package installs in the overcloud images. These repos will also be copied on to the undercloud image.
  • image_build_yaml_paths -- List of yaml files to be passed to the overcloud image build. (Defaults to yamls packaged in tripleo-common. In order to produce security hardened images, the alternate overcloud-hardened-images need to be used instead of the overcloud-images ones).
  • image_build_extract_list -- List of artifacts to extract from the isolated build environment after building.
  • inject_images -- List of artifacts to inject into the undercloud image
  • skip_build_images -- skip building images if there present or cached (default: true), setting it to false will add '--no-skip' option to openstack image build command.

Example Usage

---
- name: Build images using an isolated build environment
  hosts: virthost
  roles:
    - build-images

- name: Build images with repos directly installed on the host
  hosts: virthost
  vars:
    build_image_isolated: false
  roles:
    - build-images

License

Apache