BIGTOP-637. Update boxgrinder appliance for the coming release
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/ff094134 Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/ff094134 Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/ff094134 Branch: refs/heads/master Commit: ff09413451454d15c6d5dba3d79c8c6a5bece002 Parents: c21c29e Author: Bruno Mahé <[email protected]> Authored: Sat Apr 6 14:43:59 2013 -0700 Committer: Bruno Mahé <[email protected]> Committed: Sat Apr 6 14:43:59 2013 -0700 ---------------------------------------------------------------------- bigtop-deploy/vm/boxgrinder/bigtop-init-hdfs | 64 +++++++++++++++++++ bigtop-deploy/vm/boxgrinder/bigtop_hadoop.appl | 12 +++- 2 files changed, 74 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/ff094134/bigtop-deploy/vm/boxgrinder/bigtop-init-hdfs ---------------------------------------------------------------------- diff --git a/bigtop-deploy/vm/boxgrinder/bigtop-init-hdfs b/bigtop-deploy/vm/boxgrinder/bigtop-init-hdfs new file mode 100755 index 0000000..b0295da --- /dev/null +++ b/bigtop-deploy/vm/boxgrinder/bigtop-init-hdfs @@ -0,0 +1,64 @@ +#!/bin/bash +# +# 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. +# +# Initialize HDFS +# +# chkconfig: 345 90 15 +# description: Hadoop nodemanager +# +### BEGIN INIT INFO +# Provides: bigtop-init-hdfs +# Short-Description: Initialize HDFS directories used by Yarn +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 +# Required-Start: $syslog $remote_fs hadoop-hdfs-namenode +# Required-Stop: $syslog $remote_fs +# Should-Start: +# Should-Stop: +### END INIT INFO + +. /lib/lsb/init-functions + +# Ensure this is run only once +FIRST_EXECUTION_LOCK="/var/lib/bigtop-init-hdfs" + +RETVAL=0 + +start() { + log_success_msg "Initializing HDFS" + + if [ ! -e "${FIRST_EXECUTION_LOCK}" ]; then + /usr/lib/hadoop/libexec/init-hdfs.sh + touch "${FIRST_EXECUTION_LOCK}" + fi + RETVAL=$? + return $RETVAL +} + +service() { + case "$1" in + start) + start + ;; + *) + exit 0 + esac +} + +service "$1" + +exit $RETVAL http://git-wip-us.apache.org/repos/asf/bigtop/blob/ff094134/bigtop-deploy/vm/boxgrinder/bigtop_hadoop.appl ---------------------------------------------------------------------- diff --git a/bigtop-deploy/vm/boxgrinder/bigtop_hadoop.appl b/bigtop-deploy/vm/boxgrinder/bigtop_hadoop.appl index 93ed0e8..7dbbbe9 100644 --- a/bigtop-deploy/vm/boxgrinder/bigtop_hadoop.appl +++ b/bigtop-deploy/vm/boxgrinder/bigtop_hadoop.appl @@ -25,7 +25,7 @@ hardware: partitions: "/": size: 2 - type: ext3 + type: ext4 repos: - name: "Bigtop" baseurl: "http://bigtop01.cloudera.org:8080/view/Bigtop-trunk/job/Bigtop-trunk-Repository/label=centos6/lastSuccessfulBuild/artifact/repo/" @@ -33,8 +33,16 @@ packages: - @core - shadow-utils - passwd + - screen + - sed + - vim-enhanced + - wget - java-1.6.0-openjdk-devel - hadoop-conf-pseudo +files: + "/etc/init.d": + - "bigtop-init-hdfs" post: base: - - "/usr/bin/yes Y | su hdfs /bin/bash -c '/usr/bin/hadoop namenode -format'" + - "/etc/init.d/hadoop-hdfs-namenode init" + - "/sbin/chkconfig bigtop-init-hdfs on"
