WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 3cf7a83

Browse files
authored
Merge pull request #21 from cuebook/RemoveEFS
Removed EFS dependency from zeppelin job server
2 parents 8fda2b0 + f222936 commit 3cf7a83

File tree

7 files changed

+45
-69
lines changed

7 files changed

+45
-69
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM node:12-alpine as builder
33
WORKDIR /app
44
ENV PATH /app/node_modules/.bin:$PATH
55
COPY ui/package.json /app/package.json
6-
RUN npm install --silent
6+
RUN npm install
77
COPY ui /app
88

99
RUN npm run build

api/app/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
REDIS_BROKER_URL = os.environ.get("REDIS_BROKER_URL", "redis://redis:6379/0")
157157

158158
# s3 file settings
159-
S3_BUCKET_NAME = os.environ.get("S3_BUCKET_NAME", None)
159+
S3_BUCKET_NAME = os.environ.get("S3_BUCKET_NAME", "")
160160
S3_FILES_PREFIX = os.environ.get("S3_FILES_PREFIX", "files/")
161161

162162
# Postgres configuration for Schema Browser

api/seeddata/crontabschedule.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"minute": "0",
77
"hour": "0",
88
"day_of_week": "0",
9-
"day_of_month": "30",
10-
"month_of_year": "2",
9+
"day_of_month": "1",
10+
"month_of_year": "1",
1111
"timezone": "Asia/Kolkata"
1212
}
1313
},
@@ -18,4 +18,4 @@
1818
"name": "No Schedule"
1919
}
2020
}
21-
]
21+
]

api/utils/kubernetesTemplates/zeppelinServer.yaml

Lines changed: 20 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,26 @@ metadata:
99
spec:
1010
serviceAccountName: zeppelin-server
1111
volumes:
12-
- name: zeppelin-server-notebook-volume
13-
persistentVolumeClaim:
14-
claimName: cuelake-notebook-efs-pvc
15-
- name: zeppelin-server-conf
16-
persistentVolumeClaim:
17-
claimName: cuelake-conf-efs-pvc
18-
- name: nginx-conf
19-
configMap:
20-
name: zeppelin-server-conf
21-
items:
22-
- key: nginx.conf
23-
path: nginx.conf
12+
- name: shared-notebook
13+
emptyDir:
14+
- name: shared-conf
15+
emptyDir:
16+
initContainers:
17+
- name: init
18+
image: bitnami/kubectl
19+
command: ['sh', '-c']
20+
volumeMounts:
21+
- name: shared-notebook
22+
mountPath: /shared-notebook
23+
- name: shared-conf
24+
mountPath: /shared-conf
25+
args:
26+
- >-
27+
kubectl cp $(kubectl get pods | grep zeppelin-server | awk '{print $1}' ):/zeppelin/conf /shared-conf &&
28+
kubectl cp $(kubectl get pods | grep zeppelin-server | awk '{print $1}' ):/zeppelin/notebook /shared-notebook
2429
containers:
2530
- name: zeppelin-server
26-
image: 'cuebook/zeppelin-server:0.9.0'
31+
image: 'cuebook/zeppelin-server-lite:0.2'
2732
command:
2833
- sh
2934
- '-c'
@@ -58,9 +63,9 @@ spec:
5863
apiVersion: v1
5964
fieldPath: metadata.name
6065
volumeMounts:
61-
- name: zeppelin-server-notebook-volume
66+
- name: shared-notebook
6267
mountPath: /zeppelin/notebook
63-
- name: zeppelin-server-conf
68+
- name: shared-conf
6469
mountPath: /zeppelin/conf
6570
lifecycle:
6671
preStop:
@@ -78,46 +83,3 @@ spec:
7883
requests:
7984
memory: "1024Mi"
8085
cpu: "250m"
81-
- name: zeppelin-server-gateway
82-
image: 'nginx:1.14.0'
83-
command:
84-
- /bin/sh
85-
- '-c'
86-
args:
87-
- >-
88-
cp -f /tmp/conf/nginx.conf /etc/nginx/nginx.conf; sed -i -e
89-
"s/SERVICE_DOMAIN/$SERVICE_DOMAIN/g" /etc/nginx/nginx.conf; sed -i -e
90-
"s/NAMESPACE/$(cat
91-
/var/run/secrets/kubernetes.io/serviceaccount/namespace)/g"
92-
/etc/nginx/nginx.conf; cat /etc/nginx/nginx.conf; /usr/sbin/nginx
93-
env:
94-
- name: SERVICE_DOMAIN
95-
valueFrom:
96-
configMapKeyRef:
97-
name: zeppelin-server-conf-map
98-
key: SERVICE_DOMAIN
99-
volumeMounts:
100-
- name: nginx-conf
101-
mountPath: /tmp/conf
102-
lifecycle:
103-
preStop:
104-
exec:
105-
command:
106-
- /usr/sbin/nginx
107-
- '-s'
108-
- quit
109-
terminationMessagePath: /dev/termination-log
110-
terminationMessagePolicy: File
111-
imagePullPolicy: IfNotPresent
112-
- name: dnsmasq
113-
image: 'janeczku/go-dnsmasq:release-1.0.5'
114-
args:
115-
- '--listen'
116-
- '127.0.0.1:53'
117-
- '--default-resolver'
118-
- '--append-search-domains'
119-
- '--hostsfile=/etc/hosts'
120-
- '--verbose'
121-
terminationMessagePath: /dev/termination-log
122-
terminationMessagePolicy: File
123-
imagePullPolicy: IfNotPresent

api/utils/kubernetesTemplates/zeppelinService.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spec:
88
- name: http
99
protocol: TCP
1010
port: 80
11-
targetPort: 80
11+
targetPort: 8080
1212
- name: rpc
1313
protocol: TCP
1414
port: 12320

api/utils/zeppelinAPI.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,11 @@ def restartInterpreter(self, interpreterName: str):
149149
return self.__parseResponse(response)
150150

151151
def healthCheck(self):
152-
response = requests.get(f"{self.ZEPPELIN_ADDR}/{ZEPPELIN_VERSION_ENDPOINT}")
153-
return self.__parseResponse(response)
152+
try:
153+
response = requests.get(f"{self.ZEPPELIN_ADDR}/{ZEPPELIN_VERSION_ENDPOINT}")
154+
return self.__parseResponse(response)
155+
except Exception as ex:
156+
return False
154157

155158
def __parseResponse(self, response):
156159
"""

cuelake.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ spec:
117117
path: nginx.conf
118118
containers:
119119
- name: zeppelin-server
120-
image: cuebook/zeppelin-server:0.9.0
120+
image: cuebook/zeppelin-server-lite:0.2
121121
command: ["sh", "-c"]
122122
args:
123123
- curl https://raw.githubusercontent.com/cuebook/cuelake/main/zeppelinConf/interpreter.json -o $(ZEPPELIN_HOME)/conf/interpreter.json && curl https://raw.githubusercontent.com/cuebook/cuelake/main/zeppelinConf/zeppelin-env.sh -o $(ZEPPELIN_HOME)/conf/zeppelin-env.sh && curl https://raw.githubusercontent.com/cuebook/cuelake/main/zeppelinConf/zeppelin-site.xml -o $(ZEPPELIN_HOME)/conf/zeppelin-site.xml && $(ZEPPELIN_HOME)/bin/zeppelin.sh
@@ -211,7 +211,7 @@ metadata:
211211
name: zeppelin-server-role
212212
rules:
213213
- apiGroups: [""]
214-
resources: ["pods", "services", "configmaps"]
214+
resources: ["pods", "pods/exec", "services", "configmaps"]
215215
verbs: ["create", "get", "update", "patch", "list", "delete", "watch"]
216216
- apiGroups: ["rbac.authorization.k8s.io"]
217217
resources: ["roles", "rolebindings"]
@@ -300,16 +300,27 @@ spec:
300300
labels:
301301
app.kubernetes.io/name: lakehouse
302302
spec:
303+
serviceAccountName: zeppelin-server
303304
volumes:
304305
- name: lakehouse-db-volume
305306
persistentVolumeClaim:
306307
claimName: lakehouse-db-volume-pvc
307308
containers:
308309
- name: lakehouse
309-
image: cuebook/lakehouse:latest
310+
image: cuebook/lakehouse:0.2
311+
resources:
312+
requests:
313+
memory: "2560Mi"
314+
cpu: "250m"
310315
volumeMounts:
311316
- name: lakehouse-db-volume # configure this to persist db
312317
mountPath: /code/db
318+
env:
319+
- name: POD_NAMESPACE
320+
valueFrom:
321+
fieldRef:
322+
apiVersion: v1
323+
fieldPath: metadata.namespace
313324
envFrom:
314325
- configMapRef:
315326
name: cuelake-conf-map

0 commit comments

Comments
 (0)