Firing up a new virtual machine is smooth, straightforward and often done in just seconds, but to reach this point you have to invest some time and effort in setting up a nice and reliable cloud environment. There are a lot of things to do. You have to prepare some images having a operating system installed, you have to take care about your DNS records, put some SSH Keys into your fresh virtual machine and install some useful software on top of it like an Apache web-server etc. For automating these tasks OpenNebula does provide hooks and contextualization for it.
We at Netways have been using the Foreman in combination with Puppet for doing all these tasks on bare metal systems and now implemented a compute resource functionality for the Foreman project. It can be used to deploy virtual machines within OpenNebula using the Foreman interface which configures DNS,DHCP,PXE,Puppet and so on as well. The functionality is covered by using and extending the ruby fog library.
The pull requests can be found on GitHub:
And a quick demo can be found here (speaker is a little bit dozy and its in german, but you can get an idea of how it works):
The idea is to create a blank (empty datablock image) VM via Foreman in OpenNebula, which then will be fully deployed from scratch. Installation will be done with a PXE-Boot and Kickstart/Preseed installation. Additional software on top like Apache and stuff like that will be installed and configured with Puppet. Everything can be chosen via the Foreman interface which interacts with all infrastructure elements. Also it would be possible to use contextualized prepared images, but we did not implemented it yet.
We are using this feature for some days right now in production and it is really cool. It definitely will and should not replace the Sunstone interface, its just a interaction via the XMLRPC API of OpenNebula.
Every feedback is very welcome and contribution or help for getting it pushed to the master branch of the projects (Foreman, Fog) is of course appreciated. For further information or questions leave your comments below.
Hey, nice. Do you guys deploy OpenNebula itself using Foreman?
Respond here as well if possible: https://plus.google.com/113635437049548586176/posts/TwCuZUayJay
@lzap, thank you. Yes, we are provisioning our OpenNebula hosts with the same setup. We are using a version of this puppet module for it: https://github.com/epost-dev/opennebula-puppet-module
Hi, there are two more blogposts [1, 2] if you need more information to foreman, fog and OpenNebula, unfortunately only in German, but i think everybody can get the idea. Additionally there is a readme in OpenNebula Fog  and foreman-one .