BIGTOP-1256. Update puppet recipes for Spark deployment to reflect BIGTOP-1183


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/9a648f36
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/9a648f36
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/9a648f36

Branch: refs/heads/master
Commit: 9a648f36e6b47dd732c23e0ad86179580f4bee34
Parents: 82aff90
Author: Xiaomin Zhang <[email protected]>
Authored: Thu Jul 10 17:28:25 2014 +0800
Committer: Konstantin Boudnik <[email protected]>
Committed: Mon Jul 14 13:22:31 2014 -0700

----------------------------------------------------------------------
 .../puppet/modules/spark/manifests/init.pp      | 21 ++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/9a648f36/bigtop-deploy/puppet/modules/spark/manifests/init.pp
----------------------------------------------------------------------
diff --git a/bigtop-deploy/puppet/modules/spark/manifests/init.pp 
b/bigtop-deploy/puppet/modules/spark/manifests/init.pp
index 1cc7133..1281ff4 100644
--- a/bigtop-deploy/puppet/modules/spark/manifests/init.pp
+++ b/bigtop-deploy/puppet/modules/spark/manifests/init.pp
@@ -15,24 +15,28 @@
 
 class spark {
   class common {
-    package { "spark":
+    package { "spark-core":
       ensure => latest,
     }
 
     file { "/etc/spark/conf/spark-env.sh":
         content => template("spark/spark-env.sh"),
-        require => [Package["spark"]],
+        require => [Package["spark-core"]],
     }
   }
 
   define master($master_host = $fqdn, $master_port = "7077", $master_ui_port = 
"18080") {
     include common   
 
+    package { "spark-master":
+      ensure => latest,
+    }
+
     if ( $fqdn == $master_host ) {
       service { "spark-master":
         ensure => running,
-        require => [ Package["spark"], File["/etc/spark/conf/spark-env.sh"], ],
-        subscribe => [Package["spark"], File["/etc/spark/conf/spark-env.sh"] ],
+        require => [ Package["spark-master"], 
File["/etc/spark/conf/spark-env.sh"], ],
+        subscribe => [Package["spark-master"], 
File["/etc/spark/conf/spark-env.sh"] ],
         hasrestart => true,
         hasstatus => true,
       }
@@ -41,13 +45,18 @@ class spark {
 
   define worker($master_host = $fqdn, $master_port = "7077", $master_ui_port = 
"18080") {
     include common
+
+    package { "spark-worker":
+      ensure => latest,
+    }
+
     if ( $fqdn == $master_host ) {
       Service["spark-master"] ~> Service["spark-worker"]
     }
     service { "spark-worker":
       ensure => running,
-      require => [ Package["spark"], File["/etc/spark/conf/spark-env.sh"], ],
-      subscribe => [Package["spark"], File["/etc/spark/conf/spark-env.sh"] ],
+      require => [ Package["spark-worker"], 
File["/etc/spark/conf/spark-env.sh"], ],
+      subscribe => [Package["spark-worker"], 
File["/etc/spark/conf/spark-env.sh"] ],
       hasrestart => true,
       hasstatus => true,
     } 

Reply via email to