Change default Debian version to Wheezy
[ext/instance-debootstrap.git] / README
diff --git a/README b/README
index 893804f..ed73c80 100644 (file)
--- a/README
+++ b/README
@@ -38,6 +38,10 @@ ganeti will look for OS definitions.
 Configuration of instance creation
 ----------------------------------
 
+Note: the minimum disk size accepted is 256MB, as ``debootstrap``
+requires disk space both for downloading the packages and installing
+them.
+
 The kind of instance created can be customized via a settings file. This
 file is not installed by default, as the instance creation will work
 without it. The creation scripts will look for it in
@@ -58,6 +62,9 @@ named 'defaults' in the source distribution for more details):
 - EXTRAPKGS: most OSes will need some extra packages installed to make
   them work nicely under Xen; the example file containts a few
   suggestions
+- COMPONENTS: if defined, overrides the default debootstrap components
+  ("main"); this can be helpful e.g. by using "main,contrib,nonfree" for
+  Debian, or "main,universe" for Ubuntu
 - CUSTOMIZE_DIR: a directory containing customization script for the
   instance.  (by default $sysconfdir/ganeti/instance-debootstrap/hooks)
   See "Customization of the instance" below.
@@ -79,6 +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 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
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~