root / docs / installation.rst @ cedde35d
History | View | Annotate | Download (7.2 kB)
1 | 457cb69b | Stavros Sachtouris | Installation |
---|---|---|---|
2 | 457cb69b | Stavros Sachtouris | ============ |
3 | 457cb69b | Stavros Sachtouris | |
4 | fa479dc3 | Stavros Sachtouris | This guide describes the standard installation process for kamaki, with the |
5 | fa479dc3 | Stavros Sachtouris | aspiration of covering as much cases as possible. Although kamaki was initially |
6 | fa479dc3 | Stavros Sachtouris | targeted to Linux/Unix-like users, it is quite straightforward to install and |
7 | fa479dc3 | Stavros Sachtouris | have it up and running in all platforms running python 2.6 or 2.7. |
8 | 457cb69b | Stavros Sachtouris | |
9 | 5f5045b5 | Stavros Sachtouris | |
10 | 2151584b | Stavros Sachtouris | * Kamaki repository: `http://code.grnet.gr/git/kamaki <http://code.grnet.gr/git/kamaki>`_ |
11 | 2151584b | Stavros Sachtouris | |
12 | 6539c700 | Stavros Sachtouris | * Kamaki at pypi: `http://pypi.python.org/pypi/kamaki <https://pypi.python.org/pypi/kamaki>`_ |
13 | 6539c700 | Stavros Sachtouris | |
14 | fa479dc3 | Stavros Sachtouris | * Synnefo Linux packages: `http://apt.dev.grnet.gr <http://apt.dev.grnet.gr>`_ |
15 | 2151584b | Stavros Sachtouris | |
16 | fa382f9e | Stavros Sachtouris | Linux and Unix-like environments |
17 | fa382f9e | Stavros Sachtouris | -------------------------------- |
18 | 457cb69b | Stavros Sachtouris | |
19 | 7eda693f | Stavros Sachtouris | Debian: |
20 | 7eda693f | Stavros Sachtouris | ^^^^^^^ |
21 | ec3b8f78 | Stavros Sachtouris | |
22 | ec3b8f78 | Stavros Sachtouris | The following steps describe a command-line approach, but any graphic package manager can be used instead. |
23 | ec3b8f78 | Stavros Sachtouris | |
24 | 7eda693f | Stavros Sachtouris | * As root, append the following to */etc/apt/sources.list* :: |
25 | ec3b8f78 | Stavros Sachtouris | |
26 | fa479dc3 | Stavros Sachtouris | deb http://apt.dev.grnet.gr wheezy/ |
27 | fa479dc3 | Stavros Sachtouris | |
28 | fa479dc3 | Stavros Sachtouris | .. warning:: Debian Squeeze users may replace "wheezy" with "squeeze" |
29 | ec3b8f78 | Stavros Sachtouris | |
30 | 76e7661e | Stavros Sachtouris | * Make sure the GPG public key for the Synnefo development team is added: |
31 | ec3b8f78 | Stavros Sachtouris | |
32 | 7eda693f | Stavros Sachtouris | .. code-block:: console |
33 | ec3b8f78 | Stavros Sachtouris | |
34 | 7eda693f | Stavros Sachtouris | $ sudo curl https://dev.grnet.gr/files/apt-grnetdev.pub|apt-key add - |
35 | ec3b8f78 | Stavros Sachtouris | |
36 | 7eda693f | Stavros Sachtouris | otherwise *apt-get update* will produce GPG warnings. |
37 | ec3b8f78 | Stavros Sachtouris | |
38 | 7eda693f | Stavros Sachtouris | * Update the Debian sources: |
39 | ec3b8f78 | Stavros Sachtouris | |
40 | 7eda693f | Stavros Sachtouris | .. code-block:: console |
41 | ec3b8f78 | Stavros Sachtouris | |
42 | 7eda693f | Stavros Sachtouris | $ sudo apt-get update |
43 | ec3b8f78 | Stavros Sachtouris | |
44 | 7eda693f | Stavros Sachtouris | * Install kamaki: |
45 | ec3b8f78 | Stavros Sachtouris | |
46 | ec3b8f78 | Stavros Sachtouris | .. code-block:: console |
47 | ec3b8f78 | Stavros Sachtouris | |
48 | 7eda693f | Stavros Sachtouris | $ sudo apt-get install kamaki |
49 | ec3b8f78 | Stavros Sachtouris | |
50 | 7eda693f | Stavros Sachtouris | Ubuntu |
51 | 7eda693f | Stavros Sachtouris | ^^^^^^ |
52 | ec3b8f78 | Stavros Sachtouris | |
53 | 7eda693f | Stavros Sachtouris | The following steps describe a command-line approach, but any graphic package manager can be used instead. |
54 | 7eda693f | Stavros Sachtouris | |
55 | 7eda693f | Stavros Sachtouris | * Let ppa take care of the repository configuration: |
56 | e3a1d743 | Stavros Sachtouris | |
57 | e3a1d743 | Stavros Sachtouris | .. code-block:: console |
58 | e3a1d743 | Stavros Sachtouris | |
59 | e3a1d743 | Stavros Sachtouris | $ sudo apt-get install python-software-properties |
60 | e3a1d743 | Stavros Sachtouris | $ sudo add-apt-repository ppa:grnet/synnefo |
61 | e3a1d743 | Stavros Sachtouris | |
62 | 7eda693f | Stavros Sachtouris | * Update the Debian sources: |
63 | ec3b8f78 | Stavros Sachtouris | |
64 | 7eda693f | Stavros Sachtouris | .. code-block:: console |
65 | ec3b8f78 | Stavros Sachtouris | |
66 | 7eda693f | Stavros Sachtouris | $ sudo apt-get update |
67 | ec3b8f78 | Stavros Sachtouris | |
68 | 7eda693f | Stavros Sachtouris | * Install kamaki: |
69 | ec3b8f78 | Stavros Sachtouris | |
70 | 7eda693f | Stavros Sachtouris | .. code-block:: console |
71 | ec3b8f78 | Stavros Sachtouris | |
72 | 7eda693f | Stavros Sachtouris | $ sudo apt-get install kamaki |
73 | ec3b8f78 | Stavros Sachtouris | |
74 | 4054c46d | Stavros Sachtouris | Install ansicolors (optional but recommended) |
75 | 4054c46d | Stavros Sachtouris | """"""""""""""""""""""""""""""""""""""""""""" |
76 | 6539c700 | Stavros Sachtouris | |
77 | 6539c700 | Stavros Sachtouris | .. code-block:: console |
78 | 6539c700 | Stavros Sachtouris | |
79 | 6539c700 | Stavros Sachtouris | $ sudo apt-get install python-ansicolors |
80 | 4054c46d | Stavros Sachtouris | |
81 | 4054c46d | Stavros Sachtouris | Install mock (for developers only) |
82 | 4054c46d | Stavros Sachtouris | """""""""""""""""""""""""""""""""" |
83 | 4054c46d | Stavros Sachtouris | |
84 | 4054c46d | Stavros Sachtouris | .. code-block:: console |
85 | 4054c46d | Stavros Sachtouris | |
86 | 4054c46d | Stavros Sachtouris | $ sudo apt-get install python-mock |
87 | 4054c46d | Stavros Sachtouris | |
88 | 4054c46d | Stavros Sachtouris | .. warning:: kamaki.clients unit-tests need python-mock 1.X or better. e.g.:: |
89 | 4054c46d | Stavros Sachtouris | |
90 | 4054c46d | Stavros Sachtouris | $ sudo apt-get install python-mock=1.0.1 |
91 | 6539c700 | Stavros Sachtouris | |
92 | 904091dd | Stavros Sachtouris | .. hint:: To activate functional tests in kamaki. enable the preconfigured |
93 | 904091dd | Stavros Sachtouris | *livetest* command group: |
94 | 904091dd | Stavros Sachtouris | |
95 | 904091dd | Stavros Sachtouris | .. code-block:: console |
96 | 904091dd | Stavros Sachtouris | |
97 | 904091dd | Stavros Sachtouris | $ kamaki config set livetest_cli livetest |
98 | 904091dd | Stavros Sachtouris | |
99 | 904091dd | Stavros Sachtouris | |
100 | 904091dd | Stavros Sachtouris | Install astakosclient (optional) |
101 | 904091dd | Stavros Sachtouris | """""""""""""""""""""""""""""""" |
102 | 904091dd | Stavros Sachtouris | |
103 | 904091dd | Stavros Sachtouris | A seperate project called |
104 | 904091dd | Stavros Sachtouris | `astakosclient <https://pypi.python.org/pypi/astakosclient>`_ can be used for |
105 | 904091dd | Stavros Sachtouris | advanced user and service management. |
106 | 904091dd | Stavros Sachtouris | |
107 | 904091dd | Stavros Sachtouris | .. code-block:: console |
108 | 904091dd | Stavros Sachtouris | |
109 | 904091dd | Stavros Sachtouris | $ apt-get install python-astakosclient |
110 | 904091dd | Stavros Sachtouris | |
111 | 904091dd | Stavros Sachtouris | .. hint:: To activate astakosclient commands in kamaki, enable the |
112 | 904091dd | Stavros Sachtouris | preconfigured *astakos* command group: |
113 | 904091dd | Stavros Sachtouris | |
114 | 904091dd | Stavros Sachtouris | .. code-block:: console |
115 | 904091dd | Stavros Sachtouris | |
116 | 904091dd | Stavros Sachtouris | $ kamaki config set astakos_cli astakos |
117 | 904091dd | Stavros Sachtouris | |
118 | 6539c700 | Stavros Sachtouris | .. _installing-from-pypi-ref: |
119 | 5f5045b5 | Stavros Sachtouris | |
120 | 6539c700 | Stavros Sachtouris | Installing from pypi |
121 | 6539c700 | Stavros Sachtouris | ^^^^^^^^^^^^^^^^^^^^ |
122 | 457cb69b | Stavros Sachtouris | |
123 | 961e6040 | Stavros Sachtouris | Requirements |
124 | 961e6040 | Stavros Sachtouris | """""""""""" |
125 | 961e6040 | Stavros Sachtouris | |
126 | 961e6040 | Stavros Sachtouris | Essential: |
127 | 961e6040 | Stavros Sachtouris | |
128 | fa479dc3 | Stavros Sachtouris | * Python 2.6 or 2.7 [http://www.python.org] |
129 | 961e6040 | Stavros Sachtouris | * Python setuptools [http://pypi.python.org/pypi/setuptools] |
130 | 961e6040 | Stavros Sachtouris | |
131 | 961e6040 | Stavros Sachtouris | Optional: |
132 | 961e6040 | Stavros Sachtouris | |
133 | 961e6040 | Stavros Sachtouris | * VirtualEnv (python-virtualenv) [http://www.virtualenv.org] |
134 | 961e6040 | Stavros Sachtouris | |
135 | ec3b8f78 | Stavros Sachtouris | Setup a virtual enviroment (optional) |
136 | ec3b8f78 | Stavros Sachtouris | """"""""""""""""""""""""""""""""""""" |
137 | 5f5045b5 | Stavros Sachtouris | |
138 | fa479dc3 | Stavros Sachtouris | With virtualenv users can setup kamaki and synnefo services in a sandbox |
139 | fa479dc3 | Stavros Sachtouris | environment. |
140 | 2151584b | Stavros Sachtouris | |
141 | 2151584b | Stavros Sachtouris | .. code-block:: console |
142 | 2151584b | Stavros Sachtouris | |
143 | 2151584b | Stavros Sachtouris | $ virtualenv kamaki-env |
144 | 2151584b | Stavros Sachtouris | $ source kamaki-env/bin/activate |
145 | 2151584b | Stavros Sachtouris | |
146 | fa479dc3 | Stavros Sachtouris | A more detailed example of using virtual env can be found at the |
147 | fa479dc3 | Stavros Sachtouris | `snf-image-creator setup guide <http://www.synnefo.org/docs/snf-image-creator/latest/install.html#python-virtual-environment>`_ |
148 | 2151584b | Stavros Sachtouris | |
149 | ec3b8f78 | Stavros Sachtouris | Install kamaki |
150 | ec3b8f78 | Stavros Sachtouris | """""""""""""" |
151 | 2151584b | Stavros Sachtouris | |
152 | f5d9bc54 | Stavros Sachtouris | .. code-block:: console |
153 | e3a1d743 | Stavros Sachtouris | |
154 | 6539c700 | Stavros Sachtouris | $ pip install kamaki |
155 | 2151584b | Stavros Sachtouris | |
156 | 904091dd | Stavros Sachtouris | Install ansicolors |
157 | 904091dd | Stavros Sachtouris | """""""""""""""""" |
158 | 5f5045b5 | Stavros Sachtouris | |
159 | 4054c46d | Stavros Sachtouris | The **ansicolors** package is not required for running kamaki, but it is |
160 | 4054c46d | Stavros Sachtouris | recommended as a user experience improvement. In specific, ansicolors |
161 | 4054c46d | Stavros Sachtouris | adds colors to kamaki responses. |
162 | 2151584b | Stavros Sachtouris | |
163 | 2151584b | Stavros Sachtouris | .. code-block:: console |
164 | 2151584b | Stavros Sachtouris | |
165 | 4054c46d | Stavros Sachtouris | $ pip install ansicolors |
166 | 6fb4af77 | Stavros Sachtouris | |
167 | fa479dc3 | Stavros Sachtouris | Install mock (developers only) |
168 | fa479dc3 | Stavros Sachtouris | """""""""""""""""""""""""""""" |
169 | 6fb4af77 | Stavros Sachtouris | |
170 | fa479dc3 | Stavros Sachtouris | The **mock** package is needed for running the prepared unit-tests in the |
171 | fa479dc3 | Stavros Sachtouris | kamaki.clients package. This feature is useful when extending / debugging |
172 | fa479dc3 | Stavros Sachtouris | kamaki functionality and is aimed to kamaki developers and contributors. |
173 | fa479dc3 | Stavros Sachtouris | Therefore, users can enjoy the full kamaki user experience without installing |
174 | fa479dc3 | Stavros Sachtouris | mock. |
175 | 6fb4af77 | Stavros Sachtouris | |
176 | 6fb4af77 | Stavros Sachtouris | .. code-block:: console |
177 | 6fb4af77 | Stavros Sachtouris | |
178 | 4054c46d | Stavros Sachtouris | $ pip install mock |
179 | 2151584b | Stavros Sachtouris | |
180 | 4054c46d | Stavros Sachtouris | .. warning:: mock version >= 1.X |
181 | 6fb4af77 | Stavros Sachtouris | |
182 | 904091dd | Stavros Sachtouris | .. hint:: To activate functional tests in kamaki. enable the preconfigured |
183 | 904091dd | Stavros Sachtouris | *livetest* command group: |
184 | 904091dd | Stavros Sachtouris | |
185 | 904091dd | Stavros Sachtouris | .. code-block:: console |
186 | 904091dd | Stavros Sachtouris | |
187 | 904091dd | Stavros Sachtouris | $ kamaki config set livetest_cli livetest |
188 | 904091dd | Stavros Sachtouris | |
189 | 904091dd | Stavros Sachtouris | Install astakosclient |
190 | 904091dd | Stavros Sachtouris | """"""""""""""""""""" |
191 | 904091dd | Stavros Sachtouris | |
192 | 904091dd | Stavros Sachtouris | A seperate project called |
193 | 904091dd | Stavros Sachtouris | `astakosclient <https://pypi.python.org/pypi/astakosclient>`_ can be used for |
194 | 904091dd | Stavros Sachtouris | advanced user and service management. |
195 | 904091dd | Stavros Sachtouris | |
196 | 904091dd | Stavros Sachtouris | .. code-block:: console |
197 | 904091dd | Stavros Sachtouris | |
198 | 904091dd | Stavros Sachtouris | $ pip install astakosclient |
199 | 904091dd | Stavros Sachtouris | |
200 | 904091dd | Stavros Sachtouris | .. hint:: To activate astakosclient commands in kamaki, enable the |
201 | 904091dd | Stavros Sachtouris | preconfigured *astakos* command group: |
202 | 904091dd | Stavros Sachtouris | |
203 | 904091dd | Stavros Sachtouris | .. code-block:: console |
204 | 904091dd | Stavros Sachtouris | |
205 | 904091dd | Stavros Sachtouris | $ kamaki config set astakos_cli astakos |
206 | 904091dd | Stavros Sachtouris | |
207 | 5f5045b5 | Stavros Sachtouris | Mac OS X |
208 | 5f5045b5 | Stavros Sachtouris | -------- |
209 | 5f5045b5 | Stavros Sachtouris | |
210 | fa479dc3 | Stavros Sachtouris | Kamaki can be installed on Mac OS X systems from source, by following the steps |
211 | fa479dc3 | Stavros Sachtouris | at :ref:`installing-from-pypi-ref`. |
212 | 457cb69b | Stavros Sachtouris | |
213 | 457cb69b | Stavros Sachtouris | Windows |
214 | 457cb69b | Stavros Sachtouris | ------- |
215 | 457cb69b | Stavros Sachtouris | |
216 | fa479dc3 | Stavros Sachtouris | Kamaki can be installed on Windows by following the pypi method. Installing the |
217 | fa479dc3 | Stavros Sachtouris | requirements is a bit different than in other systems. |
218 | 6539c700 | Stavros Sachtouris | |
219 | 6539c700 | Stavros Sachtouris | The full process is detailed in the following: |
220 | 5c801047 | Stavros Sachtouris | |
221 | 5c801047 | Stavros Sachtouris | Requirements |
222 | 5c801047 | Stavros Sachtouris | ^^^^^^^^^^^^ |
223 | 5c801047 | Stavros Sachtouris | |
224 | b6a99832 | Stavros Sachtouris | * Python 2.7 or better (`Official versions <http://www.python.org/getit>`_) |
225 | 5c801047 | Stavros Sachtouris | |
226 | b6a99832 | Stavros Sachtouris | * Setuptools (`Official versions and workarounds <http://pypi.python.org/pypi/setuptools>`_) |
227 | 5c801047 | Stavros Sachtouris | |
228 | fa479dc3 | Stavros Sachtouris | Users who have already set up and wokring python and setuptools (e.g. for |
229 | fa479dc3 | Stavros Sachtouris | another project) may skip python and / or setup tools installation. |
230 | 5c801047 | Stavros Sachtouris | |
231 | 5c801047 | Stavros Sachtouris | Install python |
232 | 6539c700 | Stavros Sachtouris | ^^^^^^^^^^^^^^ |
233 | 5c801047 | Stavros Sachtouris | |
234 | fa479dc3 | Stavros Sachtouris | Download and run the Windows installer from |
235 | fa479dc3 | Stavros Sachtouris | `here <http://www.python.org/getit>`_ |
236 | 5c801047 | Stavros Sachtouris | |
237 | fa479dc3 | Stavros Sachtouris | Users should pick the installer that fits their windows version and machine |
238 | fa479dc3 | Stavros Sachtouris | architecture. |
239 | 5c801047 | Stavros Sachtouris | |
240 | 5c801047 | Stavros Sachtouris | Add python to windows path |
241 | 6539c700 | Stavros Sachtouris | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
242 | 5c801047 | Stavros Sachtouris | |
243 | fa479dc3 | Stavros Sachtouris | The following will allow users to run python and python scripts from command |
244 | fa479dc3 | Stavros Sachtouris | line. |
245 | 5c801047 | Stavros Sachtouris | |
246 | fa479dc3 | Stavros Sachtouris | * Select **System** from the Control Panel, select the **Advanced** tab, the |
247 | fa479dc3 | Stavros Sachtouris | **Environment Variables** button and then find the **PATH** (user or |
248 | fa479dc3 | Stavros Sachtouris | system) and **edit** |
249 | 5c801047 | Stavros Sachtouris | |
250 | b6a99832 | Stavros Sachtouris | * Without removing existing values, append the following to PATH:: |
251 | 5c801047 | Stavros Sachtouris | |
252 | fa479dc3 | Stavros Sachtouris | ;C:\Python27;C:\Python27\Scripts |
253 | 5c801047 | Stavros Sachtouris | |
254 | b6a99832 | Stavros Sachtouris | .. note:: Path values are separated by semicolons |
255 | 5c801047 | Stavros Sachtouris | |
256 | fa479dc3 | Stavros Sachtouris | .. warning:: In case of a different version, C:\\Python27 should be replaced |
257 | fa479dc3 | Stavros Sachtouris | with the actual python path in the system |
258 | 5c801047 | Stavros Sachtouris | |
259 | 5c801047 | Stavros Sachtouris | Install setuptools |
260 | 6539c700 | Stavros Sachtouris | ^^^^^^^^^^^^^^^^^^ |
261 | 5c801047 | Stavros Sachtouris | |
262 | fa479dc3 | Stavros Sachtouris | According to the corresponding |
263 | fa479dc3 | Stavros Sachtouris | `python org page <http://pypi.python.org/pypi/setuptools>`_, the setuptools |
264 | fa479dc3 | Stavros Sachtouris | installer doesn't currently work on 64bit machines. |
265 | 5c801047 | Stavros Sachtouris | |
266 | fa479dc3 | Stavros Sachtouris | * Users with 32-bit operating systems should download and run the graphic |
267 | fa479dc3 | Stavros Sachtouris | installer |
268 | 5c801047 | Stavros Sachtouris | |
269 | fa479dc3 | Stavros Sachtouris | * Users with 64-bit machines should download the |
270 | fa479dc3 | Stavros Sachtouris | `ez_setup.py <http://peak.telecommunity.com/dist/ez_setup.py>`_ script and |
271 | fa479dc3 | Stavros Sachtouris | install it from a command shell. In the following example, the script was |
272 | fa479dc3 | Stavros Sachtouris | downloaded at C:\\Downloads:: |
273 | 5c801047 | Stavros Sachtouris | |
274 | fa479dc3 | Stavros Sachtouris | C:\> cd Downloads |
275 | fa479dc3 | Stavros Sachtouris | C:\Downloads\> python ez_setup.py |
276 | fa479dc3 | Stavros Sachtouris | ... |
277 | fa479dc3 | Stavros Sachtouris | Installation finished |
278 | fa479dc3 | Stavros Sachtouris | C:\Downloads\> |
279 | 5c801047 | Stavros Sachtouris | |
280 | 5c801047 | Stavros Sachtouris | Install kamaki |
281 | 6539c700 | Stavros Sachtouris | ^^^^^^^^^^^^^^ |
282 | 5c801047 | Stavros Sachtouris | |
283 | 6539c700 | Stavros Sachtouris | .. code-block:: console |
284 | 5c801047 | Stavros Sachtouris | |
285 | fa479dc3 | Stavros Sachtouris | $ easy_install kamaki |