Este contenido no está disponible en el idioma seleccionado.
Chapter 3. Installing MTA command-line interface
You can install the Migration Toolkit for Applications (MTA) command-line interface (CLI) on Linux, Windows, or macOS operating systems.
You can also install the CLI for use with Docker on Windows. Note, however, that this is a Developer Preview feature only.
3.1. Installing the CLI by using a .zip file Copiar enlaceEnlace copiado en el portapapeles!
You can install the Migration Toolkit for Applications (MTA) command-line interface (CLI) by using the downloadable .zip
file available on the official MTA download page.
Prerequisites
Red Hat Container Registry Authentication for
registry.redhat.io
. Red Hat distributes container images fromregistry.redhat.io
, which requires authentication. For more details, see Red Hat Container Registry Authentication.NoteThis prerequisite is not applicable for the containerless mode. For more information, see Analyzing applications in containerless mode.
- You installed Java Development Kit (JDK) version 17 or later.
-
You set the
JAVA_HOME
environmental variable. -
You installed Maven version 3.9.9 or later with its binary added to the
$PATH
variable.
Procedure
Navigate to the MTA download page and download one of the following operating system-specific CLI files or the
src
file:- mta-7.3.2-cli-linux-amd64.zip
- mta-7.3.2-cli-linux-arm64.zip
- mta-7.3.2-cli-darwin-amd64.zip
- mta-7.3.2-cli-darwin-arm64.zip
- mta-7.3.2-cli-windows-amd64.zip
- mta-7.3.2-cli-windows-arm64.zip
- mta-7.3.2-cli-src.zip
-
Extract the
.zip
file to the.kantra
directory inside your$HOME
directory. The.zip
file extracts themta-cli
binary, along with other required directories and files. Move the
mta-cli
binary to your$PATH
variable.NoteYou can place the
mta-cli
binary in any folder that is included in the$PATH
variable. Alternatively, you can add a folder that containsmta-cli
to$PATH
. This way, you do not need to specify a full path when using the CLI.
3.2. Installing the CLI on a disconnected environment Copiar enlaceEnlace copiado en el portapapeles!
When your system is in a disconnected environment, you can install the Migration Toolkit for Applications (MTA) command-line interface (CLI) by performing the following actions:
- Download the required images by using an external computer.
- Copying the downloaded images to the system you want to install MTA CLI on.
The following procedure applies only to container mode.
The analysis output in the disconnected environment usually results in fewer incidents because a dependency analysis does not run accurately without access to Maven.
Prerequisites
- You downloaded the required MTA CLI binary from the Migration Toolkit for Applications Red Hat Developer page.
- You installed the Podman tool on your system.
For the analysis of Java applications, you enabled container runtime usage by setting the
--run-local
flag tofalse
:--run-local=false
--run-local=false
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The analysis of non-Java applications runs in container mode by default.
Procedure
On a connected device, perform the following steps:
Authenticate to registry.redhat.io:
podman login registry.redhat.io
$ podman login registry.redhat.io
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the
mta-cli
binary file. The binary file pulls the required provider images. For example:mta-cli analyze
$ mta-cli analyze
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantThis command only pulls the required images. For example, if you run a command that requires Java images, a .NET image will not be pulled.
Display the image list:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Save the images:
podman save <image_ID> -o <image_name>.image
$ podman save <image_ID> -o <image_name>.image
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Copy the images onto a USB drive or directly to the file system of the disconnected device.
On the disconnected device, enter:
podman load --input <image_name>.image
$ podman load --input <image_name>.image
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.3. Installing the CLI for use with Docker on Windows Copiar enlaceEnlace copiado en el portapapeles!
To migrate applications built with .NET framework version 4.5 or later, on Microsoft Windows to cross-platform .NET 8.0, you must install the CLI for use with Docker on Windows. To do so, you must configure Docker to use Windows containers first.
Prerequisites
- A host with Windows 11+ 64-bit version 21H2 or higher.
- You downloaded the Docker Desktop for Windows installation program. For more details, see Install Docker Desktop on Windows.
Procedure
- Open a PowerShell with Administrator privileges.
Ensure Hyper-V is installed and enabled:
PS C:\Users\<user_name>> Enable-WindowsOptionalFeature -Online ` -FeatureName Microsoft-Hyper-V-All
PS C:\Users\<user_name>> Enable-WindowsOptionalFeature -Online ` -FeatureName Microsoft-Hyper-V-All
Copy to Clipboard Copied! Toggle word wrap Toggle overflow PS C:\Users\<user_name>> Enable-WindowsOptionalFeature -Online ` -FeatureName Containers
PS C:\Users\<user_name>> Enable-WindowsOptionalFeature -Online ` -FeatureName Containers
Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteYou might need to reboot Windows for the change to take effect.
Install Docker Desktop on Windows.
Run the installer by double-clicking the
Docker_Desktop_Installer.exe
file.By default, Docker Desktop is installed to the
C:\Program Files\Docker\Docker
path.Ensure that Docker will run Windows containers as the backend instead of Linux containers:
- In the Windows task bar, right-click on the Docker icon.
- Click Switch to Windows containers.
In PowerShell, create a folder for MTA:
PS C:\Users\<user_name>> mkdir C:\Users\<user_name>\MTA
PS C:\Users\<user_name>> mkdir C:\Users\<user_name>\MTA
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Extract the
mta-7.3.2-cli-windows.zip
file to theMTA
folder:PS C:\Users\<user_name>> cd C:\Users\<user_name>\Downloads
PS C:\Users\<user_name>> cd C:\Users\<user_name>\Downloads
Copy to Clipboard Copied! Toggle word wrap Toggle overflow PS C:\Users\<user_name>> Expand-Archive ` -Path "{ProductShortNameLower}-{ProductVersion}-cli-windows.zip" ` -DestinationPath "C:\Users\<user_name>\MTA"
PS C:\Users\<user_name>> Expand-Archive ` -Path "{ProductShortNameLower}-{ProductVersion}-cli-windows.zip" ` -DestinationPath "C:\Users\<user_name>\MTA"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure that Docker is running Windows containers the
OS/Arch
is set towindows/amd64
:PS C:\Users\<user_name>> docker version
PS C:\Users\<user_name>> docker version
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
CONTAINER_TOOL
environment variable to use Docker:PS C:\Users\<user_name>> $env:CONTAINER_TOOL="C:\Windows\system32\docker.exe"
PS C:\Users\<user_name>> $env:CONTAINER_TOOL="C:\Windows\system32\docker.exe"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
DOTNET_PROVIDER_IMG
environment variable to use the upstreamdotnet-external-provider
:PS C:\Users\<user_name>> $env:DOTNET_PROVIDER_IMG="quay.io/konveyor/dotnet-external-provider:v0.5.0"
PS C:\Users\<user_name>> $env:DOTNET_PROVIDER_IMG="quay.io/konveyor/dotnet-external-provider:v0.5.0"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
RUNNER_IMG
environment variable to use the upstream image:PS C:\Users\<user_name>> $env:RUNNER_IMG="quay.io/konveyor/kantra:v0.5.0"
PS C:\Users\<user_name>> $env:RUNNER_IMG="quay.io/konveyor/kantra:v0.5.0"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow