Rename tests to livetest in kamaki.clients
[kamaki] / docs / installation.rst
index 2be955f..81fb712 100644 (file)
@@ -6,57 +6,138 @@ This guide describes the standard installation process for kamaki, with the aspi
 
 * Kamaki repository: `http://code.grnet.gr/git/kamaki <http://code.grnet.gr/git/kamaki>`_
 
-* Synnefo Linux packages: `http://apt.dev.grnet.gr <http://apt.dev.grnet.gr>`_
+* Synnefo Linux packages: `http://apt.dev.grnet.gr <http://apt.dev.grnet.gr>`_, `http://apt2.dev.grnet.gr <http://apt2.dev.grnet.gr>`_
 
 Linux and Unix-like enviroments
 -------------------------------
 
+Debian:
+^^^^^^^
+
+The following steps describe a command-line approach, but any graphic package manager can be used instead.
+
+* As root, append the following to */etc/apt/sources.list* ::
+
+    deb http://apt.dev.grnet.gr/ squeeze main
+    deb http://apt2.dev.grnet.gr stable/
+
+* Make sure the GPG public key for the GRNET dev team is added:
+
+    .. code-block:: console
+
+        $ sudo curl https://dev.grnet.gr/files/apt-grnetdev.pub|apt-key add -
+
+    otherwise *apt-get update* will produce GPG warnings.
+
+* Update the Debian sources:
+
+    .. code-block:: console
+
+        $ sudo apt-get update
+
+* Install kamaki:
+
+    .. code-block:: console
+
+        $ sudo apt-get install kamaki
+
+Ubuntu
+^^^^^^
+
+The following steps describe a command-line approach, but any graphic package manager can be used instead.
+
+* Let ppa take care of the repository configuration:
+
+    .. code-block:: console
+
+        $ sudo apt-get install python-software-properties
+        $ sudo add-apt-repository ppa:grnet/synnefo
+
+* Update the Debian sources:
+
+    .. code-block:: console
+
+        $ sudo apt-get update
+
+* Install kamaki:
+
+    .. code-block:: console
+
+        $ sudo apt-get install kamaki
+
+Install ansicolors and/or progress (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.)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-1. Setup a virtual enviroment (optional)
-""""""""""""""""""""""""""""""""""""""""
+Requirements
+""""""""""""
+
+Essential:
+
+ * Python 2.6 or better [http://www.python.org]
+ * Python setuptools [http://pypi.python.org/pypi/setuptools]
+
+Optional:
+
+ * VirtualEnv (python-virtualenv) [http://www.virtualenv.org]
+
+Setup a virtual enviroment (optional)
+"""""""""""""""""""""""""""""""""""""
 
 With virtualenv users can setup kamaki and synnefo services in a sandbox environment.
 
 .. code-block:: console
 
     $ virtualenv kamaki-env
-
     $ source kamaki-env/bin/activate
 
-.. hint:: More about virtualenv: `<http://www.virtualenv.org>`_
+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>`_
 
-2. Install snf-common from synnefo project (required since v0.6.0)
-""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+Install objpool (was: snf-common)
+"""""""""""""""""""""""""""""""""
 
-Package snf-common is required since kamaki 0.6.0.
+Kamaki is based on python-objpool. The objpool package is easy to install from source, even on windows platforms:
 
 .. code-block:: console
 
-    $ git clone http://code.grnet.gr/git/synnefo
+    $ git clone http://code.grnet.gr/git/objpool
+    $ cd objpool
+    $ ./setup build install
+    $ cd -
 
-    $ cd synnefo/snf-common
+Install kamaki
+""""""""""""""
 
-    $ ./setup build install
+Kamaki can be downloaded from `this location <https://code.grnet.gr/projects/kamaki/files>`_, where users can pick the version they prefer and unzip it locally:
 
-    $ cd -
+.. code-block:: console
 
-3. Install kamaki
-"""""""""""""""""
+    $ tar xvfz kamaki-0.7.tar.gz
+
+or it can be downloaded directly from the git repository:
 
 .. code-block:: console
 
     $ git clone http://code.grnet.gr/git/kamaki
 
-    $ cd kamaki
+and then installed by the setup script:
 
+.. code-block:: console
+
+    $ cd kamaki
     $ ./setup build install
 
-4. Install progress and/or ansicolors (optional)
-""""""""""""""""""""""""""""""""""""""""""""""""
+Install progress and/or ansicolors (optional)
+"""""""""""""""""""""""""""""""""""""""""""""
 
 progress: command-line progress bars (in some commands)
 
@@ -65,60 +146,102 @@ ansicolors: color kamaki output (can switched on and off in `setup <setup.html>`
 .. code-block:: console
 
     $ pip install progress
-
     $ pip install ansicolors
 
-Ubuntu and Debian packages
-^^^^^^^^^^^^^^^^^^^^^^^^^^
+Mac OS X
+--------
 
-The following steps describe a command-line approach, but any graphic package manager can be used instead.
+Kamaki can be installed on Mac OS X systems from source, by following the steps at :ref:`installing-from-source-ref`.
 
-1. Add the following to apt sources list
-""""""""""""""""""""""""""""""""""""""""
+Windows
+-------
 
-* Debian::
+Kamaki can run on Windows, either on standard Windows console, or inside an improved command line shell. The present guide presents a tested method for setting up kamaki in windows
 
-    deb http://apt.dev.grnet.gr/ sid main
+Requirements
+^^^^^^^^^^^^
 
-* Ubuntu::
+* Python 2.7 or better (`Official versions <http://www.python.org/getit>`_)
 
-    deb http://apt.dev.grnet.gr/ precise main
+* Git (download `windows version <http://git-scm.com/download/win>`_)
 
-2. Update
-"""""""""
+* Setuptools (`Official versions and workarounds <http://pypi.python.org/pypi/setuptools>`_)
 
-.. code-block:: console
+Installation from source
+^^^^^^^^^^^^^^^^^^^^^^^^
 
-    $ sudo apt-get update
+Install python
+""""""""""""""
 
-.. note:: Safely ignore a signature verification error like the following, if it emerges:
+Download and run the Windows installer from `here <http://www.python.org/getit>`_
 
-    .. 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
+Users should pick the installer that fits their windows version and architecture.
 
-3. Install kamaki
-"""""""""""""""""
+Add python to windows path
+""""""""""""""""""""""""""
 
-Since version 0.6.0, the package snf-common (available at synnefo apt repository) will be automatically installed as a dependency.
+The following will allow users to run python and python scripts from command line.
 
-.. code-block:: console
+* Select **System** from the Control Panel, select the **Advanced** tab, the **Environment Variables** button and then find the **PATH** (user or system) and **edit**
 
-    $ sudo apt-get install kamaki
+* Without removing existing values, append the following to PATH::
 
-4. Install ansicolors and/or progress (Optional)
-""""""""""""""""""""""""""""""""""""""""""""""""
+    C:\Python;C:\Python\Scripts
 
-.. code-block:: console
+.. note:: Path values are separated by semicolons
 
-    $ sudo apt-get install python-ansicolors
+.. warning:: C:\\Python should be replaced with the actual python path in the system, e.g. C:\\Python27
 
-    $ sudo apt-get install python-progress
+Install setuptools
+""""""""""""""""""
 
-Mac OS X
---------
+According to the corresponding `python org page <http://pypi.python.org/pypi/setuptools>`_, the setuptools installer doesn't currently work on 64bit machines.
 
-Kamaki can be installed on Mac OS X systems from source, by following the steps at :ref:`installing-from-source-ref`.
+* Users with 32-bit operating systems should download and run the graphic installer
 
-Windows
--------
+* 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::
+
+    C:\> cd Downloads
+    C:\Downloads\> python ez_setup.py
+    ...
+    Installation finished
+    C:\Downloads\>
+
+Install GIT
+"""""""""""
+
+`Download GIT <http://git-scm.com/download/win>`_ and run the graphic installer. During the installation, users will be able to modify some installation options. The present guide is tested with the default selections.
+
+After the installation is completed, a GIT standalone shell will be installed (a desktop shortcut is created, by default). Users are advised to run kamaki through this shell.
+
+Install kamaki
+""""""""""""""
+
+* Run the GIT standalone shell
+
+* Enter the location where kamaki will be installed, e.g. **C:\\**
+
+    .. code-block:: console
+
+        $ cd /c/
+
+* Download source from GRNET repository
+
+    .. code-block:: console
+
+        $ git clone http://code.grnet.gr/git/kamaki
+        Cloning into 'kamaki'...
+        Receiving objects: ...
+        Resolving Deltas: ...
+
+* Enter source and install kamaki
+
+    .. code-block:: console
+
+        $ cd kamaki
+        $ python setup.py install
+        running install
+        ...
+        Finished processing dependencies for kamaki==0.7
 
-It has proven possible (and not too tricky) to install kamaki on Windows console using some auxiliary applications, but Windows users are not the target audience for the time being.
+    $ kamaki --version