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.

Note

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

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 from registry.redhat.io, which requires authentication. For more details, see Red Hat Container Registry Authentication.

    Note

    This 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

  1. 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
  2. Extract the .zip file to the .kantra directory inside your $HOME directory. The .zip file extracts the mta-cli binary, along with other required directories and files.
  3. Move the mta-cli binary to your $PATH variable.

    Note

    You can place the mta-cli binary in any folder that is included in the $PATH variable. Alternatively, you can add a folder that contains mta-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

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:

  1. Download the required images by using an external computer.
  2. Copying the downloaded images to the system you want to install MTA CLI on.
Important

The following procedure applies only to container mode.

Note

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 to false:

    --run-local=false
    Copy to Clipboard Toggle word wrap

    The analysis of non-Java applications runs in container mode by default.

Procedure

  1. On a connected device, perform the following steps:

    1. Authenticate to registry.redhat.io:

      $ podman login registry.redhat.io
      Copy to Clipboard Toggle word wrap
    2. Run the mta-cli binary file. The binary file pulls the required provider images. For example:

      $ mta-cli analyze
      Copy to Clipboard Toggle word wrap
      Important

      This command only pulls the required images. For example, if you run a command that requires Java images, a .NET image will not be pulled.

    3. Display the image list:

      $ podman images
      REPOSITORY                                                        TAG         IMAGE ID      CREATED       SIZE
      registry.redhat.io/mta/mta-generic-external-provider-rhel9        7.3.1       8b8d7fa14570  13 days ago   692 MB
      registry.redhat.io/mta/mta-cli-rhel9                              7.3.1       45422a12d936  13 days ago   1.6 GB
      registry.redhat.io/mta/mta-java-external-provider-rhel9           7.3.1       4d6d0912a38b  13 days ago   715 MB
      registry.redhat.io/mta/mta-dotnet-external-provider-rhel9         7.3.1       66ec9fc51408  13 days ago   1.27 GB
      Copy to Clipboard Toggle word wrap
    4. Save the images:

      $ podman save <image_ID> -o <image_name>.image
      Copy to Clipboard Toggle word wrap
    5. Copy the images onto a USB drive or directly to the file system of the disconnected device.
  2. On the disconnected device, enter:

    $ podman load --input <image_name>.image
    Copy to Clipboard Toggle word wrap

3.3. Installing the CLI for use with Docker on Windows

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

  1. Open a PowerShell with Administrator privileges.
  2. Ensure Hyper-V is installed and enabled:

    PS C:\Users\<user_name>> Enable-WindowsOptionalFeature -Online ` -FeatureName Microsoft-Hyper-V-All
    Copy to Clipboard Toggle word wrap
    PS C:\Users\<user_name>> Enable-WindowsOptionalFeature -Online ` -FeatureName Containers
    Copy to Clipboard Toggle word wrap
    Note

    You might need to reboot Windows for the change to take effect.

  3. Install Docker Desktop on Windows.

    1. 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.

    2. Ensure that Docker will run Windows containers as the backend instead of Linux containers:

      1. In the Windows task bar, right-click on the Docker icon.
      2. Click Switch to Windows containers.
  4. In PowerShell, create a folder for MTA:

    PS C:\Users\<user_name>> mkdir C:\Users\<user_name>\MTA
    Copy to Clipboard Toggle word wrap
  5. Extract the mta-7.3.2-cli-windows.zip file to the MTA folder:

    PS C:\Users\<user_name>> cd C:\Users\<user_name>\Downloads
    Copy to Clipboard Toggle word wrap
    PS C:\Users\<user_name>> Expand-Archive ` -Path "{ProductShortNameLower}-{ProductVersion}-cli-windows.zip" ` -DestinationPath "C:\Users\<user_name>\MTA"
    Copy to Clipboard Toggle word wrap
  6. Ensure that Docker is running Windows containers the OS/Arch is set to windows/amd64:

    PS C:\Users\<user_name>> docker version
    Copy to Clipboard Toggle word wrap
    Client:
     Version:           27.0.3
     API version:       1.46
     Go version:        go1.21.11
     Git commit:        7d4bcd8
     Built:             Sat Jun 29 00:03:32 2024
     OS/Arch:           windows/amd64
     Context:           desktop-windows
    Server: Docker Desktop 4.32.0 (157355)
     Engine:
      Version:          27.0.3
      API version:      1.46 (minimum version 1.24)
      Go version:       go1.21.11
      Git commit:       662f78c
      Built:            Sat Jun 29 00:02:13 2024
      OS/Arch:          windows/amd64
      Experimental:     false
    Copy to Clipboard Toggle word wrap
  7. Set the CONTAINER_TOOL environment variable to use Docker:

    PS C:\Users\<user_name>> $env:CONTAINER_TOOL="C:\Windows\system32\docker.exe"
    Copy to Clipboard Toggle word wrap
  8. Set the DOTNET_PROVIDER_IMG environment variable to use the upstream dotnet-external-provider:

    PS C:\Users\<user_name>> $env:DOTNET_PROVIDER_IMG="quay.io/konveyor/dotnet-external-provider:v0.5.0"
    Copy to Clipboard Toggle word wrap
  9. 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"
    Copy to Clipboard Toggle word wrap
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat