apiVersion: v1 kind: ConfigMap metadata: name: hbase-configmap labels: app: {{ template "hbase.name" . }} chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} data: hbase-site.xml: | hbase.master {{ template "hbase.name" . }}-hbase-master:16010 zookeeper.znode.parent /hbase hbase.rootdir hdfs://{{ .Values.hbase.hdfs.name }}-hdfs-nn:9000/hbase hbase.unsafe.stream.capability.enforce false hbase.wal.provider filesystem hbase.cluster.distributed true hbase.zookeeper.quorum {{ .Values.hbase.zookeeper.quorum }} bootstrap.sh: | #!/bin/bash : ${HADOOP_PREFIX:=/usr/local/hadoop} . $HADOOP_PREFIX/etc/hadoop/hadoop-env.sh # Directory to find config artifacts CONFIG_DIR="/tmp/hbase-config" # Copy config files from volume mount for f in hbase-site.xml; do if [[ -e ${CONFIG_DIR}/$f ]]; then cp ${CONFIG_DIR}/$f /opt/hbase/conf/$f else echo "ERROR: Could not find $f in $CONFIG_DIR" exit 1 fi done # installing libraries if any - (resource urls added comma separated to the ACP system variable) cd $HADOOP_PREFIX/share/hadoop/common ; for cp in ${ACP//,/ }; do echo == $cp; curl -LO $cp ; done; cd - if [[ "${HOSTNAME}" =~ "hbase-master" ]]; then /opt/hbase/bin/hbase-daemon.sh --config /opt/hbase/conf start master fi if [[ "${HOSTNAME}" =~ "hbase-rs" ]]; then /opt/hbase/bin/hbase-daemon.sh --config /opt/hbase/conf start regionserver fi tail -f /opt/hbase/logs/*