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

MTA-2744 - Rework MTA CLI section #880

Open
wants to merge 56 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
016bdd6
Updated .gitignore file
HagayVider1 Apr 21, 2024
7a5011b
Text edits in MTA CLI guide
HagayVider1 May 6, 2024
94897b6
Updated install CLI section
HagayVider1 May 6, 2024
54a0ec2
Updated install CLI procedure and link to Run CLI procedure
HagayVider1 May 7, 2024
3815164
Fixed spelling
HagayVider1 May 7, 2024
8722f49
Update according to comment
HagayVider1 May 7, 2024
4106033
Update according to Adndy's comments
HagayVider1 May 7, 2024
ad4158d
Update updated according to comment
HagayVider1 May 7, 2024
a9adfb0
Replaced link with xref
HagayVider1 May 7, 2024
1b2901f
Merge branch 'main' into mta-2744_rework-mta-cli-section
HagayVider1 May 7, 2024
37f5272
Changed xref
HagayVider1 May 7, 2024
5dae139
Changed xref
HagayVider1 May 7, 2024
74433e1
Updated xref command
HagayVider1 May 8, 2024
555a837
Added Windows EXE option
HagayVider1 May 16, 2024
b27fa85
Updated migration paths table - to revert
HagayVider1 May 21, 2024
9d67697
Updated About CLI
HagayVider1 May 23, 2024
aed8816
Updated CLI installation procedure
HagayVider1 May 23, 2024
0e6ef1e
Updated What is MTA
HagayVider1 May 23, 2024
ed6cf04
Updated Username and Password step
HagayVider1 May 23, 2024
56a8f60
Update docs/topics/installing-cli-tool.adoc
HagayVider1 May 27, 2024
da19c36
Update docs/topics/installing-cli-tool.adoc
HagayVider1 May 27, 2024
896b888
Moved sections within CLI guide
HagayVider1 May 27, 2024
e90fd7d
Updated about MTA according to Andy's comments
HagayVider1 May 29, 2024
35307af
Updated about CLI section
HagayVider1 May 29, 2024
30ba650
Corrected Podman name
HagayVider1 May 29, 2024
ad8a8d9
Updated About CLI section
HagayVider1 May 30, 2024
e57201e
Updated file download section
HagayVider1 May 30, 2024
a28e029
Corrected capitalization
HagayVider1 May 30, 2024
1474e60
Added darwin-mta-cli filename for macOS
HagayVider1 May 30, 2024
bb03d4e
Rewriting Running MTA CLI section
HagayVider1 May 30, 2024
1504f44
Updated file names in installation
HagayVider1 May 30, 2024
1011b1f
Corrected typos
HagayVider1 May 30, 2024
5e6d4b9
Updated installation procedure
HagayVider1 May 30, 2024
c2d899e
Merge branch 'main' into mta-2744_rework-mta-cli-section
HagayVider1 May 30, 2024
b86383b
Corrected after linting
HagayVider1 Jun 3, 2024
78c393b
Updated Running the CLI section
HagayVider1 Jun 5, 2024
728e9b8
Renamed Accessing reports to Reports and moved to head or Reports cha…
HagayVider1 Jun 5, 2024
222c1f3
Updated the Reports chapter start
HagayVider1 Jun 5, 2024
47a99ce
Corrected spacing
HagayVider1 Jun 5, 2024
85a35bf
Updated open report procedure
HagayVider1 Jun 5, 2024
b84f8d0
Updated outline for Reports chapter
HagayVider1 Jun 5, 2024
0765fe5
Updated What is the MTA
HagayVider1 Jun 5, 2024
bfe9536
Updated after linting
HagayVider1 Jun 6, 2024
b825cac
Corrected What is MTA section
HagayVider1 Jun 6, 2024
176ec50
Updated bulleted list
HagayVider1 Jun 6, 2024
7e09487
Added backticks where necessary
HagayVider1 Jun 10, 2024
142dbdf
Corrected table
HagayVider1 Jun 10, 2024
e6dbf74
Corrected table
HagayVider1 Jun 10, 2024
a212ed2
Corrected Running the CLI header
HagayVider1 Jun 10, 2024
5d740d7
Corrected document hierarchy
HagayVider1 Jun 10, 2024
97ad2ea
Corrected back-tick
HagayVider1 Jun 13, 2024
8af6fd0
Corrected third-party
HagayVider1 Jun 13, 2024
a850e14
Replaced image with MTA 7
HagayVider1 Jun 13, 2024
760771b
Removed Shared archives - added Dependencies
HagayVider1 Jun 13, 2024
7bbe1a8
Replaced Dashboard image
HagayVider1 Jun 13, 2024
5910a92
// Add query for Dashboard image
HagayVider1 Jun 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@ html/
*/build/*
Gemfile.lock
*/master.html
.idea/
.idea/
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why have you changed the .gitignore file?
You should be using your global .gitignore file which we set up in our last git training session.

Copy link
Collaborator

Choose a reason for hiding this comment

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

You have closed this comment and failed to correct your mistake

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
.idea/
.idea/

.gitignore
.DS_Store
assets/.DS_Store
docs/.DS_Store
docs/topics/.DS_Store
27 changes: 12 additions & 15 deletions docs/cli-guide/master.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,26 @@ include::topics/making-open-source-more-inclusive.adoc[]

== Introduction

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reorganized sections in guide:
Making open source more inclusive

  1. Introduction
    1.1 About Migration Toolkit for Applications
    1.2 About the MTA CLI
    1.3 About the CLI guide
  2. Installing the CLI application
    2.1 Installing the CLI .zip file
    2.2 Installing the CLI using Podman
    2.3 Installation known issues
  3. Running the CLI
    3.1 Running the CLI
    3.2 MTA command syntax and examples
    3.3 Migration analysis using the command line
    3.4 Transformation using the CLI
  4. Reports
    4.1 Reviewing reports
    4.1.1 Application report
    4.1.2 Technologies report
    4.2 Selecting packages

// About the {UserCLIBookName}
include::topics/about-cli-guide.adoc[leveloffset=+2]

// About {ProductName}
include::topics/mta-what-is-the-toolkit.adoc[leveloffset=+2]

// About the {CLINameTitle}
include::topics/about-cli.adoc[leveloffset=+2]

// About the {UserCLIBookName}
include::topics/about-cli-guide.adoc[leveloffset=+2]

// Supported migration paths
include::topics/migration-paths.adoc[leveloffset=+3]

For more information about use cases and migration paths, see the link:https://developers.redhat.com/products/mta/use-cases[{ProductShortName} for developers] web page.

// About the {CLINameTitle}
include::topics/about-cli.adoc[leveloffset=+2]

== Installing and Running the CLI

// Install the CLI
include::topics/installing-cli-tool.adoc[leveloffset=+2]

// CLI known issues
include::topics/cli-tool-known-issues.adoc[leveloffset=+3]
include::topics/installing-cli-tool.adoc[leveloffset=+1]

// Run the CLI
include::topics/mta-cli-run.adoc[leveloffset=+2]
include::topics/mta-cli-run.adoc[leveloffset=+1]

// Analyze application source code
include::topics/mta-cli-analyze.adoc[leveloffset=+3]
Expand All @@ -52,11 +49,11 @@ include::topics/mta-cli-transform.adoc[leveloffset=+3]
// Available OpenRewrite recipes
include::topics/available-openrewrite-recipes.adoc[leveloffset=+4]

// Access the Report
include::topics/access-report.adoc[leveloffset=+2]
// Reports
include::topics/access-report.adoc[leveloffset=+1]

// Review the Reports
include::topics/mta-review-reports.adoc[leveloffset=+1]
include::topics/mta-review-reports.adoc[leveloffset=+2]

// Export the Report in CSV Format
// include::topics/csv-export.adoc[leveloffset=+1]
Expand Down
2 changes: 1 addition & 1 deletion docs/topics/about-cli-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
[id="about-cli-guide_{context}"]
= About the {UserCLIBookName}

This guide is for engineers, consultants, and others who want to use the {ProductName} ({ProductShortName}) to migrate Java applications or other components. It describes how to install and run the {CLIName}, review the generated reports, and take advantage of additional features.
This guide is for programmers, engineers, consultants, and others who want to use the {ProductName} ({ProductShortName}) to migrate Java and Go applications, or other software components. It describes how to install and run the {CLIName}, review the generated reports, and take advantage of additional features.
2 changes: 1 addition & 1 deletion docs/topics/about-cli.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[id="about-cli_{context}"]
= The {ProductShortName} {CLINameTitle}

The {CLIName} is a command-line tool in the {ProductName} that you can use to assess and prioritize migration and modernization efforts for applications. It provides numerous reports that highlight the analysis without using the other tools. The {CLIName} includes a wide array of customization options. By using the {CLIName}, you can tune {ProductShortName} analysis options or integrate with external automation tools.
The {ProductName} {CLIName} is a command-line tool that you can use for assessing and managing your migration and modernization efforts for applications. It produces many reports that highlight the analysis without having to use the other tools. The {CLIName} includes a wide array of customization options, enabling you to tune the {ProductShortName} analysis options or integrate with external automation tools.

ifndef::cli-guide[]
For more information about using the {CLIName}, see link:{ProductDocUserGuideURL}[_{UserCLIBookName}_].
Expand Down
12 changes: 6 additions & 6 deletions docs/topics/access-report.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

:_content-type: PROCEDURE
[id="access-report_{context}"]
= Accessing reports
= Reports
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed section on opening an analysis report be chapter header.


When you run the {ProductName}, a report is generated in the `<OUTPUT_REPORT_DIRECTORY>` that you specify using the `--output` argument in the command line.
{ProductShortName} {CLIName} analyzes the application and generates a report of the analysis results. The report is saved to the `<OUTPUT_REPORT_DIRECTORY>` that you specified in the `./ analyze` command, after the `--output` argument.

The output directory contains the following files and subdirectories:
Navigate to the directory and open the `<APPLICATION_NAME>-output` directory, which contains the following files and subdirectories:

----
<OUTPUT_REPORT_DIRECTORY>/
Expand All @@ -22,13 +22,13 @@ The output directory contains the following files and subdirectories:

.Procedure

. Obtain the path of the `index.html` file of your report from the output that appears after you run {ProductShortName}:
. In the `<APPLICATION_NAME>-output` directory that you specified in the {ProductShortName} `./analyze` command, open the `index.html` file:
Copy link

Choose a reason for hiding this comment

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

Is the ./ needed in this line?

Same question for line 9

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I ran the command with ./ at the beginning, and it generated the -output directory inside the directory where I was working.
MTA-CLI-command
The command created the <ApplicationName>-output directory.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Corrected line 9

+
----
Report created: <OUTPUT_REPORT_DIRECTORY>/index.html
Access it at this URL: file:///<OUTPUT_REPORT_DIRECTORY>/index.html
----

. Open the `index.html` file by using a browser.
. The `index.html` file opens in a browser by default.
+
The generated report is displayed.
The browser window shows the generated report.
52 changes: 44 additions & 8 deletions docs/topics/installing-cli-tool.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
[id="installing-cli-tool_{context}"]
= Installing the {CLINameTitle}

You can install the {CLINameTitle} on Linux, Windows, or macOS operating systems.

You can install the {ProductShortName} {CLINameTitle} on Linux, Windows, or macOS operating systems.

.Prerequisites

Expand All @@ -24,24 +23,52 @@ Podman provides a command-line interface (CLI) familiar to anyone who has used t
For more information on installing and using Podman, see link:https://podman.io/docs/installation[Podman installation instructions].
====

.Installation options

Copy link
Contributor Author

Choose a reason for hiding this comment

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

New step on Installation options
Downloading the ZIP file is preferred, but installing using Podman is also available.

You can run either of the following two options to install {ProductShortName} {CLINameTitle}:

* Downloading the appropriate {ProductShortName} {CLINameTitle} `.zip` file, according to your operating system, and installing by using the command line.
* Running Podman on your computer and installing {ProductShortName} {CLIName} using Podman commands.

+
[WARNING]
====
Although installation using Podman is possible, downloading and installing the {ProductShortName} {CLIName} `.zip` file is the preferred installation.
====


[id="installing-downloadable-cli-zip_{context}"]
== Installing the {CLINameTitle} `.zip` file

.Procedure

To install using the downloadable `.zip` file:

. Navigate to the link:{DevDownloadPageURL}[{ProductShortName} Download page] and download the OS-specific CLI file or the `src` file:
. Navigate to the link:https://developers.redhat.com/products/mta/download[{ProductShortName} Download page] and download the OS-specific {ProductShortName} CLI file or the `mta-{ProductVersion}-cli-src` file:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added link to MTA CLI download page with all OS download options


+
* Migration Toolkit {CLINameTitle} - {CLINameTitle} for Linux x86_64
* Migration Toolkit {CLINameTitle} - {CLINameTitle} for Linux aarch64
* Migration Toolkit {CLINameTitle} - {CLINameTitle} for macOS x86_64
* Migration Toolkit {CLINameTitle} - {CLINameTitle} for macOS aarch64
* Migration Toolkit {CLINameTitle} - {CLINameTitle} for Windows x86_64
* Migration Toolkit {CLINameTitle} - {CLINameTitle} for Windows aarch64
* Migration Toolkit {CLINameTitle} - {CLINameTitle} for {ProductShortName} source Code

+
* {ProductShortNameLower}-{ProductVersion}-cli-linux.zip
* {ProductShortNameLower}-{ProductVersion}-cli-macos.zip
* {ProductShortNameLower}-{ProductVersion}-cli-windows.zip
* {ProductShortNameLower}-{ProductVersion}-cli-src.zip
[NOTE]
====
Do not download and install the {ProductShortName} source code file if your computer runs one of the above operating systems.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

New note

Copy link
Collaborator

@anarnold97 anarnold97 Jun 15, 2024

Choose a reason for hiding this comment

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

You need to use Vale

💡 RedHat.TermsSuggestions 1(101-106) Depending on the context, consider using 'earlier', 'previous', 'preceding', or 'before' rather than 'above'.

====

. Extract the `.zip` file to a directory of your choice. The `.zip` file extracts a single binary, called *mta-cli*.
+
When you encounter `<{ProductShortName}_HOME>` in this guide, replace it with the actual path to your {ProductShortName} installation.

. Copy or save the `mta-cli` binary on Linux, `darwin-mta-cli on macOS, or `mta-cli.exe` on Windows, to a known directory.
Copy link

Choose a reason for hiding this comment

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

nitpick: backtick missing after "darwin-mta-cli"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Corrected

+
Continue to xref:cli-run_cli-guide[Running the CLI] to run the CLI command.


[id="installing-using-podman_{context}"]
== Installing the {CLINameTitle} using Podman
Expand All @@ -60,10 +87,19 @@ To install using `podman pull`:
[source,terminal]
----
podman login registry.redhat.io
----

. Enter your `Username` and `Password`.
+
[source,terminal]
----
Username: <username>
Password: <***********>
----
. Issue:
+
If your `Username` and `Password` are correct, the terminal line should show `Login Succeeded!`.

. Copy the binary `PATH` for system-wide use.
+
[source,terminal]
----
Expand Down
24 changes: 24 additions & 0 deletions docs/topics/migration-paths.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ The {ProductName} ({ProductShortName}) supports the following migrations:
|Spring Boot in Red Hat Runtimes
|Quarkus
|Open Liberty
|Azure App Service

|Oracle WebLogic Server
|{icon-check}
Expand All @@ -36,6 +37,7 @@ The {ProductName} ({ProductShortName}) supports the following migrations:
|-
|-
|-
|-

|IBM WebSphere Application Server
|{icon-check}
Expand All @@ -46,6 +48,7 @@ The {ProductName} ({ProductShortName}) supports the following migrations:
|-
|-
|{icon-check}
|-

|JBoss EAP 4
|{icon-x} footnoteref:[note2,Although {ProductShortName} does not currently provide rules for this migration path, Red Hat Consulting can assist with migration from any source platform to JBoss EAP 7.]
Expand All @@ -55,6 +58,7 @@ The {ProductName} ({ProductShortName}) supports the following migrations:
|-
|-
|-
|-

|JBoss EAP 5
|{icon-check}
Expand All @@ -65,6 +69,7 @@ The {ProductName} ({ProductShortName}) supports the following migrations:
|-
|-
|-
|-

|JBoss EAP 6
|{icon-check}
Expand All @@ -75,6 +80,7 @@ The {ProductName} ({ProductShortName}) supports the following migrations:
|-
|-
|-
|-

|JBoss EAP 7
|{icon-check}
Expand All @@ -85,6 +91,7 @@ The {ProductName} ({ProductShortName}) supports the following migrations:
|-
|{icon-check}
|-
|-

|Thorntail
|{icon-check} footnoteref:[note3,Requires JBoss Enterprise Application Platform expansion pack 2 (EAP XP 2)]
Expand All @@ -95,6 +102,7 @@ The {ProductName} ({ProductShortName}) supports the following migrations:
|-
|-
|-
|-

|Oracle JDK
|-
Expand All @@ -105,6 +113,7 @@ The {ProductName} ({ProductShortName}) supports the following migrations:
|-
|-
|-
|-

|Camel 2
|-
Expand All @@ -115,6 +124,7 @@ The {ProductName} ({ProductShortName}) supports the following migrations:
|-
|-
|-
|-

|Spring Boot
|-
Expand All @@ -125,6 +135,7 @@ The {ProductName} ({ProductShortName}) supports the following migrations:
|{icon-check}
|{icon-check}
|-
|-

|Any Java application
|-
Expand All @@ -135,6 +146,7 @@ The {ProductName} ({ProductShortName}) supports the following migrations:
|-
|-
|-
|-

|Any Java EE application
|-
Expand All @@ -145,4 +157,16 @@ The {ProductName} ({ProductShortName}) supports the following migrations:
|-
|-
|-
|-

|Azure
|-
|-
|-
|-
|-
|-
|-
|-
|{icon-check}
|===
4 changes: 2 additions & 2 deletions docs/topics/mta-cli-run.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

:_content-type: PROCEDURE
[id="cli-run_{context}"]
= Running the {CLINameTitle}
// = Running the {CLINameTitle}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Section upgraded to chapter heading


You can run {ProductShortName} against your application.

.Procedure

. Open a terminal and navigate to the `<{ProductShortName}_HOME>/` directory.

. Execute the `{mta-cli}` script, or `{mta-cli}.exe` for Windows, and specify the appropriate arguments:
. Run the `{mta-cli}` script, or `{mta-cli}.exe` for Windows, or darwin-{mta-cli} for macOS, and specify the appropriate arguments:
Copy link

Choose a reason for hiding this comment

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

nitpick: missing backticks around "darwin-{mta-cli}"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Corrected


+
[source,terminal,subs="attributes+"]
Expand Down
8 changes: 4 additions & 4 deletions docs/topics/mta-review-reports.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ $ <{ProductShortName}_HOME>/bin/{mta-cli} --input /home/username/{mta-cli}-sourc
----
endif::cli-guide[]

Use a browser to open the `index.html` file located in the report output directory. This opens a landing page that lists the applications that were processed. Each row contains a high-level overview of the story points, number of incidents, and technologies encountered in that application.
Use a browser to open the `index.html` file located in the report output directory. This opens a landing page that lists the applications that were processed. Each row contains a high-level overview of the story points, number of incidents, and technologies encountered in that application.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The MTA analysis produces a static HTML file that shows the all the issues in the application. This is the same result as an analysis in the MTA Web Console, which should also cover the MTA report.
Should I insert or link/xref to sections in the MTA Web Console guide regarding MTA reports?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes please


.Application list
image::3-1-applications.png[Application list]

NOTE: The incidents and estimated story points change as new rules are added to {ProductShortName}. The values here may not match what you see when you test this application.
NOTE: The incidents and estimated story points change as new rules are added to {ProductShortName}. The values here might not match what you see when you test this application.

The following table lists all of the reports and pages that can be accessed from this main {ProductShortName} landing page. Click the name of the application, *jee-example-app-1.0.0.ear*, to view the application report.

Expand Down Expand Up @@ -78,7 +78,7 @@ The top navigation bar lists the various reports that contain additional details
| Provides a concise summary of all issues that require attention.

| Application details
| Provides a detailed overview of all resources found within the application that may need attention during the migration.
| Provides a detailed overview of all resources found within the application that might need attention during the migration.

| Technologies
| Displays all embedded libraries grouped by functionality, allowing you to quickly view the technologies used in each application.
Expand Down Expand Up @@ -141,7 +141,7 @@ This report includes details about every issue that was raised by the selected m
.Issues report
image::3-4-issues-report.png[Issues report]

Each reported issue may be expanded, by clicking on the title, to obtain additional details. The following information is provided.
Each reported issue can be expanded, by clicking on the title, to obtain additional details. The following information is provided.

* A list of files where the incidents occurred, along with the number of incidents within each file. If the file is a Java source file, then clicking the filename will direct you to the corresponding Source report.
* A detailed description of the issue. This description outlines the problem, provides any known solutions, and references supporting documentation regarding either the issue or resolution.
Expand Down
Loading