[Freeipa-devel] idempotent installer [from LinuxAlt 2013]

Petr Spacek pspacek at redhat.com
Thu Nov 14 14:40:52 UTC 2013


Hello,

there is an interesting idea that installers should be idempotent. I have 
heard it on LinuxAlt conference 2013 in Brno, Czech republic and it is 
implemented e.g. by project Chef [1] and it is used e.g. by OpenStack 
installer [2] (used e.g. by SUSE).

What Wikipedia says about idempotence [3]:
"Idempotence is the property of certain operations in mathematics and computer 
science, that can be applied multiple times without changing the result beyond 
the initial application."

... And that is it :-)

In reality, it means that you can re-run OpenStack installer on the same 
machine/set of machines (with the same configuration, of course!) and it will 
re-do everything again. You can re-run installer again and again without any harm!

This solves case where something went wrong during the installation, the 
installation was aborted and the machine was left in some inconsistent state. 
Think about e.g. network failure during installation, improper configuration 
which prevented installation from finishing (crap in DNS), some intermittent 
and mysterious errors in Dogtag installer and so on.

It does mean that you don't need to recycle whole machine if something went 
wrong during installation ...

As a result, you don't need to have separate system for installation and for 
upgrade.

(Obviously, it means installation steps has to be 'declarative' instead of 
'imperative'.)


I think that this is very interesting idea and it would be interesting to 
write new code with idempotence in mind. Eventually, we could end with fully 
idempotent installer :-)

[1] http://www.opscode.com/chef/
[2] http://www.slideshare.net/mattray/deploying-openstack-with-chef
[3] http://en.wikipedia.org/wiki/Idempotence

-- 
Petr^2 Spacek




More information about the Freeipa-devel mailing list