You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2014/07/09 18:05:57 UTC

svn commit: r1609216 - /incubator/slider/site/trunk/content/developing/building.md

Author: stevel
Date: Wed Jul  9 16:05:57 2014
New Revision: 1609216

URL: http://svn.apache.org/r1609216
Log:
SLIDER-221: document building the RPM

Modified:
    incubator/slider/site/trunk/content/developing/building.md

Modified: incubator/slider/site/trunk/content/developing/building.md
URL: http://svn.apache.org/viewvc/incubator/slider/site/trunk/content/developing/building.md?rev=1609216&r1=1609215&r2=1609216&view=diff
==============================================================================
--- incubator/slider/site/trunk/content/developing/building.md (original)
+++ incubator/slider/site/trunk/content/developing/building.md Wed Jul  9 16:05:57 2014
@@ -25,7 +25,8 @@ Here's how to set this up.
 ### Networking
 
 The network on the development system must be functional, with hostname lookup
-of the local host working. Tests will fail without this.
+of the local host working. Tests will fail without this. For maven builds to
+work, remote network access is often a pre-requisite.
 
 ### Java 7
 
@@ -231,6 +232,98 @@ Note that the final location of the accu
 it may be directly under target/ or it may be in a subdirectory, with
 a path such as `target/accumulo-$ACCUMULO_VERSION-dev/accumulo-$ACCUMULO_VERSION/`
 
+## Building the Slider RPM
+ 
+It is possible to build an RPM file for slider. This is an architecture
+independent RPM with the artifacts  and layout of the slider .tar file, but hosted
+under `/usr/lib/slider`.
+
+The configuration directory is `/usr/lib/slider/conf`; Binaries are found under
+`/usr/lib/slider/conf/bin`
+
+The RPM can only be built on a Linux system with the `rpm` command installed;
+it is an optional artifact that must be explicitly created by enabling the maven
+`rpm` profile
+
+    mvn clean install -DskipTests -Prpm
+    
+This creates an RPM under `slider-assembly/target/rpm/slider/RPMS/noarch/`; the
+RPM name is built from the project version, with timestamp generation during
+`-SNAPSHOT` builds to ensure that RPM updates succeed.
+
+The RPM can be manually examined by open what is really an archive file, and
+verifying its contents. 
+
+For a release, the installation of the RPM itself must be verified
+
+1. build the RPM: `mvn install -Prpm`
+1. `scp` the RPM to the target machine. If you build it on the target machine
+this step can be ommitted
+1. Install the RPM
+
+        rpm -Uvh slider*.rpm
+1. Verify that the installation has succeeded by executing the `slider version`
+command.
+1. Modify the configuration files in `/usr/lib/slider/conf` to bind slider
+to the target cluster.
+1. To uninstall: `rpm -e slider`
+
+
+### Example
+
+    # rpm -Uvh slider-0.31.0-incubating_SNAPSHOT20140709153353.noarch.rpm 
+    Preparing...                ########################################### [100%]
+       1:slider                 ########################################### [100%]
+    
+    # ls -l /usr/lib/slider
+    total 16
+    drwxr-xr-x 3 root   root   4096 Jul  9 19:57 agent
+    drwxr-xr-x 2 mapred hadoop 4096 Jul  9 19:57 bin
+    drwxr-xr-x 2 mapred hadoop 4096 Jul  9 19:57 conf
+    drw-r--r-- 2 mapred hadoop 4096 Jul  9 19:57 lib
+
+    # ls -l /usr/lib/slider/bin
+    total 12
+    -rwxr-xr-x 1 mapred hadoop 2345 Jul  9  2014 slider
+    -rwxr-xr-x 1 mapred hadoop 5096 Jul  9  2014 slider.py
+
+    # /usr/lib/slider/bin/slider version
+    slider_home = "/usr/lib/slider"
+    slider_jvm_opts = "-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true
+      -Xmx256m -Djava.confdir=/usr/lib/slider/conf"
+    classpath = "/usr/lib/slider/lib/*:/usr/lib/slider/conf:"
+    
+    command is java -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Xmx256m
+      -Djava.confdir=/usr/lib/slider/conf --classpath "/usr/lib/slider/lib/*:/usr/lib/slider/conf:" org.apache.slider.Slider version
+    
+    
+    2014-05-16 19:34:34,730 [main] INFO  client.RMProxy - Connecting to ResourceManager at /0.0.0.0:8032
+    2014-05-16 19:34:35,300 [main] INFO  client.SliderClient - Slider Core-0.31.0-incubating-SNAPSHOT
+    Built against commit# d44d4c1bf0
+    2014-05-16 19:34:35,304 [main] INFO  client.SliderClient - Compiled against Hadoop 2.4.0
+    2014-05-16 19:34:35,310 [main] INFO  client.SliderClient - Hadoop runtime version branch-2.4.0
+    with source checksum 375b2832a6641759c6eaf6e3e998147 and build date 2014-03-31T08:31Z
+    2014-05-16 19:34:35,314 [main] INFO  util.ExitUtil - Exiting with status 0
+
+This output shows that slider is not configured yet: the Resource manager
+Address of `/0.0.0.0:8032` is invalid.
+
+Uninstallation can also be tested
+
+    # rpm -e slider
+    # /usr/lib/slider/bin/slider version
+    -bash: /usr/lib/slider/bin/slider: No such file or directory
+
+### RPM Configuration files 
+
+The configuration directory of slider is chosen when the RPM is built. It is fixed
+in `slider-assembly/pom.xml` to  `src/conf-hdp`
+
+    <src.confdir>src/conf-hdp</src.confdir>
+
+This configuration sets the `yarn.application.classpath` value to that required
+by HDP installations. To target other installations, alternate maven profiles
+will need to be defined.
 
 ## Testing
 
@@ -322,7 +415,7 @@ You can create the JAR file and set up i
 
 # Development Notes
 
-<!---
+
 ## Git branch model
 
 
@@ -345,16 +438,16 @@ merge them back in when they are ready.
 
  
     # until we get a public JIRA we're just using an in-house one. sorry
-    git flow feature start BUG-8192
+    git flow feature start SLIDER-8192
     
     # finishes merges back in to develop/
-    git flow feature finish BUG-8192
+    git flow feature finish SLIDER-8192
     
     # release branch
     git flow release start 0.4.0
     
     git flow release finish 0.4.0
--->
+
 
 ## Attention OS/X developers