You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ds...@apache.org on 2014/11/05 19:04:01 UTC

git commit: AMBARI-8154 storm secure cluster issues (dsen)

Repository: ambari
Updated Branches:
  refs/heads/branch-1.7.0 ead69217f -> 0cdc6d931


AMBARI-8154 storm secure cluster issues (dsen)


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

Branch: refs/heads/branch-1.7.0
Commit: 0cdc6d931cf39700974b82c09d6067746876933c
Parents: ead6921
Author: Dmytro Sen <ds...@apache.org>
Authored: Wed Nov 5 20:03:34 2014 +0200
Committer: Dmytro Sen <ds...@apache.org>
Committed: Wed Nov 5 20:03:34 2014 +0200

----------------------------------------------------------------------
 .../2.1/services/STORM/package/scripts/storm.py |  9 ++++-
 .../services/STORM/configuration/storm-env.xml  | 40 ++++++++++++++++++++
 .../python/stacks/2.1/STORM/test_storm_base.py  |  2 +
 3 files changed, 50 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0cdc6d93/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py
index 7568ba8..948a53b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py
@@ -26,7 +26,14 @@ from ambari_agent.AgentException import AgentException
 def storm():
   import params
 
-  Directory([params.log_dir, params.pid_dir, params.local_dir, params.conf_dir],
+  Directory(params.log_dir,
+            owner=params.storm_user,
+            group=params.user_group,
+            mode=0775,
+            recursive=True
+  )
+
+  Directory([params.pid_dir, params.local_dir, params.conf_dir],
             owner=params.storm_user,
             group=params.user_group,
             recursive=True

http://git-wip-us.apache.org/repos/asf/ambari/blob/0cdc6d93/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-env.xml
new file mode 100644
index 0000000..b9f1927
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/STORM/configuration/storm-env.xml
@@ -0,0 +1,40 @@
+<?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.
+ */
+-->
+
+<configuration>
+  <!-- storm-env.sh -->
+  <property>
+    <name>content</name>
+    <description>This is the jinja template for storm-env.sh file</description>
+    <value>
+#!/bin/bash
+
+# Set Storm specific environment variables here.
+
+# The java implementation to use.
+export JAVA_HOME={{java64_home}}
+
+# export STORM_CONF_DIR=""
+STORM_HOME=/usr/hdp/current/storm-client
+    </value>
+  </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/0cdc6d93/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_base.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_base.py b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_base.py
index 887c67e..c9f9d38 100644
--- a/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_base.py
+++ b/ambari-server/src/test/python/stacks/2.1/STORM/test_storm_base.py
@@ -30,6 +30,7 @@ class TestStormBase(RMFTestCase):
     self.assertResourceCalled('Directory', '/var/log/storm',
       owner = 'storm',
       group = 'hadoop',
+      mode = 0775,
       recursive = True,
     )
     self.assertResourceCalled('Directory', '/var/run/storm',
@@ -68,6 +69,7 @@ class TestStormBase(RMFTestCase):
     self.assertResourceCalled('Directory', '/var/log/storm',
       owner = 'storm',
       group = 'hadoop',
+      mode = 0775,
       recursive = True,
     )
     self.assertResourceCalled('Directory', '/var/run/storm',