-
Notifications
You must be signed in to change notification settings - Fork 272
Use Makefile to simplify setup and commands #2027
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
base: main
Are you sure you want to change the base?
Conversation
The script is likely a nice addition for macOS users who are using brew. |
So we can switch to podman if that is a concern (or make docker substitute-able via env variable). Docker is still free for individuals or even small companies. However, most of the docs we have currently are using docker as opposed to podman. And yes, as you called out, this will be great for Linux/Unix users (brew can also be installed on WSL for Windows users). This doesn't work for native Windows users who are not using WSL (most of our docs are not Windows friendly at the moment as well). What do you think? |
If users/developers find this |
For sure, we don't necessary need to change the doc to replace the ones with gradlew commands. The main purpose for this one is to easy the process for developers who are not familiar with those tools and run 1-2 short commands to get things going. I will be adding more use cases (such as minikube) later this week. Again, thanks for your feedback and feel free to drop me things that you think can be benefits for developers to perform without copying/paste length commands from various pages. |
Don't get me wrong, but it seems the setup is quite opinionated. The Makefile requires devs to use new things, that do not necessarily match their daily workflows. For example, I do not have Certain things in this change however look useful. For example the helm stuff, so I wouldn't mind to have that as a separate "helper Makefile", but without the requirement for brew, jenv and a specific Java distribution. Minikube can just work, but people may have special settings. I recall a bunch of "specialties" wrt minikube + podman + images published to minikube's registry. The line between "non-commercial OSS use" and "commercial use" of Docker (i.e. you work on something for your employer) is blurry. I don't mind this script in general, if it's helpful for some users, but I'm not convinced that it's suitable for most users. |
I think the intension here is not to promo everyone to use And yes, with the one I pushed last night, I had defined the needed dependencies per target. This mean, if an user is only working on helm, it won't ask user to setup jenv etc nor specific java distribution. Then for the licensing concern with Docker, I don't see a problem with switching to podman. However, I do think we should make it configurable as not everyone work on Polaris from a corporate perspective (also, docker itself is free, the one that required license is docker desktop which has the GUI. Our current doc is installing docker desktop which is not free for large corp. That being said, within a large corporate, an user can still installed docker on his/her Linux machine without GUI to avoid the licensing concern). For the minikube lifecycle management, this is mainly from @adutra feedback earlier with I created this tool mainly to easy my workflow with Mac when working with Polaris. But we can for sure extend it to make it suitable for more users which are not using Mac or not using brew. |
I had add podman support and brew optional with the latest push, here is the new CLI interface:
Here is a sample command in case if u want to play around with podman:
There is one catch found with podman build, where podman will try to add default registry (in this case docker.io as prefix to the image):
This is a good practice but it will break our existed workflow. I can look into more (either update chart to use docker.io as well as update docker build to include the registry or check if there is a way to even remove it in podman...quick check shows later is not possible). |
This PR brings in a root-level Makefile to simplify and centralize how we set up our development environment and run common build tasks for Polaris.
The Problem I Noticed:
Right now, getting set up or performing routine builds often means jumping between different documentation pages to find various tool installations (like
helm
,kubectl
,jq
,jenv
,git
,docker
) and then copying lengthygradlew
commands. While it makes sense to have granular instructions for deep dives or specific contributions, having a single, straightforward entry point for common tasks could really smooth out onboarding for new folks and make our development flow much more efficient.My Proposal (and a Working Example):
I've put together this PR as a first pass, a working example, to kick off a discussion on whether this centralized Makefile approach is something we want to adopt. It shows how we can:
make
command. (We can definitely refine this further, perhaps breaking it down into component-specific sets if we build this out.)gradlew
calls with concisemake
commands to build the server, admin, or both.make
targets.pre-commit
target to automate routine tasks like Helm documentation generation and applying Spotless formatting.Beyond this PR: Other Potential Use Cases:
If we move forward with this approach, the Makefile could also become a central point for:
make
command.make start
,make stop
) and orchestrating Helm deployments.What I'm Looking For:
I'd really appreciate your thoughts on this centralized Makefile idea. Does this feel like the right path for how we want to manage our developer experience? Any feedback on the overall concept or the specific examples here would be super helpful as we decide whether to build this out further.
Mailing discussion:
https://lists.apache.org/thread/vjnptg3prdps9slkt7rnvv7ldcwld88s
Sample interface and commands output:
Main interface:
Run pre-commit
Run build
Minikube state management