root / docs / installation.rst @ 447365fe
History | View | Annotate | Download (6.3 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 | abfaa6d9 | Vangelis Koukis | 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 | 16d7b9ff | Stavros Sachtouris | * Make sure the GPG public key for the Synnefo repository 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 | abfaa6d9 | Vangelis Koukis | The following steps describe a command-line approach, but any graphic package |
54 | abfaa6d9 | Vangelis Koukis | manager can be used instead. |
55 | 7eda693f | Stavros Sachtouris | |
56 | 7eda693f | Stavros Sachtouris | * Let ppa take care of the repository configuration: |
57 | e3a1d743 | Stavros Sachtouris | |
58 | e3a1d743 | Stavros Sachtouris | .. code-block:: console |
59 | e3a1d743 | Stavros Sachtouris | |
60 | e3a1d743 | Stavros Sachtouris | $ sudo apt-get install python-software-properties |
61 | e3a1d743 | Stavros Sachtouris | $ sudo add-apt-repository ppa:grnet/synnefo |
62 | e3a1d743 | Stavros Sachtouris | |
63 | 7eda693f | Stavros Sachtouris | * Update the Debian sources: |
64 | ec3b8f78 | Stavros Sachtouris | |
65 | 7eda693f | Stavros Sachtouris | .. code-block:: console |
66 | ec3b8f78 | Stavros Sachtouris | |
67 | 7eda693f | Stavros Sachtouris | $ sudo apt-get update |
68 | ec3b8f78 | Stavros Sachtouris | |
69 | 7eda693f | Stavros Sachtouris | * Install kamaki: |
70 | ec3b8f78 | Stavros Sachtouris | |
71 | 7eda693f | Stavros Sachtouris | .. code-block:: console |
72 | ec3b8f78 | Stavros Sachtouris | |
73 | 7eda693f | Stavros Sachtouris | $ sudo apt-get install kamaki |
74 | ec3b8f78 | Stavros Sachtouris | |
75 | 4054c46d | Stavros Sachtouris | Install ansicolors (optional but recommended) |
76 | 4054c46d | Stavros Sachtouris | """"""""""""""""""""""""""""""""""""""""""""" |
77 | 6539c700 | Stavros Sachtouris | |
78 | 6539c700 | Stavros Sachtouris | .. code-block:: console |
79 | 6539c700 | Stavros Sachtouris | |
80 | 6539c700 | Stavros Sachtouris | $ sudo apt-get install python-ansicolors |
81 | 4054c46d | Stavros Sachtouris | |
82 | 4054c46d | Stavros Sachtouris | Install mock (for developers only) |
83 | 4054c46d | Stavros Sachtouris | """""""""""""""""""""""""""""""""" |
84 | 4054c46d | Stavros Sachtouris | |
85 | 4054c46d | Stavros Sachtouris | .. code-block:: console |
86 | 4054c46d | Stavros Sachtouris | |
87 | 4054c46d | Stavros Sachtouris | $ sudo apt-get install python-mock |
88 | 4054c46d | Stavros Sachtouris | |
89 | 16d7b9ff | Stavros Sachtouris | .. warning:: kamaki.clients unit-tests need python-mock 1.X or better. e.g.,:: |
90 | 4054c46d | Stavros Sachtouris | |
91 | 4054c46d | Stavros Sachtouris | $ sudo apt-get install python-mock=1.0.1 |
92 | 6539c700 | Stavros Sachtouris | |
93 | 2bd23362 | Stavros Sachtouris | .. hint:: To activate functional tests in kamaki enable the preconfigured |
94 | 904091dd | Stavros Sachtouris | *livetest* command group: |
95 | 904091dd | Stavros Sachtouris | |
96 | 904091dd | Stavros Sachtouris | .. code-block:: console |
97 | 904091dd | Stavros Sachtouris | |
98 | 904091dd | Stavros Sachtouris | $ kamaki config set livetest_cli livetest |
99 | 904091dd | Stavros Sachtouris | |
100 | 904091dd | Stavros Sachtouris | |
101 | 6539c700 | Stavros Sachtouris | .. _installing-from-pypi-ref: |
102 | 5f5045b5 | Stavros Sachtouris | |
103 | 6539c700 | Stavros Sachtouris | Installing from pypi |
104 | 6539c700 | Stavros Sachtouris | ^^^^^^^^^^^^^^^^^^^^ |
105 | 457cb69b | Stavros Sachtouris | |
106 | 961e6040 | Stavros Sachtouris | Requirements |
107 | 961e6040 | Stavros Sachtouris | """""""""""" |
108 | 961e6040 | Stavros Sachtouris | |
109 | 961e6040 | Stavros Sachtouris | Essential: |
110 | 961e6040 | Stavros Sachtouris | |
111 | fa479dc3 | Stavros Sachtouris | * Python 2.6 or 2.7 [http://www.python.org] |
112 | 961e6040 | Stavros Sachtouris | * Python setuptools [http://pypi.python.org/pypi/setuptools] |
113 | 961e6040 | Stavros Sachtouris | |
114 | 961e6040 | Stavros Sachtouris | Optional: |
115 | 961e6040 | Stavros Sachtouris | |
116 | 961e6040 | Stavros Sachtouris | * VirtualEnv (python-virtualenv) [http://www.virtualenv.org] |
117 | 961e6040 | Stavros Sachtouris | |
118 | ec3b8f78 | Stavros Sachtouris | Setup a virtual enviroment (optional) |
119 | ec3b8f78 | Stavros Sachtouris | """"""""""""""""""""""""""""""""""""" |
120 | 5f5045b5 | Stavros Sachtouris | |
121 | 16d7b9ff | Stavros Sachtouris | Use virtualenv to setup kamaki and Synnefo services in a sandbox environment. |
122 | 2151584b | Stavros Sachtouris | |
123 | 2151584b | Stavros Sachtouris | .. code-block:: console |
124 | 2151584b | Stavros Sachtouris | |
125 | 2151584b | Stavros Sachtouris | $ virtualenv kamaki-env |
126 | 2151584b | Stavros Sachtouris | $ source kamaki-env/bin/activate |
127 | 2151584b | Stavros Sachtouris | |
128 | fa479dc3 | Stavros Sachtouris | A more detailed example of using virtual env can be found at the |
129 | fa479dc3 | Stavros Sachtouris | `snf-image-creator setup guide <http://www.synnefo.org/docs/snf-image-creator/latest/install.html#python-virtual-environment>`_ |
130 | 2151584b | Stavros Sachtouris | |
131 | ec3b8f78 | Stavros Sachtouris | Install kamaki |
132 | ec3b8f78 | Stavros Sachtouris | """""""""""""" |
133 | 2151584b | Stavros Sachtouris | |
134 | f5d9bc54 | Stavros Sachtouris | .. code-block:: console |
135 | e3a1d743 | Stavros Sachtouris | |
136 | 6539c700 | Stavros Sachtouris | $ pip install kamaki |
137 | 2151584b | Stavros Sachtouris | |
138 | 904091dd | Stavros Sachtouris | Install ansicolors |
139 | 904091dd | Stavros Sachtouris | """""""""""""""""" |
140 | 5f5045b5 | Stavros Sachtouris | |
141 | 4054c46d | Stavros Sachtouris | The **ansicolors** package is not required for running kamaki, but it is |
142 | 4054c46d | Stavros Sachtouris | recommended as a user experience improvement. In specific, ansicolors |
143 | 4054c46d | Stavros Sachtouris | adds colors to kamaki responses. |
144 | 2151584b | Stavros Sachtouris | |
145 | 2151584b | Stavros Sachtouris | .. code-block:: console |
146 | 2151584b | Stavros Sachtouris | |
147 | 4054c46d | Stavros Sachtouris | $ pip install ansicolors |
148 | 6fb4af77 | Stavros Sachtouris | |
149 | fa479dc3 | Stavros Sachtouris | Install mock (developers only) |
150 | fa479dc3 | Stavros Sachtouris | """""""""""""""""""""""""""""" |
151 | 6fb4af77 | Stavros Sachtouris | |
152 | fa479dc3 | Stavros Sachtouris | The **mock** package is needed for running the prepared unit-tests in the |
153 | fa479dc3 | Stavros Sachtouris | kamaki.clients package. This feature is useful when extending / debugging |
154 | fa479dc3 | Stavros Sachtouris | kamaki functionality and is aimed to kamaki developers and contributors. |
155 | fa479dc3 | Stavros Sachtouris | Therefore, users can enjoy the full kamaki user experience without installing |
156 | fa479dc3 | Stavros Sachtouris | mock. |
157 | 6fb4af77 | Stavros Sachtouris | |
158 | 6fb4af77 | Stavros Sachtouris | .. code-block:: console |
159 | 6fb4af77 | Stavros Sachtouris | |
160 | 4054c46d | Stavros Sachtouris | $ pip install mock |
161 | 2151584b | Stavros Sachtouris | |
162 | 4054c46d | Stavros Sachtouris | .. warning:: mock version >= 1.X |
163 | 6fb4af77 | Stavros Sachtouris | |
164 | 904091dd | Stavros Sachtouris | .. hint:: To activate functional tests in kamaki. enable the preconfigured |
165 | 904091dd | Stavros Sachtouris | *livetest* command group: |
166 | 904091dd | Stavros Sachtouris | |
167 | 904091dd | Stavros Sachtouris | .. code-block:: console |
168 | 904091dd | Stavros Sachtouris | |
169 | 904091dd | Stavros Sachtouris | $ kamaki config set livetest_cli livetest |
170 | 904091dd | Stavros Sachtouris | |
171 | 904091dd | Stavros Sachtouris | |
172 | 5f5045b5 | Stavros Sachtouris | Mac OS X |
173 | 5f5045b5 | Stavros Sachtouris | -------- |
174 | 5f5045b5 | Stavros Sachtouris | |
175 | 2bd23362 | Stavros Sachtouris | Kamaki can be installed on Mac OS X systems, by following the steps |
176 | fa479dc3 | Stavros Sachtouris | at :ref:`installing-from-pypi-ref`. |
177 | 457cb69b | Stavros Sachtouris | |
178 | 457cb69b | Stavros Sachtouris | Windows |
179 | 457cb69b | Stavros Sachtouris | ------- |
180 | 457cb69b | Stavros Sachtouris | |
181 | fa479dc3 | Stavros Sachtouris | Kamaki can be installed on Windows by following the pypi method. Installing the |
182 | fa479dc3 | Stavros Sachtouris | requirements is a bit different than in other systems. |
183 | 6539c700 | Stavros Sachtouris | |
184 | 6539c700 | Stavros Sachtouris | The full process is detailed in the following: |
185 | 5c801047 | Stavros Sachtouris | |
186 | 5c801047 | Stavros Sachtouris | Requirements |
187 | 5c801047 | Stavros Sachtouris | ^^^^^^^^^^^^ |
188 | 5c801047 | Stavros Sachtouris | |
189 | b6a99832 | Stavros Sachtouris | * Python 2.7 or better (`Official versions <http://www.python.org/getit>`_) |
190 | 5c801047 | Stavros Sachtouris | |
191 | b6a99832 | Stavros Sachtouris | * Setuptools (`Official versions and workarounds <http://pypi.python.org/pypi/setuptools>`_) |
192 | 5c801047 | Stavros Sachtouris | |
193 | 2bd23362 | Stavros Sachtouris | Users who have already set up python and setuptools (e.g., for |
194 | abfaa6d9 | Vangelis Koukis | another project) may skip Python and / or setuptools installation. |
195 | 5c801047 | Stavros Sachtouris | |
196 | abfaa6d9 | Vangelis Koukis | Install Python |
197 | 6539c700 | Stavros Sachtouris | ^^^^^^^^^^^^^^ |
198 | 5c801047 | Stavros Sachtouris | |
199 | fa479dc3 | Stavros Sachtouris | Download and run the Windows installer from |
200 | fa479dc3 | Stavros Sachtouris | `here <http://www.python.org/getit>`_ |
201 | 5c801047 | Stavros Sachtouris | |
202 | fa479dc3 | Stavros Sachtouris | Users should pick the installer that fits their windows version and machine |
203 | fa479dc3 | Stavros Sachtouris | architecture. |
204 | 5c801047 | Stavros Sachtouris | |
205 | abfaa6d9 | Vangelis Koukis | Add Python to windows path |
206 | 6539c700 | Stavros Sachtouris | ^^^^^^^^^^^^^^^^^^^^^^^^^^ |
207 | 5c801047 | Stavros Sachtouris | |
208 | abfaa6d9 | Vangelis Koukis | The following will allow users to run Python and Python scripts from command |
209 | fa479dc3 | Stavros Sachtouris | line. |
210 | 5c801047 | Stavros Sachtouris | |
211 | fa479dc3 | Stavros Sachtouris | * Select **System** from the Control Panel, select the **Advanced** tab, the |
212 | fa479dc3 | Stavros Sachtouris | **Environment Variables** button and then find the **PATH** (user or |
213 | fa479dc3 | Stavros Sachtouris | system) and **edit** |
214 | 5c801047 | Stavros Sachtouris | |
215 | b6a99832 | Stavros Sachtouris | * Without removing existing values, append the following to PATH:: |
216 | 5c801047 | Stavros Sachtouris | |
217 | fa479dc3 | Stavros Sachtouris | ;C:\Python27;C:\Python27\Scripts |
218 | 5c801047 | Stavros Sachtouris | |
219 | b6a99832 | Stavros Sachtouris | .. note:: Path values are separated by semicolons |
220 | 5c801047 | Stavros Sachtouris | |
221 | fa479dc3 | Stavros Sachtouris | .. warning:: In case of a different version, C:\\Python27 should be replaced |
222 | fa479dc3 | Stavros Sachtouris | with the actual python path in the system |
223 | 5c801047 | Stavros Sachtouris | |
224 | 5c801047 | Stavros Sachtouris | Install setuptools |
225 | 6539c700 | Stavros Sachtouris | ^^^^^^^^^^^^^^^^^^ |
226 | 5c801047 | Stavros Sachtouris | |
227 | fa479dc3 | Stavros Sachtouris | According to the corresponding |
228 | fa479dc3 | Stavros Sachtouris | `python org page <http://pypi.python.org/pypi/setuptools>`_, the setuptools |
229 | fa479dc3 | Stavros Sachtouris | installer doesn't currently work on 64bit machines. |
230 | 5c801047 | Stavros Sachtouris | |
231 | 2bd23362 | Stavros Sachtouris | * Users with 32-bit platforms should download and run the graphic |
232 | fa479dc3 | Stavros Sachtouris | installer |
233 | 5c801047 | Stavros Sachtouris | |
234 | 2bd23362 | Stavros Sachtouris | * Users with 64-bit platforms should download the |
235 | fa479dc3 | Stavros Sachtouris | `ez_setup.py <http://peak.telecommunity.com/dist/ez_setup.py>`_ script and |
236 | fa479dc3 | Stavros Sachtouris | install it from a command shell. In the following example, the script was |
237 | fa479dc3 | Stavros Sachtouris | downloaded at C:\\Downloads:: |
238 | 5c801047 | Stavros Sachtouris | |
239 | fa479dc3 | Stavros Sachtouris | C:\> cd Downloads |
240 | fa479dc3 | Stavros Sachtouris | C:\Downloads\> python ez_setup.py |
241 | fa479dc3 | Stavros Sachtouris | ... |
242 | fa479dc3 | Stavros Sachtouris | Installation finished |
243 | fa479dc3 | Stavros Sachtouris | C:\Downloads\> |
244 | 5c801047 | Stavros Sachtouris | |
245 | 5c801047 | Stavros Sachtouris | Install kamaki |
246 | 6539c700 | Stavros Sachtouris | ^^^^^^^^^^^^^^ |
247 | 5c801047 | Stavros Sachtouris | |
248 | 6539c700 | Stavros Sachtouris | .. code-block:: console |
249 | 5c801047 | Stavros Sachtouris | |
250 | fa479dc3 | Stavros Sachtouris | $ easy_install kamaki |