Statistics
| Branch: | Tag: | Revision:

root / docs / installation.rst @ 95a11486

History | View | Annotate | Download (6.8 kB)

1
Installation
2
============
3

    
4
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

    
6

    
7
* Kamaki repository: `http://code.grnet.gr/git/kamaki <http://code.grnet.gr/git/kamaki>`_
8

    
9
* Synnefo Linux packages: `http://apt2.dev.grnet.gr <http://apt2.dev.grnet.gr>`_
10

    
11
Linux and Unix-like enviroments
12
-------------------------------
13

    
14
Debian:
15
^^^^^^^
16

    
17
The following steps describe a command-line approach, but any graphic package manager can be used instead.
18

    
19
* As root, append the following to */etc/apt/sources.list* ::
20

    
21
    deb http://apt2.dev.grnet.gr stable/
22

    
23
* Make sure the GPG public key for the GRNET dev team is added:
24

    
25
    .. code-block:: console
26

    
27
        $ sudo curl https://dev.grnet.gr/files/apt-grnetdev.pub|apt-key add -
28

    
29
    otherwise *apt-get update* will produce GPG warnings.
30

    
31
* Update the Debian sources:
32

    
33
    .. code-block:: console
34

    
35
        $ sudo apt-get update
36

    
37
* Install kamaki:
38

    
39
    .. code-block:: console
40

    
41
        $ sudo apt-get install kamaki
42

    
43
Ubuntu
44
^^^^^^
45

    
46
The following steps describe a command-line approach, but any graphic package manager can be used instead.
47

    
48
* Let ppa take care of the repository configuration:
49

    
50
    .. code-block:: console
51

    
52
        $ sudo apt-get install python-software-properties
53
        $ sudo add-apt-repository ppa:grnet/synnefo
54

    
55
* Update the Debian sources:
56

    
57
    .. code-block:: console
58

    
59
        $ sudo apt-get update
60

    
61
* Install kamaki:
62

    
63
    .. code-block:: console
64

    
65
        $ sudo apt-get install kamaki
66

    
67
Install ansicolors and/or progress (Optional but recommended)
68
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
69

    
70
.. code-block:: console
71

    
72
    $ sudo apt-get install python-ansicolors
73
    $ sudo apt-get install python-progress
74

    
75
.. _installing-from-source-ref:
76

    
77
Installing from source (git repos.)
78
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
79

    
80
Requirements
81
""""""""""""
82

    
83
Essential:
84

    
85
 * Python 2.6 or better [http://www.python.org]
86
 * Python setuptools [http://pypi.python.org/pypi/setuptools]
87

    
88
Optional:
89

    
90
 * VirtualEnv (python-virtualenv) [http://www.virtualenv.org]
91

    
92
Setup a virtual enviroment (optional)
93
"""""""""""""""""""""""""""""""""""""
94

    
95
With virtualenv users can setup kamaki and synnefo services in a sandbox environment.
96

    
97
.. code-block:: console
98

    
99
    $ virtualenv kamaki-env
100
    $ source kamaki-env/bin/activate
101

    
102
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>`_
103

    
104
Install objpool (was: snf-common)
105
"""""""""""""""""""""""""""""""""
106

    
107
Kamaki is based on python-objpool. The objpool package is easy to install from source, even on windows platforms:
108

    
109
.. code-block:: console
110

    
111
    $ git clone http://code.grnet.gr/git/objpool
112
    $ cd objpool
113
    $ ./setup build install
114
    $ cd -
115

    
116
Install kamaki
117
""""""""""""""
118

    
119
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:
120

    
121
.. code-block:: console
122

    
123
    $ tar xvfz kamaki-0.7.tar.gz
124

    
125
or it can be downloaded directly from the git repository:
126

    
127
.. code-block:: console
128

    
129
    $ git clone http://code.grnet.gr/git/kamaki
130

    
131
and then installed by the setup script:
132

    
133
.. code-block:: console
134

    
135
    $ cd kamaki
136
    $ ./setup build install
137

    
138
Install progress and/or ansicolors (optional)
139
"""""""""""""""""""""""""""""""""""""""""""""
140

    
141
progress: command-line progress bars (in some commands)
142

    
143
ansicolors: color kamaki output (can switched on and off in `setup <setup.html>`_)
144

    
145
.. code-block:: console
146

    
147
    $ pip install progress
148
    $ pip install ansicolors
149

    
150
Mac OS X
151
--------
152

    
153
Kamaki can be installed on Mac OS X systems from source, by following the steps at :ref:`installing-from-source-ref`.
154

    
155
Windows
156
-------
157

    
158
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
159

    
160
Requirements
161
^^^^^^^^^^^^
162

    
163
* Python 2.7 or better (`Official versions <http://www.python.org/getit>`_)
164

    
165
* Git (download `windows version <http://git-scm.com/download/win>`_)
166

    
167
* Setuptools (`Official versions and workarounds <http://pypi.python.org/pypi/setuptools>`_)
168

    
169
Installation from source
170
^^^^^^^^^^^^^^^^^^^^^^^^
171

    
172
Install python
173
""""""""""""""
174

    
175
Download and run the Windows installer from `here <http://www.python.org/getit>`_
176

    
177
Users should pick the installer that fits their windows version and architecture.
178

    
179
Add python to windows path
180
""""""""""""""""""""""""""
181

    
182
The following will allow users to run python and python scripts from command line.
183

    
184
* Select **System** from the Control Panel, select the **Advanced** tab, the **Environment Variables** button and then find the **PATH** (user or system) and **edit**
185

    
186
* Without removing existing values, append the following to PATH::
187

    
188
    C:\Python;C:\Python\Scripts
189

    
190
.. note:: Path values are separated by semicolons
191

    
192
.. warning:: C:\\Python should be replaced with the actual python path in the system, e.g. C:\\Python27
193

    
194
Install setuptools
195
""""""""""""""""""
196

    
197
According to the corresponding `python org page <http://pypi.python.org/pypi/setuptools>`_, the setuptools installer doesn't currently work on 64bit machines.
198

    
199
* Users with 32-bit operating systems should download and run the graphic installer
200

    
201
* 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::
202

    
203
    C:\> cd Downloads
204
    C:\Downloads\> python ez_setup.py
205
    ...
206
    Installation finished
207
    C:\Downloads\>
208

    
209
Install GIT
210
"""""""""""
211

    
212
`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.
213

    
214
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.
215

    
216
Install kamaki
217
""""""""""""""
218

    
219
* Run the GIT standalone shell
220

    
221
* Enter the location where kamaki will be installed, e.g. **C:\\**
222

    
223
    .. code-block:: console
224

    
225
        $ cd /c/
226

    
227
* Download source from GRNET repository
228

    
229
    .. code-block:: console
230

    
231
        $ git clone http://code.grnet.gr/git/kamaki
232
        Cloning into 'kamaki'...
233
        Receiving objects: ...
234
        Resolving Deltas: ...
235

    
236
* Enter source and install kamaki
237

    
238
    .. code-block:: console
239

    
240
        $ cd kamaki
241
        $ python setup.py install
242
        running install
243
        ...
244
        Finished processing dependencies for kamaki==0.7
245

    
246
    $ kamaki --version