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