Commit fb645934 authored by 徐泽意's avatar 徐泽意

update

parent 50e420ec
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
# pull images
docker pull danisla/hadoop:2.7.3 && docker tag danisla/hadoop:2.7.3 registry.cn-qingdao.aliyuncs.com/wod/hadoop:2.7.3 && \
docker push registry.cn-qingdao.aliyuncs.com/wod/hadoop:2.7.3
docker pull 33098876/hbase:latest && docker tag 33098876/hbase:latest registry.cn-qingdao.aliyuncs.com/wod/hbase:latest && \
docker push registry.cn-qingdao.aliyuncs.com/wod/hbase:latest
## install
```bashhbase
# install
安装zookeeper。
#安装hbase
helm install \
/etc/kubernetes/helm/hbase \
--name=hbase \
--namespace=default \
-f /etc/kubernetes/helm/hbase/values-overrides.yaml
# uninstall
helm delete hbase --purge
# update
helm upgrade hbase /etc/kubernetes/helm/hbase \
-f /etc/kubernetes/helm/hbase/values-overrides.yaml
# HBase chart
Original chart from [warp-poke/hbase-helm](https://github.com/warp-poke/hbase-helm), modified to work with [chenseanxy/helm-hadoop-3](https://github.com/chenseanxy/helm-hadoop-3) chart.
Current Version: HBase 2.1.7 based on Hadoop 3.1.2
For HBase 1 chart, use tag [1.4.10-hadoop3.1.2](https://github.com/chenseanxy/helm-hbase-chart/tree/1.4.10-hadoop3.1.2)
A chart to deploy Hbase with Hadoop using Kubernetes. Heavily inspired by the [Hadoop chart](https://github.com/kubernetes/charts/tree/master/stable/hadoop).
## Getting started
```
helm install --name myzk incubator/zookeeper --set servers=1,heap="1G"
helm del --purge hbase;helm install . --name hbase
```
You need:
* Kubernetes
* [Helm](https://helm.sh/)
Required charts:
* Zookeeper: `incubator/zookeeper` from helm/charts
* Hadoop: `chenseanxy/helm-hadoop-3` from [here](https://github.com/chenseanxy/helm-hadoop-3)
## Config
In `values.yaml`:
`hbase.hdfs.name`, `hbase.hdfs.release`: point to your Hadoop deployment
`hbase.zookeeper.quorum`: Zookeeper address:port
## Architecture
This chart is using several functionalities from Kubernetes.
* [ConfigMap](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/): at first, it is used as key-value to store elements. Here, we are using it to store config files. Furthermore, we are using it to inject a boostrap.sh to start our container.
* For every container, we are mouting a container in /tmp based on the content of the ConfigMap (one entry == one file).
* Entrypoint for every component is the bash called `bootstrap.sh`, which is hold by the ConfigMap.
* `bootstrap.sh` is copying the files in the ConfigMap to the right location, starting the daemon and tail the logs
* [Headless Service](https://kubernetes.io/docs/concepts/services-networking/service/#headless-services): In Kubernetes, every request to a pod a loadbalanced through a proxy by default. But Hbase is directly trying to connect to the RS, so by enabling headless mode, we can directly access the RS container.
* [StatefulSet](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/): it is used to deploy stateful applications to Kubernetes.
* [PodDisruptionBudget](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/): Allow user to define policy on pod failure.
* [PersistentVolumClaim](https://kubernetes.io/docs/concepts/storage/persistent-volumes/): allows pod to have volumes for data. Used for HDFS.
There's a YAML per role and per functionality. Binding is done through [Selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/).
## TODO
* Namenode HA
* Hbase Master HA
\ No newline at end of file
*.tar
*.tar.gz
*.tar.bz2
FROM chenseanxy/hadoop:3.2.1-nolib
ARG VERSION=
ADD hbase-${VERSION}-bin.tar.gz /opt
RUN cd /opt && ln -s ./hbase-${VERSION} hbase && \
cp hbase/lib/client-facing-thirdparty/htrace-core-3.1.0-incubating.jar hbase/lib && \
.
WORKDIR /opt/hbase
.PHONY: build
# Current apache hbase releases: http://hbase.apache.org/releases.html
HADOOP_30_VERSION = 3.1.2
HBASE_VERSION = 2.1.7
DOCKER = docker
DOCKER_REPO = chenseanxy/hbase
all: build
### Build hbase versioned images with native libs.
build:
$(DOCKER) build -t hbase:$(HBASE_VERSION)-hadoop$(HADOOP_30_VERSION) \
--build-arg HADOOP_VERSION=$(HADOOP_30_VERSION) \
--build-arg VERSION=$(HBASE_VERSION) \
.
tag:
$(DOCKER) tag \
hbase:$(HBASE_VERSION)-hadoop$(HADOOP_30_VERSION) \
$(DOCKER_REPO):$(HBASE_VERSION)-hadoop$(HADOOP_30_VERSION)
push:
$(DOCKER) push $(DOCKER_REPO):$(HBASE_VERSION)-hadoop$(HADOOP_30_VERSION)
### Fetch binary distribution
hbase-%-bin.tar.gz:
curl -LO http://archive.apache.org/dist/hbase/$(HBASE_VERSION)/hbase-$(HBASE_VERSION)-bin.tar.gz
# Keep intermediate downloads.
.PRECIOUS: hbase-%-bin.tar.gz
# HBase Image
Original Image: [PierreZ/hbase-docker](https://github.com/PierreZ/hbase-docker/tree/master/distributed-1.3.1-hadoop-2.7.3)
Current Version: 2.1.7 based on Hadoop 3.1.2 (TAG: 2.1.7-hadoop3.1.2)
Docker Hub: [chenseanxy/hbase](https://hub.docker.com/r/chenseanxy/hbase)
configInfo:
- name: hbaseImage
text: hbase镜像
type: text
value: registry.cn-qingdao.aliyuncs.com/wod/hbase:2.1.7
- name: hdfs.nameNode.resources
text: 资源限制
type: resource
memory: "2048Mi"
cpu: "1000m
- name: hdfs.dataNode.replicas
text: dataNode个数
type: text
value: 3
- name: hdfs.dataNode.resources
text: 资源限制
type: resource
memory: "2048Mi"
cpu: "1000m
- name: persistence.nameNode.storageSpec
text: nameNode存储类
type: storage
storage: "50Gi"
value: "nfs-client"
- name: persistence.dataNode.storageSpec
text: dataNode存储类
type: storage
storage: "200Gi"
value: "nfs-client"
- name: hbase.hmaster.replicas
text: hmaster个数
type: text
value: 1
- name: hbase.hdfs.name
text: hdfs名称
type: text
value: hadoop
- name: hbase.hdfs.release
text: release
type: text
value: hadoop
- name: hbase.zookeeper.quorum
text: quorum
type: text
value: hadoop
\ No newline at end of file
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "hadoop.name" -}}
{{- define "hbase.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Expand the name of the chart.
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "hbase.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
\ No newline at end of file
{{- define "hbase.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
This diff is collapsed.
......@@ -20,8 +20,16 @@ data:
</property>
<property>
<name>hbase.rootdir</name>
<value>hdfs://{{ template "hbase.name" . }}-hdfs-nn:9000/hbase</value>
<value>hdfs://{{ .Values.hbase.hdfs.name }}-hdfs-nn:9000/hbase</value>
</property>
<property>
<name>hbase.unsafe.stream.capability.enforce</name>
<value>false</value>
</property>
<property>
<name>hbase.wal.provider</name>
<value>filesystem</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
......@@ -64,4 +72,4 @@ data:
/opt/hbase/bin/hbase-daemon.sh --config /opt/hbase/conf start regionserver
fi
tail -f opt/hbase/logs/*
\ No newline at end of file
tail -f /opt/hbase/logs/*
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ template "hbase.name" . }}-hbase-master
name: {{ template "hbase.fullname" . }}-master
labels:
app: {{ template "hadoop.name" . }}
app: {{ template "hbase.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
......@@ -11,7 +11,7 @@ metadata:
spec:
selector:
matchLabels:
app: {{ template "hadoop.name" . }}
app: {{ template "hbase.name" . }}
release: {{ .Release.Name }}
component: hbase-master
minAvailable: 1 # FIXME: HA?
\ No newline at end of file
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: {{ template "hbase.name" . }}-hbase-master
annotations:
checksum/config: {{ include (print $.Template.BasePath "/hadoop-configmap.yaml") . | sha256sum }}
name: {{ template "hbase.fullname" . }}-master
labels:
app: {{ template "hadoop.name" . }}
app: {{ template "hbase.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: hbase-master
spec:
serviceName: {{ template "hbase.name" . }}-hbase-master
replicas: {{ .Values.hbase.master.replicas }}
serviceName: {{ template "hbase.fullname" . }}-master
replicas: {{ .Values.hbase.hmaster.replicas }}
template:
metadata:
labels:
app: {{ template "hadoop.name" . }}
app: {{ template "hbase.name" . }}
release: {{ .Release.Name }}
component: hbase-master
spec:
......@@ -25,44 +23,35 @@ spec:
- topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels:
app: {{ template "hadoop.name" . }}
app: {{ .Values.hbase.hdfs.name }}
release: {{ .Values.hbase.hdfs.release | quote }}
component: hdfs-nn
terminationGracePeriodSeconds: 0
containers:
- name: hbase-master
image: {{ .Values.hbaseimage.repository }}:{{ .Values.hbaseimage.tag }}
imagePullPolicy: {{ .Values.hbaseimage.pullPolicy }}
env:
- name: HBASE_SERVER_TYPE
value: hbase-master
- name: HDFS_PATH
value: {{ template "hbase.name" . }}-hdfs-nn:9000
- name: ZOOKEEPER_SERVICE_LIST
value: {{ .Values.hbase.env.zookeeperServiceList }}
- name: ZOOKEEPER_PORT
value: "{{ .Values.hbase.env.zookeeperPort }}"
- name: ZNODE_PARENT
value: hbase
ports:
- name: port1
containerPort: 16000
protocol: TCP
- name: port2
containerPort: 16010
protocol: TCP
image: {{ .Values.hbaseImage }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
command:
- "/bin/bash"
- "/opt/hbase/bin/start-k8s-hbase.sh"
- "/bin/bash"
- "/tmp/hbase-config/bootstrap.sh"
resources:
{{ toYaml .Values.hbase.master.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{ toYaml .Values.hdfs.nameNode.resources | indent 10 }}
readinessProbe:
httpGet:
path: /
port: 16010
initialDelaySeconds: 5
timeoutSeconds: 2
livenessProbe:
httpGet:
path: /
port: 16010
initialDelaySeconds: 10
timeoutSeconds: 2
volumeMounts:
- name: hbase-config
mountPath: /tmp/hbase-config
volumes:
- name: hbase-config
configMap:
name: hbase-configmap
\ No newline at end of file
......@@ -2,7 +2,7 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "hbase.name" . }}-hbase-master
name: {{ template "hbase.fullname" . }}-master
labels:
app: {{ template "hbase.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
......
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ template "hbase.name" . }}-hbase-rs
name: {{ template "hbase.name" . }}-rs
labels:
app: {{ template "hadoop.name" . }}
app: {{ template "hbase.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
......@@ -11,7 +11,7 @@ metadata:
spec:
selector:
matchLabels:
app: {{ template "hadoop.name" . }}
app: {{ template "hbase.name" . }}
release: {{ .Release.Name }}
component: hbase-rs
minAvailable: 1 # FIXME: HA?
\ No newline at end of file
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: {{ template "hbase.name" . }}-hbase-rs
annotations:
checksum/config: {{ include (print $.Template.BasePath "/hadoop-configmap.yaml") . | sha256sum }}
name: {{ template "hbase.name" . }}-rs
labels:
app: {{ template "hadoop.name" . }}
app: {{ template "hbase.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: hbase-rs
spec:
serviceName: {{ template "hbase.name" . }}-hbase-rs
replicas: {{ .Values.hbase.region.replicas }}
serviceName: {{ template "hbase.name" . }}-rs
replicas: {{ .Values.hdfs.dataNode.replicas }}
template:
metadata:
labels:
app: {{ template "hadoop.name" . }}
app: {{ template "hbase.name" . }}
release: {{ .Release.Name }}
component: hbase-rs
spec:
......@@ -25,46 +23,35 @@ spec:
- topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels:
app: {{ template "hadoop.name" . }}
release: {{ .Release.Name | quote }}
app: {{ .Values.hbase.hdfs.name }}
release: {{ .Values.hbase.hdfs.release | quote }}
component: hdfs-nn
terminationGracePeriodSeconds: 0
containers:
- name: hbase-rs
image: "{{ .Values.hbaseimage.repository }}:{{ .Values.hbaseimage.tag }}"
imagePullPolicy: {{ .Values.hbaseimage.pullPolicy }}
env:
- name: HBASE_SERVER_TYPE
value: hbase-regionserver
- name: HDFS_PATH
value: {{ template "hbase.name" . }}-hdfs-nn:9000
- name: ZOOKEEPER_SERVICE_LIST
value: {{ .Values.hbase.env.zookeeperServiceList }}
- name: ZOOKEEPER_PORT
value: "{{ .Values.hbase.env.zookeeperPort }}"
- name: ZNODE_PARENT
value: hbase
ports:
- name: port11
containerPort: 16020
protocol: TCP
- name: port12
containerPort: 16030
protocol: TCP
image: {{ .Values.hbaseImage }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
command:
- "/bin/bash"
- "/opt/hbase/bin/start-k8s-hbase.sh"
- "/bin/bash"
- "/tmp/hbase-config/bootstrap.sh"
resources:
{{ toYaml .Values.hbase.region.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{ toYaml .Values.hdfs.nameNode.resources | indent 10 }}
readinessProbe:
httpGet:
path: /
port: 16030
initialDelaySeconds: 5
timeoutSeconds: 2
livenessProbe:
httpGet:
path: /
port: 16030
initialDelaySeconds: 10
timeoutSeconds: 2
volumeMounts:
- name: hbase-config
mountPath: /tmp/hbase-config
volumes:
- name: hbase-config
configMap:
name: hbase-configmap
\ No newline at end of file
......@@ -2,7 +2,7 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "hbase.name" . }}-hbase-rs
name: {{ template "hbase.fullname" . }}-rs
labels:
app: {{ template "hbase.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
......
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ template "hbase.name" . }}-hdfs-dn
labels:
app: {{ template "hadoop.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: hdfs-dn
spec:
selector:
matchLabels:
app: {{ template "hadoop.name" . }}
release: {{ .Release.Name }}
component: hdfs-dn
minAvailable: {{ .Values.hdfs.dataNode.pdbMinAvailable }}
\ No newline at end of file
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: {{ template "hbase.name" . }}-hdfs-dn
annotations:
checksum/config: {{ include (print $.Template.BasePath "/hadoop-configmap.yaml") . | sha256sum }}
labels:
app: {{ template "hadoop.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: hdfs-dn
spec:
serviceName: {{ template "hbase.name" . }}-hdfs-dn
replicas: {{ .Values.hdfs.dataNode.replicas }}
template:
metadata:
labels:
app: {{ template "hadoop.name" . }}
release: {{ .Release.Name }}
component: hdfs-dn
spec:
affinity:
podAntiAffinity:
{{- if eq .Values.antiAffinity "hard" }}
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels:
app: {{ template "hadoop.name" . }}
release: {{ .Release.Name | quote }}
component: hdfs-dn
{{- else if eq .Values.antiAffinity "soft" }}
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 5
podAffinityTerm:
topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels:
app: {{ template "hadoop.name" . }}
release: {{ .Release.Name | quote }}
component: hdfs-dn
{{- end }}
terminationGracePeriodSeconds: 0
containers:
- name: hdfs-dn
image: {{ .Values.image }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
command:
- "/bin/bash"
- "/tmp/hadoop-config/bootstrap.sh"
- "-d"
resources:
{{ toYaml .Values.hdfs.dataNode.resources | indent 10 }}
readinessProbe:
httpGet:
path: /
port: 50075
initialDelaySeconds: 5
timeoutSeconds: 2
livenessProbe:
httpGet:
path: /
port: 50075
initialDelaySeconds: 10
timeoutSeconds: 2
volumeMounts:
- name: hadoop-config
mountPath: /tmp/hadoop-config
- name: dfs
mountPath: /root/hdfs/datanode
volumes:
- name: hadoop-config
configMap:
name: hadoop-configmap
{{- if .Values.persistence.dataNode.enabled }}
volumeClaimTemplates:
- metadata:
name: dfs
labels:
app: {{ template "hadoop.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: hdfs-dn
spec:
accessModes:
- {{ .Values.persistence.dataNode.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.dataNode.size | quote }}
{{- if .Values.persistence.dataNode.storageClass }}
{{- if (eq "-" .Values.persistence.dataNode.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.dataNode.storageClass }}"
{{- end }}
{{- end }}
{{- end }}
# A headless service to create DNS records
apiVersion: v1
kind: Service
metadata:
name: {{ template "hbase.name" . }}-hdfs-dn
labels:
app: {{ template "hadoop.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: hdfs-dn
spec:
clusterIP: "None"
ports:
- name: dfs
port: 9000
protocol: TCP
- name: webhdfs
port: 50075
selector:
app: {{ template "hadoop.name" . }}
release: {{ .Release.Name }}
component: hdfs-dn
\ No newline at end of file
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ template "hbase.name" . }}-hdfs-nn
labels:
app: {{ template "hadoop.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: hdfs-nn
spec:
selector:
matchLabels:
app: {{ template "hadoop.name" . }}
release: {{ .Release.Name }}
component: hdfs-nn
minAvailable: {{ .Values.hdfs.nameNode.pdbMinAvailable }}
\ No newline at end of file
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: {{ template "hbase.name" . }}-hdfs-nn
annotations:
checksum/config: {{ include (print $.Template.BasePath "/hadoop-configmap.yaml") . | sha256sum }}
labels:
app: {{ template "hadoop.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: hdfs-nn
spec:
serviceName: {{ template "hbase.name" . }}-hdfs-nn
replicas: 1
template:
metadata:
labels:
app: {{ template "hadoop.name" . }}
release: {{ .Release.Name }}
component: hdfs-nn
spec:
affinity:
podAntiAffinity:
{{- if eq .Values.antiAffinity "hard" }}
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels:
app: {{ template "hadoop.name" . }}
release: {{ .Release.Name | quote }}
component: hdfs-nn
{{- else if eq .Values.antiAffinity "soft" }}
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 5
podAffinityTerm:
topologyKey: "kubernetes.io/hostname"
labelSelector:
matchLabels:
app: {{ template "hadoop.name" . }}
release: {{ .Release.Name | quote }}
component: hdfs-nn
{{- end }}
terminationGracePeriodSeconds: 0
containers:
- name: hdfs-nn
image: {{ .Values.image }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
command:
- "/bin/bash"
- "/tmp/hadoop-config/bootstrap.sh"
- "-d"
resources:
{{ toYaml .Values.hdfs.nameNode.resources | indent 10 }}
readinessProbe:
httpGet:
path: /
port: 50070
initialDelaySeconds: 5
timeoutSeconds: 2
livenessProbe:
httpGet:
path: /
port: 50070
initialDelaySeconds: 10
timeoutSeconds: 2
volumeMounts:
- name: hadoop-config
mountPath: /tmp/hadoop-config
- name: dfs
mountPath: /root/hdfs/namenode
volumes:
- name: hadoop-config
configMap:
name: hadoop-configmap
{{- if .Values.persistence.nameNode.enabled }}
volumeClaimTemplates:
- metadata:
name: dfs
labels:
app: {{ template "hadoop.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: hdfs-nn
spec:
accessModes:
- {{ .Values.persistence.nameNode.accessMode | quote }}
resources:
requests:
storage: {{ .Values.persistence.nameNode.size | quote }}
{{- if .Values.persistence.nameNode.storageClass }}
{{- if (eq "-" .Values.persistence.nameNode.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.nameNode.storageClass }}"
{{- end }}
{{- end }}
{{- end }}
# A headless service to create DNS records
apiVersion: v1
kind: Service
metadata:
name: {{ template "hbase.name" . }}-hdfs-nn
labels:
app: {{ template "hadoop.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
component: hdfs-nn
spec:
clusterIP: "None"
ports:
- name: dfs
port: 9000
protocol: TCP
- name: webhdfs
port: 50070
selector:
app: {{ template "hadoop.name" . }}
release: {{ .Release.Name }}
component: hdfs-nn
\ No newline at end of file
# The base hadoop image to use for all components.
# See this repo for image build details: https://github.com/Comcast/kube-yarn/tree/master/image
image: registry.cn-qingdao.aliyuncs.com/wod/hadoop:2.7.3
imagePullPolicy: IfNotPresent
# See this repo for image build details: https://github.com/chenseanxy/helm-hbase-chart/tree/master/image
hbaseimage:
repository: registry.cn-qingdao.aliyuncs.com/wod/hbase
tag: latest
pullPolicy: Always
hbaseVersion: 1.4.9
# The version of the hadoop libraries being used in the image.
hadoopVersion: 2.7.3
hbaseImage: registry.cn-qingdao.aliyuncs.com/wod/hbase:2.1.7
# Select anitAffinity as either hard or soft, default is hard
antiAffinity: "soft"
......@@ -21,11 +12,11 @@ hdfs:
resources:
requests:
memory: "2048Mi"
memory: "256Mi"
cpu: "10m"
limits:
memory: "2048Mi"
cpu: "1000m"
memory: "8Gi"
cpu: "4000m"
dataNode:
replicas: 3
......@@ -34,46 +25,30 @@ hdfs:
resources:
requests:
memory: "2048Mi"
memory: "256Mi"
cpu: "10m"
limits:
memory: "2048Mi"
cpu: "1000m"
memory: "8Gi"
cpu: "4000m"
persistence:
nameNode:
enabled: true
storageClass: "rook-ceph-block"
enabled: false
storageClass: "-"
accessMode: ReadWriteOnce
size: 50Gi
dataNode:
enabled: true
storageClass: "rook-ceph-block"
enabled: false
storageClass: "-"
accessMode: ReadWriteOnce
size: 20Gi
size: 200Gi
hbase:
env:
zookeeperServiceList: myzk-zookeeper
zookeeperPort: "2181"
master:
hmaster:
replicas: 1
resources:
requests:
memory: "2048Mi"
cpu: "10m"
limits:
memory: "2048Mi"
cpu: "1000m"
region:
replicas: 3
resources:
requests:
memory: "2048Mi"
cpu: "10m"
limits:
memory: "2048Mi"
cpu: "1000m"
hdfs:
name: "hadoop-hadoop"
release: "hadoop"
zookeeper:
quorum: "myzk-zookeeper"
quorum: "myzk-zookeeper-headless"
# The base hadoop image to use for all components.
# See this repo for image build details: https://github.com/Comcast/kube-yarn/tree/master/image
image: danisla/hadoop:2.7.3
imagePullPolicy: IfNotPresent
# See this repo for image build details: https://github.com/chenseanxy/helm-hbase-chart/tree/master/image
hbaseimage:
repository: 33098876/hbase
tag: lastest
pullPolicy: Always
hbaseVersion: 1.4.9
# The version of the hadoop libraries being used in the image.
hadoopVersion: 2.7.3
hbaseImage: chenseanxy/hbase:1.4.10-hadoop3.1.2
# Select anitAffinity as either hard or soft, default is hard
antiAffinity: "soft"
......@@ -21,7 +12,7 @@ hdfs:
resources:
requests:
memory: "2048Mi"
memory: "256Mi"
cpu: "10m"
limits:
memory: "2048Mi"
......@@ -34,7 +25,7 @@ hdfs:
resources:
requests:
memory: "2048Mi"
memory: "256Mi"
cpu: "10m"
limits:
memory: "2048Mi"
......@@ -54,26 +45,10 @@ persistence:
size: 200Gi
hbase:
env:
zookeeperServiceList: myzk-zookeeper
zookeeperPort: "2181"
master:
hmaster:
replicas: 1
resources:
requests:
memory: "2048Mi"
cpu: "10m"
limits:
memory: "2048Mi"
cpu: "1000m"
region:
replicas: 3
resources:
requests:
memory: "2048Mi"
cpu: "10m"
limits:
memory: "2048Mi"
cpu: "1000m"
hdfs:
name: "hadoop"
release: "hadoop"
zookeeper:
quorum: "myzk-zookeeper"
quorum: "zookeeper"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment