Document instance variant creation
authorThomas Thrainer <thomasth@google.com>
Thu, 23 May 2013 09:11:30 +0000 (11:11 +0200)
committerThomas Thrainer <thomasth@google.com>
Thu, 23 May 2013 15:57:47 +0000 (17:57 +0200)
Add a section in README which describes how to define new instance
variants and an example how to do that for Ubuntu 12.04.

Signed-off-by: Thomas Thrainer <thomasth@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

NEWS
README

diff --git a/NEWS b/NEWS
index a25b841..42e4c1a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+Version 0.13
+------------
+
+Improve documentation with regard to instance variants.
+
+
 Version 0.12
 ------------
 
diff --git a/README b/README
index d7df90b..ed73c80 100644 (file)
--- a/README
+++ b/README
@@ -86,17 +86,47 @@ is installed on, not the cluster master. This is indeed not a very good
 model of using this OS but currently the OS interface in ganeti is
 limiting.
 
+Creating OS variants
+--------------------
+
+Every Ganeti OS supports variants, so it's possible to define custom OS
+variants with instance-debootstrap as well. First, an additional variant has
+to be defined in ``$osdir/debootstrap/variants.list`` (with ``$osdir`` being
+``/usr/share/ganeti/os`` by default). Secondly, you can configure this
+instance variant in
+``$sysconfdir/ganeti/instance-debootstrap/variants/$variant.conf``, overriding
+the settings mentioned in the previous section.
+
+To use the newly created instance variant, specify it in ``gnt-instance`` like
+this::
+
+  gnt-instance add -o debootstrap+precise ...
+
 Example
 +++++++
 
-To create a Ubuntu 12.04 (precise) instance, your
-``/etc/default/ganeti-instance-debootstrap`` file will contain::
+To create a Ubuntu 12.04 (precise) instance variant, add the following to
+``$osdir/debootstrap/variants.list``::
+
+  precise
+
+Now create the file
+``$sysconfdir/ganeti/instance-debootstrap/variants/precise.conf`` with the
+following content::
 
   MIRROR="http://archive.ubuntu.com/ubuntu/"
   SUITE="precise"
   COMPONENTS="main,universe"
   ARCH="amd64"
 
+You can create Ubuntu 12.04 instances as follows::
+
+  gnt-instance add -t plain -o debootstrap+precise --disk 0:size=10000m -n node1.example.com instance1.example.com
+
+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``).
+
 Customization of the instance
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~