Return-Path: X-Original-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1C598E82D for ; Fri, 8 Mar 2013 19:37:50 +0000 (UTC) Received: (qmail 75696 invoked by uid 500); 8 Mar 2013 19:37:49 -0000 Delivered-To: apmail-incubator-cloudstack-commits-archive@incubator.apache.org Received: (qmail 75579 invoked by uid 500); 8 Mar 2013 19:37:49 -0000 Mailing-List: contact cloudstack-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-commits@incubator.apache.org Received: (qmail 75530 invoked by uid 99); 8 Mar 2013 19:37:49 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Mar 2013 19:37:49 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 43941509F; Fri, 8 Mar 2013 19:37:49 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bfederle@apache.org To: cloudstack-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer 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. Message-Id: <20130308193749.43941509F@tyr.zones.apache.org> Date: Fri, 8 Mar 2013 19:37:49 +0000 (UTC) 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 Authored: Fri Mar 8 13:03:58 2013 -0600 Committer: Joe Brockmeier 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 @@ ]>
- Building RPMs - - 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: - $ mvn -P deps - - - Now that we have resolved the dependencies we can move on to building &PRODUCT; - and packaging them into RPMs by issuing the following command. - $ ./waf rpm - - - Once this completes, you should find assembled RPMs in - artifacts/rpmbuild/RPMS/x86_64 - -
- Creating a yum repo - - 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: - $ cd artifacts/rpmbuild/RPMS/x86_64 - - - Next we'll issue a command to create the repository metadata by - issuing the following command: - $ createrepo ./ - - - The files and directories within our current working directory can now - be uploaded to a web server and serve as a yum repository - + Building RPMs from Source + As mentioned previously in , 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. + # yum groupinstall "Development Tools" + # yum install java-1.6.0-openjdk-devel.x86_64 genisoimage mysql mysql-server ws-common-utils MySQL-python tomcat6 createrepo + Next, you'll need to install build-time dependencies for CloudStack with + Maven. We're using Maven 3, so you'll want to + grab a Maven 3 tarball + and uncompress it in your home directory (or whatever location you prefer): + $ tar zxvf apache-maven-3.0.4-bin.tar.gz + $ export PATH=/usr/local/apache-maven-3.0.4//bin:$PATH + Maven also needs to know where Java is, and expects the JAVA_HOME environment + variable to be set: + $ export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64/ + Verify that Maven is installed correctly: + $ mvn --version + You probably want to ensure that your environment variables will survive a logout/reboot. + Be sure to update ~/.bashrc with the PATH and JAVA_HOME variables. + + 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. + Packaging has Changed + 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. + +
+ Generating RPMS + Now that we have the prerequisites and source, you will cd to the packaging/centos63/ directory. + Generating RPMs is done using the package.sh script: + $./package.sh + + That will run for a bit and then place the finished packages in dist/rpmbuild/RPMS/x86_64/. + You should see seven RPMs in that directory: cloudstack-agent-4.1.0-SNAPSHOT.el6.x86_64.rpm, cloudstack-awsapi-4.1.0-SNAPSHOT.el6.x86_64.rpm, cloudstack-cli-4.1.0-SNAPSHOT.el6.x86_64.rpm, cloudstack-common-4.1.0-SNAPSHOT.el6.x86_64.rpm, cloudstack-docs-4.1.0-SNAPSHOT.el6.x86_64.rpm, cloudstack-management-4.1.0-SNAPSHOT.el6.x86_64.rpm, and cloudstack-usage-4.1.0-SNAPSHOT.el6.x86_64.rpm. +
+ Creating a yum repo + + 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: + $ mkdir -p ~/tmp/repo + $ cp dist/rpmbuild/RPMS/x86_64/*rpm ~/tmp/repo/ + $ createrepo ~/tmp/repo + + + The files and directories within ~/tmp/repo can now be uploaded to a web server and serve as a yum repository. + +
+
+ Configuring your systems to use your new yum repository + + 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 /etc/yum.repos.d/cloudstack.repo with this information: + + [apache-cloudstack] + name=Apache CloudStack + baseurl=http://webserver.tld/path/to/repo + enabled=1 + gpgcheck=0 + + + Completing this step will allow you to easily install $PRODUCT; on a number of machines across the network. + +
+
-
- Configuring your systems to use your new yum repository - - 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 /etc/yum.repos.d/cloudstack.repo - with the following content: - -[apache-cloudstack] -name=Apache CloudStack -baseurl=http://webserver.tld/path/to/repo -enabled=1 -gpgcheck=0 - - - - Completing this step will allow you to easily install CloudStack on a number of - machines across the network. - -
-