This PR introduces the "osc-manage-image" tool. This tool is meant to be the one used to promote a newly created test image to be the main ose3 base image.
How should this be manually tested?
NOTE: to avoid disruption to the already in-use "ose3-base" image, make sure to follow these steps carefully.
Make sure 2 test images are available, e.g.: At time of writing, these two images are available: ose-test-img-0000-28-Oct-2015 and ose-test-img-1039-27-Oct-2015
Capture the ID of these images - used to validate the steps below
Change the value of "image_name" in provisioning/lib/constants to one of the above images, e.g.: ose-test-img-0000-28-Oct-2015
For the purpose of this test, this image becomes the "base" image to be retired and the name of the newly promoted image
Also make sure a instance/vm is using the image before doing the promotion
Run the "osc-manage-image" tool to promote the other image, e.g.: ./osc-manage-image --action=promote --image-name=ose-test-img-1039-27-Oct-2015
Verify that the original "ose-test-img-0000-28-Oct-2015" has been renamed something like "ose3-delete-after-X-Y-Z", verify "ose-test-img-1039-27-Oct-2015" has been renamed to "ose-test-img-0000-28-Oct-2015"
Use the image IDs from step 1a above to validate the images
Verify that the instance/vm using the former "base image" is now using the image named "ose3-delete-after...."
Verify that the newly become "base image" is marked with Public set to "Yes"
Example run:
>> ./osc-manage-image --action=promote --image-name=ose-test-img-1039-27-Oct-2015
This will promote 'ose-test-img-1039-27-Oct-2015' to 'ose3-base' - do you want to continue? [Y]: n
Exiting...
>> ./osc-manage-image --action=promote --image-name=ose-test-img-1039-27-Oct-2015
This will promote 'ose-test-img-1039-27-Oct-2015' to 'ose3-base' - do you want to continue? [Y]:
Backing up image 'ose3-base' => 'ose3-delete-after-12-Feb-2016' ...
Promoting image 'ose-test-img-1039-27-Oct-2015' => 'ose3-base' ...
Done! Image 'ose-test-img-1039-27-Oct-2015' has been promoted to 'ose3-base'.
What does this PR do?
This PR introduces the "osc-manage-image" tool. This tool is meant to be the one used to promote a newly created test image to be the main ose3 base image.
How should this be manually tested?
NOTE: to avoid disruption to the already in-use "ose3-base" image, make sure to follow these steps carefully.
Example run:
Is there a relevant Issue open for this?
N/A
Who would you like to review this?
/cc @etsauer