ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [11/38] git commit: AMBARI-7155. Jinja2 should be installed with server rpm as well. (aonishuk)
Date Sun, 07 Sep 2014 09:45:04 GMT
AMBARI-7155. Jinja2 should be installed with server rpm as well. (aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4adf44e1
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4adf44e1
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4adf44e1

Branch: refs/heads/branch-alerts-dev
Commit: 4adf44e12f881e645b9e2609af138791ee9db9b0
Parents: 582c494
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Fri Sep 5 16:32:41 2014 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Fri Sep 5 16:32:41 2014 +0300

----------------------------------------------------------------------
 ambari-agent/conf/unix/install-helper.sh        |  6 +++++
 ambari-agent/pom.xml                            |  2 +-
 .../src/main/package/rpm/posttrans_agent.sh     |  7 ++++++
 ambari-server/conf/unix/install-helper.sh       |  6 +++++
 ambari-server/pom.xml                           | 25 ++++++++++++++++++++
 .../src/main/package/rpm/posttrans_server.sh    |  7 ++++++
 6 files changed, 52 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4adf44e1/ambari-agent/conf/unix/install-helper.sh
----------------------------------------------------------------------
diff --git a/ambari-agent/conf/unix/install-helper.sh b/ambari-agent/conf/unix/install-helper.sh
index f17dd73..3f47a79 100644
--- a/ambari-agent/conf/unix/install-helper.sh
+++ b/ambari-agent/conf/unix/install-helper.sh
@@ -20,10 +20,12 @@
 
 COMMON_DIR="/usr/lib/python2.6/site-packages/ambari_commons"
 RESOURCE_MANAGEMENT_DIR="/usr/lib/python2.6/site-packages/resource_management"
+JINJA_DIR="/usr/lib/python2.6/site-packages/ambari_jinja2"
 OLD_COMMON_DIR="/usr/lib/python2.6/site-packages/common_functions"
 INSTALL_HELPER_SERVER="/var/lib/ambari-server/install-helper.sh"
 COMMON_DIR_AGENT="/usr/lib/ambari-agent/lib/ambari_commons"
 RESOURCE_MANAGEMENT_DIR_AGENT="/usr/lib/ambari-agent/lib/resource_management"
+JINJA_AGENT_DIR="/usr/lib/ambari-agent/lib/ambari_jinja2"
 
 PYTHON_WRAPER_TARGET="/usr/bin/ambari-python-wrap"
 PYTHON_WRAPER_SOURCE="/var/lib/ambari-agent/ambari-python-wrap"
@@ -38,6 +40,10 @@ do_install(){
   if [ ! -d "$RESOURCE_MANAGEMENT_DIR" ]; then
     ln -s "$RESOURCE_MANAGEMENT_DIR_AGENT" "$RESOURCE_MANAGEMENT_DIR"
   fi
+  # setting jinja2 shared resource
+  if [ ! -d "$JINJA_DIR" ]; then
+    ln -s "$JINJA_AGENT_DIR" "$JINJA_DIR"
+  fi
   # setting python-wrapper script
   if [ ! -f "$PYTHON_WRAPER_TARGET" ]; then
     ln -s "$PYTHON_WRAPER_SOURCE" "$PYTHON_WRAPER_TARGET"

http://git-wip-us.apache.org/repos/asf/ambari/blob/4adf44e1/ambari-agent/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-agent/pom.xml b/ambari-agent/pom.xml
index f4cec91..f226748 100644
--- a/ambari-agent/pom.xml
+++ b/ambari-agent/pom.xml
@@ -40,7 +40,7 @@
     <agent.install.dir>/usr/lib/python2.6/site-packages/ambari_agent</agent.install.dir>
     <ambari_commons.install.dir>/usr/lib/ambari-agent/lib/ambari_commons</ambari_commons.install.dir>
     <resource_management.install.dir>/usr/lib/ambari-agent/lib/resource_management</resource_management.install.dir>
-    <jinja.install.dir>/usr/lib/python2.6/site-packages/ambari_jinja2</jinja.install.dir>
+    <jinja.install.dir>/usr/lib/ambari-agent/lib/ambari_jinja2</jinja.install.dir>
     <lib.dir>/usr/lib/ambari-agent/lib</lib.dir>
     <python.ver>python &gt;= 2.6</python.ver>
     <deb.python.ver>python (&gt;= 2.6)</deb.python.ver>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4adf44e1/ambari-agent/src/main/package/rpm/posttrans_agent.sh
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/package/rpm/posttrans_agent.sh b/ambari-agent/src/main/package/rpm/posttrans_agent.sh
index caabb33..c301fc3 100644
--- a/ambari-agent/src/main/package/rpm/posttrans_agent.sh
+++ b/ambari-agent/src/main/package/rpm/posttrans_agent.sh
@@ -16,6 +16,8 @@
 
 RESOURCE_MANAGEMENT_DIR="/usr/lib/python2.6/site-packages/resource_management"
 RESOURCE_MANAGEMENT_DIR_AGENT="/usr/lib/ambari-agent/lib/resource_management"
+JINJA_DIR="/usr/lib/python2.6/site-packages/ambari_jinja2"
+JINJA_AGENT_DIR="/usr/lib/ambari-agent/lib/ambari_jinja2"
 
 # remove RESOURCE_MANAGEMENT_DIR if it's a directory
 if [ -d "$RESOURCE_MANAGEMENT_DIR" ]; then  # resource_management dir exists
@@ -28,4 +30,9 @@ if [ ! -d "$RESOURCE_MANAGEMENT_DIR" ]; then
   ln -s "$RESOURCE_MANAGEMENT_DIR_AGENT" "$RESOURCE_MANAGEMENT_DIR"
 fi
 
+# setting jinja2 shared resource
+if [ ! -d "$JINJA_DIR" ]; then
+  ln -s "$JINJA_AGENT_DIR" "$JINJA_DIR"
+fi
+
 exit 0
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/4adf44e1/ambari-server/conf/unix/install-helper.sh
----------------------------------------------------------------------
diff --git a/ambari-server/conf/unix/install-helper.sh b/ambari-server/conf/unix/install-helper.sh
index f1624c2..108f4c2 100644
--- a/ambari-server/conf/unix/install-helper.sh
+++ b/ambari-server/conf/unix/install-helper.sh
@@ -19,10 +19,12 @@
 
 COMMON_DIR="/usr/lib/python2.6/site-packages/ambari_commons"
 RESOURCE_MANAGEMENT_DIR="/usr/lib/python2.6/site-packages/resource_management"
+JINJA_DIR="/usr/lib/python2.6/site-packages/ambari_jinja2"
 OLD_COMMON_DIR="/usr/lib/python2.6/site-packages/common_functions"
 INSTALL_HELPER_AGENT="/var/lib/ambari-agent/install-helper.sh"
 COMMON_DIR_SERVER="/usr/lib/ambari-server/lib/ambari_commons"
 RESOURCE_MANAGEMENT_DIR_SERVER="/usr/lib/ambari-server/lib/resource_management"
+JINJA_SERVER_DIR="/usr/lib/ambari-server/lib/ambari_jinja2"
 
 PYTHON_WRAPER_TARGET="/usr/bin/ambari-python-wrap"
 PYTHON_WRAPER_SOURCE="/var/lib/ambari-server/ambari-python-wrap"
@@ -37,6 +39,10 @@ do_install(){
   if [ ! -d "$RESOURCE_MANAGEMENT_DIR" ]; then
     ln -s "$RESOURCE_MANAGEMENT_DIR_SERVER" "$RESOURCE_MANAGEMENT_DIR"
   fi
+  # setting jinja2 shared resource
+  if [ ! -d "$JINJA_DIR" ]; then
+    ln -s "$JINJA_SERVER_DIR" "$JINJA_DIR"
+  fi
   # setting python-wrapper script
   if [ ! -f "$PYTHON_WRAPER_TARGET" ]; then
     ln -s "$PYTHON_WRAPER_SOURCE" "$PYTHON_WRAPER_TARGET"

http://git-wip-us.apache.org/repos/asf/ambari/blob/4adf44e1/ambari-server/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index e6c2546..b07afbf 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -33,6 +33,7 @@
     <hdpLatestUrl>http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json</hdpLatestUrl>
     <ambari_commons.install.dir>/usr/lib/ambari-server/lib/ambari_commons</ambari_commons.install.dir>
     <resource_management.install.dir>/usr/lib/ambari-server/lib/resource_management</resource_management.install.dir>
+    <jinja.install.dir>/usr/lib/ambari-server/lib/ambari_jinja2</jinja.install.dir>
     <ambari-web-dir>${basedir}/../ambari-web/public</ambari-web-dir>
     <ambari-admin-dir>${basedir}/../ambari-admin</ambari-admin-dir>
     <contrib-views-dir>${basedir}/../contrib/views</contrib-views-dir>
@@ -283,6 +284,19 @@
                 </source>
               </sources>
             </mapping>
+            <mapping>
+              <directory>${jinja.install.dir}</directory>
+              <username>root</username>
+              <groupname>root</groupname>
+              <sources>
+                <source>
+                  <location>${project.basedir}/../ambari-common/src/main/python/ambari_jinja2/ambari_jinja2</location>
+                  <excludes>
+                    <exclude>${project.basedir}/../ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite</exclude>
+                  </excludes>
+                </source>
+              </sources>
+            </mapping>
               <mapping>
               <directory>/usr/sbin</directory>
               <filemode>755</filemode>
@@ -922,6 +936,17 @@
                 <group>root</group>
               </mapper>
             </data>
+            <data>
+              <src>${project.basedir}/../ambari-common/src/main/python/ambari_jinja2/ambari_jinja2</src>
+              <excludes>${project.basedir}/../ambari-common/src/main/python/ambari_jinja2/ambari_jinja2/testsuite</excludes>
+              <type>directory</type>
+              <mapper>
+                <type>perm</type>
+                <prefix>${jinja.install.dir}</prefix>
+                <user>root</user>
+                <group>root</group>
+              </mapper>
+            </data>
           </dataSet>
         </configuration>
       </plugin>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4adf44e1/ambari-server/src/main/package/rpm/posttrans_server.sh
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/package/rpm/posttrans_server.sh b/ambari-server/src/main/package/rpm/posttrans_server.sh
index 04e4532..6df3c5d 100644
--- a/ambari-server/src/main/package/rpm/posttrans_server.sh
+++ b/ambari-server/src/main/package/rpm/posttrans_server.sh
@@ -16,6 +16,8 @@
 
 RESOURCE_MANAGEMENT_DIR="/usr/lib/python2.6/site-packages/resource_management"
 RESOURCE_MANAGEMENT_DIR_SERVER="/usr/lib/ambari-server/lib/resource_management"
+JINJA_DIR="/usr/lib/python2.6/site-packages/ambari_jinja2"
+JINJA_SERVER_DIR="/usr/lib/ambari-server/lib/ambari_jinja2"
 
 # remove RESOURCE_MANAGEMENT_DIR if it's a directory
 if [ -d "$RESOURCE_MANAGEMENT_DIR" ]; then  # resource_management dir exists
@@ -28,4 +30,9 @@ if [ ! -d "$RESOURCE_MANAGEMENT_DIR" ]; then
   ln -s "$RESOURCE_MANAGEMENT_DIR_SERVER" "$RESOURCE_MANAGEMENT_DIR"
 fi
 
+# setting jinja2 shared resource
+if [ ! -d "$JINJA_DIR" ]; then
+  ln -s "$JINJA_SERVER_DIR" "$JINJA_DIR"
+fi
+
 exit 0
\ No newline at end of file


Mime
View raw message