Wiki

Version 7 (Vangelis Koukis, 10/10/2011 04:41 pm)

1 1 Constantinos Venetsanopoulos
h1. snf-image
2 1 Constantinos Venetsanopoulos
3 3 Constantinos Venetsanopoulos
snf-image is a Ganeti OS Provider primarly used by Synnefo.
4 2 Constantinos Venetsanopoulos
5 7 Vangelis Koukis
It is written from scratch and allows Ganeti to launch instances from predefined or untrusted custom Images. The whole process of deploying an Image onto the block device, as provided by Ganeti, is done in complete isolation from the physical host, enhancing robustness and security.
6 1 Constantinos Venetsanopoulos
7 7 Vangelis Koukis
There are also additional hooks that can be enabled at image deployment. They allow for:
8 1 Constantinos Venetsanopoulos
9 7 Vangelis Koukis
 * changing the password of root or arbitrary users
10 7 Vangelis Koukis
 * injecting files at arbitrary locations inside the filesystem, e.g., SSH keys
11 7 Vangelis Koukis
 * setting a custom hostname
12 7 Vangelis Koukis
 * re-creating SSH host keys to ensure the image uses unique keys
13 1 Constantinos Venetsanopoulos
14 7 Vangelis Koukis
snf-image has been used successfully to deploy many major Linux distributions (Debian, Ubuntu/Kubuntu, CentOS, Fedora), as well as Windows 2008 R2.  
15 7 Vangelis Koukis
16 7 Vangelis Koukis
snf-image requires ganeti-os-interface v20 to operate.
17 7 Vangelis Koukis
It introduces the following OS parameters:
18 7 Vangelis Koukis
19 7 Vangelis Koukis
 * @img_id@ (/required/): the unique id of the image as known by the storage backend
20 7 Vangelis Koukis
 * @img_format@ (/required/): the image format (extdump and ntfsdump [dd] currently supported)
21 7 Vangelis Koukis
 * @img_passwd@ (/required/): the passwd to be injected inside the image
22 7 Vangelis Koukis
 * @img_personality@ (/optional/): files to be injected into the image filesystem. It is a JSON-encoded list of files to be injected: every file is defined by its path and base64-encoded data. This format follows the notation proposed by the "OpenStack Compute API v1.1":http://docs.openstack.org/api/openstack-compute/1.1/content/CreateServers.html. ["more...":http://docs.openstack.org/api/openstack-compute/1.1/content/Server_Personality-d1e2543.html ] for defining server personalities.
23 7 Vangelis Koukis
24 7 Vangelis Koukis
The snf-image Ganeti OS Provider is released under a [[Licence|2-clause BSD Licence]].
25 3 Constantinos Venetsanopoulos
26 1 Constantinos Venetsanopoulos
h2. Architecture
27 3 Constantinos Venetsanopoulos
28 1 Constantinos Venetsanopoulos
h2. Download
29 1 Constantinos Venetsanopoulos
30 1 Constantinos Venetsanopoulos
h2. Installation
31 1 Constantinos Venetsanopoulos
32 5 Constantinos Venetsanopoulos
Before installing snf-image be sure to have a working Ganeti installation in your cluster. The installation process should take place in *all* ganeti nodes. Here we will describe the installation in a single node. The process is identical for all nodes and should be repeated manually or automatically (e.g. with puppet).
33 5 Constantinos Venetsanopoulos
34 5 Constantinos Venetsanopoulos
# Download the snf-image-host debian package as described in the download section.
35 5 Constantinos Venetsanopoulos
# Install the snf-image-host debian package:
36 5 Constantinos Venetsanopoulos
<pre>
37 5 Constantinos Venetsanopoulos
 # dpkg -i snf-image-host_version.deb
38 5 Constantinos Venetsanopoulos
</pre>
39 5 Constantinos Venetsanopoulos
# If the dependencies are not met, install all the dependencies using @apt-get install@
40 5 Constantinos Venetsanopoulos
# Download the snf-image-helper debian package as described in the download section and store it in a handy location.
41 5 Constantinos Venetsanopoulos
# *Do NOT install the snf-image-helper debian package* in the Ganeti node (the package should be present but NOT installed in any node).
42 6 Constantinos Venetsanopoulos
# Configure the packages, as described in the next section, before you can start using the new OS Provider.
43 5 Constantinos Venetsanopoulos
44 5 Constantinos Venetsanopoulos
h2. Configuration
45 5 Constantinos Venetsanopoulos
46 5 Constantinos Venetsanopoulos
Once you have installed snf-image-host in the Ganeti node and also snf-image-helper is present, proceed with the following configuration:
47 5 Constantinos Venetsanopoulos
48 5 Constantinos Venetsanopoulos
# Edit /etc/default/snf-image and set the HELPER_DIR variable to a directory in which all snf-helper related stuff are going to be stored (the directory should be able to store at least 700MB of data)
49 5 Constantinos Venetsanopoulos
# Move the snf-image-helper debian package inside this directory and edit the HELPER_PKG variable in /etc/default/snf-image accordingly
50 5 Constantinos Venetsanopoulos
<pre>
51 5 Constantinos Venetsanopoulos
 $ mv /path/to/handy/location/snf-image-helper_version.deb HELPER_DIR/
52 5 Constantinos Venetsanopoulos
</pre>
53 5 Constantinos Venetsanopoulos
# Update the helper-vm image and related data:
54 5 Constantinos Venetsanopoulos
<pre>
55 5 Constantinos Venetsanopoulos
 $ /usr/bin/snf-image-update-helper
56 5 Constantinos Venetsanopoulos
</pre>
57 5 Constantinos Venetsanopoulos
 
58 1 Constantinos Venetsanopoulos
h2. Features / Hooks
59 1 Constantinos Venetsanopoulos
60 1 Constantinos Venetsanopoulos
h2. Community & Support
61 1 Constantinos Venetsanopoulos
62 1 Constantinos Venetsanopoulos
* Bug-reports: snf-image-bugs@lists.grnet.gr
63 1 Constantinos Venetsanopoulos
* Support: snf-image-support@lists.grnet.gr