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.
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 wheezy/
Warning
Debian Squeeze users may replace “wheezy” with “squeeze”
Make sure the GPG public key for the Synnefo repository is added:
$ 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:
$ sudo apt-get update
Install kamaki:
$ sudo apt-get install kamaki
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:
$ sudo apt-get install python-software-properties $ sudo add-apt-repository ppa:grnet/synnefo
Update the Debian sources:
$ sudo apt-get update
Install kamaki:
$ sudo apt-get install kamaki
$ sudo apt-get install python-ansicolors
$ sudo apt-get install python-mock
Warning
kamaki.clients unit-tests need python-mock 1.X or better. e.g.,:
$ sudo apt-get install python-mock=1.0.1
Hint
To activate functional tests in kamaki enable the preconfigured livetest command group:
$ kamaki config set livetest_cli livetest
Essential:
- Python 2.6 or 2.7 [http://www.python.org]
- Python setuptools [http://pypi.python.org/pypi/setuptools]
Optional:
- VirtualEnv (python-virtualenv) [http://www.virtualenv.org]
Use virtualenv to setup kamaki and Synnefo services in a sandbox environment.
$ 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
$ pip install kamaki
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.
$ pip install ansicolors
The mock package is needed for running the prepared unit-tests in the kamaki.clients package. This feature is useful when extending / debugging kamaki functionality and is aimed to kamaki developers and contributors. Therefore, users can enjoy the full kamaki user experience without installing mock.
$ pip install mock
Warning
mock version >= 1.X
Hint
To activate functional tests in kamaki. enable the preconfigured livetest command group:
$ kamaki config set livetest_cli livetest
Kamaki can be installed on Mac OS X systems, by following the steps at Installing from pypi.
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:
Users who have already set up python and setuptools (e.g., for another project) may skip Python and / or setuptools installation.
Download and run the Windows installer from here
Users should pick the installer that fits their windows version and machine architecture.
The following will allow users to run Python and Python scripts from command line.
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
According to the corresponding python org page, the setuptools installer doesn’t currently work on 64bit machines.
installer
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\>
$ easy_install kamaki