Skip to content

Commit 18d5dd7

Browse files
authored
Merge pull request migtools#11 from RichardHoch/bulk
Running the MTA CLI against multiple applications and generating a single report
2 parents 3c547db + a53b365 commit 18d5dd7

10 files changed

+248
-56
lines changed

docs/cli-guide/master.adoc

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:mta:
22
include::topics/templates/document-attributes.adoc[]
3-
:_content-type: ASSEMBLY
3+
:_mod-docs-content-type: ASSEMBLY
44
[id="cli-guide"]
55
= CLI Guide
66

@@ -37,8 +37,24 @@ include::topics/installing-cli-tool.adoc[leveloffset=+2]
3737
// CLI known issues
3838
include::topics/cli-tool-known-issues.adoc[leveloffset=+3]
3939

40+
[id="running-cli"]
41+
=== Running the CLI
42+
43+
You can run the {ProductFullName} {CLINameTitle} against one or more applications.
44+
45+
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].
46+
47+
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)].
48+
49+
[IMPORTANT]
50+
====
51+
include::snippets/developer-preview.adoc[]
52+
====
53+
4054
// Run the CLI
41-
include::topics/mta-cli-run.adoc[leveloffset=+2]
55+
include::topics/mta-cli-run-single-app.adoc[leveloffset=+3]
56+
57+
include::topics/mta-cli-run-multiple-apps.adoc[leveloffset=+3]
4258

4359
// Analyze application source code
4460
include::topics/mta-cli-analyze.adoc[leveloffset=+3]

docs/topics/mta-7-installing-web-console-on-openshift.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ The most commonly used CR settings are listed in this table:
161161
|====
162162
+
163163
.Example YAML file
164-
[sample,YAML]
164+
[source,YAML]
165165
----
166166
kind: Tackle
167167
apiVersion: tackle.konveyor.io/v1alpha1

docs/topics/mta-cli-analyze.adoc

Lines changed: 68 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
//
33
// * docs/cli-guide/master.adoc
44

5-
:_content-type: CONCEPT
5+
:_mod-doc-content-type: CONCEPT
66
[id="mta-cli-analyze_{context}"]
77
= Performing analysis using the command line
88

9-
`Analyze` allows running source code and binary analysis using `analyzer-lsp`.
9+
`Analyze` supports running source code and binary analysis using `analyzer-lsp`.
1010

1111
.To run analysis on application source code, run the following command:
1212

1313
[source,terminal,subs="attributes+"]
1414
----
15-
{mta-cli} analyze --input=<path/to/source/code> --output=<path/to/output/dir>
15+
{mta-cli} analyze --input=<path_to_source_code> --output=<path_to_output_directory>
1616
----
1717

1818
All flags:
@@ -25,27 +25,70 @@ Usage:
2525
{mta-cli} analyze [flags]
2626
2727
Flags:
28-
--analyze-known-libraries analyze known open-source libraries
29-
-h, --help help for analyze
30-
-i, --input string path to application source code or a binary
31-
--json-output create analysis and dependency output as json
32-
--list-sources list rules for available migration sources
33-
--list-targets list rules for available migration targets
34-
-l, --label-selector string run rules based on specified label selector expression
35-
--maven-settings string path to a custom maven settings file to use
36-
--overwrite overwrite output directory
37-
--skip-static-report do not generate the static report
38-
-m, --mode string analysis mode. Must be one of 'full' or 'source-only' (default "full")
39-
-o, --output string path to the directory for analysis output
40-
--rules stringArray filename or directory containing rule files
41-
--skip-static-report do not generate the static report
42-
-s, --source string source technology to consider for analysis. To specify multiple sources, repeat the parameter: --source <source_1> --source <source_2> etc.
43-
-t, --target string target technology to consider for analysis. To specify multiple targets, repeat the parameter: --target <target_1> --target <target_2> etc.
28+
29+
--analyze-known-libraries Analyze known open-source libraries.
30+
--context-lines (int) Number of lines of source code to
31+
include in the output for each
32+
incident (default: `100`).
33+
-d, --dependency-folders (stringArray) Directory for dependencies.
34+
--enable-default-rulesets Run default rulesets with analysis
35+
(default: `true`).
36+
-h, --help Help for analyze.
37+
--http-proxy (string) HTTP proxy string URL.
38+
--https-proxy (string) HTTPS proxy string URL.
39+
--incident-selector (string) An expression to select incidents
40+
based on custom variables.
41+
Example:
42+
!package=io.demo.config-utils
43+
-i, --input (string) Path to application source code or
44+
a binary.
45+
--jaeger-endpoint (string) Jaeger endpoint to collect traces.
46+
--json-output Create analysis and dependency
47+
output as JSON.
48+
--list-sources List rules for available
49+
migration sources.
50+
--list-targets List rules for available
51+
migration targets.
52+
-l, --label-selector (string) Run rules based on specified label
53+
selector expression.
54+
--maven-settings (string) Path to the custom maven
55+
settings file to use.
56+
--overwrite Overwrite output directory.
57+
--skip-static-report Do not generate the static report.
58+
-m, --mode (string) Analysis mode, must be one of
59+
`full` or `source-only`
60+
(default: `full`).
61+
--no-proxy (string) Proxy-excluded URLs
62+
(relevant only with proxy).
63+
-o, --output (string) Path to the directory for analysis
64+
output.
65+
--overwrite Overwrite output directory.
66+
--rules (stringArray) Filename or directory containing
67+
rule files.
68+
--skip-static-report Do not generate the static report.
69+
-s, --source (string) Source technology to consider
70+
for analysis.
71+
To specify multiple sources,
72+
repeat the parameter:
73+
`--source <source_1>
74+
--source <source_2>` etc.
75+
-t, --target (string) Target technology to consider
76+
for analysis.
77+
To specify multiple targets,
78+
repeat the parameter:
79+
`--target <target_1>
80+
--target <target_2>` etc.
81+
4482
4583
Global Flags:
46-
--log-level uint32 log level (default 4)
47-
--no-cleanup do not cleanup temporary resources
84+
--log-level uint32 Log level (default: 4).
85+
--no-cleanup Do not cleanup temporary resources.
4886
----
87+
88+
[NOTE]
89+
====
90+
The list of flags above does not include the `--bulk` flag because this flag is only offered as part of a Developer Preview feature. That feature is described in xref:mta-cli-run-multiple-apps_{context}[Support for providing a single report when analyzing multiple applications on the CLI].
91+
====
4992
.Usage example
5093

5194
. Get an example application to run analysis on.
@@ -73,9 +116,8 @@ dependency.log
73116
output.yaml
74117
static-report
75118
----
119+
+
120+
* `output.yaml` is the file that contains the issues report.
121+
* `static-report` contains the static HTML report.
122+
* `dependencies.yaml` contains the dependencies report.
76123
77-
`output.yaml` is the file that contains the issues report.
78-
79-
`static-report` contains the static HTML report.
80-
81-
`dependencies.yaml` contains a dependencies report.

docs/topics/mta-cli-args.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// * docs/cli-guide/master.adoc
44

5-
:_content-type: REFERENCE
5+
:_mod-docs-content-type: REFERENCE
66
[id="cli-args_{context}"]
77
= About {ProductShortName} command-line arguments
88

@@ -26,7 +26,7 @@ To run the {ProductShortName} command, for example when executing from a script,
2626

2727
[NOTE]
2828
====
29-
This option may result in a longer execution time and a large number of migration issues being reported.
29+
This option might result in a longer execution time and a large number of migration issues being reported.
3030
====
3131

3232
|--help |Display the {ProductShortName} help message.
@@ -70,7 +70,7 @@ The following flags are available:
7070
|Flag |Description
7171

7272
| --analyze-known-libraries
73-
| analyze known open-source libraries
73+
| analyze known open source libraries
7474

7575
| -h, --help
7676
| help for analyze
@@ -79,7 +79,7 @@ The following flags are available:
7979
| path to application source code or a binary
8080

8181
| --json-output
82-
| create analysis and dependency output as json
82+
| create analysis and dependency output as JSON
8383

8484
| --list-sources
8585
| list rules for available migration sources
@@ -130,7 +130,7 @@ The following flags are available:
130130
| log level (default 4)
131131

132132
| --no-cleanup
133-
| do not cleanup temporary resources
133+
| do not clean up temporary resources
134134
|====
135135

136136

@@ -153,7 +153,7 @@ Specify the path to the directory to output the report information generated by
153153
Error: required flag(s) "output" not set
154154
----
155155

156-
However, if you specify the `--overwrite` argument, {ProductShortName} will proceed to delete and recreate the directory. See the description of this argument for more information.
156+
However, if you specify the `--overwrite` argument, {ProductShortName} will proceed to delete and re-create the directory. See the description of this argument for more information.
157157

158158
[id="cli-source-argument_{context}"]
159159
== Setting the source technology
@@ -208,6 +208,6 @@ A space-delimited list of the packages to be evaluated by {ProductShortName}. It
208208
----
209209
210210
* In most cases, you are interested only in evaluating custom application class packages and not standard Java EE or third party packages. The `<PACKAGE_N>` argument is a package prefix; all subpackages will be scanned. For example, to scan the packages `com.mycustomapp` and `com.myotherapp`, use `--packages com.mycustomapp com.myotherapp` argument on the command line.
211-
* While you can provide package names for standard Java EE third party software like `org.apache`, it is usually best not to include them as they should not impact the migration effort.
211+
* While you can provide package names for standard Java EE third party software such as `org.apache`, it is usually best not to include them as they should not impact the migration effort.
212212
213213
////
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * docs/cli-guide/master.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="mta-cli-run-multiple-apps_{context}"]
7+
= Running the {ProductShortName} {CLINameTitle} against multiple applications and generating a single report (Developer Preview)
8+
9+
You can now run the {ProductFullName} {CLINameTitle} against multiple applications and generate a combined report. This can save you time and give you a better idea of how to prepare a set of applications for migration.
10+
11+
This feature is currently a Developer Preview feature.
12+
13+
include::snippets/developer-preview-admonition.adoc[]
14+
15+
.Procedure
16+
17+
. Open a terminal and navigate to the `<{ProductShortName}_HOME>/` directory.
18+
19+
. Run the `{mta-cli}` script, or `{mta-cli}.exe` for Windows, and specify the appropriate arguments, entering one input per `analyze` command, but entering the same output directory for all inputs. For example, to analyze applications A, B, and C:
20+
21+
.. Enter the following command for input A:
22+
+
23+
[source,terminal]
24+
----
25+
$ ./{mta-cli} analyze --bulk --input=<path_to_input_A> --output=<path_to_output_ABC> --source <source_A> --target <target_A>
26+
----
27+
* `--input`: The application to be evaluated.
28+
* `--output`: The output directory for the generated reports.
29+
* `--source`: The source technology for the application migration. For example, `weblogic`.
30+
* `--target`: The target technology for the application migration. For example, `eap8`.
31+
32+
.. Enter the following command for input B:
33+
+
34+
[source,terminal]
35+
----
36+
$ ./{mta-cli} analyze --bulk --input=<path_to_input_B> --output=<path_to_output_ABC> --source <source_B> --target <target_B>
37+
----
38+
.. Enter the following command for input C:
39+
+
40+
[source,terminal]
41+
----
42+
$ ./{mta-cli} analyze --bulk --input=<path_to_input_C> --output=<path_to_output_ABC> --source <source_C> --target <target_C>
43+
----
44+
+
45+
{ProductShortName} generates a single report, listing all issues that need to be resolved before the applications can be migrated.
46+
47+
. Access the report.
48+
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * docs/cli-guide/master.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="mta-cli-run-single-app_{context}"]
7+
= Running the {ProductShortName} {CLINameTitle} against an application
8+
9+
You can run the {ProductFullName} {CLINameTitle} against an application.
10+
11+
.Procedure
12+
13+
. Open a terminal and navigate to the `<{ProductShortName}_HOME>/` directory.
14+
15+
. Run the `{mta-cli}` script, or `{mta-cli}.exe` for Windows, and specify the appropriate arguments:
16+
17+
+
18+
[source,terminal,subs="attributes+"]
19+
----
20+
$ ./{mta-cli} analyze --input <path_to_input> \
21+
--output <path_to_output> --source <source_name> --target <target_source> \
22+
----
23+
+
24+
* `--input`: The application to be evaluated.
25+
* `--output`: The output directory for the generated reports.
26+
* `--source`: The source technology for the application migration. For example, `weblogic`.
27+
* `--target`: The target technology for the application migration. For example, `eap8`.
28+
29+
. Access the report.
30+
31+
[id="command-examples_{context}"]
32+
== {ProductShortName} command examples
33+
34+
[discrete]
35+
=== Running {ProductShortName} on an application archive
36+
37+
The following command analyzes the example EAR archive named `jee-example-app-1.0.0.ear` for migrating from JBoss EAP 5 to JBoss EAP 7:
38+
39+
[source,terminal,subs="attributes+"]
40+
----
41+
$ <{ProductShortName}_HOME>/{mta-cli} analyze \
42+
--input <path_to_jee-example-app-1.0.0.ear> \
43+
--output <path_to_report_output> --source eap5 --target eap7 \
44+
----
45+
[]
46+
47+
[discrete]
48+
=== Running {ProductShortName} on source code
49+
50+
The following command analyzes the source code of an example application called `customer-management` for migrating to JBoss EAP 8.
51+
52+
[source,terminal,subs="attributes+"]
53+
----
54+
55+
$ <{ProductShortName}_HOME>/{mta-cli} analyze --mode source-only --input <path_to_customer-management> \
56+
--output <path_to_report_output> --target eap8 --packages org.jboss.eap
57+
----
58+
[]
59+
[discrete]
60+
=== Running cloud-readiness rules
61+
62+
The following command analyzes the example EAR archive named `jee-example-app-1.0.0.ear` for migrating to JBoss EAP 7. It also evaluates the archive for cloud readiness:
63+
64+
[source,terminal,subs="attributes+"]
65+
----
66+
$ <{ProductShortName}_HOME>/{mta-cli} analyze --input <path_to_jee-example-app-1.0.0.ear> \
67+
--output <path_to_report_output> \
68+
--target eap7
69+
----
70+
[]
71+

0 commit comments

Comments
 (0)