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

RANGER-4750: Optimizations in the docker image build process #302

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kumaab
Copy link
Contributor

@kumaab kumaab commented Mar 16, 2024

What changes were proposed in this pull request?

Restructure the downloads of service tarballs from download-archives.sh to Dockerfile.ranger-service as part of the image build for respective services.

Key highlights:

  • When building specific images (eg: ranger-hadoop, ranger-hive), only hadoop and hive tarballs are downloaded bringing down the time taken to bring up the containers effectively.
  • Allows to take advantage of docker parallelization thereby allowing parallel service tarball downloads. Currently, the service tarball downloads happen in a sequential manner with download-archives.sh.
  • Although subject to network speeds, this also has shown minor improvements in overall build times for all images.

How was this patch tested?

Command to bring up containers:

  • docker-compose -f docker-compose.ranger-base.yml -f docker-compose.ranger.yml -f docker-compose.ranger-${RANGER_DB_TYPE}.yml -f docker-compose.ranger-usersync.yml -f docker-compose.ranger-tagsync.yml -f docker-compose.ranger-kms.yml -f docker-compose.ranger-hadoop.yml -f docker-compose.ranger-hbase.yml -f docker-compose.ranger-kafka.yml -f docker-compose.ranger-hive.yml -f docker-compose.ranger-trino.yml -f docker-compose.ranger-knox.yml build

@kumaab kumaab self-assigned this Mar 16, 2024

RUN tar xvfz /home/ranger/dist/hbase-${HBASE_VERSION}-bin.tar.gz --directory=/opt/ && \
RUN wget -O /home/ranger/dist/hbase-${HBASE_VERSION}-bin.tar.gz \
Copy link
Contributor

Choose a reason for hiding this comment

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

files like hbase--bin.tar.gz could be large. It will help to avoid downloading such files for every build. Please review.

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