e1046165cf57fb45313fa0aad4aa927c7dbe6c31
[snf-image-creator] / docs / install.rst
1 Installation
2 ^^^^^^^^^^^^
3
4 This guide describes how to install snf-image-creator on an Ubuntu 12.04 LTS
5 system. It it highly recommended to have virtualization capable hardware.
6 snf-image-creator will work on processors that do not support virtualization
7 but it will be extremely slow.
8
9 Dependencies
10 ============
11
12 snf-image-creator depends on the following programs:
13
14  * Python 2 [http://www.python.org/]
15  * Python setuptools [http://pypi.python.org/pypi/setuptools]
16  * Python Dialog [http://pythondialog.sourceforge.net/]
17  * Python bindings for libguestfs [http://libguestfs.org/]
18  * Kamaki [https://code.grnet.gr/projects/kamaki]
19  * Python sh (previously pbs) [https://github.com/amoffat/sh]
20  * ANSI colors for Python [http://pypi.python.org/pypi/ansicolors]
21  * progress [http://pypi.python.org/pypi/progress]
22  * Python interface to sendfile [http://pypi.python.org/pypi/pysendfile]
23
24 The first four programs (python2, setuptools, Python-Dialog, and libguestfs)
25 need to be installed manually by the user. In an Ubuntu 12.04 LTS system this
26 can be achieved by installing packages provided by the distribution, using the
27 following command:
28
29 .. code-block:: console
30
31    $ apt-get install python-setuptools python-guestfs python-dialog \
32      python-gevent python-dev
33
34 The rest of the dependencies will be automatically resolved by setuptools.
35 Keep in mind though that git needs to be installed to download the source
36 files. You can use the following command:
37
38 .. code-block:: console
39
40    $ apt-get install git
41
42 Python Virtual Environment
43 ==========================
44
45 Since snf-image-creator and the rest of it's dependencies won't be installed
46 using packages, it's better to work in an isolated python virtual environment
47 (virtualenv). Installing the Virtual Python Environment builder in Ubuntu can
48 be accomplished using the following command:
49
50 .. code-block:: console
51
52    $ apt-get install python-virtualenv
53
54 Now, create a new python virtual environment like this:
55
56 .. code-block:: console
57
58    $ virtualenv --system-site-packages ~/image-creator-env
59
60 and activate it by executing:
61
62 .. code-block:: console
63
64    $ source ~/image-creator-env/bin/activate
65
66 You can later deactivate it using the following command:
67
68 .. code-block:: console
69
70    $ deactivate
71
72
73 snf-common Installation
74 =======================
75
76 Install snf-common from source, by cloning it's repository:
77
78 .. code-block:: console
79
80    $ cd ~
81    $ git clone https://code.grnet.gr/git/synnefo
82    $ cd synnefo/snf-common
83    $ python setup.py build
84
85 Then, make sure you are within the activated virtual environment before you
86
87 .. code-block:: console
88
89    $ python setup.py install
90
91 kamaki Installation
92 ===================
93
94 Install kamaki from source, by cloning it's repository:
95
96 .. code-block:: console
97
98    $ cd ~
99    $ git clone https://code.grnet.gr/git/kamaki
100    $ cd kamaki
101    $ ./setup.py build
102
103 As above, make sure you are within the activated virtual environment before you
104 execute:
105
106 .. code-block:: console
107
108    $ ./setup.py install
109
110 snf-image-creator Installation
111 ==============================
112
113 Install snf-image-creator the same way:
114
115 .. code-block:: console
116
117    $ cd ~
118    $ git clone https://code.grnet.gr/git/snf-image-creator
119    $ git checkout stable-0.1
120    $ cd snf-image-creator
121    $ ./setup.py build
122
123 And from within the virtual environment execute:
124
125 .. code-block:: console
126
127    $ ./setup.py install