[Openstack] Using OpenStack in a CI/CD runway

Clint Byrum clint at fewbar.com
Thu Mar 20 21:33:10 UTC 2014


Excerpts from Daniel Ellison's message of 2014-03-20 12:10:52 -0700:
> Hi all,
> 
> I've tried to look this up online but all I seem to get is information about continuous integration/distribution in the OpenStack project itself and not much of anything concerning using OpenStack as part of a CI/CD runway to production.
> 
> Maybe the answers are obvious to those already involved in these things. Please forgive the ignorance that is surely about to ensue.
> 
> One point I'm stuck on (and several online resources mention this only in passing) is how to build a new image on the fly based on an existing image, adding a new version of code from the repository. There seems to be many ways to do this and for someone coming at this as a newbie it's very hard to figure out a good path. Is there a tool that can produce a new image from an existing one plus some extra stuff? And if so, can it be automated?
> 

In the TripleO project, we use this tool to automate building custom
images:

https://git.openstack.org/cgit/openstack/diskimage-builder/tree/README.md

It downloads or bootstraps an existing image (Ubuntu, Fedora, RHEL,
OpenSUSE, Debian), extracts it and chroots into the image, runs your
"elements", and then saves the result as raw or qcow2.

> Concerning the runway itself, do people use Jenkins (or its equivalent) to orchestrate the whole thing? Or can Heat handle it all on its own? Or maybe Puppet (or its equivalent) can do it all.
>

Heat would not be able to handle it, no. Jenkins is a fine choice, as you
can drive your image build/test based on commits to multiple git repos.

Pay close attention to the 'source-repositories' element in
diskimage-builder, as you would likely use it to pull the specific
commit jenkins wants to test and then build an image for that.

> As you can see, I'm casting about for answers. I apologize if these questions are naive. This is an important project in my company; it will determine whether we go ahead with OpenStack or scrap it completely. I need to find a solution that incorporates OpenStack into a continuous integration/distribution system.
>

One thing, I would suggest this cycle:

* Commit to repo
* Pull commit into new image
* Run tests on new image
* Deploy image

That last step is tricky.. you can do it various ways, either by nova
rebuilding servers (involves downtime), or spinning up new ones. It kind
of depends on how your application is made available.




More information about the Openstack mailing list