forked from eucalyptus/eucalyptus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
368 lines (268 loc) · 12.7 KB
/
INSTALL
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
===================================
Building and Installing from Source
This is the Eucalyptus process for developers wishing to understand or
modify Eucalyptus source code. It allows them to obtain and build the
Eucalyptus source code into installable packages.
If you instead wish to evaluate Eucalyptus by deploying a small private
cloud on your own machine with a single command, see
http://www.eucalyptus.com/download to download and install the FastStart
package.
If you instead wish to implement a Eucalyptus cloud on multiple systems with
full configurability, from pre-built component packages, refer to the
Eucalyptus documentation at https://docs.eucalyptus.com/eucalyptus/latest/#install-guide/eucalyptus.html
to get started.
===================================
The process consists of:
1. Setting up your Linux environment,
2. Obtaining the source code and dependent github repositories,
3. Installing build dependencies,
4. Building the code from source into RPM packages,
5. Distributing the RPMs to other systems,
6. Installing the RPMs to the build system and other systems,
7. Configuring Eucalyptus, using the Eucalyptus Install Guide,
8. Rebuilding code as needed, and installing rebuilt artifacts.
***NOTE*** The following instructions are subject to change and
may be INCOMPLETE. Contributions encouraged! :)
Eucalyptus only supports 64-bit installations on CentOS/RHEL 7.
These instructions were tested on the "Minimal" distribution of CentOS 7.
We will use the Eucalyptus RPM build process to build the source code,
install it to a certain directory tree, and create the RPM packages. Those
packages will be installed on all systems that will be part of the
Eucalyptus cloud, which can include the build system.
1. Set up the environment
=========================
On each system (build or others), add the following environment variables to
your .bashrc, or another file you can source before executing the
commands that use them.
Pick any directories you wish. Just don't make any nested in any of the
others.
#------------------------
# Get github repositories here
export EUCAGIT=~/euca/git
# Lay out the rpmbuild structure here, for sources, build outputs, and RPMs
export EUCARPM=~/euca/rpmbuild
# Distribute the rpmbuild outputs to other systems here
# Define this on the build system too
export EUCAPKGS=~/euca/pkgs
#------------------------
Log out and in again, or "source <this file>".
Create the directories if they don't already exist:
>>>>> Command 1a:
# mkdir -p $EUCAGIT $EUCAPKGS $EUCARPM/SPECS $EUCARPM/SOURCES
Install the following tools and repos needed for building:
>>>>> Command 1b:
# yum install git yum-utils wget \
http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Install the Eucalyptus repository that will allow yum to find the packages
needed for building Eucalyptus that are not in the other repos. Point your
Web browser to:
http://downloads.eucalyptus.com/software/eucalyptus/nightly/devel
Drill down to find the latest version of the RPM for your desired Linux
platform, for "x86_64" (not "source"). As of this writing, the subdirs "7",
"7Server", and "7Workstation" all point to the same repositories. Look for
the latest version of:
eucalyptus-release-nightly-<...>.rpm
>>>>> Command 1c:
# yum install <that Eucalyptus URL>
Similarly, install the euca2ools repository from:
http://downloads.eucalyptus.com/software/euca2ools/nightly/devel
Drill down to find the latest:
euca2ools-release-nightly-<...>.rpm
>>>>> Command 1d:
# yum install <that euca2ools URL>
If you are setting up a non-build system to install Eucalyptus on, skip the
next build-only steps and proceed to Step 6 (Install Eucalyptus).
2. Get the source code (build system only)
======================
Get the Eucalyptus source code repository:
>>>>> Command 2a:
# git clone https://github.com/eucalyptus/eucalyptus.git $EUCAGIT/eucalyptus
Get the repository containing the RPM build spec and a few other files
needed to build and install the source code:
>>>>> Command 2b:
# git clone https://github.com/eucalyptus/eucalyptus-rpmspec.git $EUCAGIT/eucalyptus-rpmspec
Get the Eucalyptus-specific libraries needed to build and run:
>>>>> Command 2c:
# git clone https://github.com/eucalyptus/eucalyptus-cloud-libs.git $EUCAGIT/eucalyptus-cloud-libs
3. Install build dependencies (build system only)
=============================
Follow these instructions to install the required build dependencies.
Install the general software development build dependencies:
>>>>> Command 3a:
# yum groupinstall development
Install the Eucalyptus-specific build dependencies:
>>>>> Command 3b:
# yum-builddep --nogpgcheck eucalyptus
(The GPG keys are not kept up-to-date for nightly builds, hence the
--nogpgcheck.)
4. Build Eucalyptus (build system only)
===================
We run the rpmbuild command with the Eucalyptus build spec to build the
source code, install it into a destination file tree, and create binary RPMs
that can be installed on this system or any other system that has been
prepared using steps 1-3 above.
Remove any artifacts from the previous rpmbuild:
BE CAREFUL: Make sure $EUCARPM is defined!
>>>>> Command 4a:
# if [ -n "$EUCARPM" ]; then rm -Rf $EUCARPM/*/*; fi
Link to the RPM spec file:
>>>>> Command 4b:
# ln -fs $EUCAGIT/eucalyptus-rpmspec/eucalyptus.spec $EUCARPM/SPECS
Create the tarballs of eucalyptus and the eucalyptus-cloud-libs that
rpmbuild will un-tar and build. We also need the cloud libs installed
at /usr/share/eucalyptus for rpmbuild to find.
>>>>> Commands 4c:
# cd $EUCAGIT && \
autoconf && \
tar -cvJf $EUCARPM/SOURCES/eucalyptus.tar.xz --exclude .git --exclude eucalyptus/clc/lib --exclude build-info.properties eucalyptus
>>>>> (end of commands)
>>>>> Commands 4d:
# cd $EUCAGIT/eucalyptus-cloud-libs && \
tar -cvJf $EUCARPM/SOURCES/eucalyptus-cloud-libs.tar.xz *.jar licenses && \
autoconf && \
./configure --prefix=/usr && \
make clean && make && make install
>>>>> (end of commands)
Now rpmbuild will do all of the build and packaging, in one command:
>>>>> Command 4e:
# rpmbuild --define "_topdir $EUCARPM" --define 'tarball_basedir eucalyptus' --define 'cloud_lib_tarball eucalyptus-cloud-libs.tar.xz' -bb $EUCARPM/SPECS/eucalyptus.spec
5. Distribute the Build (build system only)
=======================
At this point, if you plan to use Eucalyptus on more than one system, you're
ready to push the software out to the other systems.
From the build system, copy the packages to the other systems' hostnames or
IP addresses:
>>>>> Commands 5a: #
# rsync -ar $EUCARPM/RPMS/ root@{host-2}:$EUCAPKGS
# rsync -ar $EUCARPM/RPMS/ root@{host-3}:$EUCAPKGS
...
>>>>> (end of commands)
6. Install and Configure Eucalyptus (on all systems)
===================================
You can now install the Eucalyptus RPMs onto each system.
The Eucalyptus documentation can be found here:
https://docs.eucalyptus.com/
Follow the instructions in the Installation Guide for the following
sections:
- Plan Your Installation
- Configure Dependencies
After completing those sections, install the packages you have built.
Install ALL of the Eucalyptus RPMs even if all the components are not
needed, to prevent dependency problems with Eucalyptus packages that have
the same names but different version numbers in the eucalyptus-nightly
repository. You can still choose which components to configure and run on
each system.
If you are updating an existing deployment, stop all eucalyptus services
before re-installing packages.
For the build system (if you're installing onto it):
>>>>> Command 6a:
# yum install $EUCARPM/RPMS/noarch/* $EUCARPM/RPMS/x86_64/*
Note: If you have rebuilt packages per Step 7 below, the package versions
will likely be the same, so "yum install" will do nothing. To force the
new packages to be updated, you must re-install them:
# yum reinstall $EUCARPM/RPMS/noarch/* $EUCARPM/RPMS/x86_64/*
For all other systems:
>>>>> Command 6a:
# yum install $EUCAPKGS/noarch/* $EUCAPKGS/x86_64/*
Or, if you are updating packages per above:
# yum reinstall $EUCAPKGS/noarch/* $EUCAPKGS/x86_64/*
The yum command may install many other Linux packages on which the
Eucalyptus packages depend.
Continue following the instructions from the Installation Guide, starting at
the "Install Eucalyptus Release Packages" section (NOT the "Install Nightly
Release Packages" section).
Skip the "yum install" commands for what you've already installed:
1. Skip installing the package repositories from downloads.eucalyptus.com.
2. Skip installing these packages, because you installed them already:
eucalyptus-node
eucalyptus-cloud
eucalyptus-cluster
eucalyptus-sc
eucalyptus-walrus
NOTE: There are other "yum install" commands and other steps in the
"Install Eucalyptus Release Packages" sections that you still need to
perform, besides installing Eucalyptus packages, such as removing the
default libvirt network (virsh commands), and "yum install"s of
eucalyptus-service-image and eucaconsole.
Continue the Installation Guide through the "Configure the Runtime
Environment" section.
Your cloud should now be configured and running!
7. Rebuild Eucalyptus (build system only)
=====================
NOTE: Before replacing files on installed systems, stop any Eucalyptus
services or processes that may be using them. Then restart them after the
files have been replaced. If you are unclear what to stop and restart,
refer to the Installation Guide sections "Shutdown Services" and
"Restart Eucalyptus Services".
NOTE: The following steps require that the above rpmbuild process be
performed at least once, and the resulting RPMs be installed at least once
onto any system you intend to update with rebuilt artifacts (including the
build system).
To rebuild code after changing it, you can either:
1. Repeat step 4, using rpmbuild. Then, you can then either:
1a. Copy the RPM packages you've changed to the installed systems, and
re-install them.
1b. Or, copy individual jars or executables (or other built artifacts)
from the $EUCARPM/BUILD directory tree to the installed systems,
replacing those files.
2. Or, you can build the code using "make", without rpmbuild. Then, you can
copy individual jars or executables (or other built artifacts) built by
"make" to the installed systems, replacing those files.
Non-rpmbuild rebuilds (option 2)
---------------------
If you choose this option, add the following environment variable to your
.bashrc, or another file you can source before executing the commands that
use them.
export EUCALYPTUS=/
Do not use any other directory besides "/", or neither "make" nor "rpmbuild"
will work. Future "rpmbuild"s will continue to work as long as it's defined
this way.
Run the "configure" scripts to prepare the system to build:
>>>>> Commands 8a:
# cd $EUCAGIT/eucalyptus-cloud-libs
# autoconf
# ./configure --prefix=/usr
# cd $EUCAGIT/eucalyptus
# autoconf
# ./configure --prefix=$EUCALYPTUS \
--disable-bundled-jars \
--with-apache2-module-dir=/usr/lib64/httpd/modules \
--with-axis2==/usr/share/axis2-* \
--with-axis2c=/usr/lib64/axis2c \
--with-db-home=/usr
Run the "make" commands below. The "make clean" deletes the artifacts from
any previous build. The "make" builds the artifacts, in the
$EUCAGIT/eucalyptus tree. The "make install" of eucalyptus-cloud-libs
is required for the eucalyptus "make" to find the cloud libraries at
/usr/share/eucalyptus, because --disable-bundled-jars was supplied to
the configure command. Without it, the "make" of eucalyptus will download
the "master" branch of the cloud libs from github, regardless of the branch
you're building, which would be incorrect if you're not building "master".
>>>>> Command 8b:
# cd $EUCAGIT/eucalyptus-cloud-libs
# make clean && make && make install
# cd $EUCAGIT/eucalyptus
# make clean && make
The next "make install" command copies the built artifacts into their runtime
destination directories on this build system, overwriting any files already
installed by package-based installs.
If your build system is also an installed system as part of your running
cloud, the following step will update all necessary files. If your build
system is not part of your cloud, skip this step.
If you only want to update a few artifact files (such as a .jar file) onto
your installed systems, you can skip the following step, and instead copy
those files from the $EUCAGIT/eucalyptus-cloud-libs and/or
$EUCAGIT/eucalyptus trees to their proper destination directories on the
installed systems.
>>>>> Commands 8c: (optional)
# cd $EUCAGIT/eucalyptus
# make install
>>>>> (end of commands)
NOTE: If you do a non-rpmbuild (option 2), and later wish to do an rpmbuild
(option 1), remove all make artifacts from the non-rpmbuild before doing the
rpmbuild:
>>>>> Commands 8d:
# cd $EUCAGIT/eucalyptus
# make distclean
>>>>> (end of commands)
(End)