Rename tests to livetest in kamaki.clients
[kamaki] / docs / installation.rst
1 Installation
2 ============
3
4 This guide describes the standard installation process for kamaki, with the aspiration of covering as much cases as possible. Although kamaki was initially targeted to advanced Linux/Unix-like users, it should be quite straightforward to install and have it up and running in most popular platforms.
5
6
7 * Kamaki repository: `http://code.grnet.gr/git/kamaki <http://code.grnet.gr/git/kamaki>`_
8
9 * Synnefo Linux packages: `http://apt.dev.grnet.gr <http://apt.dev.grnet.gr>`_, `http://apt2.dev.grnet.gr <http://apt2.dev.grnet.gr>`_
10
11 Linux and Unix-like enviroments
12 -------------------------------
13
14 Debian:
15 ^^^^^^^
16
17 The following steps describe a command-line approach, but any graphic package manager can be used instead.
18
19 * As root, append the following to */etc/apt/sources.list* ::
20
21     deb http://apt.dev.grnet.gr/ squeeze main
22     deb http://apt2.dev.grnet.gr stable/
23
24 * Make sure the GPG public key for the GRNET dev team is added:
25
26     .. code-block:: console
27
28         $ sudo curl https://dev.grnet.gr/files/apt-grnetdev.pub|apt-key add -
29
30     otherwise *apt-get update* will produce GPG warnings.
31
32 * Update the Debian sources:
33
34     .. code-block:: console
35
36         $ sudo apt-get update
37
38 * Install kamaki:
39
40     .. code-block:: console
41
42         $ sudo apt-get install kamaki
43
44 Ubuntu
45 ^^^^^^
46
47 The following steps describe a command-line approach, but any graphic package manager can be used instead.
48
49 * Let ppa take care of the repository configuration:
50
51     .. code-block:: console
52
53         $ sudo apt-get install python-software-properties
54         $ sudo add-apt-repository ppa:grnet/synnefo
55
56 * Update the Debian sources:
57
58     .. code-block:: console
59
60         $ sudo apt-get update
61
62 * Install kamaki:
63
64     .. code-block:: console
65
66         $ sudo apt-get install kamaki
67
68 Install ansicolors and/or progress (Optional but recommended)
69 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
70
71 .. code-block:: console
72
73     $ sudo apt-get install python-ansicolors
74     $ sudo apt-get install python-progress
75
76 .. _installing-from-source-ref:
77
78 Installing from source (git repos.)
79 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80
81 Requirements
82 """"""""""""
83
84 Essential:
85
86  * Python 2.6 or better [http://www.python.org]
87  * Python setuptools [http://pypi.python.org/pypi/setuptools]
88
89 Optional:
90
91  * VirtualEnv (python-virtualenv) [http://www.virtualenv.org]
92
93 Setup a virtual enviroment (optional)
94 """""""""""""""""""""""""""""""""""""
95
96 With virtualenv users can setup kamaki and synnefo services in a sandbox environment.
97
98 .. code-block:: console
99
100     $ virtualenv kamaki-env
101     $ source kamaki-env/bin/activate
102
103 A more detailed example of using virtual env can be found at the `snf-image-creator setup guide <http://docs.dev.grnet.gr/snf-image-creator/latest/install.html#python-virtual-environment>`_
104
105 Install objpool (was: snf-common)
106 """""""""""""""""""""""""""""""""
107
108 Kamaki is based on python-objpool. The objpool package is easy to install from source, even on windows platforms:
109
110 .. code-block:: console
111
112     $ git clone http://code.grnet.gr/git/objpool
113     $ cd objpool
114     $ ./setup build install
115     $ cd -
116
117 Install kamaki
118 """"""""""""""
119
120 Kamaki can be downloaded from `this location <https://code.grnet.gr/projects/kamaki/files>`_, where users can pick the version they prefer and unzip it locally:
121
122 .. code-block:: console
123
124     $ tar xvfz kamaki-0.7.tar.gz
125
126 or it can be downloaded directly from the git repository:
127
128 .. code-block:: console
129
130     $ git clone http://code.grnet.gr/git/kamaki
131
132 and then installed by the setup script:
133
134 .. code-block:: console
135
136     $ cd kamaki
137     $ ./setup build install
138
139 Install progress and/or ansicolors (optional)
140 """""""""""""""""""""""""""""""""""""""""""""
141
142 progress: command-line progress bars (in some commands)
143
144 ansicolors: color kamaki output (can switched on and off in `setup <setup.html>`_)
145
146 .. code-block:: console
147
148     $ pip install progress
149     $ pip install ansicolors
150
151 Mac OS X
152 --------
153
154 Kamaki can be installed on Mac OS X systems from source, by following the steps at :ref:`installing-from-source-ref`.
155
156 Windows
157 -------
158
159 Kamaki can run on Windows, either on standard Windows console, or inside an improved command line shell. The present guide presents a tested method for setting up kamaki in windows
160
161 Requirements
162 ^^^^^^^^^^^^
163
164 * Python 2.7 or better (`Official versions <http://www.python.org/getit>`_)
165
166 * Git (download `windows version <http://git-scm.com/download/win>`_)
167
168 * Setuptools (`Official versions and workarounds <http://pypi.python.org/pypi/setuptools>`_)
169
170 Installation from source
171 ^^^^^^^^^^^^^^^^^^^^^^^^
172
173 Install python
174 """"""""""""""
175
176 Download and run the Windows installer from `here <http://www.python.org/getit>`_
177
178 Users should pick the installer that fits their windows version and architecture.
179
180 Add python to windows path
181 """"""""""""""""""""""""""
182
183 The following will allow users to run python and python scripts from command line.
184
185 * Select **System** from the Control Panel, select the **Advanced** tab, the **Environment Variables** button and then find the **PATH** (user or system) and **edit**
186
187 * Without removing existing values, append the following to PATH::
188
189     C:\Python;C:\Python\Scripts
190
191 .. note:: Path values are separated by semicolons
192
193 .. warning:: C:\\Python should be replaced with the actual python path in the system, e.g. C:\\Python27
194
195 Install setuptools
196 """"""""""""""""""
197
198 According to the corresponding `python org page <http://pypi.python.org/pypi/setuptools>`_, the setuptools installer doesn't currently work on 64bit machines.
199
200 * Users with 32-bit operating systems should download and run the graphic installer
201
202 * Users with 64-bit machines should download the `ez_setup.py <http://peak.telecommunity.com/dist/ez_setup.py>`_ script and install it from a command shell. In the following example, the script was downloaded at C:\\Downloads::
203
204     C:\> cd Downloads
205     C:\Downloads\> python ez_setup.py
206     ...
207     Installation finished
208     C:\Downloads\>
209
210 Install GIT
211 """""""""""
212
213 `Download GIT <http://git-scm.com/download/win>`_ and run the graphic installer. During the installation, users will be able to modify some installation options. The present guide is tested with the default selections.
214
215 After the installation is completed, a GIT standalone shell will be installed (a desktop shortcut is created, by default). Users are advised to run kamaki through this shell.
216
217 Install kamaki
218 """"""""""""""
219
220 * Run the GIT standalone shell
221
222 * Enter the location where kamaki will be installed, e.g. **C:\\**
223
224     .. code-block:: console
225
226         $ cd /c/
227
228 * Download source from GRNET repository
229
230     .. code-block:: console
231
232         $ git clone http://code.grnet.gr/git/kamaki
233         Cloning into 'kamaki'...
234         Receiving objects: ...
235         Resolving Deltas: ...
236
237 * Enter source and install kamaki
238
239     .. code-block:: console
240
241         $ cd kamaki
242         $ python setup.py install
243         running install
244         ...
245         Finished processing dependencies for kamaki==0.7
246
247     $ kamaki --version