-
Notifications
You must be signed in to change notification settings - Fork 379
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#4059] feat(iceberg-rest-server): support Iceberg REST server docker…
… image (#4138) ### What changes were proposed in this pull request? add gravitino iceberg rest service docker image ### Why are the changes needed? 1. setup Gravition Iceberg REST service easily for test 2. user could add customer changes and setup a new docker image for product. Fix: #4059 ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? in local machine, setup docker image and check it works
- Loading branch information
Showing
5 changed files
with
94 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
FROM openjdk:8-jdk-buster | ||
FROM openjdk:17 | ||
LABEL maintainer="[email protected]" | ||
|
||
WORKDIR /root/gravitino | ||
|
@@ -26,4 +26,4 @@ COPY packages/gravitino /root/gravitino | |
EXPOSE 8090 | ||
EXPOSE 9001 | ||
|
||
ENTRYPOINT ["/bin/bash", "/root/gravitino/bin/gravitino.sh", "start"] | ||
ENTRYPOINT ["/bin/bash", "/root/gravitino/bin/gravitino.sh", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# | ||
# 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:17 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
WORKDIR /root/gravitino-iceberg-rest-server | ||
|
||
COPY packages/gravitino-iceberg-rest-server /root/gravitino-iceberg-rest-server | ||
|
||
EXPOSE 9001 | ||
|
||
ENTRYPOINT ["/bin/bash", "/root/gravitino-iceberg-rest-server/bin/gravitino-iceberg-rest-server.sh", "start"] |
42 changes: 42 additions & 0 deletions
42
dev/docker/iceberg-rest-server/iceberg-rest-server-dependency.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
# | ||
# 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. | ||
# | ||
set -ex | ||
iceberg_rest_server_dir="$(dirname "${BASH_SOURCE-$0}")" | ||
iceberg_rest_server_dir="$(cd "${iceberg_rest_server_dir}">/dev/null; pwd)" | ||
gravitino_home="$(cd "${iceberg_rest_server_dir}/../../..">/dev/null; pwd)" | ||
|
||
# Prepare the Iceberg REST server packages | ||
cd ${gravitino_home} | ||
./gradlew clean assembleIcebergRESTServer -x test | ||
|
||
# Removed old packages | ||
rm -rf "${iceberg_rest_server_dir}/packages" | ||
mkdir -p "${iceberg_rest_server_dir}/packages" | ||
|
||
cd distribution | ||
tar xfz gravitino-iceberg-rest-server-*.tar.gz | ||
cp -r gravitino-iceberg-rest-server*-bin ${iceberg_rest_server_dir}/packages/gravitino-iceberg-rest-server | ||
|
||
# Keeping the container running at all times | ||
cat <<EOF >> "${iceberg_rest_server_dir}/packages/gravitino-iceberg-rest-server/bin/gravitino-iceberg-rest-server.sh" | ||
# Keeping a process running in the background | ||
tail -f /dev/null | ||
EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters