Web version : http://www.logilab.org/blogentry/145033
At Logilab we are big fans of SaltStack, we use it quite extensively to
centralize, configure and automate deployments.
We've talked on our blog about how to build a debian AMI "by hand"
and we wanted to automate this
fully. Hence the salt way seemed to be the obvious way to go.
So we wrote salt-ami-cloud-builder. It is mainly glue between existing
pieces of software that we use and like. If you already have some
definition of a type of host that you provision using salt-stack,
salt-ami-cloud-builder should be able to generate the corresponding
Building a Debian based OpenStack private cloud using salt made us
realize that we needed a way to generate various flavours of AMIs for
the following reasons:
* Some of our openstack users need "preconfigured" AMIs (for example a
Debian system with Postgres 9.1 and the appropriate Python bindings)
without doing the modifications by hand or waiting for an automated
script to do the job at AMI boot time.
* Some cloud use cases require that you boot many (hundreds for
instance) machines with the same configuration. While tools like salt
automate the job, waiting while the same download and install takes
place hundreds of times is a waste of resources. If the modifications
have already been integrated into a specialized ami, you save a lot of
computing time. And especially in the amazon (or other pay-per-use
infrastructures), these resources are not free.
* Sometimes one needs to repeat a computation on an instance with the
very same packages and input files, possibly years after the first run.
Freezing packages and files in one preconfigured AMI helps this a lot.
When relying only on a salt configuration the installed packages may
be (exactly) the same from one run to the other.
Get it now !
Grab the code here: http://hg.logilab.org/master/salt-ami-cloud-builder
The project page is http://www.logilab.org/project/salt-ami-cloud-builder
The docs can be read here: http://docs.logilab.org/salt-ami-cloud-builder
We hope you find it useful. Bug reports and contributions are welcome.
The logilab-salt-ami-cloud-builder team.