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