Statistics
| Branch: | Tag: | Revision:

root / docs / install.rst @ 3e131a2a

History | View | Annotate | Download (8.4 kB)

1
Installation
2
^^^^^^^^^^^^
3

    
4
This guide describes how to install snf-image-creator on a Linux system. 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.
7

    
8
Dependencies
9
============
10

    
11
snf-image-creator depends on the following programs:
12

    
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
 * pyparted [https://fedorahosted.org/pyparted/]
19
 * rsync [http://rsync.samba.org/]
20
 * ./kamaki [https://code.grnet.gr/projects/kamaki]
21
 * Python sh (previously pbs) [https://github.com/amoffat/sh]
22
 * ANSI colors for Python [http://pypi.python.org/pypi/ansicolors]
23
 * progress [http://pypi.python.org/pypi/progress]
24

    
25
The above dependencies are resolved differently, depending on the installation
26
method you choose. There are two installation methods available:
27

    
28
#. `Installation using packages <#install-snf-image-creator-using-packages>`_
29

    
30
#. `Installation from source <#install-snf-image-creator-from-source>`_
31

    
32
Install snf-image-creator using packages
33
========================================
34

    
35
Debian
36
------
37

    
38
For *Debian 7.0 (wheezy)* you can use our official packages found in our
39
development repository.
40

    
41
Add the following line to */etc/apt/sources.list*:
42

    
43
.. code-block:: console
44

    
45
   deb http://apt.dev.grnet.gr wheezy/
46

    
47
And resynchronize the package index files from their sources:
48

    
49
.. code-block:: console
50

    
51
   $ sudo apt-get update
52

    
53
You should be able to list the package by calling:
54

    
55
.. code-block:: console
56

    
57
   $ apt-cache showpkg snf-image-creator
58

    
59
And install the package with this command:
60

    
61
.. code-block:: console
62

    
63
   $ apt-get install snf-image-creator
64

    
65
Ubuntu
66
------
67

    
68
For *Ubuntu 12.04 LTS*, *12.10* and *13.04* systems, you can use our official
69
packages found in *grnet/synnefo* Lauchpad PPA.
70

    
71
Add the synnefo PPA in your system:
72

    
73
.. code-block:: console
74

    
75
   $ sudo apt-add-repository ppa:grnet/synnefo
76
   $ sudo apt-get update
77

    
78
If *apt-add-repository* is missing, first install:
79

    
80
*software-properties-common* (Ubuntu 12.10 & 13.04):
81

    
82
.. code-block:: console
83

    
84
   $ sudo apt-get install software-properties-common
85

    
86
Or *python-software-properties* (Ubuntu 12.04):
87

    
88
.. code-block:: console
89

    
90
   $ sudo apt-get install python-software-properties
91

    
92
After the synnefo repository is set up, you should be able to list
93
snf-image-creator by calling:
94

    
95
.. code-block:: console
96

    
97
   $ apt-cache showpkg snf-image-creator
98

    
99
Install the package by issuing:
100

    
101
.. code-block:: console
102

    
103
   $ sudo apt-get install snf-image-creator
104

    
105
.. note::
106
   If you are asked during the installation to create/update a
107
   "supermin appliance", choose "Yes".
108

    
109
Fedora
110
------
111

    
112
For *Fedora 17* you can use our official packages hosted at the *synnefo*
113
repository of the openSUSE Build Service.
114

    
115
Add the *synnefo* repository for *Fedora 17* to *yum*:
116

    
117
.. code-block:: console
118

    
119
   $ cd /etc/yum.repos.d
120
   $ wget http://download.opensuse.org/repositories/home:/GRNET:/synnefo/Fedora_17/home:GRNET:synnefo.repo
121

    
122
To list the *snf-image-creator* package use the following command:
123

    
124
.. code-block:: console
125

    
126
   $ yum info snf-image-creator
127

    
128
Install the package by issuing:
129

    
130
.. code-block:: console
131

    
132
   $ yum install snf-image-creator
133

    
134
CentOS
135
------
136

    
137
For *CentOS 6* you can use our official packages hosted at the *synnefo*
138
repository of the OpenSUSE Build Service.
139

    
140
Add the *synnefo* repository for *CentOS 6* to the yum repositories list:
141

    
142
.. code-block:: console
143

    
144
   $ cd /etc/yum.repos.d
145
   $ wget http://download.opensuse.org/repositories/home:/GRNET:/synnefo/CentOS_CentOS-6/home:GRNET:synnefo.repo
146

    
147
Check the `Fedora <#fedora>`_ instructions on how to install the software.
148

    
149
OpenSUSE
150
--------
151

    
152
For *OpenSUSE 12.3* you can use our official packages hosted at the *synnefo*
153
repository of the OpenSUSE Build Service.
154

    
155
Add the *Virtualization* repository for *OpenSUSE 12.3* to *YaST* with the
156
*Zypper* package manager:
157

    
158
.. code-block:: console
159

    
160
   $ zypper ar -f http://download.opensuse.org/repositories/Virtualization/openSUSE_12.3/Virtualization.repo
161

    
162
Add the *synnefo* repository:
163

    
164
.. code-block:: console
165

    
166
   $ zypper ar -f http://download.opensuse.org/repositories/home:/GRNET:/synnefo/openSUSE_12.3/home:GRNET:synnefo.repo
167

    
168
To list the *snf-image-creator* package use the following command:
169

    
170
.. code-block:: console
171

    
172
   $ zypper se snf-image-creator
173

    
174
Install the package by issuing:
175

    
176
.. code-block:: console
177

    
178
   $ zypper in snf-image-creator
179

    
180

    
181
Arch Linux
182
----------
183

    
184
For *Arch Linux* there are **unofficial** packages in AUR:
185
https://aur.archlinux.org/packages/snf-image-creator/ kindly provided by
186
Axilleas Pipinellis <axilleas@archlinux.info>.
187

    
188
.. note::
189
    Those packages are not maintained by the Synnefo development team.
190

    
191
    Please direct package-specific questions to Axilleas Pipinellis <axilleas@archlinux.info>,
192
    Cc: the Synnefo development team <synnefo-devel@googlegroups.com>
193

    
194
To install the package you may use *yaourt*. Create and install
195
the *yaourt* package:
196

    
197
.. code-block:: console
198

    
199
   $ wget https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gz
200
   $ tar -xvf package-query.tar.gz
201
   $ cd package-query
202
   $ makepkg -s
203
   $ pacman -U package-query-<VERSION>-<ARCH>.pkg.tar.xz
204
   $ cd ..
205
   $ wget https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz
206
   $ tar -xvf yaourt.tar.gz
207
   $ cd yaourt
208
   $ makepkg -s
209
   $ pacman -U yaourt-<VERSION>-<ARCH>.pkg.tar.xz
210

    
211
Install *snf-image-creator* using yaourt:
212

    
213
.. code-block:: console
214

    
215
   $ yaourt -Sa snf-image-creator
216

    
217
Install snf-image-creator from source
218
=====================================
219

    
220
Manually install the following dependencies:
221

    
222
 * Python 2 [http://www.python.org/]
223
 * Python setuptools [http://pypi.python.org/pypi/setuptools]
224
 * Python Dialog [http://pythondialog.sourceforge.net/]
225
 * Python bindings for libguestfs [http://libguestfs.org/]
226
 * Python interface to sendfile [http://pypi.python.org/pypi/pysendfile]
227
 * pyparted [https://fedorahosted.org/pyparted/]
228
 * rsync [http://rsync.samba.org/]
229

    
230
In Ubuntu you can do this using:
231
 
232
.. code-block:: console
233

    
234
   $ sudo apt-get install python-setuptools python-guestfs python-dialog \
235
     python-sendfile python-parted rsync
236

    
237
If you are using Ubuntu 12.10 you also need to install libguestfs-tools:
238

    
239
.. code-block:: console
240

    
241
   $ sudo apt-get install libguestfs-tools
242

    
243
.. note::
244
   If you are asked during the installation to create/update a
245
   "supermin appliance", choose "Yes".
246

    
247
Python Virtual Environment
248
--------------------------
249

    
250
Since snf-image-creator and the rest of its dependencies won't be installed
251
using packages, it's better to work in an isolated python virtual environment
252
(virtualenv).
253

    
254
Install the Virtual Python Environment builder:
255
http://pypi.python.org/pypi/virtualenv.
256

    
257
For Ubuntu use the following command:
258

    
259
.. code-block:: console
260

    
261
   $ sudo apt-get install python-virtualenv
262

    
263
Then create a new python virtual environment:
264

    
265
.. code-block:: console
266

    
267
   $ virtualenv --system-site-packages ~/image-creator-env
268

    
269
and activate it by executing:
270

    
271
.. code-block:: console
272

    
273
   $ source ~/image-creator-env/bin/activate
274

    
275
You may later deactivate it using:
276

    
277
.. code-block:: console
278

    
279
   $ deactivate
280

    
281
kamaki Installation
282
-------------------
283

    
284
Refer to `./kamaki documentation <http://docs.dev.grnet.gr/kamaki/latest/installation.html>`_
285
for instructions. You may install kamaki from source inside the virtualenv
286
you've created above or by using binary packages if they are available for your
287
distribution.
288

    
289
snf-image-creator Installation
290
------------------------------
291

    
292
Download the latest snf-image-creator source package from
293
`here <https://code.grnet.gr/projects/snf-image-creator/files>`_ and install it
294
inside the virtualenv using the following commands:
295

    
296
.. code-block:: console
297

    
298
   $ tar -xf snf_image_creator-<VERSION>.tar.gz
299
   $ cd snf_image_creator-<VERSION>
300
   $ python ./setup.py install
301

    
302
Alternatively, you can install the bleeding edge version of the software by
303
cloning its git repository:
304

    
305
.. code-block:: console
306

    
307
   $ git clone https://code.grnet.gr/git/snf-image-creator
308
   $ cd snf-image-creator
309
   $ python ./setup.py install
310

    
311
To do the latter, you'll need to have git (http://git-scm.com/) installed.
312
For ubuntu this can be done using:
313

    
314
.. code-block:: console
315

    
316
   $ sudo apt-get install git
317

    
318
.. warning::
319
   Keep in mind that the bleeding edge version may be unstable or even
320
   unusable.
321