Update developer-oriented documentation
[kamaki] / docs / installation.rst
index cc61712..81ea633 100644 (file)
 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
+--------------------------------
 
-.. _installing-from-source-ref:
+Debian:
+^^^^^^^
 
-Installing from source (git repos.)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+The following steps describe a command-line approach, but any graphic package manager can be used instead.
 
-Requirements
-""""""""""""
+* As root, append the following to */etc/apt/sources.list* ::
 
-Essential:
+    deb http://apt.dev.grnet.gr wheezy/
 
- * Python 2.6 or better [http://www.python.org]
- * Python setuptools [http://pypi.python.org/pypi/setuptools]
+.. warning:: Debian Squeeze users may replace "wheezy" with "squeeze"
 
-Optional:
+* Make sure the GPG public key for the Synnefo repository is added:
 
- * VirtualEnv (python-virtualenv) [http://www.virtualenv.org]
+    .. code-block:: console
 
-1. Setup a virtual enviroment (optional)
-""""""""""""""""""""""""""""""""""""""""
+        $ sudo curl https://dev.grnet.gr/files/apt-grnetdev.pub|apt-key add -
 
-With virtualenv users can setup kamaki and synnefo services in a sandbox environment.
+    otherwise *apt-get update* will produce GPG warnings.
 
-.. code-block:: console
+* Update the Debian sources:
 
-    $ virtualenv kamaki-env
+    .. code-block:: console
 
-    $ source kamaki-env/bin/activate
+        $ sudo apt-get update
 
-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>`_
+* Install kamaki:
 
-2. Install snf-common
-"""""""""""""""""""""
+    .. code-block:: console
 
-Package snf-common is part of the synnefo project and is a kamaki dependency since version 0.6.0.
+        $ sudo apt-get install kamaki
 
-.. code-block:: console
+Ubuntu
+^^^^^^
 
-    $ git clone http://code.grnet.gr/git/synnefo
+The following steps describe a command-line approach, but any graphic package
+manager can be used instead.
 
-    $ cd synnefo/snf-common
+* Let ppa take care of the repository configuration:
 
-    $ ./setup build install
+    .. code-block:: console
 
-    $ cd -
+        $ sudo apt-get install python-software-properties
+        $ sudo add-apt-repository ppa:grnet/synnefo
 
-3. Install kamaki
-"""""""""""""""""
+* Update the Debian sources:
 
-.. code-block:: console
-
-    $ git clone http://code.grnet.gr/git/kamaki
+    .. code-block:: console
 
-    $ cd kamaki
+        $ sudo apt-get update
 
-    $ ./setup build install
+* Install kamaki:
 
-4. Install progress and/or ansicolors (optional)
-""""""""""""""""""""""""""""""""""""""""""""""""
+    .. code-block:: console
 
-progress: command-line progress bars (in some commands)
+        $ sudo apt-get install kamaki
 
-ansicolors: color kamaki output (can switched on and off in `setup <setup.html>`_)
+Install ansicolors (optional but recommended)
+"""""""""""""""""""""""""""""""""""""""""""""
 
 .. code-block:: console
 
-    $ pip install progress
-
-    $ pip install ansicolors
+    $ sudo apt-get install python-ansicolors
 
-Ubuntu and Debian packages
-^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-The following steps describe a command-line approach, but any graphic package manager can be used instead.
+.. _installing-from-pypi-ref:
 
-1. Add the following to apt sources list
-""""""""""""""""""""""""""""""""""""""""
+Installing from pypi
+^^^^^^^^^^^^^^^^^^^^
 
-* Debian::
+Requirements
+""""""""""""
 
-    deb http://apt.dev.grnet.gr/ sid main
+Essential:
 
-* Ubuntu::
+ * Python 2.6 or 2.7 [http://www.python.org]
+ * Python setuptools [http://pypi.python.org/pypi/setuptools]
 
-    deb http://apt.dev.grnet.gr/ precise main
+Optional:
 
-2. Update
-"""""""""
+ * VirtualEnv (python-virtualenv) [http://www.virtualenv.org]
 
-.. code-block:: console
+Setup a virtual enviroment (optional)
+"""""""""""""""""""""""""""""""""""""
 
-    $ sudo apt-get update
+Use virtualenv to setup kamaki and Synnefo services in a sandbox environment.
 
-.. note:: Safely ignore a signature verification error like the following, if it emerges:
+.. code-block:: console
 
-    .. warning:: GPG error: http://apt.dev.grnet.gr precise/sid InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY XXXXXXXX
+    $ virtualenv kamaki-env
+    $ source kamaki-env/bin/activate
 
-3. Install kamaki
-"""""""""""""""""
+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>`_
 
-Since version 0.6.0, the package snf-common (available at synnefo apt repository) will be automatically installed as a dependency.
+Install kamaki
+""""""""""""""
 
 .. code-block:: console
 
-    $ sudo apt-get install kamaki
+    $ pip install kamaki
 
-4. Install ansicolors and/or progress (Optional)
-""""""""""""""""""""""""""""""""""""""""""""""""
+Install ansicolors
+""""""""""""""""""
+
+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.
 
 .. code-block:: console
 
-    $ sudo apt-get install python-ansicolors
+    $ pip install ansicolors
 
-    $ sudo apt-get install python-progress
 
 Mac OS X
 --------
 
-Kamaki can be installed on Mac OS X systems from source, by following the steps at :ref:`installing-from-source-ref`.
+Kamaki can be installed on Mac OS X systems, by following the steps
+at :ref:`installing-from-pypi-ref`.
 
 Windows
 -------
 
-Although it is proven not too tricky to install kamaki on Windows console using `git for windows <http://git-scm.com/downloads>`_, Windows environments are not supported at the time being.
+Kamaki can be installed on Windows by following the pypi method. Installing the
+requirements is a bit different than in other systems. 
+
+The full process is detailed in the following:
+
+Requirements
+^^^^^^^^^^^^
+
+* Python 2.7 (`Official versions <http://www.python.org/getit>`_)
+
+* Setuptools (`Official versions and workarounds <http://pypi.python.org/pypi/setuptools>`_)
+
+Users who have already set up python and setuptools (e.g., for
+another project) may skip Python and / or setuptools installation.
+
+Install Python
+^^^^^^^^^^^^^^
+
+Download and run the Windows installer from
+`here <http://www.python.org/getit>`_
+
+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
+
+    $ easy_install kamaki