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
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
25 method you choose. There are two installation methods available:
27 #. `Install snf-image-creator using official packages`_ (currently only for
28 Ubuntu 12.04, more OSes will be supported soon)
29 #. `Install snf-image-creator from source`_ (provided you meet the above
32 Both methods are presented below.
34 Install snf-image-creator using official packages
35 =================================================
37 This method of installing snf-image-creator has all the advantages of Ubuntu's
40 * Automatic resolution of dependencies
41 * Simple installation of consequent updates
43 In order to proceed with the installation, you must first add GRNET's dev repo
44 to your sources. You can use the following commands:
46 .. code-block:: console
48 $ cd /etc/apt/sources.list.d
49 $ echo "deb http://apt.dev.grnet.gr precise main" | \
50 sudo tee -a apt.dev.grnet.gr.list
51 $ echo "deb-src http://apt.dev.grnet.gr precise main" | \
52 sudo tee -a apt.dev.grnet.gr.list
54 You will also need to import the repo's GPG key. You can use the ``curl`` tool
57 .. code-block:: console
59 $ sudo apt-get install curl
61 Use the following command to import the GPG key:
63 .. code-block:: console
65 $ sudo curl https://dev.grnet.gr/files/apt-grnetdev.pub | sudo apt-key add -
67 You can verify that the repo has been added successfully if snf-image-creator
68 exists as a package. First do an update of your sources:
70 .. code-block:: console
74 then check if snf-image-creator exists with the following command:
76 .. code-block:: console
78 $ apt-cache showpkg snf-image-creator
80 If GRNET's dev repo has been added successfully, you can install
81 snf-image-creator, along with its dependencies, with the following command:
83 .. code-block:: console
85 $ sudo apt-get install snf-image-creator
87 The installation might take a while. Please note that at some point during the
88 installation you will be prompted to create/update a "supermin appliance". This
89 is a setting regarding libguestfs and you can safely choose "Yes".
91 Install snf-image-creator from source
92 =====================================
94 This method provides you with the cutting edge of snf-image-creator, which
95 gives you access to all the latest features. Keep in mind, however,
96 that you may experience instability issues.
98 The first four dependencies (python2, setuptools, Python-Dialog, and
99 libguestfs) need to be installed manually by the user. In an Ubuntu 12.04 LTS
100 system this can be achieved by installing packages provided by the
101 distribution, using the following command:
103 .. code-block:: console
105 $ apt-get install python-setuptools python-guestfs python-dialog
107 The rest of the dependencies will be automatically resolved by setuptools.
108 Note that at some point during the installation, you will be prompted to
109 create/update a "supermin appliance". This is a setting regarding libguestfs
110 and you can safely choose "Yes".
112 In order to download the source files, git needs to be installed. You can do
113 so with the following command:
115 .. code-block:: console
117 $ apt-get install git
119 Python Virtual Environment
120 --------------------------
122 Since snf-image-creator and the rest of its dependencies won't be installed
123 using packages, it's better to work in an isolated python virtual environment
124 (virtualenv). Installing the Virtual Python Environment builder in Ubuntu can
125 be accomplished using the following command:
127 .. code-block:: console
129 $ apt-get install python-virtualenv
131 Now, create a new python virtual environment like this:
133 .. code-block:: console
135 $ virtualenv --system-site-packages ~/image-creator-env
137 and activate it by executing:
139 .. code-block:: console
141 $ source ~/image-creator-env/bin/activate
143 You can later deactivate it using the following command:
145 .. code-block:: console
149 snf-common Installation
150 -----------------------
152 Install snf-common from source, by cloning it's repository:
154 .. code-block:: console
157 $ git clone https://code.grnet.gr/git/synnefo
158 $ cd synnefo/snf-common
159 $ python setup.py build
161 Then, make sure you are within the activated virtual environment before you
164 .. code-block:: console
166 $ python setup.py install
171 Install kamaki from source, by cloning it's repository:
173 .. code-block:: console
176 $ git clone https://code.grnet.gr/git/kamaki
180 As above, make sure you are within the activated virtual environment before you
183 .. code-block:: console
187 snf-image-creator Installation
188 ------------------------------
190 Install snf-image-creator the same way:
192 .. code-block:: console
195 $ git clone https://code.grnet.gr/git/snf-image-creator
196 $ git checkout stable-0.1
197 $ cd snf-image-creator
200 And from within the virtual environment execute:
202 .. code-block:: console