4 This guide describes how to install snf-image-creator on an Ubuntu 12.04 LTS
5 system. It is highly recommended to have virtualization capable hardware.
6 snf-image-creator will work on processors that do not support virtualization
7 but it will be extremely slow.
12 snf-image-creator depends on the following programs:
14 * Python 2 [http://www.python.org/]
15 * Python setuptools [http://pypi.python.org/pypi/setuptools]
16 * Python Dialog [http://pythondialog.sourceforge.net/]
17 * Python bindings for libguestfs [http://libguestfs.org/]
18 * Kamaki [https://code.grnet.gr/projects/kamaki]
19 * Python sh (previously pbs) [https://github.com/amoffat/sh]
20 * ANSI colors for Python [http://pypi.python.org/pypi/ansicolors]
21 * progress [http://pypi.python.org/pypi/progress]
22 * Python interface to sendfile [http://pypi.python.org/pypi/pysendfile]
24 The above dependencies are resolved differently, depending on the installation
27 There are two installation methods. The first uses official packages whereas
28 the second installs snf-image-creator and its dependencies from source. Both
29 methods are presented below.
31 Install snf-image-creator using official packages
32 =================================================
34 This method of installing snf-image-creator boasts all the advantages of
35 Ubuntu's APT installation:
37 * Automatic resolution of dependencies
38 * Simple installation of consequent updates
40 In order to proceed with the installation, you must first add GRNET's dev repo
41 to your sources. You can use the following commands:
43 .. code-block:: console
45 cd /etc/apt/sources.list.d
46 echo "deb http://apt.dev.grnet.gr precise main" | \
47 sudo tee -a apt.dev.grnet.gr.list
48 echo "deb-src http://apt.dev.grnet.gr precise main" | \
49 sudo tee -a apt.dev.grnet.gr.list
51 You will also need to import the repo's GPG key. You can use the ``curl`` tool
54 .. code-block:: console
56 $ sudo apt-get install curl
58 Use the following command to import the GPG key:
60 .. code-block:: console
62 $ sudo curl https://dev.grnet.gr/files/apt-grnetdev.pub | sudo apt-key add -
64 You can verify that the repo has been added successfully if snf-image-creator
65 exists as a package. First do an update of your sources:
67 .. code-block:: console
71 then check if snf-image-creator exists with the following command:
73 .. code-block:: console
75 $ apt-cache showpkg snf-image-creator
77 If GRNET's dev repo has been added successfully, you can install
78 snf-image-creator, along with its dependencies, with the following command:
80 .. code-block:: console
82 $ sudo apt-get install snf-image-creator
84 The installation might take a while. Please note that at some point during the
85 installation you will be prompted to create/update a "supermin appliance". This
86 is a setting regarding libguestfs and you can safely choose "Yes".
88 Install snf-image-creator from source
89 =====================================
91 This method provides you with the cutting edge of snf-image-creator, which
92 gives you access to all the latest features. Keep in mind, however,
93 that you may experience instability issues.
95 The first four dependencies (python2, setuptools, Python-Dialog, and
96 libguestfs) need to be installed manually by the user. In an Ubuntu 12.04 LTS
97 system this can be achieved by installing packages provided by the
98 distribution, using the following command:
100 .. code-block:: console
102 $ apt-get install python-setuptools python-guestfs python-dialog
104 The rest of the dependencies will be automatically resolved by setuptools.
105 Keep in mind though that git needs to be installed to download the source
106 files. You can use the following command:
108 .. code-block:: console
110 $ apt-get install git
112 Python Virtual Environment
113 --------------------------
115 Since snf-image-creator and the rest of it's dependencies won't be installed
116 using packages, it's better to work in an isolated python virtual environment
117 (virtualenv). Installing the Virtual Python Environment builder in Ubuntu can
118 be accomplished using the following command:
120 .. code-block:: console
122 $ apt-get install python-virtualenv
124 Now, create a new python virtual environment like this:
126 .. code-block:: console
128 $ virtualenv --system-site-packages ~/image-creator-env
130 and activate it by executing:
132 .. code-block:: console
134 $ source ~/image-creator-env/bin/activate
136 You can later deactivate it using the following command:
138 .. code-block:: console
142 snf-common Installation
143 -----------------------
145 Install snf-common from source, by cloning it's repository:
147 .. code-block:: console
150 $ git clone https://code.grnet.gr/git/synnefo
151 $ cd synnefo/snf-common
152 $ python setup.py build
154 Then, make sure you are within the activated virtual environment before you
156 .. code-block:: console
158 $ python setup.py install
163 Install kamaki from source, by cloning it's repository:
165 .. code-block:: console
168 $ git clone https://code.grnet.gr/git/kamaki
172 As above, make sure you are within the activated virtual environment before you
175 .. code-block:: console
179 snf-image-creator Installation
180 ------------------------------
182 Install snf-image-creator the same way:
184 .. code-block:: console
187 $ git clone https://code.grnet.gr/git/snf-image-creator
188 $ git checkout stable-0.1
189 $ cd snf-image-creator
192 And from within the virtual environment execute:
194 .. code-block:: console