Version 1/10 - Next » - Current version
Constantinos Venetsanopoulos, 10/13/2011 01:22 pm


Developers

Checking out

To check out the source code use git:

$ git clone https://code.grnet.gr/git/snf-image

Configure and install snf-image-host

Once you have checkout the source code, it's time to configure. For the simplest default configuration run:

 $ cd snf-image-host
 $ ./autogen.sh
 $ ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc

Other configuration options you may find useful:
  • --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.
  • --with-helper-dir=/path/to/helper/dir : specify the path where the helper data are going to be stored
  • --with-helper-img=/path/to/img/file : specify the path to the helper VM image
  • --with-helper-kernel=/path/to/kernel : specify the path to the helper VM kernel
  • --with-helper-initrd=/path/to/initrd : specify the path to the helper VM initrd
  • --with-os-dir=/path/to/os/dir : specify the top-level OS Provider's directory under which to install itself

After configuring install the package by running:

 $ make && make install

Preparing snf-image-helper

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.

If you want to create your own helper VM manually and then install snf-image-helper inside (the hard way), do the following:
  1. Customize a helper VM image of your choice
  2. Once you have customized your helper VM image, mount it on a tmp directory.
  3. Checkout the source code as described in the first section.
  4. Run:
       $ cd snf-image-helper
       $ ./autogen.sh
       $ ./configure
       $ make
       $ make DESTDIR=/path/to/mounted/tmp/dir install 
      
  5. Once snf-image-helper is installed inside your helper VM image, umount the image and store it under $HELPER_DIR

Building debian packages

If you want to build debian packages from the latest source, after checking out the source, do the following:

 $ git checkout debian
 $ cd snf-image-host
 $ dpkg-buildpackage -us -uc -b
 $ cd ../snf-image-helper
 $ dpkg-buildpackage -us -uc -b
 $ cd ..

Optionally, you may clean any leftover files and directories when you're done:

 $ git clean -df