Author: smohanty
Date: Thu Apr 4 16:49:24 2013
New Revision: 1464626
URL: http://svn.apache.org/r1464626
Log:
AMBARI-1424. Upgrade enhancements for Ambari 1.3.0. (smohanty)
Added:
incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preremove.sh
incubator/ambari/trunk/ambari-server/src/main/package/
incubator/ambari/trunk/ambari-server/src/main/package/rpm/
incubator/ambari/trunk/ambari-server/src/main/package/rpm/postinstall.sh
incubator/ambari/trunk/ambari-server/src/main/package/rpm/preinstall.sh
incubator/ambari/trunk/ambari-server/src/main/package/rpm/preremove.sh
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-agent/pom.xml
incubator/ambari/trunk/ambari-agent/src/main/package/rpm/postinstall.sh
incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preinstall.sh
incubator/ambari/trunk/ambari-server/pom.xml
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1464626&r1=1464625&r2=1464626&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Thu Apr 4 16:49:24 2013
@@ -12,6 +12,8 @@ Trunk (unreleased changes):
NEW FEATURES
+ AMBARI-1424. Upgrade enhancements for Ambari 1.3.0. (smohanty)
+
AMBARI-1763. Integrate Frontend security work to enable security on
HBase and ZooKeeper. (jaimin)
Modified: incubator/ambari/trunk/ambari-agent/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/pom.xml?rev=1464626&r1=1464625&r2=1464626&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/pom.xml (original)
+++ incubator/ambari/trunk/ambari-agent/pom.xml Thu Apr 4 16:49:24 2013
@@ -34,7 +34,6 @@
<final.name>${project.artifactId}-${project.version}</final.name>
<package.release>1</package.release>
<package.prefix>/usr</package.prefix>
- <package.conf.dir>/etc/ambari-agent/conf</package.conf.dir>
<package.log.dir>/var/log/ambari-agent</package.log.dir>
<package.pid.dir>/var/run/ambari-agent</package.pid.dir>
<skipTests>false</skipTests>
@@ -43,6 +42,7 @@
<install.dir>/usr/lib/python2.6/site-packages/ambari_agent</install.dir>
<ruby.tar>http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.15/repos/centos6/ruby-1.8.7-p370.tar.gz</ruby.tar>
<lib.dir>/usr/lib/ambari-agent/lib</lib.dir>
+ <python.ver>python >= 2.6</python.ver>
</properties>
<profiles>
<profile>
@@ -132,6 +132,7 @@
<version>2.0.1</version>
<executions>
<execution>
+ <!-- unbinds rpm creation from maven lifecycle -->
<phase>none</phase>
<goals>
<goal>rpm</goal>
@@ -147,7 +148,7 @@
<require>zlib</require>
<require>${python.ver}</require>
</requires>
- <postinstallScriptlet>
+ <postinstallScriptlet>
<scriptFile>src/main/package/rpm/postinstall.sh</scriptFile>
<fileEncoding>utf-8</fileEncoding>
</postinstallScriptlet>
@@ -156,7 +157,8 @@
<fileEncoding>utf-8</fileEncoding>
</preinstallScriptlet>
<preremoveScriptlet>
- <script>mv /etc/ambari-agent/conf
/etc/ambari-agent/conf.save</script>
+ <scriptFile>src/main/package/rpm/preremove.sh</scriptFile>
+ <fileEncoding>utf-8</fileEncoding>
</preremoveScriptlet>
<needarch>x86_64</needarch>
@@ -215,8 +217,7 @@
</sources>
</mapping>
<mapping>
- <directory>${package.conf.dir}</directory>
- <configuration>true</configuration>
+ <directory>/etc/ambari-agent/conf</directory>
<filemode>755</filemode>
<username>root</username>
<groupname>root</groupname>
Modified:
incubator/ambari/trunk/ambari-agent/src/main/package/rpm/postinstall.sh
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/package/rpm/postinstall.sh?rev=1464626&r1=1464625&r2=1464626&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/package/rpm/postinstall.sh
(original)
+++ incubator/ambari/trunk/ambari-agent/src/main/package/rpm/postinstall.sh Thu
Apr 4 16:49:24 2013
@@ -14,3 +14,14 @@
# limitations under the License
chmod 755 /usr/lib/ambari-agent/lib/facter-1.6.10/bin/facter
/usr/lib/ambari-agent/lib/puppet-2.7.9/bin/filebucket
/usr/lib/ambari-agent/lib/puppet-2.7.9/bin/pi
/usr/lib/ambari-agent/lib/puppet-2.7.9/bin/puppet
/usr/lib/ambari-agent/lib/puppet-2.7.9/bin/puppetdoc
/usr/lib/ambari-agent/lib/puppet-2.7.9/bin/ralsh
/usr/lib/ambari-agent/lib/ruby-1.8.7-p370/bin/*
+
+BAK=/etc/ambari-agent/conf/ambari-agent.ini.old
+ORIG=/etc/ambari-agent/conf/ambari-agent.ini
+
+if [ -f $BAK ];
+then
+ SERV_HOST=`grep -e hostname\s*= $BAK | sed -r -e 's/hostname\s*=//' -e
's/\./\\\./g'`
+ sed -i -r -e "s/(hostname\s*=).*/\1$SERV_HOST/" $ORIG
+ rm $BAK -f
+fi
+exit 0
\ No newline at end of file
Modified: incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preinstall.sh
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preinstall.sh?rev=1464626&r1=1464625&r2=1464626&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preinstall.sh
(original)
+++ incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preinstall.sh Thu
Apr 4 16:49:24 2013
@@ -15,3 +15,10 @@
getent group puppet >/dev/null || groupadd -r puppet
getent passwd puppet >/dev/null || /usr/sbin/useradd -g puppet puppet
+
+BAK=/etc/ambari-agent/conf/ambari-agent.ini.old
+ORIG=/etc/ambari-agent/conf/ambari-agent.ini
+
+[ -f $ORIG ] && mv -f $ORIG $BAK
+
+exit 0
Added: incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preremove.sh
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preremove.sh?rev=1464626&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preremove.sh
(added)
+++ incubator/ambari/trunk/ambari-agent/src/main/package/rpm/preremove.sh Thu
Apr 4 16:49:24 2013
@@ -0,0 +1,25 @@
+# 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
+
+# WARNING: This script is performed not only on uninstall, but also
+# during package update. See http://www.ibm.com/developerworks/library/l-rpm2/
+# for details
+
+if [ "$1" -eq 0 ]; # Action is uninstall
+then
+ mv /etc/ambari-agent/conf /etc/ambari-agent/conf.save
+fi
+
+exit 0
Modified: incubator/ambari/trunk/ambari-server/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/pom.xml?rev=1464626&r1=1464625&r2=1464626&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/pom.xml (original)
+++ incubator/ambari/trunk/ambari-server/pom.xml Thu Apr 4 16:49:24 2013
@@ -110,12 +110,6 @@
</execution>
</executions>
<configuration>
- <!-- places rpm to specified folder -->
- <!--
- <workarea>
- rpm-target
- </workarea>
- -->
<copyright>2012, Apache Software Foundation</copyright>
<version>${project.version}</version>
<group>Development</group>
@@ -125,9 +119,19 @@
<require>openssl</require>
<require>${python.ver}</require>
</requires>
+ <postinstallScriptlet>
+ <scriptFile>src/main/package/rpm/postinstall.sh</scriptFile>
+ <fileEncoding>utf-8</fileEncoding>
+ </postinstallScriptlet>
+ <preinstallScriptlet>
+ <scriptFile>src/main/package/rpm/preinstall.sh</scriptFile>
+ <fileEncoding>utf-8</fileEncoding>
+ </preinstallScriptlet>
<preremoveScriptlet>
- <script>mv /etc/ambari-server/conf
/etc/ambari-server/conf.save</script>
+ <scriptFile>src/main/package/rpm/preremove.sh</scriptFile>
+ <fileEncoding>utf-8</fileEncoding>
</preremoveScriptlet>
+
<mappings>
<mapping>
<directory>/usr/lib/ambari-server</directory>
@@ -293,13 +297,25 @@
</sources>
</mapping>
<mapping>
- <directory>/var/lib/ambari-server/resources/stacks</directory>
+
<directory>/var/lib/ambari-server/resources/stacks/HDP</directory>
<filemode>755</filemode>
<username>root</username>
<groupname>root</groupname>
<sources>
<source>
- <location>src/main/resources/stacks</location>
+ <location>src/main/resources/stacks/HDP</location>
+ </source>
+ </sources>
+ </mapping>
+ <mapping>
+
<directory>/var/lib/ambari-server/resources/stacks/HDPLocal</directory>
+ <filemode>755</filemode>
+ <username>root</username>
+ <groupname>root</groupname>
+ <configuration>noreplace</configuration>
+ <sources>
+ <source>
+ <location>src/main/resources/stacks/HDPLocal</location>
</source>
</sources>
</mapping>
Added: incubator/ambari/trunk/ambari-server/src/main/package/rpm/postinstall.sh
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/package/rpm/postinstall.sh?rev=1464626&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/package/rpm/postinstall.sh
(added)
+++ incubator/ambari/trunk/ambari-server/src/main/package/rpm/postinstall.sh
Thu Apr 4 16:49:24 2013
@@ -0,0 +1,16 @@
+# 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
+
+exit 0
\ No newline at end of file
Added: incubator/ambari/trunk/ambari-server/src/main/package/rpm/preinstall.sh
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/package/rpm/preinstall.sh?rev=1464626&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/package/rpm/preinstall.sh
(added)
+++ incubator/ambari/trunk/ambari-server/src/main/package/rpm/preinstall.sh Thu
Apr 4 16:49:24 2013
@@ -0,0 +1,16 @@
+# 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
+
+exit 0
\ No newline at end of file
Added: incubator/ambari/trunk/ambari-server/src/main/package/rpm/preremove.sh
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/package/rpm/preremove.sh?rev=1464626&view=auto
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/package/rpm/preremove.sh
(added)
+++ incubator/ambari/trunk/ambari-server/src/main/package/rpm/preremove.sh Thu
Apr 4 16:49:24 2013
@@ -0,0 +1,25 @@
+# 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
+
+# WARNING: This script is performed not only on uninstall, but also
+# during package update. See http://www.ibm.com/developerworks/library/l-rpm2/
+# for details
+
+if [ "$1" -eq 0 ]; # Action is uninstall
+then
+ mv /etc/ambari-server/conf /etc/ambari-server/conf.save
+fi
+
+exit 0