4 This guide describes how to install snf-image-creator on your machine. It is
5 highly recommended to have virtualization capable hardware. snf-image-creator
6 will work on processors that do not support virtualization but it will be slow.
11 snf-image-creator depends on the following programs:
13 * Python 2 [http://www.python.org/]
14 * Python setuptools [http://pypi.python.org/pypi/setuptools]
15 * Python Dialog [http://pythondialog.sourceforge.net/]
16 * Python bindings for libguestfs [http://libguestfs.org/]
17 * Python interface to sendfile [http://pypi.python.org/pypi/pysendfile]
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]
23 The above dependencies are resolved differently, depending on the installation
24 method you choose. There are two installation methods available:
26 #. `Install snf-image-creator using official packages`_ (currently only for
27 Ubuntu 12.04, more OSes will be supported soon)
28 #. `Install snf-image-creator from source`_ (provided you meet the above
31 Both methods are presented below.
33 Install snf-image-creator using official packages
34 =================================================
36 This method of installing snf-image-creator has all the advantages of Ubuntu's
39 * Automatic resolution of dependencies
40 * Simple installation of consequent updates
42 In order to proceed with the installation, you must first add GRNET's dev repo
43 to your sources. You can use the following commands:
45 .. code-block:: console
47 $ cd /etc/apt/sources.list.d
48 $ echo "deb http://apt.dev.grnet.gr precise main" | \
49 sudo tee -a apt.dev.grnet.gr.list
50 $ echo "deb-src http://apt.dev.grnet.gr precise main" | \
51 sudo tee -a apt.dev.grnet.gr.list
53 You will also need to import the repo's GPG key. You can use the ``curl`` tool
56 .. code-block:: console
58 $ sudo apt-get install curl
60 Use the following command to import the GPG key:
62 .. code-block:: console
64 $ sudo curl https://dev.grnet.gr/files/apt-grnetdev.pub | sudo apt-key add -
66 You can verify that the repo has been added successfully if snf-image-creator
67 exists as a package. First do an update of your sources:
69 .. code-block:: console
73 then check if snf-image-creator exists with the following command:
75 .. code-block:: console
77 $ apt-cache showpkg snf-image-creator
79 If GRNET's dev repo has been added successfully, you can install
80 snf-image-creator, along with its dependencies, with the following command:
82 .. code-block:: console
84 $ sudo apt-get install snf-image-creator
86 The installation may take a while. Please note that at some point during the
87 installation you will be prompted to create/update a "supermin appliance". This
88 is a setting regarding libguestfs and you can safely choose "Yes".
90 Install snf-image-creator from source
91 =====================================
93 This method provides you with the cutting edge of snf-image-creator, which
94 gives you access to all the latest features. Keep in mind, however,
95 that you may experience instability issues.
97 The first five dependencies (python2, setuptools, Python-Dialog, libguestfs and
98 python-sendfile) need to be installed manually by the user. In an Ubuntu 12.04
99 LTS system this can be achieved by installing packages provided by the
100 distribution, using the following command:
102 .. code-block:: console
104 $ apt-get install python-setuptools python-guestfs python-dialog python-sendfile
106 The rest of the dependencies will be automatically resolved by setuptools.
107 Note that at some point during the installation, you will be prompted to
108 create/update a "supermin appliance". This is a setting regarding libguestfs
109 and you can safely choose "Yes".
111 In order to download the source files, git needs to be installed. You can do
112 so with the following command:
114 .. code-block:: console
116 $ apt-get install git
118 Python Virtual Environment
119 --------------------------
121 Since snf-image-creator and the rest of its dependencies won't be installed
122 using packages, it's better to work in an isolated python virtual environment
123 (virtualenv). Installing the Virtual Python Environment builder in Ubuntu can
124 be accomplished using the following command:
126 .. code-block:: console
128 $ apt-get install python-virtualenv
130 Now, create a new python virtual environment like this:
132 .. code-block:: console
134 $ virtualenv --system-site-packages ~/image-creator-env
136 and activate it by executing:
138 .. code-block:: console
140 $ source ~/image-creator-env/bin/activate
142 You can later deactivate it using the following command:
144 .. code-block:: console
148 snf-common Installation
149 -----------------------
151 Install snf-common from source, by cloning it's repository:
153 .. code-block:: console
156 $ git clone https://code.grnet.gr/git/synnefo
157 $ cd synnefo/snf-common
158 $ python setup.py build
160 Then, make sure you are within the activated virtual environment before you
163 .. code-block:: console
165 $ python setup.py install
170 Install kamaki from source, by cloning it's repository:
172 .. code-block:: console
175 $ git clone https://code.grnet.gr/git/kamaki
179 As above, make sure you are within the activated virtual environment before you
182 .. code-block:: console
186 snf-image-creator Installation
187 ------------------------------
189 Install snf-image-creator the same way:
191 .. code-block:: console
194 $ git clone https://code.grnet.gr/git/snf-image-creator
195 $ cd snf-image-creator
196 $ git checkout stable-0.1
199 And from within the virtual environment execute:
201 .. code-block:: console