Repository: ambari Updated Branches: refs/heads/trunk 1c85788c9 -> 1e7e5e99e
AMBARI-7943. Slider installation should also install storm-slider client Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1e7e5e99 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1e7e5e99 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1e7e5e99 Branch: refs/heads/trunk Commit: 1e7e5e99e442c7b8fd4996ed029f1988613c1176 Parents: 1c85788 Author: Sumit Mohanty <[email protected]> Authored: Fri Oct 24 12:21:22 2014 -0700 Committer: Sumit Mohanty <[email protected]> Committed: Fri Oct 24 12:21:22 2014 -0700 ---------------------------------------------------------------------- .../stacks/HDP/2.2/services/SLIDER/metainfo.xml | 6 ++++ .../services/SLIDER/package/scripts/params.py | 2 ++ .../services/SLIDER/package/scripts/slider.py | 9 +++++ .../package/templates/storm-slider-env.sh.j2 | 38 ++++++++++++++++++++ .../stacks/2.2/SLIDER/test_slider_client.py | 10 ++++++ 5 files changed, 65 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/1e7e5e99/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/metainfo.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/metainfo.xml index 3c95087..c6bd896 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/metainfo.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/metainfo.xml @@ -91,6 +91,9 @@ <package> <name>slider_2_2_*</name> </package> + <package> + <name>storm_2_2_*-slider-client</name> + </package> </packages> </osSpecific> <osSpecific> @@ -99,6 +102,9 @@ <package> <name>slider-2-2-.*</name> </package> + <package> + <name>storm-2-2-.*-slider-client</name> + </package> </packages> </osSpecific> </osSpecifics> http://git-wip-us.apache.org/repos/asf/ambari/blob/1e7e5e99/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/params.py index 643ba3f..40f192e 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/params.py @@ -43,3 +43,5 @@ slider_env_sh_template = config['configurations']['slider-env']['content'] java64_home = config['hostLevelParams']['java_home'] log4j_props = config['configurations']['slider-log4j']['content'] slider_cmd = format("{slider_bin_dir}/slider") +storm_slider_conf_dir= '/usr/hdp/current/storm-slider-client/conf' +slider_home_dir= '/usr/hdp/current/slider-client' http://git-wip-us.apache.org/repos/asf/ambari/blob/1e7e5e99/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/slider.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/slider.py b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/slider.py index 311f4bf..9944865 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/slider.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/scripts/slider.py @@ -40,6 +40,15 @@ def slider(): content=InlineTemplate(params.slider_env_sh_template) ) + Directory(params.storm_slider_conf_dir, + recursive=True + ) + + File(format("{storm_slider_conf_dir}/storm-slider-env.sh"), + mode=0755, + content=Template('storm-slider-env.sh.j2') + ) + if (params.log4j_props != None): File(format("{params.slider_conf_dir}/log4j.properties"), mode=0644, http://git-wip-us.apache.org/repos/asf/ambari/blob/1e7e5e99/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/templates/storm-slider-env.sh.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/templates/storm-slider-env.sh.j2 b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/templates/storm-slider-env.sh.j2 new file mode 100644 index 0000000..8022a4b --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/SLIDER/package/templates/storm-slider-env.sh.j2 @@ -0,0 +1,38 @@ +{# +# 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. +#} +#!/usr/bin/env python +# -*- coding: utf-8 -*- +#/* +# * 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. +# */ +export JAVA_HOME={{java64_home}} +export SLIDER_HOME={{slider_home_dir}} http://git-wip-us.apache.org/repos/asf/ambari/blob/1e7e5e99/ambari-server/src/test/python/stacks/2.2/SLIDER/test_slider_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.2/SLIDER/test_slider_client.py b/ambari-server/src/test/python/stacks/2.2/SLIDER/test_slider_client.py index 746f346..5b88351 100644 --- a/ambari-server/src/test/python/stacks/2.2/SLIDER/test_slider_client.py +++ b/ambari-server/src/test/python/stacks/2.2/SLIDER/test_slider_client.py @@ -45,6 +45,16 @@ class TestSliderClient(RMFTestCase): mode = 0755, ) + self.assertResourceCalled('Directory', + '/usr/hdp/current/storm-slider-client/conf', + recursive=True + ) + + self.assertResourceCalled('File', '/usr/hdp/current/storm-slider-client/conf/storm-slider-env.sh', + content=Template('storm-slider-env.sh.j2'), + mode = 0755, + ) + self.assertResourceCalled('File', '/etc/slider/conf/log4j.properties', mode=0644,
