Installation
============
-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.
+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 Linux/Unix-like users, it is quite straightforward to install and
+have it up and running in all platforms running Python 2.6 or 2.7.
* Kamaki repository: `http://code.grnet.gr/git/kamaki <http://code.grnet.gr/git/kamaki>`_
+* Kamaki at pypi: `http://pypi.python.org/pypi/kamaki <https://pypi.python.org/pypi/kamaki>`_
+
* Synnefo Linux packages: `http://apt.dev.grnet.gr <http://apt.dev.grnet.gr>`_
-Linux and Unix-like enviroments
--------------------------------
+Linux and Unix-like environments
+--------------------------------
-Ubuntu and Debian packages
-^^^^^^^^^^^^^^^^^^^^^^^^^^
+Debian:
+^^^^^^^
The following steps describe a command-line approach, but any graphic package manager can be used instead.
-Add the following to apt sources list
-"""""""""""""""""""""""""""""""""""""
+* As root, append the following to */etc/apt/sources.list* ::
-As root, append one of the following to */etc/apt/sources.list*:
+ deb http://apt.dev.grnet.gr wheezy/
-* Debian Sid (kamaki 0.6.2)::
+.. warning:: Debian Squeeze users may replace "wheezy" with "squeeze"
- deb http://apt.dev.grnet.gr/ sid main
+* Make sure the GPG public key for the Synnefo repository is added:
-* Debian Stable (kamaki 0.6.1)::
+ .. code-block:: console
- deb http://apt.dev.grnet.gr/ squeeze main
- deb http://apt2.dev.grnet.gr stable/
+ $ sudo curl https://dev.grnet.gr/files/apt-grnetdev.pub|apt-key add -
-* Ubuntu (kamaki 0.6.1)::
+ otherwise *apt-get update* will produce GPG warnings.
- deb http://apt.dev.grnet.gr/ precise main
+* Update the Debian sources:
+ .. code-block:: console
-Update
-""""""
+ $ sudo apt-get update
-.. note:: make sure the GPG public key for the GRNET dev team is added:
+* Install kamaki:
.. code-block:: console
- $ curl https://dev.grnet.gr/files/apt-grnetdev.pub|apt-key add -
+ $ sudo apt-get install kamaki
- otherwise *apt-get update* will produce GPG warnings.
+Ubuntu
+^^^^^^
-.. code-block:: console
+The following steps describe a command-line approach, but any graphic package
+manager can be used instead.
- $ sudo apt-get update
+* Let ppa take care of the repository configuration:
+ .. code-block:: console
-Install kamaki
-""""""""""""""
+ $ sudo apt-get install python-software-properties
+ $ sudo add-apt-repository ppa:grnet/synnefo
-.. note:: **versions 0.6.0 - 0.6.1:**
+* Update the Debian sources:
- The *snf-common* package (available at synnefo apt repository) will be automatically installed as a dependency.
+ .. code-block:: console
-.. note:: **versions 0.6.2 and on:**
+ $ sudo apt-get update
- Since version 0.6.2, *objpool* replaces *snf-common*. The objpool package is also available at synnefo repository and is automatically installed as a dependency. The *snf-common* dependency is removed.
+* Install kamaki:
-.. code-block:: console
+ .. code-block:: console
- $ sudo apt-get install kamaki
+ $ sudo apt-get install kamaki
-Install ansicolors and/or progress (Optional)
+Install ansicolors (optional but recommended)
"""""""""""""""""""""""""""""""""""""""""""""
.. code-block:: console
$ sudo apt-get install python-ansicolors
- $ sudo apt-get install python-progress
-.. _installing-from-source-ref:
-Installing from source (git repos.)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+.. _installing-from-pypi-ref:
+
+Installing from pypi
+^^^^^^^^^^^^^^^^^^^^
Requirements
""""""""""""
Essential:
- * Python 2.6 or better [http://www.python.org]
+ * Python 2.6 or 2.7 [http://www.python.org]
* Python setuptools [http://pypi.python.org/pypi/setuptools]
Optional:
Setup a virtual enviroment (optional)
"""""""""""""""""""""""""""""""""""""
-With virtualenv users can setup kamaki and synnefo services in a sandbox environment.
+Use virtualenv to setup kamaki and Synnefo services in a sandbox environment.
.. code-block:: console
$ virtualenv kamaki-env
$ source kamaki-env/bin/activate
-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>`_
+A more detailed example of using virtual env can be found at the
+`snf-image-creator setup guide <http://www.synnefo.org/docs/snf-image-creator/latest/install.html#python-virtual-environment>`_
-Install objpool (was: snf-common)
-"""""""""""""""""""""""""""""""""
+Install kamaki
+""""""""""""""
-.. note:: **versions 0.6.0 - 0.6.1**
+.. code-block:: console
- Package snf-common is part of the synnefo project and used to be a kamaki dependency in versions from 0.6.0 to 0.6.1 to provide a connection pooling mechanism. Users who still run 0.6.0 or 0.6.1 may need to manually install the snf-common package:
+ $ pip install kamaki
- .. code-block:: console
+Install ansicolors
+""""""""""""""""""
- $ git clone http://code.grnet.gr/git/synnefo
- $ cd synnefo/snf-common
- $ ./setup build install
- $ cd -
+The **ansicolors** package is not required for running kamaki, but it is
+recommended as a user experience improvement. In specific, ansicolors
+adds colors to kamaki responses.
-**Version 0.6.2 and on:**
+.. code-block:: console
-Since 0.6.2, kamaki is based on objpool (hence the snf-common dependency is now obsolete). The objpool package is easy to install from source, even on windows platforms:
+ $ pip install ansicolors
-.. code-block:: console
- $ git clone http://code.grnet.gr/git/objpool
- $ cd objpool
- $ ./setup build install
- $ cd -
+Mac OS X
+--------
-Install kamaki
-""""""""""""""
+Kamaki can be installed on Mac OS X systems, by following the steps
+at :ref:`installing-from-pypi-ref`.
-.. code-block:: console
+Windows
+-------
- $ git clone http://code.grnet.gr/git/kamaki
- $ cd kamaki
- $ ./setup build install
+Kamaki can be installed on Windows by following the pypi method. Installing the
+requirements is a bit different than in other systems.
-Install progress and/or ansicolors (optional)
-"""""""""""""""""""""""""""""""""""""""""""""
+The full process is detailed in the following:
-progress: command-line progress bars (in some commands)
+Requirements
+^^^^^^^^^^^^
-ansicolors: color kamaki output (can switched on and off in `setup <setup.html>`_)
+* Python 2.7 (`Official versions <http://www.python.org/getit>`_)
-.. code-block:: console
+* Setuptools (`Official versions and workarounds <http://pypi.python.org/pypi/setuptools>`_)
- $ pip install progress
- $ pip install ansicolors
+Users who have already set up python and setuptools (e.g., for
+another project) may skip Python and / or setuptools installation.
-Mac OS X
---------
+Install Python
+^^^^^^^^^^^^^^
-Kamaki can be installed on Mac OS X systems from source, by following the steps at :ref:`installing-from-source-ref`.
+Download and run the Windows installer from
+`here <http://www.python.org/getit>`_
-Windows
--------
+Users should pick the installer that fits their windows version and machine
+architecture.
+
+Add Python to windows path
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The following will allow users to run Python and Python scripts from command
+line.
+
+* Select **System** from the Control Panel, select the **Advanced** tab, the
+ **Environment Variables** button and then find the **PATH** (user or
+ system) and **edit**
+
+* Without removing existing values, append the following to PATH::
+
+ ;C:\Python27;C:\Python27\Scripts
+
+.. note:: Path values are separated by semicolons
+
+.. warning:: In case of a different version, C:\\Python27 should be replaced
+ with the actual python path in the system
+
+Install setuptools
+^^^^^^^^^^^^^^^^^^
+
+According to the corresponding
+`python org page <http://pypi.python.org/pypi/setuptools>`_, the setuptools
+installer doesn't currently work on 64bit machines.
+
+* Users with 32-bit platforms should download and run the graphic
+ installer
+
+* Users with 64-bit platforms 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::
+
+ C:\> cd Downloads
+ C:\Downloads\> python ez_setup.py
+ ...
+ Installation finished
+ C:\Downloads\>
+
+Install kamaki
+^^^^^^^^^^^^^^
+
+.. code-block:: console
-Since version 0.6.2 kamaki can run on Windows, either on standard Windows console, or inside an improved command line shell.
+ $ easy_install kamaki