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.
7 * Kamaki repository: `http://code.grnet.gr/git/kamaki <http://code.grnet.gr/git/kamaki>`_
9 * Kamaki at pypi: `http://pypi.python.org/pypi/kamaki <https://pypi.python.org/pypi/kamaki>`_
11 * Synnefo Linux packages: `http://apt2.dev.grnet.gr <http://apt2.dev.grnet.gr>`_
13 Linux and Unix-like enviroments
14 -------------------------------
19 The following steps describe a command-line approach, but any graphic package manager can be used instead.
21 * As root, append the following to */etc/apt/sources.list* ::
23 deb http://apt2.dev.grnet.gr stable/
25 * Make sure the GPG public key for the Synnefo development team is added:
27 .. code-block:: console
29 $ sudo curl https://dev.grnet.gr/files/apt-grnetdev.pub|apt-key add -
31 otherwise *apt-get update* will produce GPG warnings.
33 * Update the Debian sources:
35 .. code-block:: console
41 .. code-block:: console
43 $ sudo apt-get install kamaki
48 The following steps describe a command-line approach, but any graphic package manager can be used instead.
50 * Let ppa take care of the repository configuration:
52 .. code-block:: console
54 $ sudo apt-get install python-software-properties
55 $ sudo add-apt-repository ppa:grnet/synnefo
57 * Update the Debian sources:
59 .. code-block:: console
65 .. code-block:: console
67 $ sudo apt-get install kamaki
69 Install ansicolors (optional but recommended)
70 """""""""""""""""""""""""""""""""""""""""""""
72 .. code-block:: console
74 $ sudo apt-get install python-ansicolors
76 Install mock (for developers only)
77 """"""""""""""""""""""""""""""""""
79 .. code-block:: console
81 $ sudo apt-get install python-mock
83 .. warning:: kamaki.clients unit-tests need python-mock 1.X or better. e.g.::
85 $ sudo apt-get install python-mock=1.0.1
87 .. _installing-from-pypi-ref:
97 * Python 2.6 or better [http://www.python.org]
98 * Python setuptools [http://pypi.python.org/pypi/setuptools]
102 * VirtualEnv (python-virtualenv) [http://www.virtualenv.org]
104 Setup a virtual enviroment (optional)
105 """""""""""""""""""""""""""""""""""""
107 With virtualenv users can setup kamaki and synnefo services in a sandbox environment.
109 .. code-block:: console
111 $ virtualenv kamaki-env
112 $ source kamaki-env/bin/activate
114 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>`_
119 .. code-block:: console
126 The **ansicolors** package is not required for running kamaki, but it is
127 recommended as a user experience improvement. In specific, ansicolors
128 adds colors to kamaki responses.
130 .. code-block:: console
132 $ pip install ansicolors
137 The **mock** package is needed for running the prepared unit-tests in the kamaki.clients
138 package. This feature is useful when extendnig / debugging kamaki functionality and is
139 aimed to kamaki developers and contributors. Therefore, users can enjoy the full kamaki
140 user experience without installing mock.
142 .. code-block:: console
146 .. warning:: mock version >= 1.X
151 Kamaki can be installed on Mac OS X systems from source, by following the steps at :ref:`installing-from-pypi-ref`.
156 Kamaki can be installed on Windows by following the pypi method. Installing the requirements is a bit different than in other systems.
158 The full process is detailed in the following:
163 * Python 2.7 or better (`Official versions <http://www.python.org/getit>`_)
165 * Setuptools (`Official versions and workarounds <http://pypi.python.org/pypi/setuptools>`_)
167 Users who have already set up python and setuptools (e.g. for another project) may skip python and / or setup tools installation.
172 Download and run the Windows installer from `here <http://www.python.org/getit>`_
174 Users should pick the installer that fits their windows version and architecture.
176 Add python to windows path
177 ^^^^^^^^^^^^^^^^^^^^^^^^^^
179 The following will allow users to run python and python scripts from command line.
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**
183 * Without removing existing values, append the following to PATH::
185 C:\Python;C:\Python\Scripts
187 .. note:: Path values are separated by semicolons
189 .. warning:: C:\\Python should be replaced with the actual python path in the system, e.g. C:\\Python27
194 According to the corresponding `python org page <http://pypi.python.org/pypi/setuptools>`_, the setuptools installer doesn't currently work on 64bit machines.
196 * Users with 32-bit operating systems should download and run the graphic installer
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::
201 C:\Downloads\> python ez_setup.py
203 Installation finished
209 .. code-block:: console