Skip to content

Add launcher and create tar for trino-gateway #669

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

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

Conversation

anilsomisetty
Copy link

@anilsomisetty anilsomisetty commented Apr 15, 2025

Description

This pr contains below changes to add launcher script and trino-gateway tar generation similar to trino:

  1. New gateway server module to generate gateway tar
  2. Creation of launcher scripts from airlift/launcher same as trino
  3. Changes to make gateway code compatible with airlift/launcher: config.yml input changed from argument to system variable passed to java command

How to manage the service with new changes:

Command: bin/launcher (run/start/stop/restart/kill/status) --config path_of_config.yml

Additional context and related issues

Release notes

( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Apr 15, 2025
@anilsomisetty anilsomisetty force-pushed the gateway-launcher branch 3 times, most recently from 6df9e9a to 8cd0ac7 Compare April 16, 2025 09:15
@anilsomisetty anilsomisetty reopened this Apr 16, 2025
</dependency>
</dependencies>

<!-- Needed for provisio to resolve transitive dependencies for server assembly -->
Copy link
Member

Choose a reason for hiding this comment

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

Not needed.. remove please

Copy link
Author

@anilsomisetty anilsomisetty Apr 16, 2025

Choose a reason for hiding this comment

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

@mosabua I have removed it

@mosabua
Copy link
Member

mosabua commented Apr 16, 2025

Can you please explain your motivation to add this. Currently the application is a single jar file and a simple Java command .. what benefits do we get from adding a tarball and launcher

@anilsomisetty
Copy link
Author

Can you please explain your motivation to add this. Currently the application is a single jar file and a simple Java command .. what benefits do we get from adding a tarball and launcher

@mosabua Below listed things are my motivation which I liked having in trino-gateway similar to trino which was possible with this launcher addition

  1. Automated Log Management: With the new launcher, log files (launcher.log and server.log) are automatically generated for the gateway process. This eliminates the need for manual redirection of output to log files, significantly simplifying log management and making it easier to monitor and troubleshoot the gateway.
  2. Simplified Execution: The launcher script encapsulates Java commands, simplifying the execution of the application. It ensures that the application is started with the correct JVM options which can be specified in the jvm.config file, environment variables, and classpath settings.
  3. Structured Configuration: The launcher provides a structured way to organize the application's configuration and dependencies. Configurations can be placed under the etc directory, libraries under the lib directory, and launcher scripts under the bin directory. This organization enhances clarity and manageability, making it easier to locate and modify configurations and dependencies as needed.
  4. Consolidated Packaging: With the addition of multiple files due to the launcher, creating a tarball ensures that all necessary components are packaged together in a single, cohesive archive.

@mosabua
Copy link
Member

mosabua commented Apr 17, 2025

We will need to add some documentation and upgrade the existing documentation .. I think to merge this we will want to no longer have documentation for the old jar use .. at least not documented.. and the docker image build has to be updated as well. Not sure if we should do this all in one PR or in separate steps .. thoughts @anilsomisetty @oneonestar @vishalya @willmostly @Chaho12 ?

@Chaho12
Copy link
Member

Chaho12 commented Apr 17, 2025

I don't mind changing at once as long as we have sufficient documentations as it is BREAKING change.

@anilsomisetty
Copy link
Author

@mosabua @Chaho12 Please let me know if you want me to make below changes in current pr:

  1. Existing documentation update with latest changes
  2. Updates to docker image

@mosabua
Copy link
Member

mosabua commented Apr 23, 2025

If you are able to work on the docker image, the docs updates, and also the quickstart and other assets. If we go for the tarball it should be a full switch over .. and ideally in one PR to ensure it all changes within one release.

@mosabua
Copy link
Member

mosabua commented May 22, 2025

Please change the module name and hence also the binary and more to trino-gateway-server .. that makes it consistent with trino itself.

@anilsomisetty anilsomisetty force-pushed the gateway-launcher branch 3 times, most recently from 96e966a to e3a3726 Compare May 23, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants