Skip to content

Add simple settings to prestodb/presto image#21384

Merged
tdcmeehan merged 1 commit intoprestodb:masterfrom
yhwang:add-default-confs-to-docker-image
Nov 16, 2023
Merged

Add simple settings to prestodb/presto image#21384
tdcmeehan merged 1 commit intoprestodb:masterfrom
yhwang:add-default-confs-to-docker-image

Conversation

@yhwang
Copy link
Member

@yhwang yhwang commented Nov 14, 2023

Description

Update the Dockerfile to add config.properties and jvm.config.
Then users can bring up a Presto server without extra configurations.

This change makes the image can be used out of the box.

Motivation and Context

fixed: #21383

Impact

Users who use prestodb/presto docker image can launch the presto server without extra configurations. The image is embedded with simple configurations and can be overridden if needed.

Test Plan

verified the image manually:

$ docker run --rm --name testing -d prestodb/presto:latest
268b23cb81b10540cd4c4dedef51963e57acfb5cf40c46e8b9d6db5bd73049f3

$ docker logs testing -n 10
2023-11-16T05:19:25.771Z        INFO    main    com.facebook.presto.server.PluginManager        Installing com.facebook.presto.nodettlfetchers.PrestoNodeTtlFetcherPlugin
2023-11-16T05:19:25.782Z        INFO    main    com.facebook.presto.server.PluginManager        Registering Ttl fetcher factory infinite
2023-11-16T05:19:25.782Z        INFO    main    com.facebook.presto.server.PluginManager        -- Finished loading plugin /var/lib/presto/data/plugin/ttl-fetchers --
2023-11-16T05:19:25.804Z        INFO    main    com.facebook.presto.execution.resourceGroups.InternalResourceGroupManager       -- Loading resource group configuration manager --
2023-11-16T05:19:25.805Z        INFO    main    com.facebook.presto.execution.resourceGroups.InternalResourceGroupManager       -- Loaded resource group configuration manager legacy --
2023-11-16T05:19:25.805Z        INFO    main    com.facebook.presto.security.AccessControlManager       -- Loading system access control --
2023-11-16T05:19:25.806Z        INFO    main    com.facebook.presto.security.AccessControlManager       -- Loaded system access control allow-all --
2023-11-16T05:19:25.807Z        INFO    main    com.facebook.presto.storage.TempStorageManager  -- Loading temp storage local --
2023-11-16T05:19:25.816Z        INFO    main    com.facebook.presto.storage.TempStorageManager  -- Loaded temp storage local --
2023-11-16T05:19:25.843Z        INFO    main    com.facebook.presto.server.PrestoServer ======== SERVER STARTED ========

$ docker exec -ti testing presto-cli
presto> show catalogs;
 Catalog
---------
 system
(1 row)

Query 20231116_052013_00000_wrpg9, FINISHED, 1 node
Splits: 19 total, 19 done (100.00%)
[Latency: client-side: 0:02, server-side: 0:01] [0 rows, 0B] [0 rows/s, 0B/s]

presto>

Contributor checklist

  • Please make sure your submission complies with our development, formatting, commit message, and attribution guidelines.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== RELEASE NOTES ==

General Changes
* Add simple configurations to prestodb/presto docker image and make the image easier to use, including
  ``config.properties`` and ``jvm.config``

@yhwang yhwang requested a review from a team as a code owner November 14, 2023 20:55
@yhwang yhwang requested a review from presto-oss November 14, 2023 20:55
@yhwang
Copy link
Member Author

yhwang commented Nov 14, 2023

cc @wanglinsong

@dnskr
Copy link
Contributor

dnskr commented Nov 14, 2023

How can users disable or remove default catalogs if they are not needed?

@yhwang
Copy link
Member Author

yhwang commented Nov 14, 2023

How can users disable or remove default catalogs if they are not needed?

Good question! they can mount an empty folder to override the etc/catalog. i.e:
docker run -d -v ./empty-catalog:/opt/presto-server/etc/catalog prestodb/presto

Edit
The other case is adding an extra connector. It can be done by adding binding directly under etc/catalog. i.e:
docker run -d -v ./hive.properties:/opt/presto-server/etc/catalog/hive.properties prestodb/presto

@dnskr
Copy link
Contributor

dnskr commented Nov 15, 2023

I'm a bit concerned about how it will work in Kubernetes (for instance, in the Helm chart) if a user adds a catalog with sensetive values from single entries of specific secret or secrets. I suppose the cluster will have all default catalogs.
I would prefer to not require users to do any extra steps or provide configs to deploy "clean" Presto cluster. There is system catalog deployed by default, so can we avoid adding any other catalogs by default?

@yhwang
Copy link
Member Author

yhwang commented Nov 16, 2023

@dnskr I don't have a good solution for your scenario. Let me remove the catalogs from this PR for now.

Update the Dockerfile to add `config.properties`
and `jvm.config`. Then users can bring up a Presto
server without extra configurations.

This change makes the image can be used out of the box.

Signed-off-by: Yihong Wang <yh.wang@ibm.com>
@yhwang yhwang force-pushed the add-default-confs-to-docker-image branch from 9923077 to 4c186c6 Compare November 16, 2023 05:17
@tdcmeehan tdcmeehan merged commit a768596 into prestodb:master Nov 16, 2023
@wanglinsong wanglinsong mentioned this pull request Feb 12, 2024
64 tasks
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.

Make the prestodb/presto docker image easier to use

3 participants