Statistics
| Branch: | Tag: | Revision:

root / docs / installation.rst @ 6539c700

History | View | Annotate | Download (6 kB)

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