Update ChangeLog and version for 0.13
[snf-image] / docs / usage.rst
1 Usage
2 =====
3
4 .. _sample-images:
5
6 Sample Images
7 ^^^^^^^^^^^^^
8
9 While developing *snf-image*, we created and tested a number of images. The
10 following images are basic installations of some popular Linux distributions,
11 that have been tested with snf-image and provided here for testing purposes:
12
13
14  * Debian Squeeze Base System
15    [`diskdump <http://cdn.synnefo.org/debian_base-6.0-x86_64.diskdump>`_]
16    [`md5sum <http://cdn.synnefo.org/debian_base-6.0-x86_64.diskdump.md5sum>`_]
17    [`metadata <http://cdn.synnefo.org/debian_base-6.0-x86_64.diskdump.meta>`_]
18  * Debian Wheezy Base System
19    [`diskdump <http://cdn.synnefo.org/debian_base-7.0-x86_64.diskdump>`_]
20    [`md5sum <http://cdn.synnefo.org/debian_base-7.0-x86_64.diskdump.md5sum>`_]
21    [`metadata <http://cdn.synnefo.org/debian_base-7.0-x86_64.diskdump.meta>`_]
22  * Debian Desktop
23    [`diskdump <http://cdn.synnefo.org/debian_desktop-7.0-x86_64.diskdump>`_]
24    [`md5sum <http://cdn.synnefo.org/debian_desktop-7.0-x86_64.diskdump.md5sum>`_]
25    [`metadata <http://cdn.synnefo.org/debian_desktop-7.0-x86_64.diskdump.meta>`_]
26  * CentOS 6.0
27    [`diskdump <http://cdn.synnefo.org/centos-6.0-x86_64.diskdump>`_]
28    [`md5sum <http://cdn.synnefo.org/centos-6.0-x86_64.diskdump.md5sum>`_]
29    [`metadata <http://cdn.synnefo.org/centos-6.0-x86_64.diskdump.meta>`_]
30  * Fedora Desktop 19
31    [`diskdump <http://cdn.synnefo.org/fedora-19-x86_64.diskdump>`_]
32    [`md5sum <http://cdn.synnefo.org/fedora-19-x86_64.diskdump.md5sum>`_]
33    [`metadata <http://cdn.synnefo.org/fedora-19-x86_64.diskdump.meta>`_]
34  * Ubuntu Desktop LTS 12.04
35    [`diskdump <http://cdn.synnefo.org/ubuntu_desktop-12.04-x86_64.diskdump>`_]
36    [`md5sum <http://cdn.synnefo.org/ubuntu_desktop-12.04-x86_64.diskdump.md5sum>`_]
37    [`metadata <http://cdn.synnefo.org/ubuntu_desktop-12.04-x86_64.diskdump.meta>`_]
38  * Kubuntu LTS 12.04
39    [`diskdump <http://cdn.synnefo.org/kubuntu_desktop-12.04-x86_64.diskdump>`_]
40    [`md5sum <http://cdn.synnefo.org/kubuntu_desktop-12.04-x86_64.diskdump.md5sum>`_]
41    [`metadata <http://cdn.synnefo.org/kubuntu_desktop-12.04-x86_64.diskdump.meta>`_]
42  * Ubuntu Desktop 13.10
43    [`diskdump <http://cdn.synnefo.org/ubuntu_desktop-13.10-x86_64.diskdump>`_]
44    [`md5sum <http://cdn.synnefo.org/ubuntu_desktop-13.10-x86_64.diskdump.md5sum>`_]
45    [`metadata <http://cdn.synnefo.org/ubuntu_desktop-13.10-x86_64.diskdump.meta>`_]
46  * Kubuntu 13.10
47    [`diskdump <http://cdn.synnefo.org/kubuntu_desktop-13.10-x86_64.diskdump>`_]
48    [`md5sum <http://cdn.synnefo.org/kubuntu_desktop-13.10-x86_64.diskdump.md5sum>`_]
49    [`metadata <http://cdn.synnefo.org/kubuntu_desktop-13.10-x86_64.diskdump.meta>`_]
50  * Ubuntu Server 12.04
51    [`diskdump <http://cdn.synnefo.org/ubuntu_server-12.04-x86_64.diskdump>`_]
52    [`md5sum <http://cdn.synnefo.org/ubuntu_server-12.04-x86_64.diskdump.md5sum>`_]
53    [`metadata <http://cdn.synnefo.org/ubuntu_server-12.04-x86_64.diskdump.meta>`_]
54  * OpenSUSE Desktop 13.1
55    [`diskdump <http://cdn.synnefo.org/opensuse_desktop-13.1-x86_64.diskdump>`_]
56    [`md5sum <http://cdn.synnefo.org/opensuse_desktop-13.1-x86_64.diskdump.md5sum>`_]
57    [`metadata <http://cdn.synnefo.org/opensuse_desktop-13.1-x86_64.diskdump.meta>`_]
58  * FreeBSD 9.2
59    [`diskdump <http://cdn.synnefo.org/freebsd-9.2-x86_64.diskdump>`_]
60    [`md5sum <http://cdn.synnefo.org/freebsd-9.2-x86_64.diskdump.md5sum>`_]
61    [`metadata <http://cdn.synnefo.org/freebsd-9.2-x86_64.diskdump.meta>`_]
62  * OpenBSD 5.4
63    [`diskdump <http://cdn.synnefo.org/openbsd-5.4-x86_64.diskdump>`_]
64    [`md5sum <http://cdn.synnefo.org/openbsd-5.4-x86_64.diskdump.md5sum>`_]
65    [`metadata <http://cdn.synnefo.org/openbsd-5.4-x86_64.diskdump.meta>`_]
66  * NetBSD 6.1
67    [`diskdump <http://cdn.synnefo.org/netbsd-6.1-x86_64.diskdump>`_]
68    [`md5sum <http://cdn.synnefo.org/netbsd-6.1-x86_64.diskdump.md5sum>`_]
69    [`metadata <http://cdn.synnefo.org/netbsd-6.1-x86_64.diskdump.meta>`_]
70
71 Sample Usage
72 ^^^^^^^^^^^^
73
74 Download an Image
75 +++++++++++++++++
76
77 Download a :ref:`Sample Image <sample-images>` and store it under IMAGE_DIR.
78 Make sure you also have its corresponding metadata file.
79
80 Spawn a diskdump image
81 ++++++++++++++++++++++
82
83 If you want to deploy an image of type diskdump, you
84 need to provide the corresponding *img_properties* as described in the
85 :ref:`Image Format<image-format>` section. If using a diskdump found in the
86 :ref:`sample-images` list, use the *img_properties* described in the image's
87 metadata file. For example, to successfully deploy the
88 *debian_base-7.0-x86_64.diskdump* image file, you need to provide the following
89 image properties:
90
91 | OSFAMILY=linux
92 | ROOT_PARTITION=1
93 | USERS=root
94
95 Hence, the ganeti command for creating a VM from this image file would look
96 like this:
97
98 .. code-block:: console
99
100   gnt-instance add -o snf-image+default \
101     -O img_passwd=1Ki77y,img_format=diskdump,img_id=debian_base-7.0-x86_64,img_properties='{"OSFAMILY":"linux"\,"ROOT_PARTITION":"1"\,"USERS":"root"}' \
102     -t plain --disk=0:size=10G --no-name-check --no-ip-check --no-nics my_debian_server1
103
104 If you don't want to configure the image at all and just copy it to the ganeti
105 provided disk, use the ``EXCLUDE_ALL_TASKS`` image property, like this:
106
107 .. code-block:: console
108
109   gnt-instance add -o snf-image+default \
110     -O img_passwd=1Ki77y,img_format=diskdump,img_id=debian_base-7.0-x86_64,img_properties='{"EXCLUDE_ALL_TASKS":"yes"}' \
111     -t plain --disk=0:size=10G --no-name-check --no-ip-check --no-nics my_debian_server2
112
113 To configure a VM without first copying an image into the hard disk (e.g. if
114 the hard disk is a snapshot from an existing VM's hard disk) you may use the
115 *null* storage back-end like this:
116
117 .. code-block:: console
118
119   gnt-instance add -o snf-image+default \
120     -O img_passwd=1Ki77y,img_format=diskdump,img_id=null,img_properties='{"OSFAMILY":"linux"\,"ROOT_PARTITION":"1"\,"USERS":"root"}' \
121     -t plain --disk=0:size=10G --no-name-check --no-ip-check --no-nics my_debian_server3
122