From acd9e30bdecedbdf6191a5a2a91816f0d6633a52 Mon Sep 17 00:00:00 2001
From: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
Date: Tue, 9 Oct 2018 20:25:28 +0100
Subject: [PATCH] MNAIO: Add instructions for using file-backed images

This patch adds some instructions for downloading and
using the file-backed images after they're saved off
box.

Change-Id: Ia61ea5c36fd7a5d4b37d8f7063e8f87fd82c730e
---
 multi-node-aio/README.rst | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/multi-node-aio/README.rst b/multi-node-aio/README.rst
index 77f0aff9..b272c293 100644
--- a/multi-node-aio/README.rst
+++ b/multi-node-aio/README.rst
@@ -297,3 +297,26 @@ build not to use the snapshots as follows.
 
     export MNAIO_ANSIBLE_PARAMETERS="-e default_vm_disk_mode=file -e vm_use_snapshot=no"
     ./build.sh
+
+If you have previously saved some file-backed images to remote storage then,
+if they are available via a URL, they can be downloaded and used on a fresh
+host as follows.
+
+.. code-block:: bash
+
+    # First prepare the host and get the base services started
+    source bootstrap.sh
+    source ansible-env.rc
+    export ANSIBLE_PARAMETERS="-i playbooks/inventory -e default_vm_disk_mode=file"
+    ansible-playbook ${ANSIBLE_PARAMETERS} playbooks/setup-host.yml
+    ansible-playbook ${ANSIBLE_PARAMETERS} playbooks/deploy-acng.yml
+    ansible-playbook ${ANSIBLE_PARAMETERS} playbooks/deploy-pxe.yml
+    ansible-playbook ${ANSIBLE_PARAMETERS} playbooks/deploy-dhcp.yml
+
+    # Then download the images
+    export IMAGE_MANIFEST_URL="http://example.com/images/manifest.json"
+    ansible-playbook ansible-playbook ${ANSIBLE_PARAMETERS} playbooks/download-vms.yml -e manifest_url=${IMAGE_MANIFEST_URL}
+
+    # Then kick off the VM's from those images
+    ansible-playbook ansible-playbook ${ANSIBLE_PARAMETERS} playbooks/deploy-vms.yml
+