Li, Chen cec1498f54 Initial commit
Install HDFS when enable the plugin in localrc:

[[local|localrc]]
enable_plugin hdfs https://github.com/openstack/devstack-plugin-hdfs

Change-Id: I7ebf124113143ccb09dc9428a259101187ac3868
2015-08-11 12:50:20 +08:00

50 lines
952 B
Bash

#!/bin/bash
# devstack/plugin.sh
# Triggers hdfs specific functions to install and configure HDFS
# Dependencies:
#
# - ``functions`` file
# ``stack.sh`` calls the entry points in this order:
#
# - install_hdfs
# - configure_hdfs
# - start_hdfs
# - stop_hdfs
# - cleanup_hdfs
# Defaults
# --------
HDFS_PLUGIN_DIR=$(readlink -f $(dirname ${BASH_SOURCE[0]}))
HDFS_PLUGIN_LIB_DIR=$HDFS_PLUGIN_DIR/lib
HDFS_PLUGIN_HADOOP_DIR=$HDFS_PLUGIN_DIR/hadoop
HADOOP_VERSION=${HADOOP_VERSION:-"2.7.1"}
# Initializing gluster specific functions
source $HDFS_PLUGIN_LIB_DIR/hdfs-functions.sh
if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then
echo_summary "Installing HDFS"
install_hdfs
echo_summary "Configuring HDFS"
configure_hdfs
echo_summary "Starting HDFS"
start_hdfs
fi
if [[ "$1" == "unstack" ]]; then
stop_hdfs
fi
if [[ "$1" == "clean" ]]; then
cleanup_hdfs
fi
## Local variables:
## mode: shell-script
## End: