Contributing
There are two ways to consume or contribute to this project. Since this is a simple java application, you can install jdk 21 and make changes and compile.
- Install intellij idea community edition
- Open the build.gradle file as a project
- Then to compile just run it after selecing jdk21 as your java version
After setup is done, how to run locally
./gradlew clean build
java -jar build/libs/k3s-simplified.jar create --config ~/Projects/easystartup-io/k3s-simplified/cluster_config.yaml
Why am I not using GraalVM native image:
- I did explore using a GraalVM native image
- But it lead to too many issues with reflection and deserialization and I have to ensure that while running the GraalVM agent for every change that I explore all the application pathways for the agent to compute the pathways and allow reflections
- I do not feel it is worth the effort in doing it, mainly because of additional bugs that can come up during runtime
- Instead people can download a slightly larger package bundled with JRE itself which can avoid all these problems.
To test release packages
- There is a build pipeline which creates artifact when you push to
test-release
branch - You can push to that branch and check your github actions, you should be able to find the artifact to download and test where ever you want
- The link_to_artifact_file should be output in the
Output artifact URL
step of github action pipeline, then you have to manually download it - There is no way to download artifact without signing in, hence currently cant automate it
- After downloading your tar artifact
tar -xf k3s-simplified.tar.gz
cd k3s-simplified
chmod +x install.sh
sudo ./install.sh
cd ..