"Fossies" - the Fresh Open Source Software Archive 
Member "eucalyptus-4.4.2/INSTALL" (4 Aug 2017, 12461 Bytes) of package /linux/misc/eucalyptus-4.4.2.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
See also the latest
Fossies "Diffs" side-by-side code changes report for "INSTALL":
4.4.1_vs_4.4.2.
1 ===================================
2 Building and Installing from Source
3
4 This is the Eucalyptus process for developers wishing to understand or
5 modify Eucalyptus source code. It allows them to obtain and build the
6 Eucalyptus source code into installable packages.
7
8 If you instead wish to evaluate Eucalyptus by deploying a small private
9 cloud on your own machine with a single command, see
10 http://www.eucalyptus.com/download to download and install the FastStart
11 package.
12
13 If you instead wish to implement a Eucalyptus cloud on multiple systems with
14 full configurability, from pre-built component packages, refer to the
15 Eucalyptus documentation at https://docs.eucalyptus.com/eucalyptus/latest/#install-guide/eucalyptus.html
16 to get started.
17 ===================================
18
19 The process consists of:
20 1. Setting up your Linux environment,
21 2. Obtaining the source code and dependent github repositories,
22 3. Installing build dependencies,
23 4. Building the code from source into RPM packages,
24 5. Distributing the RPMs to other systems,
25 6. Installing the RPMs to the build system and other systems,
26 7. Configuring Eucalyptus, using the Eucalyptus Install Guide,
27 8. Rebuilding code as needed, and installing rebuilt artifacts.
28
29 ***NOTE*** The following instructions are subject to change and
30 may be INCOMPLETE. Contributions encouraged! :)
31
32 Eucalyptus only supports 64-bit installations on CentOS/RHEL 7.
33
34 These instructions were tested on the "Minimal" distribution of CentOS 7.
35
36 We will use the Eucalyptus RPM build process to build the source code,
37 install it to a certain directory tree, and create the RPM packages. Those
38 packages will be installed on all systems that will be part of the
39 Eucalyptus cloud, which can include the build system.
40
41
42 1. Set up the environment
43 =========================
44
45 On each system (build or others), add the following environment variables to
46 your .bashrc, or another file you can source before executing the
47 commands that use them.
48
49 Pick any directories you wish. Just don't make any nested in any of the
50 others.
51
52 #------------------------
53 # Get github repositories here
54 export EUCAGIT=~/euca/git
55
56 # Lay out the rpmbuild structure here, for sources, build outputs, and RPMs
57 export EUCARPM=~/euca/rpmbuild
58
59 # Distribute the rpmbuild outputs to other systems here
60 # Define this on the build system too
61 export EUCAPKGS=~/euca/pkgs
62 #------------------------
63
64 Log out and in again, or "source <this file>".
65
66 Create the directories if they don't already exist:
67
68 >>>>> Command 1a:
69 # mkdir -p $EUCAGIT $EUCAPKGS $EUCARPM/SPECS $EUCARPM/SOURCES
70
71 Install the following tools and repos needed for building:
72
73 >>>>> Command 1b:
74 # yum install git yum-utils wget \
75 http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
76
77 Install the Eucalyptus repository that will allow yum to find the packages
78 needed for building Eucalyptus that are not in the other repos. Point your
79 Web browser to:
80 http://downloads.eucalyptus.com/software/eucalyptus/nightly/devel
81
82 Drill down to find the latest version of the RPM for your desired Linux
83 platform, for "x86_64" (not "source"). As of this writing, the subdirs "7",
84 "7Server", and "7Workstation" all point to the same repositories. Look for
85 the latest version of:
86
87 eucalyptus-release-nightly-<...>.rpm
88
89 >>>>> Command 1c:
90 # yum install <that Eucalyptus URL>
91
92 Similarly, install the euca2ools repository from:
93 http://downloads.eucalyptus.com/software/euca2ools/nightly/devel
94 Drill down to find the latest:
95 euca2ools-release-nightly-<...>.rpm
96
97 >>>>> Command 1d:
98 # yum install <that euca2ools URL>
99
100 If you are setting up a non-build system to install Eucalyptus on, skip the
101 next build-only steps and proceed to Step 6 (Install Eucalyptus).
102
103
104 2. Get the source code (build system only)
105 ======================
106
107 Get the Eucalyptus source code repository:
108
109 >>>>> Command 2a:
110 # git clone https://github.com/eucalyptus/eucalyptus.git $EUCAGIT/eucalyptus
111
112 Get the repository containing the RPM build spec and a few other files
113 needed to build and install the source code:
114
115 >>>>> Command 2b:
116 # git clone https://github.com/eucalyptus/eucalyptus-rpmspec.git $EUCAGIT/eucalyptus-rpmspec
117
118 Get the Eucalyptus-specific libraries needed to build and run:
119
120 >>>>> Command 2c:
121 # git clone https://github.com/eucalyptus/eucalyptus-cloud-libs.git $EUCAGIT/eucalyptus-cloud-libs
122
123
124 3. Install build dependencies (build system only)
125 =============================
126
127 Follow these instructions to install the required build dependencies.
128
129 Install the general software development build dependencies:
130
131 >>>>> Command 3a:
132 # yum groupinstall development
133
134 Install the Eucalyptus-specific build dependencies:
135
136 >>>>> Command 3b:
137 # yum-builddep --nogpgcheck eucalyptus
138 (The GPG keys are not kept up-to-date for nightly builds, hence the
139 --nogpgcheck.)
140
141
142 4. Build Eucalyptus (build system only)
143 ===================
144
145 We run the rpmbuild command with the Eucalyptus build spec to build the
146 source code, install it into a destination file tree, and create binary RPMs
147 that can be installed on this system or any other system that has been
148 prepared using steps 1-3 above.
149
150 Remove any artifacts from the previous rpmbuild:
151
152 BE CAREFUL: Make sure $EUCARPM is defined!
153 >>>>> Command 4a:
154 # if [ -n "$EUCARPM" ]; then rm -Rf $EUCARPM/*/*; fi
155
156 Link to the RPM spec file:
157
158 >>>>> Command 4b:
159 # ln -fs $EUCAGIT/eucalyptus-rpmspec/eucalyptus.spec $EUCARPM/SPECS
160
161 Create the tarballs of eucalyptus and the eucalyptus-cloud-libs that
162 rpmbuild will un-tar and build:
163
164 >>>>> Commands 4c:
165 # cd $EUCAGIT && \
166 tar -cvJf $EUCARPM/SOURCES/eucalyptus.tar.xz --exclude .git --exclude eucalyptus/clc/lib --exclude build-info.properties eucalyptus
167 >>>>> (end of commands)
168
169 >>>>> Commands 4d:
170 # cd $EUCAGIT/eucalyptus-cloud-libs && \
171 tar -cvJf $EUCARPM/SOURCES/eucalyptus-cloud-libs.tar.xz *.jar licenses
172 >>>>> (end of commands)
173
174 Now rpmbuild will do all of the build and packaging, in one command:
175
176 >>>>> Command 4e:
177 # rpmbuild --define "_topdir $EUCARPM" --define 'tarball_basedir eucalyptus' --define 'cloud_lib_tarball eucalyptus-cloud-libs.tar.xz' -bb $EUCARPM/SPECS/eucalyptus.spec
178
179
180 5. Distribute the Build (build system only)
181 =======================
182
183 At this point, if you plan to use Eucalyptus on more than one system, you're
184 ready to push the software out to the other systems.
185
186 From the build system, copy the packages to the other systems' hostnames or
187 IP addresses:
188
189 >>>>> Commands 5a: #
190 # rsync -ar $EUCARPM/RPMS/ root@{host-2}:$EUCAPKGS
191 # rsync -ar $EUCARPM/RPMS/ root@{host-3}:$EUCAPKGS
192 ...
193 >>>>> (end of commands)
194
195
196 6. Install and Configure Eucalyptus (on all systems)
197 ===================================
198
199 You can now install the Eucalyptus RPMs onto each system.
200 The Eucalyptus documentation can be found here:
201 https://docs.eucalyptus.com/
202
203 Follow the instructions in the Installation Guide for the following
204 sections:
205
206 - Plan Your Installation
207 - Configure Dependencies
208
209 After completing those sections, install the packages you have built.
210 Install ALL of the Eucalyptus RPMs even if all the components are not
211 needed, to prevent dependency problems with Eucalyptus packages that have
212 the same names but different version numbers in the eucalyptus-nightly
213 repository. You can still choose which components to configure and run on
214 each system.
215
216 If you are updating an existing deployment, stop all eucalyptus services
217 before re-installing packages.
218
219 For the build system (if you're installing onto it):
220
221 >>>>> Command 6a:
222 # yum install $EUCARPM/RPMS/noarch/* $EUCARPM/RPMS/x86_64/*
223 Note: If you have rebuilt packages per Step 7 below, the package versions
224 will likely be the same, so "yum install" will do nothing. To force the
225 new packages to be updated, you must re-install them:
226 # yum reinstall $EUCARPM/RPMS/noarch/* $EUCARPM/RPMS/x86_64/*
227
228 For all other systems:
229
230 >>>>> Command 6a:
231 # yum install $EUCAPKGS/noarch/* $EUCAPKGS/x86_64/*
232 Or, if you are updating packages per above:
233 # yum reinstall $EUCAPKGS/noarch/* $EUCAPKGS/x86_64/*
234
235 The yum command may install many other Linux packages on which the
236 Eucalyptus packages depend.
237
238 Continue following the instructions from the Installation Guide, starting at
239 the "Install Eucalyptus Release Packages" section (NOT the "Install Nightly
240 Release Packages" section).
241
242 Skip the "yum install" commands for what you've already installed:
243 1. Skip installing the package repositories from downloads.eucalyptus.com.
244 2. Skip installing these packages, because you installed them already:
245 eucalyptus-node
246 eucalyptus-cloud
247 eucalyptus-cluster
248 eucalyptus-sc
249 eucalyptus-walrus
250
251 NOTE: There are other "yum install" commands and other steps in the
252 "Install Eucalyptus Release Packages" sections that you still need to
253 perform, besides installing Eucalyptus packages, such as removing the
254 default libvirt network (virsh commands), and "yum install"s of
255 eucalyptus-service-image and eucaconsole.
256
257 Continue the Installation Guide through the "Configure the Runtime
258 Environment" section.
259
260 Your cloud should now be configured and running!
261
262
263 7. Rebuild Eucalyptus (build system only)
264 =====================
265
266 NOTE: Before replacing files on installed systems, stop any Eucalyptus
267 services or processes that may be using them. Then restart them after the
268 files have been replaced. If you are unclear what to stop and restart,
269 refer to the Installation Guide sections "Shutdown Services" and
270 "Restart Eucalyptus Services".
271
272 NOTE: The following steps require that the above rpmbuild process be
273 performed at least once, and the resulting RPMs be installed at least once
274 onto any system you intend to update with rebuilt artifacts (including the
275 build system).
276
277 To rebuild code after changing it, you can either:
278
279 1. Repeat step 4, using rpmbuild. Then, you can then either:
280
281 1a. Copy the RPM packages you've changed to the installed systems, and
282 re-install them.
283
284 1b. Or, copy individual jars or executables (or other built artifacts)
285 from the $EUCARPM/BUILD directory tree to the installed systems,
286 replacing those files.
287
288 2. Or, you can build the code using "make", without rpmbuild. Then, you can
289 copy individual jars or executables (or other built artifacts) built by
290 "make" to the installed systems, replacing those files.
291
292 Non-rpmbuild rebuilds (option 2)
293 ---------------------
294
295 If you choose this option, add the following environment variable to your
296 .bashrc, or another file you can source before executing the commands that
297 use them.
298
299 export EUCALYPTUS=/
300
301 Do not use any other directory besides "/", or neither "make" nor "rpmbuild"
302 will work. Future "rpmbuild"s will continue to work as long as it's defined
303 this way.
304
305 Run the "configure" scripts to prepare the system to build:
306
307 >>>>> Commands 8a:
308 # cd $EUCAGIT/eucalyptus-cloud-libs
309 # autoconf
310 # ./configure --prefix=/usr
311 # cd $EUCAGIT/eucalyptus
312 # ./configure --prefix=$EUCALYPTUS \
313 --disable-bundled-jars \
314 --with-apache2-module-dir=/usr/lib64/httpd/modules \
315 --with-axis2==/usr/share/axis2-* \
316 --with-axis2c=/usr/lib64/axis2c \
317 --with-db-home=/usr
318
319 Run the "make" commands below. The "make clean" deletes the artifacts from
320 any previous build. The "make" builds the artifacts, in the
321 $EUCAGIT/eucalyptus tree.
322
323 >>>>> Command 8b:
324 # cd $EUCAGIT/eucalyptus-cloud-libs
325 # make clean && make
326 # cd $EUCAGIT/eucalyptus
327 # make clean && make
328
329 The next "make install" commands copy the built artifacts into their runtime
330 destination directories on this build system, overwriting any files already
331 installed by package-based installs.
332
333 If your build system is also an installed system as part of your running
334 cloud, the following step will update all necessary files. If your build
335 system is not part of your cloud, skip this step.
336
337 If you only want to update a few artifact files (such as a .jar file) onto
338 your installed systems, you can skip the following step, and instead copy
339 those files from the $EUCAGIT/eucalyptus-cloud-libs and/or
340 $EUCAGIT/eucalyptus trees to their proper destination directories on the
341 installed systems.
342
343 >>>>> Commands 8c: (optional)
344 If any files in your local eucalyptus-cloud-libs repo have changed:
345 # cd $EUCAGIT/eucalyptus-cloud-libs
346 # make install
347 Always:
348 # cd $EUCAGIT/eucalyptus
349 # make install
350
351 NOTE: If you do a non-rpmbuild (option 2), and later wish to do an rpmbuild
352 (option 1), remove all make artifacts from the non-rpmbuild before doing the
353 rpmbuild:
354
355 >>>>> Commands 8d:
356 # cd $EUCAGIT/eucalyptus
357 # make distclean
358 >>>>> (end of commands)
359
360 (End)