You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by se...@apache.org on 2022/09/23 03:43:00 UTC
[bigtop] branch master updated: BIGTOP-3819. Adding Puppet Recipes for Apache Phoenix (#1018)
This is an automated email from the ASF dual-hosted git repository.
sekikn 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 3a55ce0d BIGTOP-3819. Adding Puppet Recipes for Apache Phoenix (#1018)
3a55ce0d is described below
commit 3a55ce0db5e9261143f97e362d1562c4c5275548
Author: Peng Lee <49...@users.noreply.github.com>
AuthorDate: Fri Sep 23 11:42:54 2022 +0800
BIGTOP-3819. Adding Puppet Recipes for Apache Phoenix (#1018)
---
bigtop-deploy/puppet/manifests/cluster.pp | 4 ++
.../puppet/modules/phoenix/manifests/init.pp | 69 ++++++++++++++++++++++
2 files changed, 73 insertions(+)
diff --git a/bigtop-deploy/puppet/manifests/cluster.pp b/bigtop-deploy/puppet/manifests/cluster.pp
index eb90beeb..3ef6a196 100644
--- a/bigtop-deploy/puppet/manifests/cluster.pp
+++ b/bigtop-deploy/puppet/manifests/cluster.pp
@@ -131,6 +131,9 @@ $roles_map = {
livy => {
master => ["livy-server"],
},
+ phoenix => {
+ library => ["phoenix-server"],
+ }
}
class hadoop_cluster_node (
@@ -195,6 +198,7 @@ class node_with_roles ($roles = hiera("bigtop::roles")) inherits hadoop_cluster_
"gpdb",
"ambari",
"bigtop_utils",
+ "phoenix",
]
node_with_roles::deploy_module { $modules:
diff --git a/bigtop-deploy/puppet/modules/phoenix/manifests/init.pp b/bigtop-deploy/puppet/modules/phoenix/manifests/init.pp
new file mode 100644
index 00000000..226ecdbf
--- /dev/null
+++ b/bigtop-deploy/puppet/modules/phoenix/manifests/init.pp
@@ -0,0 +1,69 @@
+# 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 phoenix {
+
+ class deploy ($roles) {
+ if ('phoenix-server' in $roles) {
+ include phoenix::server
+ if ('hbase-master' in $roles) {
+ include phoenix::hbase_master_restart
+ }
+ if ('hbase-server' in $roles) {
+ include phoenix::hbase_server_restart
+ }
+ }
+ }
+
+ class hbase_master_restart {
+ exec { "hbase_master_restart":
+ command => "systemctl restart hbase-master",
+ path => ['/usr/bin', '/bin'],
+ cwd => '/tmp',
+ timeout => 3000,
+ require => [
+ File['phoenix-server-lib'],
+ Service['hbase-master'],
+ ],
+ }
+ }
+
+ class hbase_server_restart {
+ exec { "hbase_server_restart":
+ command => "systemctl restart hbase-regionserver",
+ path => ['/usr/bin', '/bin'],
+ cwd => '/tmp',
+ timeout => 3000,
+ require => [
+ File['phoenix-server-lib'],
+ Service['hbase-regionserver'],
+ ],
+ }
+ }
+
+ class server {
+ package { 'phoenix':
+ ensure => latest,
+ require => Package["hbase"],
+ }
+ file { 'phoenix-server-lib':
+ path => '/usr/lib/hbase/lib/phoenix-server.jar',
+ target => '/usr/lib/phoenix/phoenix-server.jar',
+ ensure => link,
+ require => Package['phoenix'],
+ }
+ }
+
+}