Skip to content

Commit 2e65525

Browse files
authored
Merge pull request #71 from migtools/MTA-3708_containerless-CLI
[To be merged for 7.2] Containerless CLI procedure for 7.2.0
2 parents dcc2dd6 + b98465b commit 2e65525

File tree

4 files changed

+103
-5
lines changed

4 files changed

+103
-5
lines changed

docs/cli-guide/master.adoc

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,25 @@ include::topics/cli-tool-known-issues.adoc[leveloffset=+3]
4949
[id="running-cli"]
5050
=== Running the CLI
5151

52-
You can run the {ProductFullName} {CLINameTitle} against one or more applications.
52+
Depending on your scenario, you can use the {ProductFullName} {CLINameTitle} to run the analysis in the following ways:
5353

54-
Before {ProductShortName} 7.1.0, if you wanted to run the {CLINameTitle} against multiple applications, you ran a series of `--analyze` commands, each against an application, and each generating a separate report. This option, which is still fully supported, is described in xref:mta-cli-run-single-app_cli-guide[Running the {ProductShortName} {CLINameTitle} against an application].
54+
* Run the analysis against a single application.
55+
* Run the analysis against multiple applications:
56+
** In {ProductShortName} versions earlier than 7.1.0, you can enter a series of `--analyze` commands, each against an application and each generating a separate report. For more information, see xref:mta-cli-run-single-app_cli-guide[Running the {ProductShortName} {CLINameTitle} against an application].
57+
** In {ProductShortName} 7.1.0 and later, you can use the `--bulk` option to analyze multiple applications at once and generate a single report. Note that this feature is a Developer Preview feature only. For more information, see xref:mta-cli-run-multiple-apps_cli-guide[Running the {ProductShortName} {CLINameTitle} against multiple applications and generating a single report (Developer Preview)].
5558

56-
In {ProductShortName} 7.1.0 and later, you can run the {CLINameTitle} against multiple applications by using the `--bulk` option, to generate a single report. This option, which is presented as a Developer Preview, is described in xref:mta-cli-run-multiple-apps_cli-guide[Running the {ProductShortName} {CLINameTitle} against multiple applications and generating a single report (Developer Preview)].
59+
//:FeatureName: Running the {CLINameTitle} against one or more applications
60+
//include::topics/developer-preview-feature.adoc[]
5761

58-
:FeatureName: Running the {CLINameTitle} against one or more applications
59-
include::topics/developer-preview-feature.adoc[]
62+
IMPORTANT: Starting from {ProductShortName} 7.2.0, you can run the application analysis in the containerless mode. Note that this option is set by default and is used automatically if all requirements are met. For more information, see xref:running-the-containerless-mta-cli_cli-guide[Running the containerless CLI].
6063

6164
// Run the CLI
6265
include::topics/mta-cli-run-single-app.adoc[leveloffset=+3]
6366

6467
include::topics/mta-cli-run-multiple-apps.adoc[leveloffset=+3]
6568

69+
include::topics/proc_running-the-containerless-mta-cli.adoc[leveloffset=+3]
70+
6671
// Analyze application source code
6772
include::topics/mta-cli-analyze.adoc[leveloffset=+3]
6873

docs/topics/installing-cli-tool.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@
99

1010
You can install the {CLINameTitle} on Linux, Windows, or macOS operating systems using the downloadable `.zip` file.
1111

12+
[IMPORTANT]
13+
====
14+
Starting from {ProductShortName} 7.2.0, you can run the application analysis for Java applications in the containerless mode.
15+
16+
The containerless mode is set by default and is used automatically if all requirements are met. For more information, see xref:running-the-containerless-mta-cli_cli-guide[Running the containerless CLI].
17+
18+
However, if you want to analyze applications in languages other than Java or, for example, use xref:mta-cli-transform_cli-guide[transformation commands], you still need to use containers.
19+
====
20+
1221
.Prerequisites
1322

1423
* Red Hat Container Registry Authentication for `registry.redhat.io`. Red Hat distributes container images from `registry.redhat.io`, which requires authentication. For more details, see link:https://access.redhat.com/RegistryAuthentication[Red Hat Container Registry Authentication].

docs/topics/installing-mta-disconnected-environment.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
[id="installing-mta-disconnected-environment_{context}"]
77
= Installing {ProductShortName} on a disconnected environment
88

9+
Starting from {ProductShortName} 7.2.0, you can run the application analysis for Java applications in the containerless mode.
10+
11+
IMPORTANT: The containerless mode is set by default and is used automatically if all requirements are met. For more information, see xref:running-the-containerless-mta-cli_cli-guide[Running the containerless CLI].
12+
13+
However, if you want to analyze applications in languages other than Java or, for example, use xref:mta-cli-transform_cli-guide[transformation commands], you still need to use containers.
14+
15+
916
On a connected device, first download and save the {ProductShortName} binary. Then download and save the Podman images, the {ProductShortName} CLI image and the provider image that you need.
1017

1118
* Download the required {ProductShortName} CLI binary from the link:https://developers.redhat.com/products/mta/download[{ProductName} Red Hat Developer page]:
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
:_newdoc-version: 2.18.3
2+
:_template-generated: 2024-11-15
3+
:_mod-docs-content-type: PROCEDURE
4+
5+
[id="running-the-containerless-mta-cli_{context}"]
6+
= Running the containerless CLI
7+
8+
Starting from {ProductShortName} 7.2.0, you can perform an application analysis for Java applications by using the {ProductShortName} CLI that does not require installation of a container runtime.
9+
10+
[IMPORTANT]
11+
====
12+
In {ProductShortName} 7.2.0 and later, containerless CLI is a default mode. To enable container runtime usage, you must set the `--run-local` flag to `false`:
13+
14+
----
15+
--run-local=false
16+
----
17+
====
18+
19+
.Prerequisites
20+
21+
* You have OpenJDK version 17 or later installed on your system.
22+
* You have Maven installed on your system.
23+
* The CLI assumes that a path to the `mvn` binary is correctly registered in the system variable. Therefore, ensure that you added `mvn` to the following variable:
24+
** `Path` for Windows.
25+
** `PATH` for Linux and macOS.
26+
* You have the `python3` package installed on your system.
27+
* You have the `JAVA_HOME` environmental variable set.
28+
* You have the `JVM_MAX_MEM` system variable set.
29+
+
30+
NOTE: If you do not set `JVM_MAX_MEM`, the analysis might hang.
31+
32+
.Procedure
33+
34+
. Move the installed {ProductShortName} CLI `.zip` file to your `$PATH`:
35+
+
36+
[source,terminal,subs="attributes+"]
37+
----
38+
$ mv <mta_cli_zip>/<os>-kantra /usr/bin
39+
----
40+
41+
. Move the requirements to the `.kantra` directory:
42+
+
43+
[source,terminal,subs="attributes+"]
44+
----
45+
$ mv $HOME/kantra.<os>.<arch> $HOME/.kantra
46+
----
47+
+
48+
NOTE: The CLI can run with the requirements moved to the directory from which you run an analysis. During the analysis, the CLI checks for the requirements in this directory first, and if it does not find the requirements, it searches for them in the `$HOME/.kantra` directory.
49+
50+
51+
. Optional: Display all `mta-cli analyze` command options:
52+
+
53+
[source,terminal,subs="attributes+"]
54+
----
55+
mta-cli analyze --help
56+
----
57+
58+
. Run the application analysis:
59+
+
60+
[source,terminal,subs="attributes+"]
61+
----
62+
$ mta-cli analyze --overwrite --input <path_to_input> --output <path_to_output> --target <target_source>
63+
----
64+
+
65+
The command arguments represent the following:
66+
67+
** `--overwrite`: Overwrites the output folder if it exists.
68+
** `--input`: The application to be analyzed.
69+
** `--output`: The output directory for the generated reports.
70+
** `--target`: The target technology for the application migration, for example, `eap8`.
71+
72+
73+
[role="_additional-resources"]
74+
.Additional resources
75+
76+
* xref:installing-downloadable-cli-zip_cli-guide[Installing the CLI .zip file]
77+

0 commit comments

Comments
 (0)