Skip to content

Commit 9b61937

Browse files
authored
HDDS-11806. Add HttpFS and Recon in getting-started k8s example (#7485)
1 parent 77ce962 commit 9b61937

8 files changed

Lines changed: 242 additions & 0 deletions

File tree

hadoop-ozone/dist/src/main/k8s/examples/getting-started/config-configmap.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,19 @@ kind: ConfigMap
1919
metadata:
2020
name: config
2121
data:
22+
HTTPFS-SITE.XML_httpfs.hadoop.config.dir: /opt/hadoop/etc/config
23+
CORE-SITE.XML_fs.defaultFS: ofs://om/
24+
CORE-SITE.XML_fs.trash.interval: "1"
25+
HTTPFS-SITE.XML_httpfs.proxyuser.hadoop.hosts: "*"
26+
HTTPFS-SITE.XML_httpfs.proxyuser.hadoop.groups: "*"
2227
OZONE-SITE.XML_hdds.datanode.dir: /data/storage
2328
OZONE-SITE.XML_ozone.scm.datanode.id.dir: /data/metadata
2429
OZONE-SITE.XML_ozone.metadata.dirs: /data/metadata
2530
OZONE-SITE.XML_ozone.scm.block.client.address: scm-0.scm
2631
OZONE-SITE.XML_ozone.om.address: om-0.om
2732
OZONE-SITE.XML_ozone.scm.client.address: scm-0.scm
2833
OZONE-SITE.XML_ozone.scm.names: scm-0.scm
34+
OZONE-SITE.XML_ozone.recon.address: recon-0.recon
2935
OZONE-SITE.XML_hdds.scm.safemode.min.datanode: "3"
3036
OZONE-SITE.XML_ozone.datanode.pipeline.limit: "1"
3137
OZONE-SITE.XML_dfs.datanode.use.datanode.hostname: "true"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
apiVersion: v1
18+
kind: Service
19+
metadata:
20+
name: httpfs-public
21+
spec:
22+
ports:
23+
- port: 14000
24+
name: rest
25+
selector:
26+
app: ozone
27+
component: httpfs
28+
type: NodePort
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
apiVersion: v1
18+
kind: Service
19+
metadata:
20+
name: httpfs
21+
spec:
22+
ports:
23+
- port: 14000
24+
name: rest
25+
clusterIP: None
26+
selector:
27+
app: ozone
28+
component: httpfs
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
apiVersion: apps/v1
18+
kind: StatefulSet
19+
metadata:
20+
name: httpfs
21+
labels:
22+
app.kubernetes.io/component: ozone
23+
spec:
24+
selector:
25+
matchLabels:
26+
app: ozone
27+
component: httpfs
28+
serviceName: httpfs
29+
replicas: 1
30+
template:
31+
metadata:
32+
labels:
33+
app: ozone
34+
component: httpfs
35+
spec:
36+
containers:
37+
- name: httpfs
38+
image: '@docker.image@'
39+
args:
40+
- ozone
41+
- httpfs
42+
livenessProbe:
43+
httpGet:
44+
path: /webhdfs/v1/?op=LISTSTATUS&user.name=hadoop
45+
port: 14000
46+
initialDelaySeconds: 30
47+
envFrom:
48+
- configMapRef:
49+
name: config
50+
volumeMounts:
51+
- name: data
52+
mountPath: /data
53+
volumes:
54+
- name: data
55+
emptyDir: {}

hadoop-ozone/dist/src/main/k8s/examples/getting-started/kustomization.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ resources:
2424
- s3g-statefulset.yaml
2525
- scm-service.yaml
2626
- scm-statefulset.yaml
27+
- httpfs-service.yaml
28+
- httpfs-statefulset.yaml
29+
- recon-service.yaml
30+
- recon-statefulset.yaml
2731
- datanode-public-service.yaml
2832
- om-public-service.yaml
2933
- s3g-public-service.yaml
3034
- scm-public-service.yaml
35+
- httpfs-public-service.yaml
36+
- recon-public-service.yaml
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
apiVersion: v1
18+
kind: Service
19+
metadata:
20+
name: recon-public
21+
spec:
22+
ports:
23+
- port: 9888
24+
name: ui
25+
selector:
26+
app: ozone
27+
component: recon
28+
type: NodePort
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
apiVersion: v1
18+
kind: Service
19+
metadata:
20+
name: recon
21+
spec:
22+
ports:
23+
- port: 9888
24+
name: ui
25+
clusterIP: None
26+
selector:
27+
app: ozone
28+
component: recon
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
apiVersion: apps/v1
18+
kind: StatefulSet
19+
metadata:
20+
name: recon
21+
labels:
22+
app.kubernetes.io/component: ozone
23+
spec:
24+
selector:
25+
matchLabels:
26+
app: ozone
27+
component: recon
28+
serviceName: recon
29+
replicas: 1
30+
template:
31+
metadata:
32+
labels:
33+
app: ozone
34+
component: recon
35+
annotations:
36+
prometheus.io/scrape: "true"
37+
prometheus.io/port: "9888"
38+
prometheus.io/path: /prom
39+
spec:
40+
securityContext:
41+
fsGroup: 1000
42+
containers:
43+
- name: recon
44+
image: '@docker.image@'
45+
args:
46+
- ozone
47+
- recon
48+
env:
49+
- name: WAITFOR
50+
value: scm-0.scm:9876
51+
livenessProbe:
52+
tcpSocket:
53+
port: 9891
54+
initialDelaySeconds: 30
55+
envFrom:
56+
- configMapRef:
57+
name: config
58+
volumeMounts:
59+
- name: data
60+
mountPath: /data
61+
volumes:
62+
- name: data
63+
emptyDir: {}

0 commit comments

Comments
 (0)