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

[WIP] Containerless CLI procedure for 7.2.0 #71

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mpershina
Copy link
Collaborator

@mpershina mpershina commented Nov 15, 2024

Tracked under MTA-3708 and also worked on in the gdoc draft.

Current preview

$ mv <mta_cli_zip>/<os>-kantra /usr/bin
----

. Move the requirements to the `.kantra` directory:

Choose a reason for hiding this comment

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

Might be good to note here that the CLI will look in the current dir for these requirements. If not found there, it will fall back to the $HOME/.kantra location.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@eemcmullan Just to clarify if I get it right: What do you mean by the "current directory", please?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

$ mv $HOME/kantra.<os>.<arch> $HOME/.kantra
----

. Open a terminal and navigate to the directory where you installed the {ProductShortName} CLI.

Choose a reason for hiding this comment

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

If the reqs are at $HOME/.kantra, the user will not need to navigate elsewhere.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ack, will attempt to rewrite it to include this info.

+
[source,terminal,subs="attributes+"]
----
$ mta-cli analyze --overwrite --input <path_to_input> --output <path_to_output> --target <target_source>

Choose a reason for hiding this comment

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

Should there be further options explained here? i.e. this will run the default rulesets previously installed, which can be disabled. Custom rules can also be specified. I'm not sure if there are details on this in another doc.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There are no details about it in any other part of the doc, I think. But I also don't think we should actually add steps for custom rules here. I'd maybe suggest to have a separate small procedure for running CLI with custom rules, and mention in this exact step that this is for default rulesets. WDYT?

* You have OpenJDK version 17 or later installed on your system.
* You have Maven installed on your system.
* You have the `python3` package installed on your system.
* You have the `JAVA_HOME` environmental variable set.
Copy link
Collaborator Author

@mpershina mpershina Nov 25, 2024

Choose a reason for hiding this comment

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

Suggested change
* You have the `JAVA_HOME` environmental variable set.
* You have the `JAVA_HOME` environmental variable set.
* Optional: You defined the `JVM_MAX_MEM` system variable.
+
NOTE: Defining ` JVM_MAX_MEM` is recommended. If you do not have this variable set, the analysis might hang.

Hi @ibragins, please check this suggestion ^ Based on what I can see in the ticket, this prereq is not mandatory. So shall we have it as optional and just add a not that it is recommended? Or shall I make it just a usuall mandatory prereq? Thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

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

@mpershina it depends on the way how Java was installed. If it was installed using installer or package manager - it will work without setting JAVA_HOME, but if user will just unpack a tarball - system should be informed somehow where is java binary. In this case this var should be defined manually.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@ibragins, I'm just a little bit confused. Are we speaking about only setting the JAVA_HOME var? Or are you talking about both JAVA_HOME and JVM_MAX_MEM? Sorry, I just need to clarify this for myslef to produce some great text, haha :-D

Copy link
Collaborator

@ibragins ibragins left a comment

Choose a reason for hiding this comment

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

I didn't see anything that is saying that container-less mode now is default one and bringing a zip file with prerequisites and putting it into $HOME/.kanta is mandatory now to make it work

@mpershina
Copy link
Collaborator Author

mpershina commented Nov 27, 2024

I didn't see anything that is saying that container-less mode now is default one and bringing a zip file with prerequisites and putting it into $HOME/.kanta is mandatory now to make it work

@ibragins It's just because I want to first work on the text draft in the google doc I shared and then move everything here, if you mean having some "default containerless cli" info in parts of the doc other than this exact procedure. The procedure in this PR already has putting requirements into $HOME/.kanta as a procedure step, not even a prereq, to make the user perform this action anyway.

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.

3 participants