bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From evan...@apache.org
Subject [bigtop] branch master updated: BIGTOP-3133. [Puppet] Add a module to deploy bigtop-utils (#441)
Date Sun, 13 Jan 2019 18:25:23 GMT
This is an automated email from the ASF dual-hosted git repository.

evansye pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git


The following commit(s) were added to refs/heads/master by this push:
     new 233bd8a  BIGTOP-3133. [Puppet] Add a module to deploy bigtop-utils (#441)
233bd8a is described below

commit 233bd8a309e05c30fb90bf74e12f076d8332cb95
Author: Evans Ye <evansye@apache.org>
AuthorDate: Mon Jan 14 02:25:19 2019 +0800

    BIGTOP-3133. [Puppet] Add a module to deploy bigtop-utils (#441)
---
 bigtop-deploy/puppet/manifests/cluster.pp          |  6 ++++-
 .../puppet/modules/bigtop_utils/manifests/init.pp  | 29 ++++++++++++++++++++++
 .../puppet/modules/bigtop_utils/tests/init.pp      | 17 +++++++++++++
 3 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/bigtop-deploy/puppet/manifests/cluster.pp b/bigtop-deploy/puppet/manifests/cluster.pp
index ac27cf6..f6cce1c 100644
--- a/bigtop-deploy/puppet/manifests/cluster.pp
+++ b/bigtop-deploy/puppet/manifests/cluster.pp
@@ -147,7 +147,10 @@ $roles_map = {
   ambari => {
     master => ["ambari-server"],
     worker => ["ambari-agent"],
-  }
+  },
+  bigtop-utils => {
+    client => ["bigtop-utils"],
+  },
 }
 
 class hadoop_cluster_node (
@@ -218,6 +221,7 @@ class node_with_roles ($roles = hiera("bigtop::roles")) inherits hadoop_cluster_
     "kafka",
     "gpdb",
     "ambari",
+    "bigtop_utils",
   ]
 
   node_with_roles::deploy_module { $modules:
diff --git a/bigtop-deploy/puppet/modules/bigtop_utils/manifests/init.pp b/bigtop-deploy/puppet/modules/bigtop_utils/manifests/init.pp
new file mode 100644
index 0000000..3d27b5d
--- /dev/null
+++ b/bigtop-deploy/puppet/modules/bigtop_utils/manifests/init.pp
@@ -0,0 +1,29 @@
+# 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.
+
+class bigtop_utils {
+
+  class deploy ($roles) {
+    if ("bigtop-utils" in $roles) {
+       include bigtop_utils::client
+    }
+  }
+
+  class client {
+    package { "bigtop-utils":
+      ensure => latest,
+    }
+  }
+}
diff --git a/bigtop-deploy/puppet/modules/bigtop_utils/tests/init.pp b/bigtop-deploy/puppet/modules/bigtop_utils/tests/init.pp
new file mode 100644
index 0000000..20da3d6
--- /dev/null
+++ b/bigtop-deploy/puppet/modules/bigtop_utils/tests/init.pp
@@ -0,0 +1,17 @@
+# 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.
+
+include bigtop_utils
+bigtop_utils::client { "test-bigtop-utils": }


Mime
View raw message