Add an example about how to run hooks master
authorMichele Tartara <mtartara@google.com>
Thu, 11 Jul 2013 10:58:32 +0000 (10:58 +0000)
committerMichele Tartara <mtartara@google.com>
Thu, 11 Jul 2013 13:29:05 +0000 (15:29 +0200)
The example has the second aim of documenting how to automatically set the
user passwords at instance creation.

Signed-off-by: Michele Tartara <mtartara@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

README

diff --git a/README b/README
index 85c65e5..d196e7d 100644 (file)
--- a/README
+++ b/README
@@ -167,6 +167,21 @@ daemons using this directory, otherwise the installation will fail because it
 won't be able to umount the filesystem from the directory, and hand the
 instance back to Ganeti.
 
+Example
++++++++
+
+The root password can be automatically set when the instance is created. In
+order to do this, the ``examples/hooks/defaultpasswords`` file has to be copied
+to ``$sysconfdir/ganeti/instance-debootstrap/hooks/``, and its data file
+``examples/hooks/confdata/defaultpasswords`` has to be copied to
+``$sysconfdir/ganeti/instance-debootstrap/hooks/confdata/`` and modified
+accordingly to one's own need. The file syntax is such that each line represent
+a user, with the format::
+
+  username:password
+
+After copying the two files, just running the instance creation as usual will
+automatically cause their execution.
 
 Caching
 ~~~~~~~