root / docs / install.rst @ b50f3b94
History | View | Annotate | Download (7.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 |
Ubuntu |
36 |
------ |
37 |
|
38 |
For *Ubuntu 12.04 LTS* and *12.10* systems, you can use our official packages |
39 |
found in *grnet/synnefo* Lauchpad PPA. |
40 |
|
41 |
Add the synnefo PPA in your system: |
42 |
|
43 |
.. code-block:: console |
44 |
|
45 |
$ sudo apt-add-repository ppa:grnet/synnefo |
46 |
$ sudo apt-get update |
47 |
|
48 |
If *apt-add-repository* is missing, install *software-properties-common* first: |
49 |
|
50 |
.. code-block:: console |
51 |
|
52 |
$ sudo apt-get install software-properties-common |
53 |
|
54 |
After the synnefo repository is set up, you should be able to list |
55 |
snf-image-creator by calling: |
56 |
|
57 |
.. code-block:: console |
58 |
|
59 |
$ apt-cache showpkg snf-image-creator |
60 |
|
61 |
Install the package by issuing: |
62 |
|
63 |
.. code-block:: console |
64 |
|
65 |
$ sudo apt-get install snf-image-creator |
66 |
|
67 |
If you are using Ubuntu 12.10, also install libguestfs-tools: |
68 |
|
69 |
.. code-block:: console |
70 |
|
71 |
$ sudo apt-get install libguestfs-tools |
72 |
|
73 |
.. note:: |
74 |
If you are asked during the installation to create/update a |
75 |
"supermin appliance", choose "Yes". |
76 |
|
77 |
.. warning:: |
78 |
In *Ubuntu 12.10* the current package of libguestfs (1.18-2) is broken. Take |
79 |
a look at the open `bug report <https://bugs.launchpad.net/ubuntu/quantal/+source/libguestfs/+bug/1086974>`_. |
80 |
Until version 1.18-2ubunut1 is out, you may workaround this problem by |
81 |
creating a symlink like this: |
82 |
|
83 |
*sudo ln -s /usr/lib/guestfs /usr/lib/x86_64-linux-gnu/guestfs* |
84 |
|
85 |
Fedora |
86 |
------ |
87 |
|
88 |
For *Fedora 17* you can use our official packages hosted at the *synnefo* |
89 |
repository of the openSUSE Build Service. |
90 |
|
91 |
Add the *synnefo* repository for *Fedora 17* to *yum*: |
92 |
|
93 |
.. code-block:: console |
94 |
|
95 |
$ cd /etc/yum.repos.d |
96 |
$ wget http://download.opensuse.org/repositories/home:/GRNET:/synnefo/Fedora_17/home:GRNET:synnefo.repo |
97 |
|
98 |
To list the *snf-image-creator* package use the following command: |
99 |
|
100 |
.. code-block:: console |
101 |
|
102 |
$ yum info snf-image-creator |
103 |
|
104 |
Install the package by issuing: |
105 |
|
106 |
.. code-block:: console |
107 |
|
108 |
$ yum install snf-image-creator |
109 |
|
110 |
CentOS |
111 |
------ |
112 |
|
113 |
For *CentOS 6* you can use our official packages hosted at the *synnefo* |
114 |
repository of the openSUSE Build Service. |
115 |
|
116 |
Add the *synnefo* repository for *CentOS 6* to the yum repositories list: |
117 |
|
118 |
.. code-block:: console |
119 |
|
120 |
$ cd /etc/yum.repos.d |
121 |
$ wget http://download.opensuse.org/repositories/home:/GRNET:/synnefo/CentOS_CentOS-6/home:GRNET:synnefo.repo |
122 |
|
123 |
Check the `Fedora <#fedora>`_ instructions on how to install the software. |
124 |
|
125 |
Arch Linux |
126 |
---------- |
127 |
|
128 |
For *Arch Linux* there are **unofficial** packages in AUR: |
129 |
https://aur.archlinux.org/packages/snf-image-creator/ kindly provided by |
130 |
Axilleas Pipinellis <axilleas@archlinux.info>. |
131 |
|
132 |
.. note:: |
133 |
Those packages are not maintained by the Synnefo development team. |
134 |
|
135 |
Please direct package-specific questions to Axilleas Pipinellis <axilleas@archlinux.info>, |
136 |
Cc: the Synnefo development team <synnefo-devel@googlegroups.com> |
137 |
|
138 |
To install the package you may use *yaourt*. Create and install |
139 |
the *yaourt* package: |
140 |
|
141 |
.. code-block:: console |
142 |
|
143 |
$ wget https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gz |
144 |
$ tar -xvf package-query.tar.gz |
145 |
$ cd package-query |
146 |
$ makepkg -s |
147 |
$ pacman -U package-query-<VERSION>-<ARCH>.pkg.tar.xz |
148 |
$ cd .. |
149 |
$ wget https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz |
150 |
$ tar -xvf yaourt.tar.gz |
151 |
$ cd yaourt |
152 |
$ makepkg -s |
153 |
$ pacman -U yaourt-<VERSION>-<ARCH>.pkg.tar.xz |
154 |
|
155 |
Install *snf-image-creator* using yaourt: |
156 |
|
157 |
.. code-block:: console |
158 |
|
159 |
$ yaourt -Sa snf-image-creator |
160 |
|
161 |
Install snf-image-creator from source |
162 |
===================================== |
163 |
|
164 |
Manually install the following dependencies: |
165 |
|
166 |
* Python 2 [http://www.python.org/] |
167 |
* Python setuptools [http://pypi.python.org/pypi/setuptools] |
168 |
* Python Dialog [http://pythondialog.sourceforge.net/] |
169 |
* Python bindings for libguestfs [http://libguestfs.org/] |
170 |
* Python interface to sendfile [http://pypi.python.org/pypi/pysendfile] |
171 |
* pyparted [https://fedorahosted.org/pyparted/] |
172 |
* rsync [http://rsync.samba.org/] |
173 |
|
174 |
In Ubuntu you can do this using: |
175 |
|
176 |
.. code-block:: console |
177 |
|
178 |
$ sudo apt-get install python-setuptools python-guestfs python-dialog \ |
179 |
python-sendfile python-parted rsync |
180 |
|
181 |
If you are using Ubuntu 12.10 you also need to install libguestfs-tools: |
182 |
|
183 |
.. code-block:: console |
184 |
|
185 |
$ sudo apt-get install libguestfs-tools |
186 |
|
187 |
.. note:: |
188 |
If you are asked during the installation to create/update a |
189 |
"supermin appliance", choose "Yes". |
190 |
|
191 |
Python Virtual Environment |
192 |
-------------------------- |
193 |
|
194 |
Since snf-image-creator and the rest of its dependencies won't be installed |
195 |
using packages, it's better to work in an isolated python virtual environment |
196 |
(virtualenv). |
197 |
|
198 |
Install the Virtual Python Environment builder: |
199 |
http://pypi.python.org/pypi/virtualenv. |
200 |
|
201 |
For Ubuntu use the following command: |
202 |
|
203 |
.. code-block:: console |
204 |
|
205 |
$ sudo apt-get install python-virtualenv |
206 |
|
207 |
Then create a new python virtual environment: |
208 |
|
209 |
.. code-block:: console |
210 |
|
211 |
$ virtualenv --system-site-packages ~/image-creator-env |
212 |
|
213 |
and activate it by executing: |
214 |
|
215 |
.. code-block:: console |
216 |
|
217 |
$ source ~/image-creator-env/bin/activate |
218 |
|
219 |
You may later deactivate it using: |
220 |
|
221 |
.. code-block:: console |
222 |
|
223 |
$ deactivate |
224 |
|
225 |
kamaki Installation |
226 |
------------------- |
227 |
|
228 |
Refer to `./kamaki documentation <http://docs.dev.grnet.gr/kamaki/latest/installation.html>`_ |
229 |
for instructions. You may install kamaki from source inside the virtualenv |
230 |
you've created above or by using binary packages if they are available for your |
231 |
distribution. |
232 |
|
233 |
snf-image-creator Installation |
234 |
------------------------------ |
235 |
|
236 |
Download the latest snf-image-creator source package from |
237 |
`here <https://code.grnet.gr/projects/snf-image-creator/files>`_ and install it |
238 |
inside the virtualenv using the following commands: |
239 |
|
240 |
.. code-block:: console |
241 |
|
242 |
$ tar -xf snf_image_creator-<VERSION>.tar.gz |
243 |
$ cd snf_image_creator-<VERSION> |
244 |
$ python ./setup.py install |
245 |
|
246 |
Alternatively, you can install the bleeding edge version of the software by |
247 |
cloning its git repository: |
248 |
|
249 |
.. code-block:: console |
250 |
|
251 |
$ git clone https://code.grnet.gr/git/snf-image-creator |
252 |
$ cd snf-image-creator |
253 |
$ python ./setup.py install |
254 |
|
255 |
To do the latter, you'll need to have git (http://git-scm.com/) installed. |
256 |
For ubuntu this can be done using: |
257 |
|
258 |
.. code-block:: console |
259 |
|
260 |
$ sudo apt-get install git |
261 |
|
262 |
.. warning:: |
263 |
Keep in mind that the bleeding edge version may be unstable or even |
264 |
unusable. |
265 |
|