root / docs / install.rst @ f8a17c48
History | View | Annotate | Download (8.5 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 |
Add the apt-dev GPG key to the list of trusted keys: |
48 |
|
49 |
.. code-block:: console |
50 |
|
51 |
$ curl https://dev.grnet.gr/files/apt-grnetdev.pub | apt-key add - |
52 |
|
53 |
And resynchronize the package index files from their sources: |
54 |
|
55 |
.. code-block:: console |
56 |
|
57 |
$ sudo apt-get update |
58 |
|
59 |
You should be able to list the package by calling: |
60 |
|
61 |
.. code-block:: console |
62 |
|
63 |
$ apt-cache showpkg snf-image-creator |
64 |
|
65 |
And install the package with this command: |
66 |
|
67 |
.. code-block:: console |
68 |
|
69 |
$ apt-get install snf-image-creator |
70 |
|
71 |
Ubuntu |
72 |
------ |
73 |
|
74 |
For *Ubuntu 12.04 LTS*, *12.10* and *13.04* systems, you can use our official |
75 |
packages found in *grnet/synnefo* Lauchpad PPA. |
76 |
|
77 |
Add the synnefo PPA in your system: |
78 |
|
79 |
.. code-block:: console |
80 |
|
81 |
$ sudo apt-add-repository ppa:grnet/synnefo |
82 |
$ sudo apt-get update |
83 |
|
84 |
If *apt-add-repository* is missing, first install: |
85 |
|
86 |
*software-properties-common* (Ubuntu 12.10 & 13.04): |
87 |
|
88 |
.. code-block:: console |
89 |
|
90 |
$ sudo apt-get install software-properties-common |
91 |
|
92 |
Or *python-software-properties* (Ubuntu 12.04): |
93 |
|
94 |
.. code-block:: console |
95 |
|
96 |
$ sudo apt-get install python-software-properties |
97 |
|
98 |
After the synnefo repository is set up, you should be able to list |
99 |
snf-image-creator by calling: |
100 |
|
101 |
.. code-block:: console |
102 |
|
103 |
$ apt-cache showpkg snf-image-creator |
104 |
|
105 |
Install the package by issuing: |
106 |
|
107 |
.. code-block:: console |
108 |
|
109 |
$ sudo apt-get install snf-image-creator |
110 |
|
111 |
.. note:: |
112 |
If you are asked during the installation to create/update a |
113 |
"supermin appliance", choose "Yes". |
114 |
|
115 |
Fedora |
116 |
------ |
117 |
|
118 |
For *Fedora 17* you can use our official packages hosted at the *synnefo* |
119 |
repository of the openSUSE Build Service. |
120 |
|
121 |
Add the *synnefo* repository for *Fedora 17* to *yum*: |
122 |
|
123 |
.. code-block:: console |
124 |
|
125 |
$ cd /etc/yum.repos.d |
126 |
$ wget http://download.opensuse.org/repositories/home:/GRNET:/synnefo/Fedora_17/home:GRNET:synnefo.repo |
127 |
|
128 |
To list the *snf-image-creator* package use the following command: |
129 |
|
130 |
.. code-block:: console |
131 |
|
132 |
$ yum info snf-image-creator |
133 |
|
134 |
Install the package by issuing: |
135 |
|
136 |
.. code-block:: console |
137 |
|
138 |
$ yum install snf-image-creator |
139 |
|
140 |
CentOS |
141 |
------ |
142 |
|
143 |
For *CentOS 6* you can use our official packages hosted at the *synnefo* |
144 |
repository of the OpenSUSE Build Service. |
145 |
|
146 |
Add the *synnefo* repository for *CentOS 6* to the yum repositories list: |
147 |
|
148 |
.. code-block:: console |
149 |
|
150 |
$ cd /etc/yum.repos.d |
151 |
$ wget http://download.opensuse.org/repositories/home:/GRNET:/synnefo/CentOS_CentOS-6/home:GRNET:synnefo.repo |
152 |
|
153 |
Check the `Fedora <#fedora>`_ instructions on how to install the software. |
154 |
|
155 |
OpenSUSE |
156 |
-------- |
157 |
|
158 |
For *OpenSUSE 12.3* you can use our official packages hosted at the *synnefo* |
159 |
repository of the OpenSUSE Build Service. |
160 |
|
161 |
Add the *Virtualization* repository for *OpenSUSE 12.3* to *YaST* with the |
162 |
*Zypper* package manager: |
163 |
|
164 |
.. code-block:: console |
165 |
|
166 |
$ zypper ar -f http://download.opensuse.org/repositories/Virtualization/openSUSE_12.3/Virtualization.repo |
167 |
|
168 |
Add the *synnefo* repository: |
169 |
|
170 |
.. code-block:: console |
171 |
|
172 |
$ zypper ar -f http://download.opensuse.org/repositories/home:/GRNET:/synnefo/openSUSE_12.3/home:GRNET:synnefo.repo |
173 |
|
174 |
To list the *snf-image-creator* package use the following command: |
175 |
|
176 |
.. code-block:: console |
177 |
|
178 |
$ zypper se snf-image-creator |
179 |
|
180 |
Install the package by issuing: |
181 |
|
182 |
.. code-block:: console |
183 |
|
184 |
$ zypper in snf-image-creator |
185 |
|
186 |
|
187 |
Arch Linux |
188 |
---------- |
189 |
|
190 |
For *Arch Linux* there are **unofficial** packages in AUR: |
191 |
https://aur.archlinux.org/packages/snf-image-creator/ kindly provided by |
192 |
Axilleas Pipinellis <axilleas@archlinux.info>. |
193 |
|
194 |
.. note:: |
195 |
Those packages are not maintained by the Synnefo development team. |
196 |
|
197 |
Please direct package-specific questions to Axilleas Pipinellis <axilleas@archlinux.info>, |
198 |
Cc: the Synnefo development team <synnefo-devel@googlegroups.com> |
199 |
|
200 |
To install the package you may use *yaourt*. Create and install |
201 |
the *yaourt* package: |
202 |
|
203 |
.. code-block:: console |
204 |
|
205 |
$ wget https://aur.archlinux.org/packages/pa/package-query/package-query.tar.gz |
206 |
$ tar -xvf package-query.tar.gz |
207 |
$ cd package-query |
208 |
$ makepkg -s |
209 |
$ pacman -U package-query-<VERSION>-<ARCH>.pkg.tar.xz |
210 |
$ cd .. |
211 |
$ wget https://aur.archlinux.org/packages/ya/yaourt/yaourt.tar.gz |
212 |
$ tar -xvf yaourt.tar.gz |
213 |
$ cd yaourt |
214 |
$ makepkg -s |
215 |
$ pacman -U yaourt-<VERSION>-<ARCH>.pkg.tar.xz |
216 |
|
217 |
Install *snf-image-creator* using yaourt: |
218 |
|
219 |
.. code-block:: console |
220 |
|
221 |
$ yaourt -Sa snf-image-creator |
222 |
|
223 |
Install snf-image-creator from source |
224 |
===================================== |
225 |
|
226 |
Manually install the following dependencies: |
227 |
|
228 |
* Python 2 [http://www.python.org/] |
229 |
* Python setuptools [http://pypi.python.org/pypi/setuptools] |
230 |
* Python Dialog [http://pythondialog.sourceforge.net/] |
231 |
* Python bindings for libguestfs [http://libguestfs.org/] |
232 |
* Python interface to sendfile [http://pypi.python.org/pypi/pysendfile] |
233 |
* pyparted [https://fedorahosted.org/pyparted/] |
234 |
* rsync [http://rsync.samba.org/] |
235 |
|
236 |
In Ubuntu you can do this using: |
237 |
|
238 |
.. code-block:: console |
239 |
|
240 |
$ sudo apt-get install python-setuptools python-guestfs python-dialog \ |
241 |
python-sendfile python-parted rsync |
242 |
|
243 |
If you are using Ubuntu 12.10 you also need to install libguestfs-tools: |
244 |
|
245 |
.. code-block:: console |
246 |
|
247 |
$ sudo apt-get install libguestfs-tools |
248 |
|
249 |
.. note:: |
250 |
If you are asked during the installation to create/update a |
251 |
"supermin appliance", choose "Yes". |
252 |
|
253 |
Python Virtual Environment |
254 |
-------------------------- |
255 |
|
256 |
Since snf-image-creator and the rest of its dependencies won't be installed |
257 |
using packages, it's better to work in an isolated python virtual environment |
258 |
(virtualenv). |
259 |
|
260 |
Install the Virtual Python Environment builder: |
261 |
http://pypi.python.org/pypi/virtualenv. |
262 |
|
263 |
For Ubuntu use the following command: |
264 |
|
265 |
.. code-block:: console |
266 |
|
267 |
$ sudo apt-get install python-virtualenv |
268 |
|
269 |
Then create a new python virtual environment: |
270 |
|
271 |
.. code-block:: console |
272 |
|
273 |
$ virtualenv --system-site-packages ~/image-creator-env |
274 |
|
275 |
and activate it by executing: |
276 |
|
277 |
.. code-block:: console |
278 |
|
279 |
$ source ~/image-creator-env/bin/activate |
280 |
|
281 |
You may later deactivate it using: |
282 |
|
283 |
.. code-block:: console |
284 |
|
285 |
$ deactivate |
286 |
|
287 |
kamaki Installation |
288 |
------------------- |
289 |
|
290 |
Refer to `./kamaki documentation <http://docs.dev.grnet.gr/kamaki/latest/installation.html>`_ |
291 |
for instructions. You may install kamaki from source inside the virtualenv |
292 |
you've created above or by using binary packages if they are available for your |
293 |
distribution. |
294 |
|
295 |
snf-image-creator Installation |
296 |
------------------------------ |
297 |
|
298 |
Download the latest snf-image-creator source package from |
299 |
`here <https://code.grnet.gr/projects/snf-image-creator/files>`_ and install it |
300 |
inside the virtualenv using the following commands: |
301 |
|
302 |
.. code-block:: console |
303 |
|
304 |
$ tar -xf snf_image_creator-<VERSION>.tar.gz |
305 |
$ cd snf_image_creator-<VERSION> |
306 |
$ python ./setup.py install |
307 |
|
308 |
Alternatively, you can install the bleeding edge version of the software by |
309 |
cloning its git repository: |
310 |
|
311 |
.. code-block:: console |
312 |
|
313 |
$ git clone https://code.grnet.gr/git/snf-image-creator |
314 |
$ cd snf-image-creator |
315 |
$ python ./setup.py install |
316 |
|
317 |
To do the latter, you'll need to have git (http://git-scm.com/) installed. |
318 |
For ubuntu this can be done using: |
319 |
|
320 |
.. code-block:: console |
321 |
|
322 |
$ sudo apt-get install git |
323 |
|
324 |
.. warning:: |
325 |
Keep in mind that the bleeding edge version may be unstable or even |
326 |
unusable. |
327 |
|