Pages

Saturday, February 4, 2017

Testing OpenShift on Openstack using Snapshots

The goal here is to allow me to test out OpenShift Container Platform on top of Red Hat OpenStack Platform. I want to be able to build and tear down the environment quickly so I can check out different configurations. OpenStack provides a way for me to do this via snapshots.

The first thing I did was upload a RHEL 7 image. Then I booted and configured two servers from that image:

After the servers were configured, I shut them down and created an image from each of those servers called "bastion-gold" image, and "master-infra-appnode-gold" image. This will allow for me to create my OpenShift Container Platform environment from these images. The steps I followed to create the snapshots are:

Now that I have all my snapshots created, I can boot my servers. I am also using cinder volumes for the Docker storage, so I need to create those and attach to the servers. Here's the simple script to create the cinder volumes:

Now, remember, after booting these new servers, you'll need to update DNS with the new IP addresses on your control_network per the reference architecture. You'll also need to adjust your Ansible inventory file to reflect the new IPs. Otherwise, you are now good to go.

To reset my environment, all I have to do is "nova delete" the snapshots, and run the above scripts to get right back to a state where I can re-install OpenShift Container Platform.

Thanks for reading!

P.S. Credit to Mark Lamourine for writing that refarch and letting me "borrow" some of his scripts.