Skip to content

Commit c3ae761

Browse files
authored
Merge pull request #14 from johnwilkins/MTA-2613
MTA-2613: [Documentation for] [Tech-Preview] Add support for analysis of .NET applications
2 parents 12e1190 + 94491b8 commit c3ae761

File tree

6 files changed

+234
-27
lines changed

6 files changed

+234
-27
lines changed

docs/cli-guide/master.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ include::topics/making-open-source-more-inclusive.adoc[]
1919
// About the {UserCLIBookName}
2020
include::topics/about-cli-guide.adoc[leveloffset=+2]
2121

22+
:FeatureName: .NET migration
23+
include::topics/developer-preview-feature.adoc[]
24+
25+
:FeatureName: Analyzing applications written in a language other than Java
26+
include::topics/developer-preview-feature.adoc[]
27+
2228
// About {ProductName}
2329
include::topics/mta-what-is-the-toolkit.adoc[leveloffset=+2]
2430

@@ -118,3 +124,6 @@ include::topics/important-links.adoc[leveloffset=+3]
118124
// * Appendix: Revision Information *
119125
// **********************************
120126
include::topics/templates/revision-info.adoc[]
127+
128+
129+

docs/topics/about-cli-guide.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
[id="about-cli-guide_{context}"]
77
= About the {UserCLIBookName}
88

9-
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.
9+
This guide is for engineers, consultants, and others who want to use the {ProductName} ({ProductShortName}) to migrate Java applications, .NET applications, or other components. In {ProductShortName} 7.1 and later, you can use {ProductShortName} to analyze applications written in languages other than Java. To run analysis on applications written in languages other than Java, add a custom rule set and do not specify a target language. This guide describes how to install and run the {CLIName}, review the generated reports, and take advantage of additional features.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// DO NOT USE THIS SNIPPET. DEVELOPER PREVIEW FEATURES ARE NOT DOCUMENTED IN CORE OPENSHIFT DOCS.
2+
3+
// When including this file, ensure that {FeatureName} is set immediately before the include. Otherwise it will result in an incorrect replacement.
4+
5+
[IMPORTANT]
6+
====
7+
[subs="attributes+"]
8+
{FeatureName} is a Developer Preview feature only. Developer Preview features are not supported by Red Hat in any way and are not functionally complete or production-ready. Do not use Developer Preview features for production or business-critical workloads. Developer Preview features provide early access to upcoming product features in advance of their possible inclusion in a Red Hat product offering, enabling customers to test functionality and provide feedback during the development process. These features might not have any documentation, are subject to change or removal at any time, and testing is limited. Red Hat might provide ways to submit feedback on Developer Preview features without an associated SLA.
9+
====
10+
// Undefine {FeatureName} attribute, so that any mistakes are easily spotted
11+
:!FeatureName:

docs/topics/installing-cli-tool.adoc

Lines changed: 140 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,17 @@
77
[id="installing-cli-tool_{context}"]
88
= Installing the {CLINameTitle}
99

10-
You can install the {CLINameTitle} on Linux, Windows, or macOS operating systems.
11-
10+
You can install the {CLINameTitle} on Linux, Windows, or macOS operating systems using the downloadable `.zip` file.
1211

1312
.Prerequisites
1413

15-
* 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].
16-
* Podman must be installed
17-
18-
+
19-
[NOTE]
20-
.Podman
21-
====
22-
Podman is a daemonless, open source, Linux-native tool designed to make it easy to find, run, build, share, and deploy applications using Open Containers Initiative (OCI) Containers and Container Images.
23-
Podman provides a command-line interface (CLI) familiar to anyone who has used the Docker Container Engine.
24-
For more information on installing and using Podman, see link:https://podman.io/docs/installation[Podman installation instructions].
25-
====
14+
* 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].
2615

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

3019
.Procedure
3120

32-
To install using the downloadable `.zip` file:
33-
3421
. Navigate to the link:{DevDownloadPageURL}[{ProductShortName} Download page] and download the OS-specific CLI file or the `src` file:
3522
+
3623
* {ProductShortNameLower}-{ProductVersion}-cli-linux.zip
@@ -46,35 +33,164 @@ When you encounter `<{ProductShortName}_HOME>` in this guide, replace it with th
4633
[id="installing-using-podman_{context}"]
4734
== Installing the {CLINameTitle} using Podman
4835

36+
You can install the {CLINameTitle} using `podman pull`.
37+
4938
.Prerequisites
5039

51-
* 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].
40+
* Red Hat Container Registry Authentication for `registry.redhat.io`. Red Hat distributes container images from `registry.redhat.io`, which requires authentication. See link:https://access.redhat.com/RegistryAuthentication[Red Hat Container Registry Authentication] for additional details.
5241

42+
* Podman must be installed.
5343

54-
.Procedure
44+
[NOTE]
45+
.Podman
46+
====
47+
Podman is a daemonless, open source, Linux-native tool designed to make it easy to find, run, build, share, and deploy applications using Open Containers Initiative (OCI) Containers and Container Images.
48+
Podman provides a command-line interface (CLI) familiar to anyone who has used the Docker Container Engine.
49+
For more information on installing and using Podman, see link:https://podman.io/docs/installation[Podman installation instructions].
50+
====
5551

56-
To install using `podman pull`:
52+
.Procedure
5753

58-
. To use Podman to authenticate to registry.redhat.io:
54+
. Use Podman to authenticate to `registry.redhat.io` by running the following command:
55+
+
56+
[source,terminal]
57+
----
58+
$ podman login registry.redhat.io
59+
----
60+
+
61+
Enter the user name and password:
5962
+
6063
[source,terminal]
6164
----
62-
podman login registry.redhat.io
6365
Username: <username>
6466
Password: <***********>
6567
----
66-
. Issue:
68+
69+
. Copy the binary `PATH` to enable system-wide use by running the following command:
6770
+
6871
[source,terminal]
6972
----
70-
podman cp $(podman create registry.redhat.com/mta-toolkit/mta-mta-cli-rhel9:{ProductVersion}):/usr/local/bin/mta-cli ./
73+
$ podman cp $(podman create registry.redhat.com/mta-toolkit/mta-mta-cli-rhel9:{ProductVersion}):/usr/local/bin/mta-cli ./
7174
----
7275
+
73-
This command will copy the binary `PATH` for system-wide use.
74-
+
7576
[WARNING]
7677
====
7778
Although installation using Podman is possible, downloading and installing the `.zip` file is the preferred installation.
7879
====
7980

81+
[id="installing-using-docker_{context}"]
82+
== Installing the {CLINameTitle} for use with Docker on Windows (Developer Preview)
83+
84+
You can install the {CLINameTitle} for use with Docker on Windows. This is the required approach when migrating applications built with .NET framework 4.5 or later on Windows to cross-platform .NET 8.0.
85+
86+
.Prerequisites
87+
88+
* A host with Windows 11+ 64-bit version 21H2 or higher.
89+
90+
* You have download the Docker Desktop for Windows installer. See link:https://docs.docker.com/desktop/install/windows-install/[Install Docker Desktop on Windows] for additional details.
91+
92+
.Procedure
93+
94+
. Open a PowerShell with Administrator privileges.
95+
96+
. Ensure Hyper-V is installed and enabled:
97+
+
98+
[source,powershell]
99+
----
100+
PS C:\Users\<your_user_name>> Enable-WindowsOptionalFeature -Online `
101+
-FeatureName Microsoft-Hyper-V-All
102+
----
103+
+
104+
[source,powershell]
105+
----
106+
PS C:\Users\<your_user_name>> Enable-WindowsOptionalFeature -Online `
107+
-FeatureName Containers
108+
----
109+
+
110+
[NOTE]
111+
====
112+
You may need to reboot Windows.
113+
====
114+
115+
. Install Docker Desktop on Windows.
116+
117+
.. Double-click `Docker_Desktop_Installer.exe` to run the installer. By default, Docker Desktop is installed at `C:\Program Files\Docker\Docker`.
118+
119+
.. Deselect the *Use WSL 2 instead of Hyper-V* option on the Configuration page to ensure that Docker will run Windows containers as the backend instead of Linux containers.
80120

121+
. In PowerShell, create a folder for {ProductShortName}:
122+
+
123+
[source,powershell]
124+
----
125+
PS C:\Users\<your_user_name>> mkdir C:\Users\<your_user_name>\MTA
126+
----
127+
+
128+
Replace `<your_user_name>` with the username for your home directory.
129+
130+
. Extract the `{ProductShortNameLower}-{ProductVersion}-cli-windows.zip` file to the `MTA` folder:
131+
+
132+
[source,powershell]
133+
----
134+
PS C:\Users\<your_user_name>> cd C:\Users\<your_user_name>\Downloads
135+
----
136+
+
137+
Replace `<your_user_name>` with the username for your home directory.
138+
+
139+
[source,powershell]
140+
----
141+
PS C:\Users\<your_user_name>> Expand-Archive `
142+
-Path "{ProductShortNameLower}-{ProductVersion}-cli-windows.zip" `
143+
-DestinationPath "C:\Users\<your_user_name>\MTA"
144+
----
145+
+
146+
Replace `<your_user_name>` with the username for your home directory.
147+
148+
. Ensure Docker is running Windows containers:
149+
+
150+
[source,powershell]
151+
----
152+
PS C:\Users\<your_user_name>> docker version
153+
----
154+
+
155+
[source,powershell]
156+
----
157+
Client:
158+
Version: 27.0.3
159+
API version: 1.46
160+
Go version: go1.21.11
161+
Git commit: 7d4bcd8
162+
Built: Sat Jun 29 00:03:32 2024
163+
OS/Arch: windows/amd64 <1>
164+
Context: desktop-windows
165+
Server: Docker Desktop 4.32.0 (157355)
166+
Engine:
167+
Version: 27.0.3
168+
API version: 1.46 (minimum version 1.24)
169+
Go version: go1.21.11
170+
Git commit: 662f78c
171+
Built: Sat Jun 29 00:02:13 2024
172+
OS/Arch: windows/amd64 <1>
173+
Experimental: false
174+
----
175+
<1> Ensure the `OS/Arch` setting is `windows/amd64`.
176+
177+
. Set the `PODMAN_BIN` environment variable to use Docker:
178+
+
179+
[source,powershell]
180+
----
181+
PS C:\Users\<your_user_name>> $env:PODMAN_BIN="C:\Windows\system32\docker.exe"
182+
----
183+
184+
. Set the `DOTNET_PROVIDER_IMG` environment variable to use the upstream `dotnet-external-provider`:
185+
+
186+
[source,powershell]
187+
----
188+
PS C:\Users\<your_user_name>> $env:DOTNET_PROVIDER_IMG="quay.io/konveyor/dotnet-external-provider:v0.5.0"
189+
----
190+
191+
. Set the `RUNNER_IMG` environment variable to use the upstream image:
192+
+
193+
[source,powershell]
194+
----
195+
PS C:\Users\<your_user_name>> $env:RUNNER_IMG="quay.io/konveyor/kantra:v0.5.0"
196+
----

docs/topics/migration-paths.adoc

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ The {ProductName} ({ProductShortName}) supports the following migrations:
1111
* Migrating from third-party enterprise application servers, such as Oracle WebLogic Server, to JBoss Enterprise Application Platform (JBoss EAP).
1212
* Upgrading to the latest release of JBoss EAP.
1313
14+
* Migrating from a Windows-only .NET 4.5+ Framework to cross-platform .NET 8.0. (Developer Preview)
15+
1416
{ProductShortName} provides a comprehensive set of rules to assess the suitability of your applications for containerization and deployment on Red Hat OpenShift Container Platform (RHOCP). You can run an {ProductShortName} analysis to assess your applications' suitability for migration to multiple target platforms.
1517

16-
.Supported migration paths: Source platform &#8658; Target platform
18+
.Supported Java migration paths: Source platform &#8658; Target platform
1719
[width="99%",cols="19%,10%,10%,10%,10%,10%,10%,10%,10%",options="^,header"]
1820
|===
1921

@@ -49,7 +51,8 @@ The {ProductName} ({ProductShortName}) supports the following migrations:
4951

5052
|JBoss EAP 4
5153
|{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.]
52-
|{icon-check} |{icon-check}
54+
|{icon-check}
55+
|{icon-check}
5356
|-
5457
|-
5558
|-
@@ -146,3 +149,16 @@ The {ProductName} ({ProductShortName}) supports the following migrations:
146149
|-
147150
|-
148151
|===
152+
153+
. .NET migration paths: Source platform &#8658; Target platform (Developer Preview)
154+
155+
[options="^,header"]
156+
|===
157+
158+
|Source platform{nbsp}&#8658;|OpenShift (cloud readiness)|Migration to .NET 8.0
159+
160+
| .NET Framework 4.5+ (Windows only)
161+
|{icon-check}
162+
|{icon-check}
163+
164+
|===

docs/topics/mta-cli-run.adoc

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,58 @@ $ <{ProductShortName}_HOME>/{mta-cli} analyze --input /path/to/jee-example-app-1
6868
----
6969
[]
7070

71+
[id="docker-command-examples_{context}"]
72+
== Docker {ProductShortName} command examples (Developer Preview)
73+
74+
When migrating a Windows .NET 4.5 or later application to cross-platform .NET 8, use Docker Desktop on Windows to analyze the application.
75+
76+
.Procedure
77+
78+
. Run the Docker Desktop for Windows as an administrator.
79+
80+
. Open a PowerShell instance as an administrator.
81+
82+
. Navigate to the {ProductShortName} directory:
83+
+
84+
[source,powershell]
85+
----
86+
PS C:\Users\<your_user_name> cd C:\Users\<your_user_name>\MTA
87+
----
88+
+
89+
Replace `<your_user_name>` with the username for your home directory.
90+
91+
. Create a directory for analysis output:
92+
+
93+
[source,powershell]
94+
----
95+
PS C:\Users\<your_user_name>\MTA> mkdir mta-output
96+
----
97+
98+
. Copy your application to the {ProductShortName} directory. The following command clones the link:https://github.com/sixeyed/nerd-dinner[Nerd Dinner] application as an example application:
99+
+
100+
[source,powershell]
101+
----
102+
PS C:\Users\<your_user_name>\MTA> git clone https://github.com/sixeyed/nerd-dinner.git
103+
----
104+
105+
. Analyze the application. The following command analyzes the link:https://github.com/sixeyed/nerd-dinner[Nerd Dinner] application for migrating from Windows .NET 4.5 or later to cross-platform .NET 8:
106+
+
107+
[source,powershell]
108+
----
109+
PS C:\Users\<your_user_name>\MTA> .\mta-cli.exe analyze `
110+
--input C:\Users\<your_user_name>\MTA\nerd-dinner\mvc4\ `
111+
--output C:\Users\<your_user_name>\MTA\mta-output\ `
112+
--overwrite --log-level 10 --label-selector konveyor.io/source=dotnetframework
113+
----
114+
+
115+
Replace `<your_user_name>` with the username for your home directory.
116+
117+
. Review the analysis results:
118+
+
119+
[source,powershell]
120+
----
121+
PS C:\Users\<your_user_name>\MTA> start-process "msedge" `
122+
-ArgumentList "file:///C:/Users/<your_user_name>/MTA/mta-output/static-report/index.html"
123+
----
124+
+
125+
Replace `<your_user_name>` with the username for your home directory.

0 commit comments

Comments
 (0)