Add an example about how to run hooks
[ext/instance-debootstrap.git] / README
diff --git a/README b/README
index ed73c80..d196e7d 100644 (file)
--- a/README
+++ b/README
@@ -57,7 +57,7 @@ named 'defaults' in the source distribution for more details):
 - ARCH: either i386 or amd64, otherwise your current architecture will
   be used
 - SUITE: the actual OS to be installed; the current default is Debian
-  *lenny*, and you can choose any of the OSes supported deboostrap (on
+  *wheezy*, and you can choose any of the OSes supported deboostrap (on
   Debian, look into /usr/share/deboostrap/scripts)
 - EXTRAPKGS: most OSes will need some extra packages installed to make
   them work nicely under Xen; the example file containts a few
@@ -127,6 +127,17 @@ For this to work, make sure that you have the appropriate debootstrap script
 for precise (or just create a symlink called ``precise`` to ``gutsy`` in
 ``/usr/share/debootstrap/scripts``).
 
+Instance creation parameters
+----------------------------
+
+Some aspects of the created instance can be conrolled via parameters at
+instance creation time with the ``-O`` parameter of ``gnt-instance``.
+
+The supported parameters are:
+
+- filesystem: the filesystem type to use for the root partition. This  has to
+  be a filesystem type supported by ``mke2fs``. The default is 'ext4'.
+
 Customization of the instance
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -141,7 +152,7 @@ installation. The following environment variables are passed, in
 addition to the ones ganeti passes to the OS scripts:
 
 TARGET: directory in which the filesystem is mounted
-SUITE: suite installed by debootstrap (eg: lenny)
+SUITE: suite installed by debootstrap (eg: wheezy)
 ARCH: target architecture
 PARTITION_STYLE: style of the disk partitioning (see above)
 EXTRA_PKGS: extra packages installed by debootstrap
@@ -156,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
 ~~~~~~~