Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(helm-chart): remove helm-chart support #110

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

unknowntpo
Copy link
Contributor

Resolve #108

@unknowntpo unknowntpo marked this pull request as ready for review November 27, 2024 09:59
@unknowntpo
Copy link
Contributor Author

@danhuawang @xunliu would you like to review this PR ?

playground.sh Outdated Show resolved Hide resolved
@xunliu
Copy link
Member

xunliu commented Dec 2, 2024

@unknowntpo I will review this PR today, Thanks.

@@ -21,7 +21,6 @@
sed -i '$d' /usr/local/sbin/start.sh
sed -i '$d' /usr/local/sbin/start.sh
cp /tmp/hive/core-site.xml /tmp/hadoop-conf
sed -i "s|hdfs://localhost:9000|hdfs://${HIVE_HOST_IP}:9000|g" /usr/local/hive/conf/hive-site.xml
/bin/bash /usr/local/sbin/start.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's placeholder in the configuration file of the hive image: https://github.com/apache/gravitino/blob/main/dev/docker/hive/hive-site.xml

I think it needs to be replaced to hdfs://hive:9000

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need to add this line, because in start.sh, It has already used sed to replace it with $(hostname).

sed -i "s/__REPLACE__HOST_NAME/$(hostname)/g" ${HIVE_CONF_DIR}/hive-site.xml

https://github.com/apache/gravitino/blob/branch-0.7/dev/docker/hive/start.sh#L37

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can directly replace tail -f /dev/null with empty.
Because maybe tail -f /dev/null is not in the last line.

Comment on lines 21 to 22
sed -i '$d' /usr/local/sbin/start.sh
sed -i '$d' /usr/local/sbin/start.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the original start.sh in image: https://github.com/apache/gravitino/blob/main/dev/docker/hive/start.sh
Is it necessary to remove the last two lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to remove the last two lines.

I don't get it. what do you mean ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to

sed -i -E 's/tail -f \/dev\/null/\s/g' /usr/local/sbin/start.sh

, since last line might be a blank string.

fixed at 7ed9dae

while [ $attempt -lt $max_attempts ]; do
response=$(curl -X GET -H "Content-Type: application/json" http://${HOST_IP}:8090/api/version)
response=$(curl -X GET -H "Content-Type: application/json" http://gravitino:8090/api/version)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it 127.0.0.1 as the hostname inside the gravitino container?

Copy link
Contributor Author

@unknowntpo unknowntpo Dec 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, reverted to 127.0.0.1 at f4404e6.

@@ -20,7 +20,7 @@
set -ex

# Because trino-connector must first synchronize a default metalake from the Gravitino server
response=$(trino --server ${TRINO_HOST_IP}:8080 --execute "SHOW CATALOGS LIKE 'catalog_hive'")
response=$(trino --server trino:8080 --execute "SHOW CATALOGS LIKE 'catalog_hive'")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use localhost as hostname ?

Copy link
Contributor Author

@unknowntpo unknowntpo Dec 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, I changed this to localhost.
1640e8f

@danhuawang
Copy link
Contributor

Do we still need the following code in init/spark/init.sh ?

# inject host information
sed -i 's/__GRAVITINO_HOST_IP__/'"$GRAVITINO_HOST_IP"'/g' /opt/spark/conf/spark-defaults.conf
sed -i 's/__HIVE_HOST_IP__/'"$HIVE_HOST_IP"'/g' /opt/spark/conf/spark-defaults.conf

@danhuawang
Copy link
Contributor

Shall we remove the placeholder "MYSQL_HOST_IP","HIVE_HOST_IP" in init/gravitino/gravitino.conf ? If removed, set env var steps in init/gravitino/init.sh is also no longer needed.

@unknowntpo unknowntpo force-pushed the feat-remove-helm-chart branch from 0367525 to badb490 Compare December 5, 2024 14:05
@unknowntpo
Copy link
Contributor Author

unknowntpo commented Dec 5, 2024

Do we still need the following code in init/spark/init.sh ?

# inject host information
sed -i 's/__GRAVITINO_HOST_IP__/'"$GRAVITINO_HOST_IP"'/g' /opt/spark/conf/spark-defaults.conf
sed -i 's/__HIVE_HOST_IP__/'"$HIVE_HOST_IP"'/g' /opt/spark/conf/spark-defaults.conf

ok, removed.

af41f3f

@unknowntpo
Copy link
Contributor Author

unknowntpo commented Dec 5, 2024

Shall we remove the placeholder "MYSQL_HOST_IP","HIVE_HOST_IP" in init/gravitino/gravitino.conf ? If removed, set env var steps in init/gravitino/init.sh is also no longer needed.

ok, removed.

59e18da

@unknowntpo unknowntpo force-pushed the feat-remove-helm-chart branch from 1b20f74 to 7ed9dae Compare December 11, 2024 00:45
@danhuawang
Copy link
Contributor

LGTM.
@xunliu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement]: Remove helm chart and revert any docker compose unrelated changes
4 participants