root / docs / installation.rst @ 6283b4b4
History | View | Annotate | Download (5.2 kB)
1 |
Installation |
---|---|
2 |
============ |
3 |
|
4 |
This guide describes the standard installation process for kamaki, with the |
5 |
aspiration of covering as much cases as possible. Although kamaki was initially |
6 |
targeted to Linux/Unix-like users, it is quite straightforward to install and |
7 |
have it up and running in all platforms running Python 2.6 or 2.7. |
8 |
|
9 |
|
10 |
* Kamaki repository: `http://github.com/grnet/kamaki <http://github.com/grnet/kamaki>`_ |
11 |
|
12 |
* Kamaki at PyPI: `http://pypi.python.org/pypi/kamaki <https://pypi.python.org/pypi/kamaki>`_ |
13 |
|
14 |
* Synnefo Linux packages: `http://apt.dev.grnet.gr <http://apt.dev.grnet.gr>`_ |
15 |
|
16 |
Linux and Unix-like environments |
17 |
-------------------------------- |
18 |
|
19 |
Debian: |
20 |
^^^^^^^ |
21 |
|
22 |
The following steps describe a command-line approach, but any graphic package manager can be used instead. |
23 |
|
24 |
* As root, append the following to */etc/apt/sources.list* :: |
25 |
|
26 |
deb http://apt.dev.grnet.gr wheezy/ |
27 |
|
28 |
.. warning:: Debian Squeeze users may replace "wheezy" with "squeeze" |
29 |
|
30 |
* Make sure the GPG public key for the Synnefo repository is added: |
31 |
|
32 |
.. code-block:: console |
33 |
|
34 |
$ sudo curl https://dev.grnet.gr/files/apt-grnetdev.pub|apt-key add - |
35 |
|
36 |
otherwise *apt-get update* will produce GPG warnings. |
37 |
|
38 |
* Update the Debian sources: |
39 |
|
40 |
.. code-block:: console |
41 |
|
42 |
$ sudo apt-get update |
43 |
|
44 |
* Install kamaki: |
45 |
|
46 |
.. code-block:: console |
47 |
|
48 |
$ sudo apt-get install kamaki |
49 |
|
50 |
Ubuntu |
51 |
^^^^^^ |
52 |
|
53 |
The following steps describe a command-line approach, but any graphic package |
54 |
manager can be used instead. |
55 |
|
56 |
* Let ppa take care of the repository configuration: |
57 |
|
58 |
.. code-block:: console |
59 |
|
60 |
$ sudo apt-get install python-software-properties |
61 |
$ sudo add-apt-repository ppa:grnet/synnefo |
62 |
|
63 |
* Update the Debian sources: |
64 |
|
65 |
.. code-block:: console |
66 |
|
67 |
$ sudo apt-get update |
68 |
|
69 |
* Install kamaki: |
70 |
|
71 |
.. code-block:: console |
72 |
|
73 |
$ sudo apt-get install kamaki |
74 |
|
75 |
Install ansicolors (optional but recommended) |
76 |
""""""""""""""""""""""""""""""""""""""""""""" |
77 |
|
78 |
.. code-block:: console |
79 |
|
80 |
$ sudo apt-get install python-ansicolors |
81 |
|
82 |
|
83 |
.. _installing-from-pypi-ref: |
84 |
|
85 |
Installing from pypi |
86 |
^^^^^^^^^^^^^^^^^^^^ |
87 |
|
88 |
Requirements |
89 |
"""""""""""" |
90 |
|
91 |
Essential: |
92 |
|
93 |
* Python 2.6 or 2.7 [http://www.python.org] |
94 |
* Python setuptools [http://pypi.python.org/pypi/setuptools] |
95 |
|
96 |
Optional: |
97 |
|
98 |
* VirtualEnv (python-virtualenv) [http://www.virtualenv.org] |
99 |
|
100 |
Setup a virtual enviroment (optional) |
101 |
""""""""""""""""""""""""""""""""""""" |
102 |
|
103 |
Use virtualenv to setup kamaki and Synnefo services in a sandbox environment. |
104 |
|
105 |
.. code-block:: console |
106 |
|
107 |
$ virtualenv kamaki-env |
108 |
$ source kamaki-env/bin/activate |
109 |
|
110 |
A more detailed example of using virtual env can be found at the |
111 |
`snf-image-creator setup guide <http://www.synnefo.org/docs/snf-image-creator/latest/install.html#python-virtual-environment>`_ |
112 |
|
113 |
Install kamaki |
114 |
"""""""""""""" |
115 |
|
116 |
.. code-block:: console |
117 |
|
118 |
$ pip install kamaki |
119 |
|
120 |
Install ansicolors |
121 |
"""""""""""""""""" |
122 |
|
123 |
The **ansicolors** package is not required for running kamaki, but it is |
124 |
recommended as a user experience improvement. In specific, ansicolors |
125 |
adds colors to kamaki responses. |
126 |
|
127 |
.. code-block:: console |
128 |
|
129 |
$ pip install ansicolors |
130 |
|
131 |
|
132 |
Mac OS X |
133 |
-------- |
134 |
|
135 |
Kamaki can be installed on Mac OS X systems, by following the steps |
136 |
at :ref:`installing-from-pypi-ref`. |
137 |
|
138 |
Windows |
139 |
------- |
140 |
|
141 |
Kamaki can be installed on Windows by following the pypi method. Installing the |
142 |
requirements is a bit different than in other systems. |
143 |
|
144 |
The full process is detailed in the following: |
145 |
|
146 |
Requirements |
147 |
^^^^^^^^^^^^ |
148 |
|
149 |
* Python 2.7 (`Official versions <http://www.python.org/download>`_) |
150 |
|
151 |
* Setuptools (`Official versions and workarounds <http://pypi.python.org/pypi/setuptools>`_) |
152 |
|
153 |
Users who have already set up python and setuptools (e.g., for |
154 |
another project) may skip Python and / or setuptools installation. |
155 |
|
156 |
Install Python |
157 |
^^^^^^^^^^^^^^ |
158 |
|
159 |
Download and run the Windows installer from |
160 |
`here <http://www.python.org/download>`_ |
161 |
|
162 |
Users should pick the installer that fits their windows version and machine |
163 |
architecture. |
164 |
|
165 |
Add Python to windows path |
166 |
^^^^^^^^^^^^^^^^^^^^^^^^^^ |
167 |
|
168 |
The following will allow users to run Python and Python scripts from command |
169 |
line. |
170 |
|
171 |
* Select **System** from the Control Panel, select the **Advanced** tab, the |
172 |
**Environment Variables** button and then find the **PATH** (user or |
173 |
system) and **edit** |
174 |
|
175 |
* Without removing existing values, append the following to PATH:: |
176 |
|
177 |
;C:\Python27;C:\Python27\Scripts |
178 |
|
179 |
.. note:: Path values are separated by semicolons |
180 |
|
181 |
.. warning:: In case of a different version, C:\\Python27 should be replaced |
182 |
with the actual python path in the system |
183 |
|
184 |
Install setuptools |
185 |
^^^^^^^^^^^^^^^^^^ |
186 |
|
187 |
According to the corresponding |
188 |
`python org page <http://pypi.python.org/pypi/setuptools>`_, the setuptools |
189 |
installer doesn't currently work on 64bit machines. |
190 |
|
191 |
* Users with 32-bit platforms should download and run the graphic |
192 |
installer |
193 |
|
194 |
* Users with 64-bit platforms should download the |
195 |
`ez_setup.py <https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py>`_ |
196 |
script and install it from a command shell. In the following example, the |
197 |
script was downloaded at C:\\Downloads:: |
198 |
|
199 |
C:\> cd Downloads |
200 |
C:\Downloads\> python ez_setup.py |
201 |
... |
202 |
Installation finished |
203 |
C:\Downloads\> |
204 |
|
205 |
Install kamaki |
206 |
^^^^^^^^^^^^^^ |
207 |
|
208 |
.. code-block:: console |
209 |
|
210 |
$ easy_install kamaki |