Open kthatipally opened 3 months ago
This issue is currently awaiting triage.
If contributors determine this is a relevant issue, they will accept it by applying the triage/accepted
label and provide further guidance.
The triage/accepted
label can be added by org members.
Let's clarify the CLI arguments for multiple applications analysis, assuming this is not Hub-related, but pure kantra CLI solution. Windup looks to use --input
option [1] that could be file or a directory, is it the right way to allow use multiple --input
as an array or applications?
@aufi I think that the main benefit here for having multiple apps, is so that we have a static report generated with multiple apps as part of the assessment.
This is particularly useful for microservices, or even larger systems deployed as a handful of deployable units, all part of the same "business application". This will give the end user a single report with all the analysis in a single report.
Now, whether --input
can receive a list of inputs (e.g., --input my app.jar,myotherappsource/,someotherapp.jar
) or requiring one --input
for each input (e.g. --input myapp.jar --input otherapp.jar --input sourcefolder/
), I think that's up to the engineering team to decide. Both options are scriptable.
PR was merged, docs/usage: https://github.com/konveyor/kantra?tab=readme-ov-file#analyze-multiple-applications
Related paragraph from kantra readme:
By design, kantra supports single application analysis per kantra command execution. However, it is possible use --bulk
option for executing multiple kantra analyze commands with different applications to get an output directory and static-report populated with all applications analysis reports.
Example:
kantra analyze --bulk --input=<path/to/source/A> --output=<path/to/output/ABC>
kantra analyze --bulk --input=<path/to/source/B> --output=<path/to/output/ABC>
kantra analyze --bulk --input=<path/to/source/C> --output=<path/to/output/ABC>
@aufi I don't understand how that example relates to what @brunoborges was asking for. Could you elaborate further how would that work if I want to analyze applications A, B and C and get the reports for the three of them merged together?
I think the implementation is almost there.
But instead of calling kantra three times with the --bulk parameter, the --input parameter should allow multiple inputs, either by comma separated list, or by adding multiple --input
Thank you for comment Ramon and Bruno, adding some description what lead us to focus on little different way to getting static report including multiple applications analyses. If the proposed --bulk
option would not satisfy you use-case, let's discuss it.
Initialy requested command like below would introduce issues with different input applications technologies, output directory structure incompatible with single application analysis, unexpectable running time before returning the report and our aim move such use-cases primary to use Hub-based Konveyor installation.
kantra analyze --input A --input B --input C --output=<path/to/output/ABC>
# or
kantra analyze --input A,B,C --output=<path/to/output/ABC>
The --bulk
option allows to run applications analysis (single application per kantra call), but put results of multiple application analyses into a single static report (when pointing to the same output directory and it doesn't make assumptions about applications technologies/languages, sources, targets, etc.
It is true that there was also nearly working PR with initialy requested functionality (currently broken by multiprovider changes and replaced by the multiple inputs with --bulk
option), but it could be refreshed and completed.
This discussion probably should involve also @pranavgaikwad and @shawn-hurley (when they're available).
Example of currently proposed solution: A user have apps A, B and C in a directory path/to/source and wants analyze them with kantra.
In order to run analysis and get single static report covering all 3 applications A, B, C, commands below should be executed (kantra analyze with --bulk option to the same output directory)
kantra analyze --bulk --input=<path/to/source/A> --output=<path/to/output/ABC>
kantra analyze --bulk --input=<path/to/source/B> --output=<path/to/output/ABC>
kantra analyze --bulk --input=<path/to/source/C> --output=<path/to/output/ABC>
I should have mentioned one more option we agreed at some point with dev-colleagues and that was not use multiple input fields (or list of applications), but add --input-bin-dir
option to analyze all applications within the directory. (implentation not finished yet)
Example command:
# E.g. have applications A.war, B.war, C.ear in directory ./apps and want analyze them to get single static report covering all 3 applications
kantra analyze --input-bin-dir=./apps --output=<path/to/output>
Let me summarize current state. There is merged&built upstream solution/workaround combining multiple application analyses into single static report with --bulk
option.
To fulfil request from this RFE, we might discuss if real multiple --input
options and/or --input-bin-dir
options support will be implemented too. Let's talk about it on regular bi-weekly call.
Kantra currently can't analyze input multiple applications at once. Adding this feature would let users analyze several projects together, using the same settings and producing combined reports similar to how Windup supports analyzing multiple applications simultaneously. This change would save time, ensure consistency, and give better insights.