Bläddra i källkod

AMBARI-8779: Common Services: Refactor HDP-2.1 FALCON, STORM, TEZ services (Jayush Luniya)

Jayush Luniya 10 år sedan
förälder
incheckning
bab3dbc840
63 ändrade filer med 555 tillägg och 351 borttagningar
  1. 0 0
      ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/alerts.json
  2. 0 0
      ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-env.xml
  3. 0 0
      ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-runtime.properties.xml
  4. 0 0
      ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-startup.properties.xml
  5. 0 0
      ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/oozie-site.xml
  6. 117 0
      ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml
  7. 0 0
      ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py
  8. 0 0
      ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_client.py
  9. 0 0
      ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server.py
  10. 0 0
      ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params.py
  11. 0 0
      ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/service_check.py
  12. 0 0
      ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/status_params.py
  13. 0 0
      ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/templates/client.properties.j2
  14. 0 0
      ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/templates/runtime.properties.j2
  15. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/alerts.json
  16. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/configuration/storm-env.xml
  17. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/configuration/storm-site.xml
  18. 126 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/metainfo.xml
  19. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/metrics.json
  20. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/files/wordCount.jar
  21. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/drpc_server.py
  22. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/nimbus.py
  23. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/nimbus_prod.py
  24. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params.py
  25. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/rest_api.py
  26. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py
  27. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service_check.py
  28. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/status_params.py
  29. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm.py
  30. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/supervisor.py
  31. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/supervisor_prod.py
  32. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/supervisord_service.py
  33. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/ui_server.py
  34. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/yaml_utils.py
  35. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/templates/client_jaas.conf.j2
  36. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/templates/config.yaml.j2
  37. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/templates/storm-metrics2.properties.j2
  38. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/templates/storm.yaml.j2
  39. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/templates/storm_jaas.conf.j2
  40. 0 0
      ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/templates/worker-launcher.cfg.j2
  41. 0 0
      ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/configuration/tez-env.xml
  42. 0 0
      ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/configuration/tez-site.xml
  43. 73 0
      ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml
  44. 0 0
      ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/params.py
  45. 0 0
      ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/tez.py
  46. 0 0
      ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/tez_client.py
  47. 1 92
      ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/metainfo.xml
  48. 1 100
      ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/metainfo.xml
  49. 1 48
      ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/metainfo.xml
  50. 7 2
      ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py
  51. 14 6
      ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py
  52. 10 4
      ambari-server/src/test/python/stacks/2.1/FALCON/test_service_check.py
  53. 7 3
      ambari-server/src/test/python/stacks/2.1/STORM/test_service_check.py
  54. 3 0
      ambari-server/src/test/python/stacks/2.1/STORM/test_storm_base.py
  55. 24 12
      ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py
  56. 16 8
      ambari-server/src/test/python/stacks/2.1/STORM/test_storm_jaas_configuration.py
  57. 24 12
      ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py
  58. 24 12
      ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus_prod.py
  59. 24 12
      ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py
  60. 24 12
      ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py
  61. 24 12
      ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py
  62. 24 12
      ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py
  63. 11 4
      ambari-server/src/test/python/stacks/2.1/TEZ/test_tez_client.py

+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/alerts.json → ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/alerts.json


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/configuration/falcon-env.xml → ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-env.xml


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/configuration/falcon-runtime.properties.xml → ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-runtime.properties.xml


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/configuration/falcon-startup.properties.xml → ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/falcon-startup.properties.xml


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/configuration/oozie-site.xml → ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/configuration/oozie-site.xml


+ 117 - 0
ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/metainfo.xml

@@ -0,0 +1,117 @@
+<?xml version="1.0"?>
+<!--
+   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.
+-->
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>FALCON</name>
+      <displayName>Falcon</displayName>
+      <comment>Data management and processing platform</comment>
+      <version>0.5.0.2.1</version>
+      <components>
+        <component>
+          <name>FALCON_CLIENT</name>
+          <displayName>Falcon Client</displayName>
+          <category>CLIENT</category>
+          <cardinality>1+</cardinality>
+          <commandScript>
+            <script>scripts/falcon_client.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+          <configFiles>
+            <configFile>
+              <type>env</type>
+              <fileName>falcon-env.sh</fileName>
+              <dictionaryName>falcon-env</dictionaryName>
+            </configFile>
+            <configFile>
+              <type>properties</type>
+              <fileName>runtime.properties</fileName>
+              <dictionaryName>falcon-runtime.properties</dictionaryName>
+            </configFile>
+            <configFile>
+              <type>properties</type>
+              <fileName>startup.properties</fileName>
+              <dictionaryName>falcon-startup.properties</dictionaryName>
+            </configFile>
+          </configFiles>
+        </component>
+        <component>
+          <name>FALCON_SERVER</name>
+          <displayName>Falcon Server</displayName>
+          <category>MASTER</category>
+          <cardinality>1</cardinality>
+          <dependencies>
+            <dependency>
+              <name>OOZIE/OOZIE_SERVER</name>
+              <scope>cluster</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+            <dependency>
+              <name>OOZIE/OOZIE_CLIENT</name>
+              <scope>cluster</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+          </dependencies>
+          <commandScript>
+            <script>scripts/falcon_server.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+        </component>
+      </components>
+
+      <osSpecifics>
+        <osSpecific>
+          <osFamily>any</osFamily>
+          <packages>
+            <package>
+              <name>falcon</name>
+            </package>
+          </packages>
+        </osSpecific>
+      </osSpecifics>
+
+      <commandScript>
+        <script>scripts/service_check.py</script>
+        <scriptType>PYTHON</scriptType>
+        <timeout>300</timeout>
+      </commandScript>
+      
+      <requiredServices>
+        <service>OOZIE</service>
+      </requiredServices>
+
+      <configuration-dependencies>
+        <config-type>falcon-env</config-type>
+        <config-type>falcon-startup.properties</config-type>
+        <config-type>falcon-runtime.properties</config-type>
+      </configuration-dependencies>
+
+      <excluded-config-types>
+        <config-type>oozie-site</config-type>
+      </excluded-config-types>
+
+    </service>
+  </services>
+</metainfo>

+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/scripts/falcon.py → ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/scripts/falcon_client.py → ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_client.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/scripts/falcon_server.py → ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/falcon_server.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/scripts/params.py → ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/scripts/service_check.py → ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/service_check.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/scripts/status_params.py → ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/status_params.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/templates/client.properties.j2 → ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/templates/client.properties.j2


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/package/templates/runtime.properties.j2 → ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/templates/runtime.properties.j2


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/alerts.json → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/alerts.json


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-env.xml → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/configuration/storm-env.xml


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/configuration/storm-site.xml → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/configuration/storm-site.xml


+ 126 - 0
ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/metainfo.xml

@@ -0,0 +1,126 @@
+<?xml version="1.0"?>
+<!--
+   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.
+-->
+
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>STORM</name>
+      <displayName>Storm</displayName>
+      <comment>Apache Hadoop Stream processing framework</comment>
+      <version>0.9.1.2.1</version>
+      <components>
+
+        <component>
+          <name>NIMBUS</name>
+          <displayName>Nimbus</displayName>
+          <category>MASTER</category>
+          <cardinality>1</cardinality>
+          <dependencies>
+            <dependency>
+              <name>ZOOKEEPER/ZOOKEEPER_SERVER</name>
+              <scope>cluster</scope>
+              <auto-deploy>
+                <enabled>true</enabled>
+              </auto-deploy>
+            </dependency>
+          </dependencies>
+          <commandScript>
+            <script>scripts/nimbus.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+        </component>
+
+        <component>
+          <name>STORM_REST_API</name>
+          <displayName>Storm REST API Server</displayName>
+          <category>MASTER</category>
+          <cardinality>1</cardinality>
+          <commandScript>
+            <script>scripts/rest_api.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+        </component>
+
+        <component>
+          <name>SUPERVISOR</name>
+          <displayName>Supervisor</displayName>
+          <category>SLAVE</category>
+          <cardinality>1+</cardinality>
+          <commandScript>
+            <script>scripts/supervisor.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+        </component>
+
+        <component>
+          <name>STORM_UI_SERVER</name>
+          <displayName>Storm UI Server</displayName>
+          <category>MASTER</category>
+          <cardinality>1</cardinality>
+          <commandScript>
+            <script>scripts/ui_server.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+        </component>
+
+        <component>
+          <name>DRPC_SERVER</name>
+          <displayName>DRPC Server</displayName>
+          <category>MASTER</category>
+          <cardinality>1</cardinality>
+          <commandScript>
+            <script>scripts/drpc_server.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+        </component>
+      </components>
+
+      <osSpecifics>
+        <osSpecific>
+          <osFamily>any</osFamily>
+          <packages>
+            <package>
+              <name>storm</name>
+            </package>
+          </packages>
+        </osSpecific>
+      </osSpecifics>
+
+      <commandScript>
+        <script>scripts/service_check.py</script>
+        <scriptType>PYTHON</scriptType>
+        <timeout>300</timeout>
+      </commandScript>
+      
+      <requiredServices>
+        <service>ZOOKEEPER</service>
+      </requiredServices>
+
+      <configuration-dependencies>
+        <config-type>storm-site</config-type>
+        <config-type>storm-env</config-type>
+      </configuration-dependencies>
+    </service>
+  </services>
+</metainfo>

+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/metrics.json → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/metrics.json


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/files/wordCount.jar → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/files/wordCount.jar


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/drpc_server.py → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/drpc_server.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/nimbus.py → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/nimbus.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/nimbus_prod.py → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/nimbus_prod.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/params.py → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/rest_api.py → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/rest_api.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service.py → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/service_check.py → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/service_check.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/status_params.py → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/status_params.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/storm.py → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/storm.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/supervisor.py → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/supervisor.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/supervisor_prod.py → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/supervisor_prod.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/supervisord_service.py → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/supervisord_service.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/ui_server.py → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/ui_server.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/scripts/yaml_utils.py → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/yaml_utils.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/client_jaas.conf.j2 → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/templates/client_jaas.conf.j2


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/config.yaml.j2 → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/templates/config.yaml.j2


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/storm-metrics2.properties.j2 → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/templates/storm-metrics2.properties.j2


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/storm.yaml.j2 → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/templates/storm.yaml.j2


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/storm_jaas.conf.j2 → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/templates/storm_jaas.conf.j2


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/package/templates/worker-launcher.cfg.j2 → ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/templates/worker-launcher.cfg.j2


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/configuration/tez-env.xml → ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/configuration/tez-env.xml


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/configuration/tez-site.xml → ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/configuration/tez-site.xml


+ 73 - 0
ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/metainfo.xml

@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<!--
+   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.
+-->
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>TEZ</name>
+      <displayName>Tez</displayName>
+      <comment>Tez is the next generation Hadoop Query Processing framework written on top of YARN.</comment>
+      <version>0.4.0.2.1</version>
+      <components>
+        <component>
+          <name>TEZ_CLIENT</name>
+          <displayName>Tez Client</displayName>
+          <cardinality>1+</cardinality>
+          <category>CLIENT</category>
+          <commandScript>
+            <script>scripts/tez_client.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>600</timeout>
+          </commandScript>
+          <configFiles>
+            <configFile>
+              <type>xml</type>
+              <fileName>tez-site.xml</fileName>
+              <dictionaryName>tez-site</dictionaryName>
+            </configFile>
+            <configFile>
+              <type>env</type>
+              <fileName>tez-env.sh</fileName>
+              <dictionaryName>tez-env</dictionaryName>
+            </configFile>
+          </configFiles>
+        </component>
+      </components>
+      <osSpecifics>
+        <osSpecific>
+          <osFamily>any</osFamily>
+          <packages>
+            <package>
+              <name>tez</name>
+            </package>
+          </packages>
+        </osSpecific>
+      </osSpecifics>
+      
+      <requiredServices>
+        <service>YARN</service>
+      </requiredServices>
+
+      <configuration-dependencies>
+        <config-type>tez-site</config-type>
+        <config-type>tez-env</config-type>
+      </configuration-dependencies>
+
+    </service>
+  </services>
+</metainfo>

+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/params.py → ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/params.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez.py → ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/tez.py


+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/package/scripts/tez_client.py → ambari-server/src/main/resources/common-services/TEZ/0.4.0.2.1/package/scripts/tez_client.py


+ 1 - 92
ambari-server/src/main/resources/stacks/HDP/2.1/services/FALCON/metainfo.xml

@@ -20,98 +20,7 @@
   <services>
     <service>
       <name>FALCON</name>
-      <displayName>Falcon</displayName>
-      <comment>Data management and processing platform</comment>
-      <version>0.5.0.2.1</version>
-      <components>
-        <component>
-          <name>FALCON_CLIENT</name>
-          <displayName>Falcon Client</displayName>
-          <category>CLIENT</category>
-          <cardinality>1+</cardinality>
-          <commandScript>
-            <script>scripts/falcon_client.py</script>
-            <scriptType>PYTHON</scriptType>
-            <timeout>600</timeout>
-          </commandScript>
-          <configFiles>
-            <configFile>
-              <type>env</type>
-              <fileName>falcon-env.sh</fileName>
-              <dictionaryName>falcon-env</dictionaryName>
-            </configFile>
-            <configFile>
-              <type>properties</type>
-              <fileName>runtime.properties</fileName>
-              <dictionaryName>falcon-runtime.properties</dictionaryName>
-            </configFile>
-            <configFile>
-              <type>properties</type>
-              <fileName>startup.properties</fileName>
-              <dictionaryName>falcon-startup.properties</dictionaryName>
-            </configFile>
-          </configFiles>
-        </component>
-        <component>
-          <name>FALCON_SERVER</name>
-          <displayName>Falcon Server</displayName>
-          <category>MASTER</category>
-          <cardinality>1</cardinality>
-          <dependencies>
-            <dependency>
-              <name>OOZIE/OOZIE_SERVER</name>
-              <scope>cluster</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-            <dependency>
-              <name>OOZIE/OOZIE_CLIENT</name>
-              <scope>cluster</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-          </dependencies>
-          <commandScript>
-            <script>scripts/falcon_server.py</script>
-            <scriptType>PYTHON</scriptType>
-            <timeout>600</timeout>
-          </commandScript>
-        </component>
-      </components>
-
-      <osSpecifics>
-        <osSpecific>
-          <osFamily>any</osFamily>
-          <packages>
-            <package>
-              <name>falcon</name>
-            </package>
-          </packages>
-        </osSpecific>
-      </osSpecifics>
-
-      <commandScript>
-        <script>scripts/service_check.py</script>
-        <scriptType>PYTHON</scriptType>
-        <timeout>300</timeout>
-      </commandScript>
-      
-      <requiredServices>
-        <service>OOZIE</service>
-      </requiredServices>
-
-      <configuration-dependencies>
-        <config-type>falcon-env</config-type>
-        <config-type>falcon-startup.properties</config-type>
-        <config-type>falcon-runtime.properties</config-type>
-      </configuration-dependencies>
-
-      <excluded-config-types>
-        <config-type>oozie-site</config-type>
-      </excluded-config-types>
-
+      <extends>common-services/FALCON/0.5.0.2.1</extends>
     </service>
   </services>
 </metainfo>

+ 1 - 100
ambari-server/src/main/resources/stacks/HDP/2.1/services/STORM/metainfo.xml

@@ -21,106 +21,7 @@
   <services>
     <service>
       <name>STORM</name>
-      <displayName>Storm</displayName>
-      <comment>Apache Hadoop Stream processing framework</comment>
-      <version>0.9.1.2.1</version>
-      <components>
-
-        <component>
-          <name>NIMBUS</name>
-          <displayName>Nimbus</displayName>
-          <category>MASTER</category>
-          <cardinality>1</cardinality>
-          <dependencies>
-            <dependency>
-              <name>ZOOKEEPER/ZOOKEEPER_SERVER</name>
-              <scope>cluster</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-          </dependencies>
-          <commandScript>
-            <script>scripts/nimbus.py</script>
-            <scriptType>PYTHON</scriptType>
-            <timeout>600</timeout>
-          </commandScript>
-        </component>
-
-        <component>
-          <name>STORM_REST_API</name>
-          <displayName>Storm REST API Server</displayName>
-          <category>MASTER</category>
-          <cardinality>1</cardinality>
-          <commandScript>
-            <script>scripts/rest_api.py</script>
-            <scriptType>PYTHON</scriptType>
-            <timeout>600</timeout>
-          </commandScript>
-        </component>
-
-        <component>
-          <name>SUPERVISOR</name>
-          <displayName>Supervisor</displayName>
-          <category>SLAVE</category>
-          <cardinality>1+</cardinality>
-          <commandScript>
-            <script>scripts/supervisor.py</script>
-            <scriptType>PYTHON</scriptType>
-            <timeout>600</timeout>
-          </commandScript>
-        </component>
-
-        <component>
-          <name>STORM_UI_SERVER</name>
-          <displayName>Storm UI Server</displayName>
-          <category>MASTER</category>
-          <cardinality>1</cardinality>
-          <commandScript>
-            <script>scripts/ui_server.py</script>
-            <scriptType>PYTHON</scriptType>
-            <timeout>600</timeout>
-          </commandScript>
-        </component>
-
-        <component>
-          <name>DRPC_SERVER</name>
-          <displayName>DRPC Server</displayName>
-          <category>MASTER</category>
-          <cardinality>1</cardinality>
-          <commandScript>
-            <script>scripts/drpc_server.py</script>
-            <scriptType>PYTHON</scriptType>
-            <timeout>600</timeout>
-          </commandScript>
-        </component>
-      </components>
-
-      <osSpecifics>
-        <osSpecific>
-          <osFamily>any</osFamily>
-          <packages>
-            <package>
-              <name>storm</name>
-            </package>
-          </packages>
-        </osSpecific>
-      </osSpecifics>
-
-      <commandScript>
-        <script>scripts/service_check.py</script>
-        <scriptType>PYTHON</scriptType>
-        <timeout>300</timeout>
-      </commandScript>
-      
-      <requiredServices>
-        <service>ZOOKEEPER</service>
-      </requiredServices>
-
-      <configuration-dependencies>
-        <config-type>storm-site</config-type>
-        <config-type>storm-env</config-type>
-      </configuration-dependencies>
+      <extends>common-services/STORM/0.9.1.2.1</extends>
     </service>
   </services>
 </metainfo>

+ 1 - 48
ambari-server/src/main/resources/stacks/HDP/2.1/services/TEZ/metainfo.xml

@@ -20,54 +20,7 @@
   <services>
     <service>
       <name>TEZ</name>
-      <displayName>Tez</displayName>
-      <comment>Tez is the next generation Hadoop Query Processing framework written on top of YARN.</comment>
-      <version>0.4.0.2.1</version>
-      <components>
-        <component>
-          <name>TEZ_CLIENT</name>
-          <displayName>Tez Client</displayName>
-          <cardinality>1+</cardinality>
-          <category>CLIENT</category>
-          <commandScript>
-            <script>scripts/tez_client.py</script>
-            <scriptType>PYTHON</scriptType>
-            <timeout>600</timeout>
-          </commandScript>
-          <configFiles>
-            <configFile>
-              <type>xml</type>
-              <fileName>tez-site.xml</fileName>
-              <dictionaryName>tez-site</dictionaryName>
-            </configFile>
-            <configFile>
-              <type>env</type>
-              <fileName>tez-env.sh</fileName>
-              <dictionaryName>tez-env</dictionaryName>
-            </configFile>
-          </configFiles>
-        </component>
-      </components>
-      <osSpecifics>
-        <osSpecific>
-          <osFamily>any</osFamily>
-          <packages>
-            <package>
-              <name>tez</name>
-            </package>
-          </packages>
-        </osSpecific>
-      </osSpecifics>
-      
-      <requiredServices>
-        <service>YARN</service>
-      </requiredServices>
-
-      <configuration-dependencies>
-        <config-type>tez-site</config-type>
-        <config-type>tez-env</config-type>
-      </configuration-dependencies>
-
+      <extends>common-services/TEZ/0.4.0.2.1</extends>
     </service>
   </services>
 </metainfo>

+ 7 - 2
ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py

@@ -22,11 +22,16 @@ from stacks.utils.RMFTestCase import *
 
 
 class TestFalconClient(RMFTestCase):
+  COMMON_SERVICES_PACKAGE_DIR = "FALCON/0.5.0.2.1/package"
+  STACK_VERSION = "2.1"
+
   def test_configure_default(self):
-    self.executeScript("2.1/services/FALCON/package/scripts/falcon_client.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/falcon_client.py",
                        classname="FalconClient",
                        command="configure",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assertResourceCalled('Directory', '/var/run/falcon',
                               owner = 'falcon',

+ 14 - 6
ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_server.py

@@ -22,12 +22,16 @@ from stacks.utils.RMFTestCase import *
 
 
 class TestFalconServer(RMFTestCase):
+  COMMON_SERVICES_PACKAGE_DIR = "FALCON/0.5.0.2.1/package"
+  STACK_VERSION = "2.1"
 
   def test_start_default(self):
-    self.executeScript("2.1/services/FALCON/package/scripts/falcon_server.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/falcon_server.py",
                        classname="FalconServer",
                        command="start",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_default()
     self.assertResourceCalled('Execute', '/usr/lib/falcon/bin/falcon-start -port 15000',
@@ -37,10 +41,12 @@ class TestFalconServer(RMFTestCase):
     self.assertNoMoreResources()
 
   def test_stop_default(self):
-    self.executeScript("2.1/services/FALCON/package/scripts/falcon_server.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/falcon_server.py",
                        classname="FalconServer",
                        command="stop",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assertResourceCalled('Execute', '/usr/lib/falcon/bin/falcon-stop',
                               path = ['/usr/bin'],
@@ -52,10 +58,12 @@ class TestFalconServer(RMFTestCase):
     self.assertNoMoreResources()
 
   def test_configure_default(self):
-    self.executeScript("2.1/services/FALCON/package/scripts/falcon_server.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/falcon_server.py",
                        classname="FalconServer",
                        command="configure",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_default()
     self.assertNoMoreResources()

+ 10 - 4
ambari-server/src/test/python/stacks/2.1/FALCON/test_service_check.py

@@ -22,12 +22,16 @@ from stacks.utils.RMFTestCase import *
 
 
 class TestFalconServer(RMFTestCase):
+  COMMON_SERVICES_PACKAGE_DIR = "FALCON/0.5.0.2.1/package"
+  STACK_VERSION = "2.1"
 
   def test_service_check(self):
-    self.executeScript("2.1/services/FALCON/package/scripts/service_check.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/service_check.py",
                        classname="FalconServiceCheck",
                        command="service_check",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assertResourceCalled('Execute', '/usr/lib/falcon/bin/falcon admin -version',
                               logoutput = True,
@@ -36,10 +40,12 @@ class TestFalconServer(RMFTestCase):
                               try_sleep = 20,)
     self.assertNoMoreResources()
   def test_service_check_secured(self):
-    self.executeScript("2.1/services/FALCON/package/scripts/service_check.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/service_check.py",
                        classname="FalconServiceCheck",
                        command="service_check",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assertResourceCalled('Execute','/usr/bin/kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari-qa',
                               user='ambari-qa'

+ 7 - 3
ambari-server/src/test/python/stacks/2.1/STORM/test_service_check.py

@@ -22,15 +22,19 @@ from mock.mock import MagicMock, call, patch
 from stacks.utils.RMFTestCase import *
 import datetime
 import  resource_management.libraries.functions
+from test_storm_base import TestStormBase
+
 @patch.object(resource_management.libraries.functions, "get_unique_id_and_date", new = MagicMock(return_value=''))
 
-class TestStormServiceCheck(RMFTestCase):
+class TestStormServiceCheck(TestStormBase):
 
   def test_service_check(self):
-    self.executeScript("2.1/services/STORM/package/scripts/service_check.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/service_check.py",
                        classname="ServiceCheck",
                        command="service_check",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
     self.assertResourceCalled('File', '/tmp/wordCount.jar',

+ 3 - 0
ambari-server/src/test/python/stacks/2.1/STORM/test_storm_base.py

@@ -25,6 +25,9 @@ import re
 
 
 class TestStormBase(RMFTestCase):
+  COMMON_SERVICES_PACKAGE_DIR = "STORM/0.9.1.2.1/package"
+  STACK_VERSION = "2.1"
+
   def assert_configure_default(self):
     import params
     self.assertResourceCalled('Directory', '/var/log/storm',

+ 24 - 12
ambari-server/src/test/python/stacks/2.1/STORM/test_storm_drpc_server.py

@@ -26,10 +26,12 @@ from test_storm_base import TestStormBase
 class TestStormDrpcServer(TestStormBase):
 
   def test_configure_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/drpc_server.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/drpc_server.py",
                        classname = "DrpcServer",
                        command = "configure",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
     self.assert_configure_default()
@@ -37,10 +39,12 @@ class TestStormDrpcServer(TestStormBase):
 
   def test_start_default(self):
 
-    self.executeScript("2.1/services/STORM/package/scripts/drpc_server.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/drpc_server.py",
                        classname = "DrpcServer",
                        command = "start",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_default()
 
@@ -61,10 +65,12 @@ class TestStormDrpcServer(TestStormBase):
     self.assertNoMoreResources()
 
   def test_stop_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/drpc_server.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/drpc_server.py",
                        classname = "DrpcServer",
                        command = "stop",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assertResourceCalled('Execute', 'sudo kill `cat /var/run/storm/drpc.pid`',
         not_if = '! (ls /var/run/storm/drpc.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/drpc.pid` >/dev/null 2>&1)',
@@ -79,19 +85,23 @@ class TestStormDrpcServer(TestStormBase):
     self.assertNoMoreResources()
 
   def test_configure_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/drpc_server.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/drpc_server.py",
                        classname = "DrpcServer",
                        command = "configure",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_secured()
     self.assertNoMoreResources()
 
   def test_start_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/drpc_server.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/drpc_server.py",
                        classname = "DrpcServer",
                        command = "start",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
     self.assert_configure_secured()
@@ -112,10 +122,12 @@ class TestStormDrpcServer(TestStormBase):
     self.assertNoMoreResources()
 
   def test_stop_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/drpc_server.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/drpc_server.py",
                        classname = "DrpcServer",
                        command = "stop",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assertResourceCalled('Execute', 'sudo kill `cat /var/run/storm/drpc.pid`',
         not_if = '! (ls /var/run/storm/drpc.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/drpc.pid` >/dev/null 2>&1)',

+ 16 - 8
ambari-server/src/test/python/stacks/2.1/STORM/test_storm_jaas_configuration.py

@@ -26,18 +26,22 @@ from test_storm_base import TestStormBase
 class TestStormJaasConfiguration(TestStormBase):
 
   def test_configure_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/nimbus.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus.py",
                        classname = "Nimbus",
                        command = "configure",
-                       config_file = "default-storm-start.json"
+                       config_file = "default-storm-start.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_default()
   def test_start_default(self):
 
-    self.executeScript("2.1/services/STORM/package/scripts/nimbus.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus.py",
                        classname = "Nimbus",
                        command = "start",
-                       config_file = "default-storm-start.json"
+                       config_file = "default-storm-start.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_default()
 
@@ -45,19 +49,23 @@ class TestStormJaasConfiguration(TestStormBase):
   @patch("storm._find_real_user_min_uid")
   def test_configure_secured(self, find_real_user_max_pid):
     find_real_user_max_pid.return_value = 500
-    self.executeScript("2.1/services/STORM/package/scripts/nimbus.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus.py",
                        classname = "Nimbus",
                        command = "configure",
-                       config_file = "secured-storm-start.json"
+                       config_file = "secured-storm-start.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_secured()
   @patch("storm._find_real_user_min_uid")
   def test_start_secured(self, find_real_user_max_pid):
     find_real_user_max_pid.return_value = 500
-    self.executeScript("2.1/services/STORM/package/scripts/nimbus.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus.py",
                        classname = "Nimbus",
                        command = "start",
-                       config_file = "secured-storm-start.json"
+                       config_file = "secured-storm-start.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_secured()
 

+ 24 - 12
ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus.py

@@ -27,19 +27,23 @@ from test_storm_base import TestStormBase
 class TestStormNimbus(TestStormBase):
 
   def test_configure_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/nimbus.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus.py",
                        classname = "Nimbus",
                        command = "configure",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_default()
     self.assertNoMoreResources()
 
   def test_start_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/nimbus.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus.py",
                        classname = "Nimbus",
                        command = "start",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
     self.assert_configure_default()
@@ -60,10 +64,12 @@ class TestStormNimbus(TestStormBase):
     self.assertNoMoreResources()
 
   def test_stop_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/nimbus.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus.py",
                        classname = "Nimbus",
                        command = "stop",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assertResourceCalled('Execute', 'sudo kill `cat /var/run/storm/nimbus.pid`',
         not_if = '! (ls /var/run/storm/nimbus.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/nimbus.pid` >/dev/null 2>&1)',
@@ -78,19 +84,23 @@ class TestStormNimbus(TestStormBase):
     self.assertNoMoreResources()
 
   def test_configure_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/nimbus.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus.py",
                        classname = "Nimbus",
                        command = "configure",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_secured()
     self.assertNoMoreResources()
 
   def test_start_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/nimbus.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus.py",
                        classname = "Nimbus",
                        command = "start",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
     self.assert_configure_secured()
@@ -111,10 +121,12 @@ class TestStormNimbus(TestStormBase):
     self.assertNoMoreResources()
 
   def test_stop_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/nimbus.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus.py",
                        classname = "Nimbus",
                        command = "stop",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assertResourceCalled('Execute', 'sudo kill `cat /var/run/storm/nimbus.pid`',
         not_if = '! (ls /var/run/storm/nimbus.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/nimbus.pid` >/dev/null 2>&1)',

+ 24 - 12
ambari-server/src/test/python/stacks/2.1/STORM/test_storm_nimbus_prod.py

@@ -26,19 +26,23 @@ from test_storm_base import TestStormBase
 class TestStormNimbus(TestStormBase):
 
   def test_configure_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/nimbus_prod.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus_prod.py",
                        classname = "Nimbus",
                        command = "configure",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_default()
     self.assertNoMoreResources()
 
   def test_start_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/nimbus_prod.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus_prod.py",
                        classname = "Nimbus",
                        command = "start",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
     self.assert_configure_default()
@@ -49,10 +53,12 @@ class TestStormNimbus(TestStormBase):
     self.assertNoMoreResources()
 
   def test_stop_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/nimbus_prod.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus_prod.py",
                        classname = "Nimbus",
                        command = "stop",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assertResourceCalled('Execute', 'supervisorctl stop storm-nimbus',
                               wait_for_finish = False,
@@ -60,19 +66,23 @@ class TestStormNimbus(TestStormBase):
     self.assertNoMoreResources()
 
   def test_configure_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/nimbus_prod.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus_prod.py",
                        classname = "Nimbus",
                        command = "configure",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_secured()
     self.assertNoMoreResources()
 
   def test_start_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/nimbus_prod.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus_prod.py",
                        classname = "Nimbus",
                        command = "start",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
     self.assert_configure_secured()
@@ -83,10 +93,12 @@ class TestStormNimbus(TestStormBase):
     self.assertNoMoreResources()
 
   def test_stop_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/nimbus_prod.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/nimbus_prod.py",
                        classname = "Nimbus",
                        command = "stop",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assertResourceCalled('Execute', 'supervisorctl stop storm-nimbus',
                               wait_for_finish = False,

+ 24 - 12
ambari-server/src/test/python/stacks/2.1/STORM/test_storm_rest_api_service.py

@@ -26,19 +26,23 @@ from test_storm_base import TestStormBase
 class TestStormRestApi(TestStormBase):
 
   def test_configure_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/rest_api.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/rest_api.py",
                        classname = "StormRestApi",
                        command = "configure",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_default()
     self.assertNoMoreResources()
 
   def test_start_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/rest_api.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/rest_api.py",
                        classname = "StormRestApi",
                        command = "start",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
     self.assert_configure_default()
@@ -59,10 +63,12 @@ class TestStormRestApi(TestStormBase):
     self.assertNoMoreResources()
 
   def test_stop_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/rest_api.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/rest_api.py",
                        classname = "StormRestApi",
                        command = "stop",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assertResourceCalled('Execute', 'sudo kill `cat /var/run/storm/restapi.pid`',
         not_if = '! (ls /var/run/storm/restapi.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/restapi.pid` >/dev/null 2>&1)',
@@ -77,19 +83,23 @@ class TestStormRestApi(TestStormBase):
     self.assertNoMoreResources()
 
   def test_configure_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/rest_api.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/rest_api.py",
                        classname = "StormRestApi",
                        command = "configure",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_secured()
     self.assertNoMoreResources()
 
   def test_start_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/rest_api.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/rest_api.py",
                        classname = "StormRestApi",
                        command = "start",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
     self.assert_configure_secured()
@@ -111,10 +121,12 @@ class TestStormRestApi(TestStormBase):
     self.assertNoMoreResources()
 
   def test_stop_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/rest_api.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/rest_api.py",
                        classname = "StormRestApi",
                        command = "stop",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assertResourceCalled('Execute', 'sudo kill `cat /var/run/storm/restapi.pid`',
         not_if = '! (ls /var/run/storm/restapi.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/restapi.pid` >/dev/null 2>&1)',

+ 24 - 12
ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor.py

@@ -26,19 +26,23 @@ from test_storm_base import TestStormBase
 class TestStormSupervisor(TestStormBase):
 
   def test_configure_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/supervisor.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/supervisor.py",
                        classname = "Supervisor",
                        command = "configure",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_default()
     self.assertNoMoreResources()
 
   def test_start_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/supervisor.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/supervisor.py",
                        classname = "Supervisor",
                        command = "start",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
     self.assert_configure_default()
@@ -72,10 +76,12 @@ class TestStormSupervisor(TestStormBase):
     self.assertNoMoreResources()
 
   def test_stop_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/supervisor.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/supervisor.py",
                        classname = "Supervisor",
                        command = "stop",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assertResourceCalled('Execute', 'sudo kill `cat /var/run/storm/supervisor.pid`',
         not_if = '! (ls /var/run/storm/supervisor.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/supervisor.pid` >/dev/null 2>&1)',
@@ -100,19 +106,23 @@ class TestStormSupervisor(TestStormBase):
     self.assertNoMoreResources()
 
   def test_configure_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/supervisor.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/supervisor.py",
                        classname = "Supervisor",
                        command = "configure",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_secured()
     self.assertNoMoreResources()
 
   def test_start_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/supervisor.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/supervisor.py",
                        classname = "Supervisor",
                        command = "start",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
     self.assert_configure_secured()
@@ -147,10 +157,12 @@ class TestStormSupervisor(TestStormBase):
     self.assertNoMoreResources()
 
   def test_stop_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/supervisor.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/supervisor.py",
                        classname = "Supervisor",
                        command = "stop",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assertResourceCalled('Execute', 'sudo kill `cat /var/run/storm/supervisor.pid`',
         not_if = '! (ls /var/run/storm/supervisor.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/supervisor.pid` >/dev/null 2>&1)',

+ 24 - 12
ambari-server/src/test/python/stacks/2.1/STORM/test_storm_supervisor_prod.py

@@ -26,19 +26,23 @@ from test_storm_base import TestStormBase
 class TestStormSupervisor(TestStormBase):
 
   def test_configure_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/supervisor_prod.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/supervisor_prod.py",
                        classname = "Supervisor",
                        command = "configure",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_default()
     self.assertNoMoreResources()
 
   def test_start_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/supervisor_prod.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/supervisor_prod.py",
                        classname = "Supervisor",
                        command = "start",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
     self.assert_configure_default()
@@ -62,10 +66,12 @@ class TestStormSupervisor(TestStormBase):
     self.assertNoMoreResources()
 
   def test_stop_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/supervisor_prod.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/supervisor_prod.py",
                        classname = "Supervisor",
                        command = "stop",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assertResourceCalled('Execute', 'supervisorctl stop storm-supervisor',
                               wait_for_finish = False,
@@ -83,19 +89,23 @@ class TestStormSupervisor(TestStormBase):
     self.assertNoMoreResources()
 
   def test_configure_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/supervisor_prod.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/supervisor_prod.py",
                        classname = "Supervisor",
                        command = "configure",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_secured()
     self.assertNoMoreResources()
 
   def test_start_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/supervisor_prod.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/supervisor_prod.py",
                        classname = "Supervisor",
                        command = "start",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
     self.assert_configure_secured()
@@ -119,10 +129,12 @@ class TestStormSupervisor(TestStormBase):
     self.assertNoMoreResources()
 
   def test_stop_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/supervisor_prod.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/supervisor_prod.py",
                        classname = "Supervisor",
                        command = "stop",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
     self.assertResourceCalled('Execute', 'supervisorctl stop storm-supervisor',

+ 24 - 12
ambari-server/src/test/python/stacks/2.1/STORM/test_storm_ui_server.py

@@ -25,19 +25,23 @@ from test_storm_base import TestStormBase
 class TestStormUiServer(TestStormBase):
 
   def test_configure_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/ui_server.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/ui_server.py",
                        classname = "UiServer",
                        command = "configure",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_default()
     self.assertNoMoreResources()
 
   def test_start_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/ui_server.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/ui_server.py",
                        classname = "UiServer",
                        command = "start",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
     self.assert_configure_default()
@@ -58,10 +62,12 @@ class TestStormUiServer(TestStormBase):
     self.assertNoMoreResources()
 
   def test_stop_default(self):
-    self.executeScript("2.1/services/STORM/package/scripts/ui_server.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/ui_server.py",
                        classname = "UiServer",
                        command = "stop",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assertResourceCalled('Execute', 'sudo kill `cat /var/run/storm/ui.pid`',
         not_if = '! (ls /var/run/storm/ui.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/ui.pid` >/dev/null 2>&1)',
@@ -76,19 +82,23 @@ class TestStormUiServer(TestStormBase):
     self.assertNoMoreResources()
 
   def test_configure_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/ui_server.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/ui_server.py",
                        classname = "UiServer",
                        command = "configure",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assert_configure_secured()
     self.assertNoMoreResources()
 
   def test_start_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/ui_server.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/ui_server.py",
                        classname = "UiServer",
                        command = "start",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
     self.assert_configure_secured()
@@ -110,10 +120,12 @@ class TestStormUiServer(TestStormBase):
     self.assertNoMoreResources()
 
   def test_stop_secured(self):
-    self.executeScript("2.1/services/STORM/package/scripts/ui_server.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/ui_server.py",
                        classname = "UiServer",
                        command = "stop",
-                       config_file="secured.json"
+                       config_file="secured.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
     self.assertResourceCalled('Execute', 'sudo kill `cat /var/run/storm/ui.pid`',
         not_if = '! (ls /var/run/storm/ui.pid >/dev/null 2>&1 && ps -p `cat /var/run/storm/ui.pid` >/dev/null 2>&1)',

+ 11 - 4
ambari-server/src/test/python/stacks/2.1/TEZ/test_tez_client.py

@@ -22,11 +22,16 @@ from stacks.utils.RMFTestCase import *
 
 class TestTezClient(RMFTestCase):
 
+  COMMON_SERVICES_PACKAGE_DIR = "TEZ/0.4.0.2.1/package"
+  STACK_VERSION = "2.1"
+
   def test_configure_default(self):
-    self.executeScript("2.1/services/TEZ/package/scripts/tez_client.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/tez_client.py",
                        classname = "TezClient",
                        command = "configure",
-                       config_file="default.json"
+                       config_file="default.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES
     )
 
     self.assertResourceCalled('Directory', '/etc/tez',
@@ -57,10 +62,12 @@ class TestTezClient(RMFTestCase):
 
 
   def test_upgrade(self):
-    self.executeScript("2.1/services/TEZ/package/scripts/tez_client.py",
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/tez_client.py",
                        classname = "TezClient",
                        command = "restart",
-                       config_file="client-upgrade.json")
+                       config_file="client-upgrade.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES)
 
     self.assertResourceCalled("Execute", "hdp-select set hadoop-client 2.2.1.0-2067")