Skip to content
372 lines (257 sloc) 12.2 KB
This is the Eucalyptus process for:
1. Setting up your Linux environment,
2. Obtaining the source code and dependent github repositories,
3. Installing build and runtime 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 v6.7.
These instructions were tested on the "Minimal" distribution of CentOS v6.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
# 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
# Put the build artifacts from "make install" here.
# Only for non-rpmbuild direct "make install" commands.
export EUCALYPTUS=~/euca/built
# Define the required JAVA environment variables
# (Verify these are correct for your system)
export JAVA_HOME="/usr/lib/jvm/java-1.7.0/"
export JAVA="$JAVA_HOME/bin/java"
Log out and in again, or "source <this file>".
Create the directories if they don't already exist:
>>>>> Command 1a:
Install the following tools and repos needed for building:
>>>>> Command 1b:
# yum install git yum-utils wget \ \
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:
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 "6",
"6Server", and "6Workstation" all point to the same repositories. Look for
the latest version of:
>>>>> Command 1c:
# yum install <that URL>
Similarly, install the euca2ools repository from:
Drill down to find the latest:
>>>>> Command 1d:
# yum install <that URL>
2. Get the source code
If you are setting up a non-build system to install Eucalyptus on, skip this
Get the Eucalyptus source code repository:
>>>>> Command 2a:
# git clone $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 $EUCAGIT/eucalyptus-rpmspec
Get the Eucalyptus-specific libraries needed to build and run:
>>>>> Command 2c:
# git clone $EUCAGIT/eucalyptus-cloud-libs
3. Install dependencies
If you are setting up a non-build system to install Eucalyptus on, finish
all steps on the build system through step 5 before performing this step on
the non-build systems.
Follow these instructions to install required build and run-time dependencies.
Install the general software development build dependencies:
>>>>> Command 3a:
# yum groupinstall development
Install the Eucalyptus-specific build dependencies:
(The GPG keys are not kept up-to-date for nightly builds.)
>>>>> Command 3b:
# yum-builddep --nogpgcheck eucalyptus
Install the Eucalyptus-specific runtime dependencies. This is the superset
of all dependencies. Not all may be required for every component. You
install them in one of two ways:
If you are setting up the build system:
The list of RPMs is parsed from the "Requires:" lines of the RPM spec
file. We save it to a file so we can use it on other systems later.
>>>>> Command 3c:
# grep -i '^Requires\:' $EUCAGIT/eucalyptus-rpmspec/eucalyptus.spec | sed -e 's/^Requires: *//' -e 's/\%.*//' | cut -d ' ' -f 1 | sort | uniq | grep -v euca | tr '\n' ' ' > $EUCAGIT/eucalyptus-rpmspec/eucalyptus_rundep
Install the runtime dependencies:
>>>>> Command 3d:
# cat $EUCAGIT/eucalyptus-rpmspec/eucalyptus_rundep | xargs yum -y install
If you are setting up the other systems:
This step is for all other systems on which you will install the packages
built on the build system. Do the following only after the packages have
been built on the build system (through step 5):
Install the runtime dependencies:
>>>>> Command 3c:
# cat $EUCAPKGS/eucalyptus_rundep | xargs yum -y install
In either case, continue here:
Download the Apache Ivy 2.1.0 tarball and replace the Ivy jar installed by
the "apache-ivy" yum install.
>>>>> Command 3e:
# wget && \
tar -zxvf apache-ivy-2.1.0-bin.tar.gz && \
cp -p apache-ivy-2.1.0/ivy-2.1.0.jar /usr/share/java && \
ln -fs /usr/share/java/ivy-2.1.0.jar /usr/share/java/ivy.jar
>>>>> (end of commands)
4. Build Eucalyptus
If you are setting up a non-build system to install Eucalyptus on, skip this
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.
Link the files from the rpmspec repo in their proper places:
>>>>> Command 4a:
# ln -s $EUCAGIT/eucalyptus-rpmspec/eucalyptus.spec $EUCARPM/SPECS
>>>>> Command 4b:
# ln -s $EUCAGIT/eucalyptus-rpmspec/ $EUCARPM/SOURCES
(Note this 2nd command links into SOURCES, not SPECS!)
Create the tarballs of eucalyptus and the eucalyptus-cloud-libs that
rpmbuild will un-tar and build:
>>>>> Command 4c:
>>>>> Command 4d:
# tar -cvJf $EUCARPM/SOURCES/eucalyptus.tar.xz --exclude .git --exclude eucalyptus/clc/lib --exclude eucalyptus
>>>>> Command 4e:
# cd $EUCAGIT/eucalyptus-cloud-libs
>>>>> Command 4f:
# tar -cvJf $EUCARPM/SOURCES/eucalyptus-cloud-libs.tar.xz --exclude .git --exclude HI --exclude tests --exclude README .
Now rpmbuild will do all of the build and packaging, in one command:
>>>>> Command 4g:
# rpmbuild --define "_topdir $EUCARPM" --define 'tarball_basedir eucalyptus' --define 'cloud_lib_tarball eucalyptus-cloud-libs.tar.xz' -bb $EUCARPM/SPECS/eucalyptus.spec
Copy the list of runtime install dependencies into the RPMS directory so we
can distribute it with the RPMs to other systems.
>>>>> Command 4h:
# cp $EUCAGIT/eucalyptus-rpmspec/eucalyptus_rundep $EUCARPM/RPMS/
5. Distribute the Build
If you are setting up a non-build system to install Eucalyptus on, skip this
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.
If you plan to use your build system as one of the nodes of your Eucalyptus
cloud, follow these instructions on the build system as well.
On all systems except the build system:
>>>>> Commands 5a: #
# rsync -ar $EUCARPM/RPMS/ root@{host-2}:$EUCAPKGS
# rsync -ar $EUCARPM/RPMS/ root@{host-3}:$EUCAPKGS
>>>>> (end of commands)
6. Install Eucalyptus
You can now install the Eucalyptus RPMs onto each system.
On each of the non-build systems, set up your environment as described in
Step 1, and install the dependencies as described in Step 3 (skip Step
2). Be sure to follow the "setting up the other systems" steps instead of
the "setting up the build system" step.
Install all RPMs built on the build system, 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.
For the build system (if you're installing onto it):
>>>>> Command 6a:
# yum install $EUCARPM/RPMS/noarch/* $EUCARPM/RPMS/x86_64/*
For all other systems:
>>>>> Command 6a:
# yum install $EUCAPKGS/noarch/* $EUCAPKGS/x86_64/*
7. Configure Eucalyptus
From this point forward, follow the instructions from the Installation
Guide. The Eucalyptus documentation can be found here:
Skip the "yum install" commands for the packages you have already installed,
8. Rebuild Eucalyptus
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)
Run the "configure" script to prepare the system to build:
>>>>> Command 8a:
# cd $EUCAGIT/eucalyptus
>>>>> Command 8b:
# ./configure --with-axis2==/usr/share/java/axis2 \
--with-axis2c=/usr/lib64/axis2c --prefix=$EUCALYPTUS \
--with-apache2-module-dir=/usr/lib64/httpd/modules \
--with-db-home=/usr/pgsql-9.2 \
Run the "make" commands below.
>>>>> Command 8c:
# make clean ; make ; make install
The "make clean" deletes the artifacts from any previous build (just those
within $EUCALYPTUS).
The "make" builds the artifacts, in the $EUCAGIT/eucalyptus tree.
The "make install" copies most of the artifacts into the $EUCALYPTUS
directory tree, and copies some into certain system directories.
If your build system is also running Eucalyptus installed from packages,
note that certain files in system directories will be overwritten by this
"make install". As of this writing, the files that "make install" copies to
system directories instead of within the $EUCALYPTUS tree are:
After the make has completed, copy individual jars or executables (or other
built artifacts) to the installed systems, replacing those files. All of the
artifacts will be built into $EUCALYPTUS except for those listed above.
Note: After replacing files, processes may have to be restarted to use them.
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
>>>>> Commands 8c:
# cd $EUCAGIT/eucalyptus
# make distclean
# rm -Rf $EUCAGIT/eucalyptus/clc/lib
Jump to Line
Something went wrong with that request. Please try again.