From 5eeaf492def2493c9f0cebd368bd1e5dfd0d4b1e Mon Sep 17 00:00:00 2001 From: Thomas Thrainer Date: Thu, 23 May 2013 11:11:30 +0200 Subject: [PATCH] Document instance variant creation 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 Reviewed-by: Guido Trotter --- NEWS | 6 ++++++ README | 34 ++++++++++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index a25b841..42e4c1a 100644 --- 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 --- 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- 1.7.2.5