forked from scality/Cloud-Migration-Tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL.txt
169 lines (123 loc) · 6.07 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
## Copyright (c) 2011, David Pineau
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions are met:
## * Redistributions of source code must retain the above copyright
## notice, this list of conditions and the following disclaimer.
## * Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimer in the
## documentation and/or other materials provided with the distribution.
## * Neither the name of the copyright holder nor the names of its contributors
## may be used to endorse or promote products derived from this software
## without specific prior written permission.
##
## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
## AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
## IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
## ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER AND CONTRIBUTORS BE
## LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
## POSSIBILITY OF SUCH DAMAGE.
################################################################################
#
# cloudmig BUILDING INSTRUCTIONS
#
################################################################################
I - Requirements
a) Building Tools
Two tools are required in order to build the tool :
- cmake (minimum version: 2.4)
- C compiler (support of the c99 standard needed)
b) Library dependencies
In order to build the cloud migration tool, you will need to have installed :
- libdroplet (depends on libXml2)
- libcurses
- libmenu
II - Building the tool
a) Setup using CMake
As cmake searches and sets most of the information it needs, you may not have
anything to setup beforehand if your cmake version is properly installed. That
being said, some cmake variables are setup to help personalize the build,
depending on your build environment (those are all facultative):
- DROPLET_PATH (the path of droplet installation: helps finding it)
- MENU_PATH (the path of libmenu : helps finding it)
- CLDMIG_INSTALL_PREFIX (the installation directory for 'make install')
- CLDMIG_PKG_TYPE (the type of package to build with 'make package')
These cmake variables are to be defined when typing the cmake command with the
-D option :
$> cmake -D THE_VARIABLE=the_value -D ANOTHER_VARIABLE=the_other_value
In order to keep the source directory clean while building, we advice to create
a build directory wherever you want. Then go into it and launch the cmake tool
with the source directory root's path as an argument. Here is an example :
$> pwd
/home/$USER/downloads/cloudmig
$> mkdir build
$> cd build
$> cmake ..
If the cmake command outputs any error, then you may be missing a dependency.
Read carefully cmake's output, and you should be able to understand which you
are missing.
b) Compiling the tool
If the cmake tool did not output any error then the only thing left to do is
to launch the make utility. Here's the example :
$> pwd
/home/$USER/downloads/cloudmig/build
$> make
The binary of both the tool(cloudmig) and its viewer(cloudmig-view) will be
place in the bin/ directory of your build root.
################################################################################
#
# cloudmig INSTALLATION INSTRUCTIONS
#
################################################################################
III - Installing from the source
a) CMake setup
For the installation process, you may want to define some cmake variables
allowing to setup a different installation path. The cmake variable
CLDMIG_INSTALL_PREFIX can be defined for this use through the cmake -D option
(see I - a for more details). By default, the install prefix is /usr/local/.
b) Installation
Now that everything is setup correctly, you can build the tool with the command
make and then install it with administrator privileges if the prefix you setup
is a system-wide path (like /usr or /usr/local). Otherwise, you only have to
type the command 'make install':
$> make
...
$> make install
...
Now, it's done ! The manpages for both tools (cloudmig and cloudmig-view) are
installed with the tools !
IV - Installing from the packages
a) Packages available
The distributed packages will install the files into the /usr directory. If you
want to install the tool within a different directory, the packages must be
built from the source, while defining the CMake variable CLDMIG_INSTALL_PREFIX.
Currently, two packages are available :
- A deb package;
- A rpm package.
b) Building your own package
In order to build your own package from the source (that may be in order to be
able to delete the source directory and still be able to uninstall the tool
whenever you want), you must first follow the steps for building, and you
may want to define the CMake variable CLDMIG_INSTALL_PREFIX in order for the
package to install the files somewhere other than in /usr. For example :
$> cmake -D CLDMIG_INSTALL_PREFIX=/usr/local ..
This will setup CMake to build a package that will install its files into the
/usr/local directory.
All that is left is to build the package itself with the make command and you
will be ready to install or distribute it :
$> make package.
c) Installing with a package
DEB package:
Type the command 'dpkg -i the_package.deb' as an administrator and
everything will be done for you. For example:
$> sudo dpkg -i cloudmig-1.0.0-Linux.deb
RPM package:
Type the command 'rpm -i the_package.deb' as an administrator and
everything will be done for you. For example:
$> sudo rpm -i cloudmig-1.0.0-Linux.rpm