rhtconsulting / rhc-ose

OpenShift Automation and Utilities by Red Hat Consulting
42 stars 34 forks source link

Updated OpenStack tools to support auto generating new base image #62

Closed oybed closed 8 years ago

oybed commented 8 years ago

What does this PR do?

This change makes it possible to automatically tailor one of the existing OS* OS1 images to become the base image for use with OSE3. With this update, the create_base_image script now does the full job from spinning up an instance, tailoring the content, capturing the snapshot and cleaning up the temporary instance.

When a new base image is needed, the normal workflow will now be:

1. Use "create_base_image" to create a new/updated ose3-base image. 
    a. The new image is named "ose3-test-img-<time-date>.qcow2" 
2. Use the image from 1a above to test it with the osc-provision tool
3. If everything looks good, renamed the image to a more appropriate name (and eventually replace the main "ose3-base" image). 
4. Use the "Images" >> "Edit" feature of the OS console to make the image "public"

How should this be manually tested?

  1. Run "./create_base_image -k=" to create a new image
  2. Make note of the new image name
  3. Use a config file for osc-provision to specify the new image as the "base" image for an installation
  4. Run "./osc-provision --num-nodes=2 --key= --config=" to test the new image.

    Is there a relevant Issue open for this?

Issue #34 is related, but this change also resolves other aspects of operating the environment.

Who would you like to review this?

/cc @etsauer

oybed commented 8 years ago

@etsauer This is a major rework of the OpenStack provisioning tools, so you may find it easier to read the source file for "create_base_image" rather than trying to make sense out of the diff as part of this PR - the diff for the other two files should OK to read.

Also, note that I'm still running through more tests as well. Hence, please check in before merging to ensure everything is still looking good.

Thx

etsauer commented 8 years ago

looks good. merging