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

[#3751] feat(CI): Enable Apache Ranger plugin in Hive Docker image #3912

Merged
merged 16 commits into from
Jul 19, 2024

Conversation

unknowntpo
Copy link
Contributor

@unknowntpo unknowntpo commented Jun 19, 2024

What changes were proposed in this pull request?

  1. Enable Apache Ranger plugin in Hive Docker image.
  2. Add Ranger integration Hive permission test.
  3. Both support Hive2 and Hive3
    • To start the Hive container, you can to specify environment variables: HIVE_RUNTIME_VERSION:
    • Hive version, currently support hive2(default) and hive3 DOCKER_ENV_RANGER_SERVER_URL:
    • Ranger server URL DOCKER_ENV_RANGER_HIVE_REPOSITORY_NAME: Ranger Hive repository name
    • DOCKER_ENV_RANGER_HDFS_REPOSITORY_NAME: Ranger HDFS repository name

Fix: #3751

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Local test.

TODO:

  • @xunliu needs to publish hive docker image
  • @unknowntpo needs to update docker-image-details.md

@unknowntpo unknowntpo force-pushed the issue-3751 branch 5 times, most recently from 3655168 to a3947c2 Compare June 28, 2024 13:54
@unknowntpo unknowntpo marked this pull request as ready for review June 28, 2024 13:55
@unknowntpo unknowntpo changed the title WIP: Issue 3751 Enable Apache Ranger plugin in Hive Docker image Jun 28, 2024
@xunliu
Copy link
Member

xunliu commented Jun 29, 2024

hi @unknowntpo Thank you for your contributions.
Please help build two hive dockers to test Gravitino integration test.

  1. HADOOP_VERSION=2.7.3 HIVE_VERSION=2.3.9 ./dev/docker/build-docker.sh --platform linux/arm64 --type hive --image datastrato/hive --tag 2.3.9-ranger
  2. HADOOP_VERSION=3.1.0 HIVE_VERSION=3.1.3 ./dev/docker/build-docker.sh --platform linux/arm64 --type hive --image datastrato/hive --tag 3.1.3-ranger

@unknowntpo
Copy link
Contributor Author

I've published docker images with these tags.

These two commands passed these tests:

  • CatalogHiveIT
  • CatalogIcebergRestIT
  • ProxyCatalogHiveIT

Note that if we run these tests with Intellij, we got not tests found for given include xxxx error,
in order to run tests, we needs to modify tag from:

@Tag("gravitino-docker-test")

to

@Tag("gravitino-docker-it")

Screenshot 2024-06-29 at 4 57 54 PM

dev/docker/hive/hive-dependency.sh Outdated Show resolved Hide resolved
dev/docker/ranger/init-mysql.sql.template Outdated Show resolved Hide resolved
dev/docker/ranger/start-ranger-services.sh Outdated Show resolved Hide resolved
@xunliu
Copy link
Member

xunliu commented Jun 29, 2024

I've published docker images with these tags.

These two commands passed these tests:

  • CatalogHiveIT
  • CatalogIcebergRestIT
  • ProxyCatalogHiveIT

Note that if we run these tests with Intellij, we got not tests found for given include xxxx error, in order to run tests, we needs to modify tag from:

@Tag("gravitino-docker-test")

to

@Tag("gravitino-docker-it")

Screenshot 2024-06-29 at 4 57 54 PM

hi @unknowntpo
Currently Gravitino didn't automatic run Docker integration test.
If you need run Docker IT in your local, please set skipDockerTests = false in
the gradle.properties:L29

So, we didn't need to modify @Tag("gravitino-docker-test").

@xunliu xunliu changed the title Enable Apache Ranger plugin in Hive Docker image [#3751] feat(CI): Enable Apache Ranger plugin in Hive Docker image Jun 29, 2024
dev/docker/hive/Dockerfile Outdated Show resolved Hide resolved
dev/docker/hive/Dockerfile Outdated Show resolved Hide resolved
@xunliu
Copy link
Member

xunliu commented Jul 4, 2024

@mchades @yuqi1129 @jerryshao Please help me review this PR, Thanks.

@xunliu xunliu requested review from jerryshao, yuqi1129 and mchades July 4, 2024 09:29
@yuqi1129
Copy link
Contributor

yuqi1129 commented Jul 5, 2024

@jerryshao @mchades , Please help to review it, I'm not quite familiar with Ranger and can't help too much with Ranger-related code.

Copy link
Contributor

@mchades mchades left a comment

Choose a reason for hiding this comment

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

please check the license of all new files

@yuqi1129
Copy link
Contributor

yuqi1129 commented Jul 8, 2024

@unknowntpo @xunliu Please resolve the comments and conflicts.

@xunliu xunliu force-pushed the issue-3751 branch 2 times, most recently from b18d895 to e6a45a3 Compare July 11, 2024 02:25
@unknowntpo
Copy link
Contributor Author

unknowntpo commented Jul 18, 2024

I've published new hive image to my docker hub repo for testing, to use this image, please set this line to integration-test/build.gradle.kts:

      environment("GRAVITINO_CI_RANGER_HIVE_DOCKER_IMAGE", "unknowntpo/gravitino-ci-hive:ranger-plugin") // Support Ranger plugin

@xunliu xunliu force-pushed the issue-3751 branch 5 times, most recently from e2dc83b to 5c0f5f5 Compare July 19, 2024 01:39
dev/docker/build-docker.sh Outdated Show resolved Hide resolved
dev/docker/hive/Dockerfile Outdated Show resolved Hide resolved
docs/publish-docker-images.md Outdated Show resolved Hide resolved
dev/docker/build-docker.sh Outdated Show resolved Hide resolved
docs/publish-docker-images.md Outdated Show resolved Hide resolved
Copy link
Member

@xunliu xunliu left a comment

Choose a reason for hiding this comment

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

@unknowntpo Thank you for your contributions.
LGTM

docs/publish-docker-images.md Outdated Show resolved Hide resolved
dev/docker/build-docker.sh Outdated Show resolved Hide resolved
Copy link
Contributor

@yuqi1129 yuqi1129 left a comment

Choose a reason for hiding this comment

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

LGTM

@yuqi1129 yuqi1129 merged commit 3c4d906 into apache:main Jul 19, 2024
33 checks passed
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.

[Subtask] Enable Apache Ranger plugin in Hive Docker image
5 participants