Fix typos in install section of the documentation
[snf-image-creator] / docs / install.rst
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 official packages <#install-snf-image-creator-using-official-packages>`_ (currently only for Ubuntu 12.04 LTS and 12.10).
29
30 #. `Installation from source <#install-snf-image-creator-from-source>`_
31
32 Install snf-image-creator using official packages
33 =================================================
34
35 For Ubuntu systems, you can use our official packages found in *grnet/synnefo*
36 Lauchpad PPA.
37
38 Add the synnefo PPA in your system:
39
40 .. code-block:: console
41
42    $ sudo apt-add-repository ppa:grnet/synnefo
43    $ sudo apt-get update
44
45 If *apt-add-repository* is missing, install *software-properties-common* first:
46
47 .. code-block:: console
48
49    $ sudo apt-get install software-properties-common
50
51 After the synnefo repository is set up, you should be able to list
52 snf-image-creator by calling:
53
54 .. code-block:: console
55
56    $ apt-cache showpkg snf-image-creator
57
58 Install the package by issuing:
59
60 .. code-block:: console
61
62    $ sudo apt-get install snf-image-creator
63
64 If you are using Ubuntu 12.10, also install libguestfs-tools:
65
66 .. code-block:: console
67
68    $ sudo apt-get install libguestfs-tools
69
70 .. note::
71    If you are asked during the installation to create/update a
72    "supermin appliance", choose "Yes".
73
74 Install snf-image-creator from source
75 =====================================
76
77 Manually install the following dependencies:
78
79  * Python 2 [http://www.python.org/]
80  * Python setuptools [http://pypi.python.org/pypi/setuptools]
81  * Python Dialog [http://pythondialog.sourceforge.net/]
82  * Python bindings for libguestfs [http://libguestfs.org/]
83  * Python interface to sendfile [http://pypi.python.org/pypi/pysendfile]
84  * pyparted [https://fedorahosted.org/pyparted/]
85  * rsync [http://rsync.samba.org/]
86
87 In Ubuntu you can do this using:
88  
89 .. code-block:: console
90
91    $ sudo apt-get install python-setuptools python-guestfs python-dialog \
92      python-sendfile python-parted rsync
93
94 If you are using Ubuntu 12.10 you also need to install libguestfs-tools:
95
96 .. code-block:: console
97
98    $ sudo apt-get install libguestfs-tools
99
100 .. note::
101    If you are asked during the installation to create/update a
102    "supermin appliance", choose "Yes".
103
104 Python Virtual Environment
105 --------------------------
106
107 Since snf-image-creator and the rest of its dependencies won't be installed
108 using packages, it's better to work in an isolated python virtual environment
109 (virtualenv).
110
111 Install the Virtual Python Environment builder:
112 http://pypi.python.org/pypi/virtualenv.
113
114 For Ubuntu use the following command:
115
116 .. code-block:: console
117
118    $ sudo apt-get install python-virtualenv
119
120 Then create a new python virtual environment:
121
122 .. code-block:: console
123
124    $ virtualenv --system-site-packages ~/image-creator-env
125
126 and activate it by executing:
127
128 .. code-block:: console
129
130    $ source ~/image-creator-env/bin/activate
131
132 You may later deactivate it using:
133
134 .. code-block:: console
135
136    $ deactivate
137
138 kamaki Installation
139 -------------------
140
141 Refer to `./kamaki documentation <http://docs.dev.grnet.gr/kamaki/latest/installation.html>`_
142 for instructions. You may install kamaki from source inside the virtualenv
143 you've created above or by using binary packages if they are available for your
144 distribution.
145
146 snf-image-creator Installation
147 ------------------------------
148
149 Download the latest snf-image-creator source package from
150 `here <https://code.grnet.gr/projects/snf-image-creator/files>`_ and install it
151 inside the virtualenv using the following commands:
152
153 .. code-block:: console
154
155    $ tar -xf snf_image_creator-<VERSION>.tar.gz
156    $ cd snf_image_creator-<VERSION>
157    $ python ./setup.py install
158
159 Alternatively, you can install the bleeding edge version of the software by
160 cloning its git repository:
161
162 .. code-block:: console
163
164    $ git clone https://code.grnet.gr/git/snf-image-creator
165    $ cd snf-image-creator
166    $ python ./setup.py install
167
168 To do the latter, you'll need to have git (http://git-scm.com/) installed.
169 For ubuntu this can be done using:
170
171 .. code-block:: console
172
173    $ sudo apt-get install git
174
175 .. warning::
176    Keep in mind that the bleeding edge version may be unstable or even
177    unusable.
178