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:01:32 UTC
git commit: AMBARI-8154 storm secure cluster issues
Repository: ambari
Updated Branches:
refs/heads/trunk 2b0a9aa6e -> 776743beb
AMBARI-8154 storm secure cluster issues
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/776743be
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/776743be
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/776743be
Branch: refs/heads/trunk
Commit: 776743beb424157697be94e57aaf220ba10846ee
Parents: 2b0a9aa
Author: Dmytro Sen <ds...@apache.org>
Authored: Wed Nov 5 20:01:05 2014 +0200
Committer: Dmytro Sen <ds...@apache.org>
Committed: Wed Nov 5 20:01:13 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/776743be/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/776743be/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/776743be/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',