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