cloudstack/docs/tmp/en-US/html/sect-source-buildrpm.html

36 lines
4.6 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>3.6. Building RPMs</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta name="generator" content="publican 2.8" /><meta name="package" content="Apache_CloudStack-Installation_Guide-4.0.0-incubating-en-US-1-" /><link rel="home" href="index.html" title="CloudStack Installation Guide" /><link rel="up" href="sect-source.html" title="Chapter 3. Building from Source" /><link rel="prev" href="sect-source-builddebs.html" title="3.5. Building DEB packages" /><link rel="next" href="installation.html" title="Chapter 4. Installation" /></head><body><p id="title"><a class="left" href="http://cloudstack.org"><img src="Common_Content/images/image_left.png" alt="Product Site" /></a><a class="right" href="http://docs.cloudstack.org"><img src="Common_Content/images/image_right.png" alt="Documentation Site" /></a></p><ul class="docnav"><li class="previous"><a accesskey="p" href="sect-source-builddebs.html"><strong>Prev</strong></a></li><li class="next"><a accesskey="n" href="installation.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" id="sect-source-buildrpm" lang="en-US"><div class="titlepage"><div><div><h2 class="title" id="sect-source-buildrpm">3.6. Building RPMs</h2></div></div></div><div class="para">
While we have defined, and you have presumably already installed the bootstrap prerequisites, there are a number of build time prerequisites that need to be resolved. CloudStack uses maven for dependency resolution. You can resolve the buildtime depdencies for CloudStack by running the following command:
<pre class="programlisting"><code class="prompt">$</code> <code class="command">mvn</code> -P deps</pre>
</div><div class="para">
Now that we have resolved the dependencies we can move on to building CloudStack and packaging them into RPMs by issuing the following command.
<pre class="programlisting"><code class="prompt">$</code> <code class="command">./waf</code> rpm</pre>
</div><div class="para">
Once this completes, you should find assembled RPMs in <code class="filename">artifacts/rpmbuild/RPMS/x86_64</code>
</div><div class="section" id="sect-source-buildrpm-repo"><div class="titlepage"><div><div><h3 class="title" id="sect-source-buildrpm-repo">3.6.1. Creating a yum repo</h3></div></div></div><div class="para">
While RPMs is an ideal packaging format - it's most easily consumed from yum repositories over a network. We'll move into the directory with the newly created RPMs by issuing the following command:
<pre class="programlisting"><code class="prompt">$</code> <code class="command">cd</code> artifacts/rpmbuild/RPMS/x86_64</pre>
</div><div class="para">
Next we'll issue a command to create the repository metadata by issuing the following command:
<pre class="programlisting"><code class="prompt">$</code> <code class="command">createrepo</code> ./</pre>
</div><div class="para">
The files and directories within our current working directory can now be uploaded to a web server and serve as a yum repository
</div></div><div class="section" id="sect-source-buildrpm-repo2"><div class="titlepage"><div><div><h3 class="title" id="sect-source-buildrpm-repo2">3.6.2. Configuring your systems to use your new yum repository</h3></div></div></div><div class="para">
Now that your yum repository is populated with RPMs and metadata we need to configure our machines that need to install CloudStack. We will create a file at <code class="filename">/etc/yum.repos.d/cloudstack.repo</code> with the following content:
<pre class="programlisting">
[apache-cloudstack]
name=Apache CloudStack
baseurl=http://<em class="replaceable"><code>webserver.tld/path/to/repo</code></em>
enabled=1
gpgcheck=0
</pre>
</div><div class="para">
Completing this step will allow you to easily install CloudStack on a number of machines across the network.
</div></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="sect-source-builddebs.html"><strong>Prev</strong>3.5. Building DEB packages</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="installation.html"><strong>Next</strong>Chapter 4. Installation</a></li></ul></body></html>