diff options
author | rootfs <hchen@redhat.com> | 2014-11-03 14:43:29 -0500 |
---|---|---|
committer | jayunit100 <jay@apache.org> | 2014-11-25 10:27:15 -0500 |
commit | 57f5900520d6208fd548cc08856514587294a4cd (patch) | |
tree | 1ed6a850ec833bcd850396c7298a629340dcde3c /bigtop-deploy | |
parent | d3bc6b24cebd2261da22f28e17865ab37f85e304 (diff) |
BIGTOP-1497. Add tachyon into bigtop.
Signed-off-by: jayunit100 <jay@apache.org>
Diffstat (limited to 'bigtop-deploy')
-rw-r--r-- | bigtop-deploy/puppet/config/site.csv | 5 | ||||
-rw-r--r-- | bigtop-deploy/puppet/manifests/cluster.pp | 7 | ||||
-rw-r--r-- | bigtop-deploy/puppet/modules/tachyon/manifests/init.pp | 45 |
3 files changed, 57 insertions, 0 deletions
diff --git a/bigtop-deploy/puppet/config/site.csv b/bigtop-deploy/puppet/config/site.csv new file mode 100644 index 00000000..2b01b13c --- /dev/null +++ b/bigtop-deploy/puppet/config/site.csv @@ -0,0 +1,5 @@ +hadoop_head_node,bigtop1.vagrant +hadoop_storage_dirs,/data/1,/data/2 +bigtop_yumrepo_uri,http://bigtop01.cloudera.org:8080/view/Releases/job/Bigtop-0.8.0/label=centos6/6/artifact/output/ +jdk_package_name,java-1.7.0-openjdk-devel.x86_64 +components,tachyon,pig diff --git a/bigtop-deploy/puppet/manifests/cluster.pp b/bigtop-deploy/puppet/manifests/cluster.pp index 0f9baef9..41c70891 100644 --- a/bigtop-deploy/puppet/manifests/cluster.pp +++ b/bigtop-deploy/puppet/manifests/cluster.pp @@ -290,6 +290,13 @@ if ($hadoop_security_authentication == "kerberos") { } } + if ($components[0] == undef or "tachyon" in $components) { + tachyon::master { "tachyon master": + master_host => $tachyon_master_host, + master_port => $tachyon_master_port + } + } + if ($components[0] == undef or "hbase" in $components) { hadoop-zookeeper::server { "zookeeper": myid => "0", diff --git a/bigtop-deploy/puppet/modules/tachyon/manifests/init.pp b/bigtop-deploy/puppet/modules/tachyon/manifests/init.pp new file mode 100644 index 00000000..8af9b689 --- /dev/null +++ b/bigtop-deploy/puppet/modules/tachyon/manifests/init.pp @@ -0,0 +1,45 @@ +# 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 tachyon { + class common { + package { "tachyon": + ensure => latest, + } + } + + define master($master_host, $master_port) { + include common + + if ( $fqdn == $master_host ) { + service { "tachyon-master": + ensure => running, + require => [ Package["tachyon"] ], + hasrestart => true, + hasstatus => true, + } + } + } + + define worker($master_host, $master_port) { + include common + + if ( $fqdn == $master_host ) { + # We want master to run first in all cases + Service["tachyon-master"] ~> Service["tachyon-worker"] + } + service { "tachyon-worker": + ensure => running, + hasrestart => true, + hasstatus => true, + } + } +} |