Developer
Version 1 (Constantinos Venetsanopoulos, 10/13/2011 01:22 pm)
1 | 1 | Constantinos Venetsanopoulos | h1. Developers |
---|---|---|---|
2 | 1 | Constantinos Venetsanopoulos | |
3 | 1 | Constantinos Venetsanopoulos | h2. Checking out |
4 | 1 | Constantinos Venetsanopoulos | |
5 | 1 | Constantinos Venetsanopoulos | To check out the source code use @git@: |
6 | 1 | Constantinos Venetsanopoulos | <pre> |
7 | 1 | Constantinos Venetsanopoulos | $ git clone https://code.grnet.gr/git/snf-image |
8 | 1 | Constantinos Venetsanopoulos | </pre> |
9 | 1 | Constantinos Venetsanopoulos | |
10 | 1 | Constantinos Venetsanopoulos | h2. Configure and install @snf-image-host@ |
11 | 1 | Constantinos Venetsanopoulos | |
12 | 1 | Constantinos Venetsanopoulos | Once you have checkout the source code, it's time to configure. For the simplest default configuration run: |
13 | 1 | Constantinos Venetsanopoulos | <pre> |
14 | 1 | Constantinos Venetsanopoulos | $ cd snf-image-host |
15 | 1 | Constantinos Venetsanopoulos | $ ./autogen.sh |
16 | 1 | Constantinos Venetsanopoulos | $ ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc |
17 | 1 | Constantinos Venetsanopoulos | </pre> |
18 | 1 | Constantinos Venetsanopoulos | |
19 | 1 | Constantinos Venetsanopoulos | Other configuration options you may find useful: |
20 | 1 | Constantinos Venetsanopoulos | * @--with-progress-monitor@ : if enabled, it monitors the progress of the dd command while the Image is being copied and produces read/write statistics. To use this option you need to have @snf-ganeti-tools@ installed on your cluster, so that the @snf-progress-monitor@ program is present on your system. |
21 | 1 | Constantinos Venetsanopoulos | * @--with-helper-dir=/path/to/helper/dir@ : specify the path where the helper data are going to be stored |
22 | 1 | Constantinos Venetsanopoulos | * @--with-helper-img=/path/to/img/file@ : specify the path to the helper VM image |
23 | 1 | Constantinos Venetsanopoulos | * @--with-helper-kernel=/path/to/kernel@ : specify the path to the helper VM kernel |
24 | 1 | Constantinos Venetsanopoulos | * @--with-helper-initrd=/path/to/initrd@ : specify the path to the helper VM initrd |
25 | 1 | Constantinos Venetsanopoulos | * @--with-os-dir=/path/to/os/dir@ : specify the top-level OS Provider's directory under which to install itself |
26 | 1 | Constantinos Venetsanopoulos | |
27 | 1 | Constantinos Venetsanopoulos | After configuring install the package by running: |
28 | 1 | Constantinos Venetsanopoulos | |
29 | 1 | Constantinos Venetsanopoulos | <pre> |
30 | 1 | Constantinos Venetsanopoulos | $ make && make install |
31 | 1 | Constantinos Venetsanopoulos | </pre> |
32 | 1 | Constantinos Venetsanopoulos | |
33 | 1 | Constantinos Venetsanopoulos | h2. Preparing @snf-image-helper@ |
34 | 1 | Constantinos Venetsanopoulos | |
35 | 1 | Constantinos Venetsanopoulos | The @snf-image-helper@ must be installed inside the helper VM and NOT the Ganeti node. The smoothest way to accomplish that, is by making a @snf-image-helper@ debian package, store it under @snf-image-host@'s $HELPER_DIR and run @snf-image-update-helper@ (part of @snf-image-host@) to create the helper VM and install the @snf-image-helper@ debian package inside it. See the next section on how to build the debian package. |
36 | 1 | Constantinos Venetsanopoulos | |
37 | 1 | Constantinos Venetsanopoulos | If you want to create your own helper VM manually and then install @snf-image-helper@ inside (the hard way), do the following: |
38 | 1 | Constantinos Venetsanopoulos | # Customize a helper VM image of your choice |
39 | 1 | Constantinos Venetsanopoulos | # Once you have customized your helper VM image, mount it on a tmp directory. |
40 | 1 | Constantinos Venetsanopoulos | # Checkout the source code as described in the first section. |
41 | 1 | Constantinos Venetsanopoulos | # Run: |
42 | 1 | Constantinos Venetsanopoulos | <pre> |
43 | 1 | Constantinos Venetsanopoulos | $ cd snf-image-helper |
44 | 1 | Constantinos Venetsanopoulos | $ ./autogen.sh |
45 | 1 | Constantinos Venetsanopoulos | $ ./configure |
46 | 1 | Constantinos Venetsanopoulos | $ make |
47 | 1 | Constantinos Venetsanopoulos | $ make DESTDIR=/path/to/mounted/tmp/dir install |
48 | 1 | Constantinos Venetsanopoulos | </pre> |
49 | 1 | Constantinos Venetsanopoulos | # Once snf-image-helper is installed inside your helper VM image, umount the image and store it under $HELPER_DIR |
50 | 1 | Constantinos Venetsanopoulos | |
51 | 1 | Constantinos Venetsanopoulos | h2. Building debian packages |
52 | 1 | Constantinos Venetsanopoulos | |
53 | 1 | Constantinos Venetsanopoulos | If you want to build debian packages from the latest source, after checking out the source, do the following: |
54 | 1 | Constantinos Venetsanopoulos | |
55 | 1 | Constantinos Venetsanopoulos | <pre> |
56 | 1 | Constantinos Venetsanopoulos | $ git checkout debian |
57 | 1 | Constantinos Venetsanopoulos | $ cd snf-image-host |
58 | 1 | Constantinos Venetsanopoulos | $ dpkg-buildpackage -us -uc -b |
59 | 1 | Constantinos Venetsanopoulos | $ cd ../snf-image-helper |
60 | 1 | Constantinos Venetsanopoulos | $ dpkg-buildpackage -us -uc -b |
61 | 1 | Constantinos Venetsanopoulos | $ cd .. |
62 | 1 | Constantinos Venetsanopoulos | </pre> |
63 | 1 | Constantinos Venetsanopoulos | |
64 | 1 | Constantinos Venetsanopoulos | Optionally, you may clean any leftover files and directories when you're done: |
65 | 1 | Constantinos Venetsanopoulos | <pre> |
66 | 1 | Constantinos Venetsanopoulos | $ git clean -df |
67 | 1 | Constantinos Venetsanopoulos | </pre> |