SLIDER-221 rpm in assembly package; specific config for HDP created; rpm currently runs on "package" target
Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/f62539bf Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/f62539bf Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/f62539bf Branch: refs/heads/master Commit: f62539bfee095944c1a5cc1b4527bd75a8fa233d Parents: 497d11c Author: Steve Loughran <ste...@apache.org> Authored: Wed Jul 9 14:13:16 2014 +0100 Committer: Steve Loughran <ste...@apache.org> Committed: Wed Jul 9 14:13:16 2014 +0100 ---------------------------------------------------------------------- slider-assembly/pom.xml | 123 +++++++++++++++++++ slider-assembly/src/conf-hdp/log4j.properties | 58 +++++++++ slider-assembly/src/conf-hdp/slider-client.xml | 77 ++++++++++++ slider-assembly/src/conf/slider-client.xml | 3 - slider-install/pom.xml | 127 +------------------- 5 files changed, 264 insertions(+), 124 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/f62539bf/slider-assembly/pom.xml ---------------------------------------------------------------------- diff --git a/slider-assembly/pom.xml b/slider-assembly/pom.xml index 9431fbc..adfd875 100644 --- a/slider-assembly/pom.xml +++ b/slider-assembly/pom.xml @@ -30,6 +30,18 @@ <version>0.31.0-incubating-SNAPSHOT</version> </parent> + + <properties> + <rpm.basedir>/usr/local/slider</rpm.basedir> + <rpm.confdir>${basedir}/conf</rpm.confdir> + <rpm.bindir>${basedir}/bin</rpm.bindir> + <rpm.libdir>${basedir}/lib</rpm.libdir> + <rpm.username>mapred</rpm.username> + <rpm.groupname>mapred</rpm.groupname> + <src.confdir>src/conf/hdp</src.confdir> + <src.libdir>${project.build.directory}/lib</src.libdir> + </properties> + <build> <plugins> <!--read in a build.properties file if defined--> @@ -177,6 +189,117 @@ </executions> </plugin> + <!-- RPM --> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>rpm-maven-plugin</artifactId> + <version>${maven-rpm-plugin.version}</version> + <executions> + <execution> + <id>generate-rpm</id> + <goals> + <goal>rpm</goal> + </goals> + </execution> + </executions> + <configuration> + <license>http://www.apache.org/licenses/LICENSE-2.0</license> + <name>slider</name> +<!----> <distribution></distribution> + <group>Applications/Engineering</group> + <!--<icon>src/main/resources/icon.gif</icon>--> + <!--<packager>ASF</packager>--> + <prefix>${rpm.basedir}</prefix> + <!-- + <changelogFile>src/changelog</changelogFile> + --> + <!-- <defineStatements> + <defineStatement>_unpackaged_files_terminate_build 0</defineStatement> + </defineStatements>--> + <provides> + <provide>apache-slider</provide> + </provides> + <mappings> + <mapping> + <directory>${rpm.basedir}</directory> + <!-- RW.R..R.. --> + <filemode>644</filemode> + + <username>${rpm.username}</username> + <groupname>${rpm.groupname}</groupname> + <sources> + <source> + <location>target/classes</location> + </source> + </sources> + </mapping> + + <!-- binaries --> + <mapping> + <directory>${rpm.bindir}</directory> + <!-- RWXR.XR.X --> + <filemode>0755</filemode> + <username>${rpm.username}</username> + <groupname>${rpm.groupname}</groupname> + <sources> + <source> + <location>src/main/scripts</location> + </source> + </sources> + </mapping> + + <!-- library --> + <mapping> + <directory>${rpm.libdir}</directory> + <!-- RW.R..R.. --> + <filemode>644</filemode> + + <username>${rpm.username}</username> + <groupname>${rpm.groupname}</groupname> + <sources> + <source> + <location>${src.libdir}</location> + </source> + </sources> + </mapping> + + <!-- configuration --> + <mapping> + <directory>${rpm.confdir}</directory> + <configuration>true</configuration> + <filemode>0755</filemode> + <username>${rpm.username}</username> + <groupname>${rpm.groupname}</groupname> + <sources> + <source> + <location>${src.confdir}</location> + </source> + </sources> + </mapping> + + </mappings> +<!-- +Scripts. +--> + <preinstallScriptlet> + <script>echo "installing slider"</script> + </preinstallScriptlet> +<!-- + <postinstallScriptlet> + <scriptFile>src/main/scripts/postinstall</scriptFile> + <fileEncoding>utf-8</fileEncoding> + </postinstallScriptlet> +--> +<!-- + <preremoveScriptlet> + <scriptFile>src/main/scripts/preremove</scriptFile> + <fileEncoding>utf-8</fileEncoding> + </preremoveScriptlet> +--> + </configuration> + </plugin> + </plugins> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/f62539bf/slider-assembly/src/conf-hdp/log4j.properties ---------------------------------------------------------------------- diff --git a/slider-assembly/src/conf-hdp/log4j.properties b/slider-assembly/src/conf-hdp/log4j.properties new file mode 100644 index 0000000..3c0d08c --- /dev/null +++ b/slider-assembly/src/conf-hdp/log4j.properties @@ -0,0 +1,58 @@ +# 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. +# + +# log4j configuration used during build and unit tests + +log4j.rootLogger=INFO,stdout +log4j.threshhold=ALL +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout + +# log layout skips stack-trace creation operations by avoiding line numbers and method +log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{2} - %m%n + +# debug edition is much more expensive +#log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c{2} (%F:%M(%L)) - %m%n + + +log4j.appender.subprocess=org.apache.log4j.ConsoleAppender +log4j.appender.subprocess.layout=org.apache.log4j.PatternLayout +log4j.appender.subprocess.layout.ConversionPattern=[%c{1}]: %m%n +#log4j.logger.org.apache.slider.yarn.appmaster.SliderAppMasterer.master=INFO,subprocess + +# for debugging Slider +#log4j.logger.org.apache.slider=DEBUG +#log4j.logger.org.apache.slider=DEBUG + +# uncomment to debug service lifecycle issues +#log4j.logger.org.apache.hadoop.yarn.service.launcher=DEBUG +#log4j.logger.org.apache.hadoop.yarn.service=DEBUG + +# uncomment for YARN operations +#log4j.logger.org.apache.hadoop.yarn.client=DEBUG + +# uncomment this to debug security problems +#log4j.logger.org.apache.hadoop.security=DEBUG + +#crank back on some noise +log4j.logger.org.apache.hadoop.util.NativeCodeLoader=ERROR +log4j.logger.org.apache.hadoop.hdfs=WARN + + +log4j.logger.org.apache.hadoop.yarn.server.nodemanager.containermanager.monitor=WARN +log4j.logger.org.apache.hadoop.yarn.server.nodemanager.NodeStatusUpdaterImpl=WARN +log4j.logger.org.apache.zookeeper=WARN http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/f62539bf/slider-assembly/src/conf-hdp/slider-client.xml ---------------------------------------------------------------------- diff --git a/slider-assembly/src/conf-hdp/slider-client.xml b/slider-assembly/src/conf-hdp/slider-client.xml new file mode 100644 index 0000000..f844106 --- /dev/null +++ b/slider-assembly/src/conf-hdp/slider-client.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> +<!-- + 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. +--> + +<!-- + Properties set here are picked up in the client. + They are not passed to the AM -though the filesystem + binding details (URL And principal) are added to the + hbase-site.xml file when a cluster is created. +--> +<configuration> + + <property> + <name>yarn.log-aggregation-enable</name> + <value>true</value> + </property> + + + <property> + <name>slider.yarn.queue</name> + <value>default</value> + <description>YARN queue for the Application Master</description> + </property> + + + <property> + <name>yarn.application.classpath</name> + <value> + /etc/hadoop/conf,/usr/lib/hadoop/*,/usr/lib/hadoop/lib/*,/usr/lib/hadoop-hdfs/*,/usr/lib/hadoop-hdfs/lib/*,/usr/lib/hadoop-yarn/*,/usr/lib/hadoop-yarn/lib/*,/usr/lib/hadoop-mapreduce/*,/usr/lib/hadoop-mapreduce/lib/* + </value> + </property> + +<!-- + + <property> + <name>yarn.resourcemanager.address</name> + <value>master:8032</value> + </property> + + <property> + <name>fs.defaultFS</name> + <value>hdfs://master:9090</value> + </property> + + <property> + <name>yarn.resourcemanager.principal</name> + <value>yarn/master@MINICLUSTER</value> + </property> + + <property> + <name>slider.security.enabled</name> + <value>true</value> + </property> + + <property> + <name>dfs.namenode.kerberos.principal</name> + <value>hdfs/master@MINICLUSTER</value> + </property> +--> + + +</configuration> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/f62539bf/slider-assembly/src/conf/slider-client.xml ---------------------------------------------------------------------- diff --git a/slider-assembly/src/conf/slider-client.xml b/slider-assembly/src/conf/slider-client.xml index d0c8f69..bd17254 100644 --- a/slider-assembly/src/conf/slider-client.xml +++ b/slider-assembly/src/conf/slider-client.xml @@ -19,9 +19,6 @@ <!-- Properties set here are picked up in the client. - They are not passed to the AM -though the filesystem - binding details (URL And principal) are added to the - hbase-site.xml file when a cluster is created. --> <configuration> <property> http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/f62539bf/slider-install/pom.xml ---------------------------------------------------------------------- diff --git a/slider-install/pom.xml b/slider-install/pom.xml index a00dca9..df061a7 100644 --- a/slider-install/pom.xml +++ b/slider-install/pom.xml @@ -31,6 +31,12 @@ <version>0.31.0-incubating-SNAPSHOT</version> </parent> + <properties> + <basedir>/usr/local/slider</basedir> + <confdir>${basedir}/conf</confdir> + <bindir>${basedir}/bin</bindir> + </properties> + <build> <plugins> <!--read in a build.properties file if defined--> @@ -55,127 +61,6 @@ </executions> </plugin> - - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>rpm-maven-plugin</artifactId> - <version>${maven-rpm-plugin.version}</version> - <executions> - <execution> - <id>generate-rpm</id> - <goals> - <goal>rpm</goal> - </goals> - </execution> - </executions> - <configuration> - <license>http://www.apache.org/licenses/LICENSE-2.0</license> - <distribution>Trash 2005</distribution> - <group>Application/Collectors</group> - <icon>src/main/resources/icon.gif</icon> - <packager>SWWDC</packager> - <prefix>/usr/local</prefix> - <changelogFile>src/changelog</changelogFile> - <defineStatements> - <defineStatement>_unpackaged_files_terminate_build 0</defineStatement> - </defineStatements> - <mappings> - <mapping> - <directory>/usr/local/bin/landfill</directory> - <filemode>440</filemode> - <username>dumper</username> - <groupname>dumpgroup</groupname> - <sources> - <source> - <location>target/classes</location> - </source> - </sources> - </mapping> - <mapping> - <directory>/usr/local/doc/landfill</directory> - <documentation>true</documentation> - <filemode>444</filemode> - <username>dumper</username> - <groupname>dumpgroup</groupname> - <sources> - <source> - <location>target/site</location> - </source> - </sources> - </mapping> - <mapping> - <directory>/usr/local/lib</directory> - <filemode>750</filemode> - <username>dumper</username> - <groupname>dumpgroup</groupname> - <dependency> - <includes> - <include>jmock:jmock</include> - <include>javax.servlet:servlet-api:2.4</include> - </includes> - <excludes> - <exclude>junit:junit</exclude> - </excludes> - </dependency> - </mapping> - <mapping> - <directory>/usr/local/bin</directory> - <filemode>750</filemode> - <username>dumper</username> - <groupname>dumpgroup</groupname> - <sources> - <source> - <location>src/main/bin</location> - </source> - <softlinkSource> - <location>/usr/local/bin/new.sh</location> - <destination>old.sh</destination> - </softlinkSource> - </sources> - </mapping> - <mapping> - <directory>/usr/local/oldbin</directory> - <filemode>750</filemode> - <username>dumper</username> - <groupname>dumpgroup</groupname> - <sources> - <softlinkSource> - <location>/usr/local/bin</location> - </softlinkSource> - </sources> - </mapping> - <mapping> - <directory>/usr/local/conf/landfill</directory> - <configuration>true</configuration> - <filemode>640</filemode> - <username>dumper</username> - <groupname>dumpgroup</groupname> - <sources> - <source> - <location>src/main/conf</location> - </source> - </sources> - </mapping> - <mapping> - <directory>/usr/local/log/landfill</directory> - <filemode>750</filemode> - <username>dumper</username> - <groupname>dumpgroup</groupname> - </mapping> - </mappings> - <preinstallScriptlet> - <script>echo "installing now"</script> - </preinstallScriptlet> - <postinstallScriptlet> - <scriptFile>src/main/scripts/postinstall</scriptFile> - <fileEncoding>utf-8</fileEncoding> - </postinstallScriptlet> - <preremoveScriptlet> - <scriptFile>src/main/scripts/preremove</scriptFile> - <fileEncoding>utf-8</fileEncoding> - </preremoveScriptlet> - </configuration> - </plugin> </plugins>