4146ececf759a0ce8e50def5cb90f5656bd97b2e
[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
33 The rest of the dependencies will be automatically resolved by setuptools.
34 Keep in mind though that git needs to be installed to download the source
35 files. You can use the following command:
36
37 .. code-block:: console
38
39    $ apt-get install git
40
41 Python Virtual Environment
42 ==========================
43
44 Since snf-image-creator and the rest of it's dependencies won't be installed
45 using packages, it's better to work in an isolated python virtual environment
46 (virtualenv). Installing the Virtual Python Environment builder in Ubuntu can
47 be accomplished using the following command:
48
49 .. code-block:: console
50
51    $ apt-get install python-virtualenv
52
53 Now, create a new python virtual environment like this:
54
55 .. code-block:: console
56
57    $ virtualenv --system-site-packages ~/image-creator-env
58
59 and activate it by executing:
60
61 .. code-block:: console
62
63    $ source ~/image-creator-env/bin/activate
64
65 You can later deactivate it using the following command:
66
67 .. code-block:: console
68
69    $ deactivate
70
71
72 snf-common Installation
73 =======================
74
75 Install snf-common from source, by cloning it's repository:
76
77 .. code-block:: console
78
79    $ cd ~
80    $ git clone https://code.grnet.gr/git/synnefo
81    $ cd synnefo/snf-common
82    $ python setup.py build
83
84 Then, make sure you are within the activated virtual environment before you
85
86 .. code-block:: console
87
88    $ python setup.py install
89
90 kamaki Installation
91 ===================
92
93 Install kamaki from source, by cloning it's repository:
94
95 .. code-block:: console
96
97    $ cd ~
98    $ git clone https://code.grnet.gr/git/kamaki
99    $ cd kamaki
100    $ ./setup.py build
101
102 As above, make sure you are within the activated virtual environment before you
103 execute:
104
105 .. code-block:: console
106
107    $ ./setup.py install
108
109 snf-image-creator Installation
110 ==============================
111
112 Install snf-image-creator the same way:
113
114 .. code-block:: console
115
116    $ cd ~
117    $ git clone https://code.grnet.gr/git/snf-image-creator
118    $ git checkout stable-0.1
119    $ cd snf-image-creator
120    $ ./setup.py build
121
122 And from within the virtual environment execute:
123
124 .. code-block:: console
125
126    $ ./setup.py install