cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [37/38] git commit: refs/heads/ui-multiple-nics - CLOUDSTACK-1: Updated the instructions for building RPMs to reflect Maven changes and new packaging.sh script contributed by Hugo, et. al.
Date Fri, 08 Mar 2013 19:37:49 GMT
CLOUDSTACK-1: Updated the instructions for building RPMs to reflect Maven changes and new packaging.sh
script contributed by Hugo, et. al.


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/ee22753c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/ee22753c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/ee22753c

Branch: refs/heads/ui-multiple-nics
Commit: ee22753c34b953fe24545b6739e1fce95e9d41c1
Parents: 5e4c2c8
Author: Joe Brockmeier <jzb@zonker.net>
Authored: Fri Mar 8 13:03:58 2013 -0600
Committer: Joe Brockmeier <jzb@zonker.net>
Committed: Fri Mar 8 13:05:56 2013 -0600

----------------------------------------------------------------------
 docs/en-US/build-rpm.xml |  146 +++++++++++++++++++++--------------------
 1 files changed, 75 insertions(+), 71 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/ee22753c/docs/en-US/build-rpm.xml
----------------------------------------------------------------------
diff --git a/docs/en-US/build-rpm.xml b/docs/en-US/build-rpm.xml
index e983aba..ba32ef5 100644
--- a/docs/en-US/build-rpm.xml
+++ b/docs/en-US/build-rpm.xml
@@ -5,78 +5,82 @@
 ]>
 
 <!-- Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-    
-    http://www.apache.org/licenses/LICENSE-2.0
-    
-    Unless required by applicable law or agreed to in writing,
-    software distributed under the License is distributed on an
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-    KIND, either express or implied.  See the License for the
-    specific language governing permissions and limitations
-    under the License.
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
 -->
 
 <section id="sect-source-buildrpm">
-    <title>Building RPMs</title>
-    <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. &PRODUCT; uses maven for dependency resolution.
-       You can resolve the buildtime depdencies for CloudStack by running the
-       following command:
-       <programlisting><prompt>$</prompt> <command>mvn</command>
-P deps</programlisting>
-    </para>
-    <para>
-       Now that we have resolved the dependencies we can move on to building &PRODUCT;
-       and packaging them into RPMs by issuing the following command. 
-       <programlisting><prompt>$</prompt> <command>./waf</command>
rpm</programlisting>
-    </para>
-    <para>
-       Once this completes, you should find assembled RPMs in
-       <filename>artifacts/rpmbuild/RPMS/x86_64</filename>
-    </para>
-    <section id="sect-source-buildrpm-repo">
-       <title>Creating a yum repo</title>
-       <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: 
-          <programlisting><prompt>$</prompt> <command>cd</command>
artifacts/rpmbuild/RPMS/x86_64</programlisting>
-       </para>
-       <para>
-          Next we'll issue a command to create the repository metadata by
-          issuing the following command: 
-          <programlisting><prompt>$</prompt> <command>createrepo</command>
./</programlisting>
-       </para>
-       <para>
-          The files and directories within our current working directory can now
-          be uploaded to a web server and serve as a yum repository
-       </para>
+    <title>Building RPMs from Source</title>
+    <para>As mentioned previously in <xref linkend="sect-source-prereq" />, you
will need to install several prerequisites before you can build packages for &PRODUCT;.
Here we'll assume you're working with a 64-bit build of CentOS or Red Hat Enterprise Linux.</para>
+    <para><programlisting># yum groupinstall "Development Tools"</programlisting></para>
+    <para><programlisting># yum install java-1.6.0-openjdk-devel.x86_64 genisoimage
mysql mysql-server ws-common-utils MySQL-python tomcat6 createrepo</programlisting></para>
+    <para>Next, you'll need to install build-time dependencies for CloudStack with

+        Maven. We're using Maven 3, so you'll want to 
+        <ulink url="http://maven.apache.org/download.cgi">grab a Maven 3 tarball</ulink>

+        and uncompress it in your home directory (or whatever location you prefer):</para>
+    <para><programlisting>$ tar zxvf apache-maven-3.0.4-bin.tar.gz</programlisting></para>
+    <para><programlisting>$ export PATH=/usr/local/apache-maven-3.0.4//bin:$PATH</programlisting></para>
+    <para>Maven also needs to know where Java is, and expects the JAVA_HOME environment

+        variable to be set:</para>
+    <para><programlisting>$ export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64/</programlisting></para>
+    <para>Verify that Maven is installed correctly:</para>
+    <para><programlisting>$ mvn --version</programlisting></para>
+    <para>You probably want to ensure that your environment variables will survive
a logout/reboot. 
+        Be sure to update <filename>~/.bashrc</filename> with the PATH and JAVA_HOME
variables.</para>
+
+    <para>Building RPMs for $PRODUCT; is fairly simple. Assuming you already have the
source downloaded and have uncompressed the tarball into a local directory, you're going to
be able to generate packages in just a few minutes.</para>
+    <note><title>Packaging has Changed</title>
+        <para>If you've created packages for $PRODUCT; previously, you should be aware
that the process has changed considerably since the project has moved to using Apache Maven.
Please be sure to follow the steps in this section closely.</para>
+    </note>
+    <section id="generating-rpms">
+        <title>Generating RPMS</title>
+        <para>Now that we have the prerequisites and source, you will cd to the <filename>packaging/centos63/</filename>
directory.</para>
+        <para>Generating RPMs is done using the <filename>package.sh</filename>
script: 
+            <programlisting><prompt>$</prompt>./package.sh</programlisting>
+        </para>
+        <para>That will run for a bit and then place the finished packages in <filename>dist/rpmbuild/RPMS/x86_64/</filename>.</para>
+        <para>You should see seven RPMs in that directory: <filename>cloudstack-agent-4.1.0-SNAPSHOT.el6.x86_64.rpm</filename>,
<filename>cloudstack-awsapi-4.1.0-SNAPSHOT.el6.x86_64.rpm</filename>, <filename>cloudstack-cli-4.1.0-SNAPSHOT.el6.x86_64.rpm</filename>,
<filename>cloudstack-common-4.1.0-SNAPSHOT.el6.x86_64.rpm</filename>, <filename>cloudstack-docs-4.1.0-SNAPSHOT.el6.x86_64.rpm</filename>,
<filename>cloudstack-management-4.1.0-SNAPSHOT.el6.x86_64.rpm</filename>, and
<filename>cloudstack-usage-4.1.0-SNAPSHOT.el6.x86_64.rpm</filename>.</para>
+            <section id="sect-source-buildrpm-repo">
+                <title>Creating a yum repo</title>
+                <para>
+                    While RPMs is a useful packaging format - it's most easily consumed from
Yum repositories over a network. The next step is to create a Yum Repo with the finished packages:
+                    <programlisting><prompt>$</prompt> mkdir -p ~/tmp/repo</programlisting>
+                    <programlisting><prompt>$</prompt> cp dist/rpmbuild/RPMS/x86_64/*rpm
~/tmp/repo/</programlisting>
+                    <programlisting><prompt>$</prompt> createrepo ~/tmp/repo</programlisting>
+                </para>
+                <para>
+                    The files and directories within <filename>~/tmp/repo</filename>
can now be uploaded to a web server and serve as a yum repository. 
+                </para>
+            </section>
+            <section id="sect-source-buildrpm-repo2">
+                <title>Configuring your systems to use your new yum repository</title>
+                <para>
+                    Now that your yum repository is populated with RPMs and metadata
+                    we need to configure the machines that need to install $PRODUCT;.
+                    Create a file named <filename>/etc/yum.repos.d/cloudstack.repo</filename>
with this information:
+                    <programlisting>
+                        [apache-cloudstack]
+                        name=Apache CloudStack
+                        baseurl=http://<replaceable>webserver.tld/path/to/repo</replaceable>
+                        enabled=1
+                        gpgcheck=0
+                    </programlisting>
+                </para>
+                <para> Completing this step will allow you to easily install $PRODUCT;
on a number of machines across the network. 
+                </para>
+            </section>
+        </section>
     </section>
-    <section id="sect-source-buildrpm-repo2">
-       <title>Configuring your systems to use your new yum repository</title>
-       <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 <filename>/etc/yum.repos.d/cloudstack.repo</filename>
-          with the following content: 
-<programlisting>
-[apache-cloudstack]
-name=Apache CloudStack
-baseurl=http://<replaceable>webserver.tld/path/to/repo</replaceable>
-enabled=1
-gpgcheck=0
-</programlisting>
-      </para>
-      <para>
-         Completing this step will allow you to easily install CloudStack on a number of

-         machines across the network. 
-      </para>
-   </section>
-</section>


Mime
View raw message