Statistics
| Branch: | Tag: | Revision:

root / docs / installation.rst @ e3a1d743

History | View | Annotate | Download (7.2 kB)

1 457cb69b Stavros Sachtouris
Installation
2 457cb69b Stavros Sachtouris
============
3 457cb69b Stavros Sachtouris
4 7536c9bf Stavros Sachtouris
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.
5 457cb69b Stavros Sachtouris
6 5f5045b5 Stavros Sachtouris
7 2151584b Stavros Sachtouris
* Kamaki repository: `http://code.grnet.gr/git/kamaki <http://code.grnet.gr/git/kamaki>`_
8 2151584b Stavros Sachtouris
9 5c801047 Stavros Sachtouris
* Synnefo Linux packages: `http://apt.dev.grnet.gr <http://apt.dev.grnet.gr>`_, `http://apt2.dev.grnet.gr <http://apt2.dev.grnet.gr>`_
10 2151584b Stavros Sachtouris
11 457cb69b Stavros Sachtouris
Linux and Unix-like enviroments
12 457cb69b Stavros Sachtouris
-------------------------------
13 457cb69b Stavros Sachtouris
14 ec3b8f78 Stavros Sachtouris
Ubuntu and Debian packages
15 ec3b8f78 Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^^^
16 ec3b8f78 Stavros Sachtouris
17 ec3b8f78 Stavros Sachtouris
The following steps describe a command-line approach, but any graphic package manager can be used instead.
18 ec3b8f78 Stavros Sachtouris
19 ec3b8f78 Stavros Sachtouris
Add the following to apt sources list
20 ec3b8f78 Stavros Sachtouris
"""""""""""""""""""""""""""""""""""""
21 ec3b8f78 Stavros Sachtouris
22 ec3b8f78 Stavros Sachtouris
As root, append one of the following to */etc/apt/sources.list*:
23 ec3b8f78 Stavros Sachtouris
24 ec3b8f78 Stavros Sachtouris
25 e3a1d743 Stavros Sachtouris
* Debian Stable::
26 ec3b8f78 Stavros Sachtouris
27 ec3b8f78 Stavros Sachtouris
    deb http://apt.dev.grnet.gr/ squeeze main
28 ec3b8f78 Stavros Sachtouris
    deb http://apt2.dev.grnet.gr stable/
29 ec3b8f78 Stavros Sachtouris
30 e3a1d743 Stavros Sachtouris
* Ubuntu::
31 ec3b8f78 Stavros Sachtouris
32 e3a1d743 Stavros Sachtouris
    deb http://ppa.launchpad.net/grnet/synnefo/ubuntu <UBUNTU_VERSION> main
33 e3a1d743 Stavros Sachtouris
    deb-src http://ppa.launchpad.net/grnet/synnefo/ubuntu <UBUNTU_VERSION> main
34 ec3b8f78 Stavros Sachtouris
35 e3a1d743 Stavros Sachtouris
where <UBUNTU_VERSION> is the system Ubuntu version (e.g. precise)
36 ec3b8f78 Stavros Sachtouris
37 ec3b8f78 Stavros Sachtouris
Update
38 ec3b8f78 Stavros Sachtouris
""""""
39 ec3b8f78 Stavros Sachtouris
40 e3a1d743 Stavros Sachtouris
* In Debian, make sure the GPG public key for the GRNET dev team is added:
41 ec3b8f78 Stavros Sachtouris
42 ec3b8f78 Stavros Sachtouris
    .. code-block:: console
43 ec3b8f78 Stavros Sachtouris
44 ec3b8f78 Stavros Sachtouris
        $ curl https://dev.grnet.gr/files/apt-grnetdev.pub|apt-key add -
45 ec3b8f78 Stavros Sachtouris
46 ec3b8f78 Stavros Sachtouris
    otherwise *apt-get update* will produce GPG warnings.
47 ec3b8f78 Stavros Sachtouris
48 e3a1d743 Stavros Sachtouris
* In Ubuntu, make sure the correct PPA signing key is installed:
49 e3a1d743 Stavros Sachtouris
50 e3a1d743 Stavros Sachtouris
    .. code-block:: console
51 e3a1d743 Stavros Sachtouris
52 e3a1d743 Stavros Sachtouris
        $ sudo apt-get install python-software-properties
53 e3a1d743 Stavros Sachtouris
        $ sudo add-apt-repository ppa:grnet/synnefo
54 e3a1d743 Stavros Sachtouris
55 e3a1d743 Stavros Sachtouris
Finally:
56 e3a1d743 Stavros Sachtouris
57 ec3b8f78 Stavros Sachtouris
.. code-block:: console
58 ec3b8f78 Stavros Sachtouris
59 ec3b8f78 Stavros Sachtouris
    $ sudo apt-get update
60 ec3b8f78 Stavros Sachtouris
61 ec3b8f78 Stavros Sachtouris
62 ec3b8f78 Stavros Sachtouris
Install kamaki
63 ec3b8f78 Stavros Sachtouris
""""""""""""""
64 ec3b8f78 Stavros Sachtouris
65 e3a1d743 Stavros Sachtouris
.. note:: The objpool package is available at synnefo repositories and is automatically installed as a dependency.
66 ec3b8f78 Stavros Sachtouris
67 ec3b8f78 Stavros Sachtouris
.. code-block:: console
68 ec3b8f78 Stavros Sachtouris
69 ec3b8f78 Stavros Sachtouris
    $ sudo apt-get install kamaki
70 ec3b8f78 Stavros Sachtouris
71 ec3b8f78 Stavros Sachtouris
Install ansicolors and/or progress (Optional)
72 ec3b8f78 Stavros Sachtouris
"""""""""""""""""""""""""""""""""""""""""""""
73 ec3b8f78 Stavros Sachtouris
74 ec3b8f78 Stavros Sachtouris
.. code-block:: console
75 ec3b8f78 Stavros Sachtouris
76 ec3b8f78 Stavros Sachtouris
    $ sudo apt-get install python-ansicolors
77 ec3b8f78 Stavros Sachtouris
    $ sudo apt-get install python-progress
78 ec3b8f78 Stavros Sachtouris
79 5f5045b5 Stavros Sachtouris
.. _installing-from-source-ref:
80 5f5045b5 Stavros Sachtouris
81 457cb69b Stavros Sachtouris
Installing from source (git repos.)
82 457cb69b Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
83 457cb69b Stavros Sachtouris
84 961e6040 Stavros Sachtouris
Requirements
85 961e6040 Stavros Sachtouris
""""""""""""
86 961e6040 Stavros Sachtouris
87 961e6040 Stavros Sachtouris
Essential:
88 961e6040 Stavros Sachtouris
89 961e6040 Stavros Sachtouris
 * Python 2.6 or better [http://www.python.org]
90 961e6040 Stavros Sachtouris
 * Python setuptools [http://pypi.python.org/pypi/setuptools]
91 961e6040 Stavros Sachtouris
92 961e6040 Stavros Sachtouris
Optional:
93 961e6040 Stavros Sachtouris
94 961e6040 Stavros Sachtouris
 * VirtualEnv (python-virtualenv) [http://www.virtualenv.org]
95 961e6040 Stavros Sachtouris
96 ec3b8f78 Stavros Sachtouris
Setup a virtual enviroment (optional)
97 ec3b8f78 Stavros Sachtouris
"""""""""""""""""""""""""""""""""""""
98 5f5045b5 Stavros Sachtouris
99 5f5045b5 Stavros Sachtouris
With virtualenv users can setup kamaki and synnefo services in a sandbox environment.
100 2151584b Stavros Sachtouris
101 2151584b Stavros Sachtouris
.. code-block:: console
102 2151584b Stavros Sachtouris
103 2151584b Stavros Sachtouris
    $ virtualenv kamaki-env
104 2151584b Stavros Sachtouris
    $ source kamaki-env/bin/activate
105 2151584b Stavros Sachtouris
106 961e6040 Stavros Sachtouris
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>`_
107 2151584b Stavros Sachtouris
108 ec3b8f78 Stavros Sachtouris
Install objpool (was: snf-common)
109 ec3b8f78 Stavros Sachtouris
"""""""""""""""""""""""""""""""""
110 5f5045b5 Stavros Sachtouris
111 f5d9bc54 Stavros Sachtouris
Since 0.6.2, kamaki is based on python-objpool. The objpool package is easy to install from source (even on windows platforms):
112 2151584b Stavros Sachtouris
113 2151584b Stavros Sachtouris
.. code-block:: console
114 2151584b Stavros Sachtouris
115 ffbc7783 Stavros Sachtouris
    $ git clone http://code.grnet.gr/git/objpool
116 ffbc7783 Stavros Sachtouris
    $ cd objpool
117 2151584b Stavros Sachtouris
    $ ./setup build install
118 2151584b Stavros Sachtouris
    $ cd -
119 2151584b Stavros Sachtouris
120 ec3b8f78 Stavros Sachtouris
Install kamaki
121 ec3b8f78 Stavros Sachtouris
""""""""""""""
122 2151584b Stavros Sachtouris
123 e3a1d743 Stavros Sachtouris
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:
124 f5d9bc54 Stavros Sachtouris
125 f5d9bc54 Stavros Sachtouris
.. code-block:: console
126 f5d9bc54 Stavros Sachtouris
127 f5d9bc54 Stavros Sachtouris
    $ tar xvfz kamaki-0.6.2.tar.gz
128 f5d9bc54 Stavros Sachtouris
129 f5d9bc54 Stavros Sachtouris
or it can be downloaded directly from the git repository:
130 f5d9bc54 Stavros Sachtouris
131 2151584b Stavros Sachtouris
.. code-block:: console
132 2151584b Stavros Sachtouris
133 2151584b Stavros Sachtouris
    $ git clone http://code.grnet.gr/git/kamaki
134 f5d9bc54 Stavros Sachtouris
135 f5d9bc54 Stavros Sachtouris
and then installed by the setup script:
136 f5d9bc54 Stavros Sachtouris
137 f5d9bc54 Stavros Sachtouris
.. code-block:: console
138 e3a1d743 Stavros Sachtouris
139 2151584b Stavros Sachtouris
    $ cd kamaki
140 2151584b Stavros Sachtouris
    $ ./setup build install
141 2151584b Stavros Sachtouris
142 ec3b8f78 Stavros Sachtouris
Install progress and/or ansicolors (optional)
143 ec3b8f78 Stavros Sachtouris
"""""""""""""""""""""""""""""""""""""""""""""
144 2151584b Stavros Sachtouris
145 5f5045b5 Stavros Sachtouris
progress: command-line progress bars (in some commands)
146 5f5045b5 Stavros Sachtouris
147 5f5045b5 Stavros Sachtouris
ansicolors: color kamaki output (can switched on and off in `setup <setup.html>`_)
148 2151584b Stavros Sachtouris
149 2151584b Stavros Sachtouris
.. code-block:: console
150 2151584b Stavros Sachtouris
151 2151584b Stavros Sachtouris
    $ pip install progress
152 2151584b Stavros Sachtouris
    $ pip install ansicolors
153 2151584b Stavros Sachtouris
154 5f5045b5 Stavros Sachtouris
Mac OS X
155 5f5045b5 Stavros Sachtouris
--------
156 5f5045b5 Stavros Sachtouris
157 5f5045b5 Stavros Sachtouris
Kamaki can be installed on Mac OS X systems from source, by following the steps at :ref:`installing-from-source-ref`.
158 457cb69b Stavros Sachtouris
159 457cb69b Stavros Sachtouris
Windows
160 457cb69b Stavros Sachtouris
-------
161 457cb69b Stavros Sachtouris
162 5c801047 Stavros Sachtouris
Since version 0.6.2 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 using kamaki in windows
163 5c801047 Stavros Sachtouris
164 5c801047 Stavros Sachtouris
Requirements
165 5c801047 Stavros Sachtouris
^^^^^^^^^^^^
166 5c801047 Stavros Sachtouris
167 b6a99832 Stavros Sachtouris
* Python 2.7 or better (`Official versions <http://www.python.org/getit>`_)
168 5c801047 Stavros Sachtouris
169 5c801047 Stavros Sachtouris
* Git (download `windows version <http://git-scm.com/download/win>`_)
170 5c801047 Stavros Sachtouris
171 b6a99832 Stavros Sachtouris
* Setuptools (`Official versions and workarounds <http://pypi.python.org/pypi/setuptools>`_)
172 5c801047 Stavros Sachtouris
173 5c801047 Stavros Sachtouris
Installation from source
174 5c801047 Stavros Sachtouris
^^^^^^^^^^^^^^^^^^^^^^^^
175 5c801047 Stavros Sachtouris
176 5c801047 Stavros Sachtouris
Install python
177 5c801047 Stavros Sachtouris
""""""""""""""
178 5c801047 Stavros Sachtouris
179 5c801047 Stavros Sachtouris
Download and run the Windows installer from `here <http://www.python.org/getit>`_
180 5c801047 Stavros Sachtouris
181 5c801047 Stavros Sachtouris
Users should pick the installer that fits their windows version and architecture.
182 5c801047 Stavros Sachtouris
183 5c801047 Stavros Sachtouris
Add python to windows path
184 5c801047 Stavros Sachtouris
""""""""""""""""""""""""""
185 5c801047 Stavros Sachtouris
186 5c801047 Stavros Sachtouris
The following will allow users to run python and python scripts from command line.
187 5c801047 Stavros Sachtouris
188 5c801047 Stavros Sachtouris
* Select **System** from the Control Panel, select the **Advanced** tab, the **Environment Variables** button and then find the **PATH** (user or system) and **edit**
189 5c801047 Stavros Sachtouris
190 b6a99832 Stavros Sachtouris
* Without removing existing values, append the following to PATH::
191 5c801047 Stavros Sachtouris
192 5c801047 Stavros Sachtouris
    C:\Python;C:\Python\Scripts
193 5c801047 Stavros Sachtouris
194 b6a99832 Stavros Sachtouris
.. note:: Path values are separated by semicolons
195 5c801047 Stavros Sachtouris
196 b6a99832 Stavros Sachtouris
.. warning:: C:\\Python should be replaced with the actual python path in the system, e.g. C:\\Python27
197 5c801047 Stavros Sachtouris
198 5c801047 Stavros Sachtouris
Install setuptools
199 5c801047 Stavros Sachtouris
""""""""""""""""""
200 5c801047 Stavros Sachtouris
201 b6a99832 Stavros Sachtouris
According to the corresponding `python org page <http://pypi.python.org/pypi/setuptools>`_, the setuptools installer doesn't currently work on 64bit machines.
202 5c801047 Stavros Sachtouris
203 5c801047 Stavros Sachtouris
* Users with 32-bit operating systems should download and run the graphic installer
204 5c801047 Stavros Sachtouris
205 b6a99832 Stavros Sachtouris
* 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::
206 5c801047 Stavros Sachtouris
207 5c801047 Stavros Sachtouris
    C:\> cd Downloads
208 5c801047 Stavros Sachtouris
    C:\Downloads\> python ez_setup.py
209 5c801047 Stavros Sachtouris
    ...
210 5c801047 Stavros Sachtouris
    Installation finished
211 5c801047 Stavros Sachtouris
    C:\Downloads\>
212 5c801047 Stavros Sachtouris
213 5c801047 Stavros Sachtouris
Install GIT
214 5c801047 Stavros Sachtouris
"""""""""""
215 5c801047 Stavros Sachtouris
216 b6a99832 Stavros Sachtouris
`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.
217 5c801047 Stavros Sachtouris
218 5c801047 Stavros Sachtouris
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.
219 5c801047 Stavros Sachtouris
220 5c801047 Stavros Sachtouris
Install kamaki
221 5c801047 Stavros Sachtouris
""""""""""""""
222 5c801047 Stavros Sachtouris
223 5c801047 Stavros Sachtouris
* Run the GIT standalone shell
224 5c801047 Stavros Sachtouris
225 b6a99832 Stavros Sachtouris
* Enter the location where kamaki will be installed, e.g. **C:\\**
226 5c801047 Stavros Sachtouris
227 b6a99832 Stavros Sachtouris
    .. code-block:: console
228 5c801047 Stavros Sachtouris
229 b6a99832 Stavros Sachtouris
        $ cd /c/
230 5c801047 Stavros Sachtouris
231 5c801047 Stavros Sachtouris
* Download source from GRNET repository
232 5c801047 Stavros Sachtouris
233 b6a99832 Stavros Sachtouris
    .. code-block:: console
234 5c801047 Stavros Sachtouris
235 b6a99832 Stavros Sachtouris
        $ git clone http://code.grnet.gr/git/kamaki
236 b6a99832 Stavros Sachtouris
        Cloning into 'kamaki'...
237 b6a99832 Stavros Sachtouris
        Receiving objects: ...
238 b6a99832 Stavros Sachtouris
        Resolving Deltas: ...
239 5c801047 Stavros Sachtouris
240 5c801047 Stavros Sachtouris
* Enter source and install kamaki
241 5c801047 Stavros Sachtouris
242 b6a99832 Stavros Sachtouris
    .. code-block:: console
243 5c801047 Stavros Sachtouris
244 b6a99832 Stavros Sachtouris
        $ cd kamaki
245 b6a99832 Stavros Sachtouris
        $ python setup.py install
246 b6a99832 Stavros Sachtouris
        running install
247 b6a99832 Stavros Sachtouris
        ...
248 b6a99832 Stavros Sachtouris
        Finished processing dependencies for kamaki==0.6.2
249 5c801047 Stavros Sachtouris
250 5c801047 Stavros Sachtouris
.. warning:: kamaki version should be 0.6.2 or better, otherwise it will not function. Users can test that by running::
251 5c801047 Stavros Sachtouris
252 5c801047 Stavros Sachtouris
    $ kamaki --version