You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@zeppelin.apache.org by "seung-00 (via GitHub)" <gi...@apache.org> on 2024/08/03 20:31:26 UTC
[PR] [ZEPPELIN-6034] Write a Dockerfile for shell interpreter [zeppelin]
seung-00 opened a new pull request, #4781:
URL: https://github.com/apache/zeppelin/pull/4781
### What is this PR for?
This PR adds a new Dockerfile to build a shell interpreter.
Although the interpreters are currently running as separate JVM processes, the existing structure confines them to a single machine, which results in low availability. To address this, I have initially created a docker image for the shell interpreter to enable the interpreter to use independent computing resources.
Since the current system wasn't designed with modular operation in mind, this PR involves some complexities in terms of configuration and testing. I'm planning to dockerize the other interpreters too, and I’ll try to iron out these kinks as I go.
### What type of PR is it?
Feature
### Todos
### What is the Jira issue?
* [ZEPPELIN-6034](https://issues.apache.org/jira/browse/ZEPPELIN-6034)
### How should this be tested?
* Build and run docker container.
### Screenshots (if appropriate)
### Questions:
* Does the license files need to update? Yes
* Is there breaking changes for older versions? No
* Does this needs documentation? Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6034] Write a Dockerfile for shell interpreter [zeppelin]
Posted by "seung-00 (via GitHub)" <gi...@apache.org>.
seung-00 commented on PR #4781:
URL: https://github.com/apache/zeppelin/pull/4781#issuecomment-2267312988
> LGTM except for we need to verify if JRE should be fine to run interpreter. I also wonder local-repo issue but let's talk about it with separate PR.
@jongyoul
Thanks for the comments. I pushed a new commit so that only the necessary files go into the runner, which reset the PR approval. The image size has been reduced to about one-third.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6034] Write a Dockerfile for shell interpreter [zeppelin]
Posted by "seung-00 (via GitHub)" <gi...@apache.org>.
seung-00 commented on code in PR #4781:
URL: https://github.com/apache/zeppelin/pull/4781#discussion_r1703031063
##########
shell/Dockerfile:
##########
@@ -0,0 +1,30 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+FROM openjdk:11
+
+COPY . /zeppelin/
+
+WORKDIR /zeppelin
+
+ENV SHELL_INTERPRETER_PORT=8081
+
+RUN chmod +x ./mvnw && chmod +x ./bin/interpreter.sh
+
+RUN ./mvnw install -am -pl zeppelin-interpreter,shell -DskipTests
+
+CMD ./bin/interpreter.sh -d interpreter/sh -c host.docker.internal -p ${INTERPRETER_EVENT_SERVER_PORT} -r ${SHELL_INTERPRETER_PORT}:${SHELL_INTERPRETER_PORT} -i sh-shared_process -l ./local-repo -g sh
Review Comment:
@jongyoul
Sure. Thanks for the suggestion.
[9ea65b9](https://github.com/apache/zeppelin/pull/4781/commits/9ea65b990097572b870fdeebc6b13eb30be31690)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6034] Write a Dockerfile for shell interpreter [zeppelin]
Posted by "jongyoul (via GitHub)" <gi...@apache.org>.
jongyoul merged PR #4781:
URL: https://github.com/apache/zeppelin/pull/4781
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6034] Write a Dockerfile for shell interpreter [zeppelin]
Posted by "jongyoul (via GitHub)" <gi...@apache.org>.
jongyoul commented on code in PR #4781:
URL: https://github.com/apache/zeppelin/pull/4781#discussion_r1703001718
##########
shell/Dockerfile:
##########
@@ -0,0 +1,30 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+FROM openjdk:11
+
+COPY . /zeppelin/
+
+WORKDIR /zeppelin
+
+ENV SHELL_INTERPRETER_PORT=8081
+
+RUN chmod +x ./mvnw && chmod +x ./bin/interpreter.sh
+
+RUN ./mvnw install -am -pl zeppelin-interpreter,shell -DskipTests
+
+CMD ./bin/interpreter.sh -d interpreter/sh -c host.docker.internal -p ${INTERPRETER_EVENT_SERVER_PORT} -r ${SHELL_INTERPRETER_PORT}:${SHELL_INTERPRETER_PORT} -i sh-shared_process -l ./local-repo -g sh
Review Comment:
Could you please divide the builder and runner for this docker container? It reduces the size of the docker container as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [ZEPPELIN-6034] Write a Dockerfile for shell interpreter [zeppelin]
Posted by "seung-00 (via GitHub)" <gi...@apache.org>.
seung-00 commented on code in PR #4781:
URL: https://github.com/apache/zeppelin/pull/4781#discussion_r1703031063
##########
shell/Dockerfile:
##########
@@ -0,0 +1,30 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+FROM openjdk:11
+
+COPY . /zeppelin/
+
+WORKDIR /zeppelin
+
+ENV SHELL_INTERPRETER_PORT=8081
+
+RUN chmod +x ./mvnw && chmod +x ./bin/interpreter.sh
+
+RUN ./mvnw install -am -pl zeppelin-interpreter,shell -DskipTests
+
+CMD ./bin/interpreter.sh -d interpreter/sh -c host.docker.internal -p ${INTERPRETER_EVENT_SERVER_PORT} -r ${SHELL_INTERPRETER_PORT}:${SHELL_INTERPRETER_PORT} -i sh-shared_process -l ./local-repo -g sh
Review Comment:
@jongyoul
Sure. Thanks for the suggestion.
[9ea65b9](https://github.com/apache/zeppelin/pull/4781/commits/9ea65b990097572b870fdeebc6b13eb30be31690)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@zeppelin.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org