Comment 14 for bug 1886152

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-playbooks (master)

Reviewed: https://review.opendev.org/743281
Committed: https://git.openstack.org/cgit/starlingx/ansible-playbooks/commit/?id=b8e84bb5d05db95436da35c5558c0402f9838337
Submitter: Zuul
Branch: master

commit b8e84bb5d05db95436da35c5558c0402f9838337
Author: Dan Voiculeasa <email address hidden>
Date: Thu Jul 16 13:43:13 2020 +0300

    B&R: Add playbook to restore user images

    Add role for restoring registry images from docker archive.
    Import user images from docker archive to docker.
    Push the images referencing local registry. After the push the images
    tags will be deleted. If there are no tags pointing to the same image
    unique id the image will be deleted from the docker filesystem thus
    recovering the space.

    Partition where archive is located, docker partition, local registry
    partition must all be big enough.

    The archive can be bigger than available space before bootstrap
    playbook is played. Restore platform procedure needs to be called before
    restoring docker images so that bootstrap playbook is called and space
    allocated.

    For local plays there are 2 key variables, while for remote play there
    are 4.
    Var `initial_backup_dir` points to the directory where the backup file is
    located.
    Var `backup_filename` points to the file in the directory.
    Var `backup_dir` is used for remote plays and is the destination folder
    on the remote where the file will be copied.
    Var `ansible_remote_tmp` points to a temporary directory on the remote
    that ansible `copy` module will use to transfer the file.

    Directories pointed to by `initial_backup_dir, `backup_dir` and
    `ansible_remote_tmp` must be mounted where free space exceeds backup
    size.

    Example call:
    restor_user_images.yml \
        -e "initial_backup_dir=/host1/sufficient/space1/" \
        -e "backup_filename=example.tar" \
        -e "ansible_remote_tmp=/host2/sufficient/space1/" \
        -e "backup_dir=/host2/sufficient/space1/"

    Closes-Bug: 1886152
    Depends-On: I4644784ea4164134f163d218e69dc4ceb148985a
    Change-Id: I0a7dcf9d174fbc07af85ef51bb4068d0dc16c560
    Signed-off-by: Dan Voiculeasa <email address hidden>