Maybe you can reference openstack’s docs , http://docs.openstack.org/image-guide/content/ch_creating_images_automatically.html <http://docs.openstack.org/image-guide/content/ch_creating_images_automatically.html>
---------- Firxiao > 在 2015年6月23日,20:22,Erik Weber <terbol...@gmail.com > <mailto:terbol...@gmail.com>> 写道: > > On Tue, Jun 23, 2015 at 2:11 PM, Rene Moser <m...@renemoser.net > <mailto:m...@renemoser.net>> wrote: > >> Hi >> >> I am currently building some tooling (Ansible, hint hint) for automating >> the process for providing cloud templates. And it seems to me quite some >> work: >> >> For every Distribution: >> - Downloading ISO >> - Rebuilding ISO with kickstart/preseed and cloud init >> - Make ISO accessible by HTTP >> - CloudStack ISO download >> - Create a VM with that ISO >> - Start VM >> - SSH into the VM and do final configration and cleanup >> - Stop VM >> - Create template from VM >> >> I was wondering how other cloud providers would handle it. >> >> > We use packer to handle template building, perhaps you could couple Ansible > with that? > > If you don't want to couple with packer, perhaps look at the way it does > things. > It starts a small http server where you host things like kernel, initramfs, > kickstart/preseed, then you boot an ipxe iso which is supplied with > user-data telling it where to fetch things. > > It is actually quite brilliant. > Atleast brilliant enough for me to be able to just push some configuration > updates to git and have a new template automatically built :-) > > Considering to submit a talk about it to CCCEU > > -- > Erik