Chapter 3. Installing the MTV Operator

You can install the MTV Operator by using the OpenShift Container Platform web console or the command line interface (CLI).

3.1. Installing the MTV Operator by using the OpenShift Container Platform web console

You can install the MTV Operator by using the OpenShift Container Platform web console.

Prerequisites

  • OpenShift Container Platform 4.9 installed.
  • OpenShift Virtualization Operator installed.
  • You must be logged in as a user with cluster-admin permissions.

Procedure

  1. In the OpenShift Container Platform web console, click OperatorsOperatorHub.
  2. Use the Filter by keyword field to search for mtv-operator.
  3. Click Migration Tookit for Virtualization Operator and then click Install.
  4. On the Install Operator page, click Install.
  5. Click OperatorsInstalled Operators to verify that Migration Tookit for Virtualization Operator appears in the openshift-mtv project with the status Succeeded.
  6. Click Migration Tookit for Virtualization Operator.
  7. Under Provided APIs, locate the ForkliftController, and click Create Instance.
  8. Click Create.
  9. Click WorkloadsPods to verify that the MTV pods are running.

Obtaining the MTV web console URL

You can obtain the MTV web console URL by using the OpenShift Container Platform web console.

Prerequisites

  • You must have the OpenShift Virtualization Operator installed.
  • You must have the MTV Operator installed.
  • You must be logged in as a user with cluster-admin privileges.

Procedure

  1. Log in to the OpenShift Container Platform web console.
  2. Click NetworkingRoutes.
  3. Select the openshift-mtv project in the Project: list.
  4. Click the URL for the forklift-ui service to open the login page for the MTV web console.

3.2. Installing the MTV Operator from the command line interface

You can install the MTV Operator from the command line interface (CLI).

Prerequisites

  • OpenShift Container Platform 4.9 installed.
  • OpenShift Virtualization Operator installed.
  • You must be logged in as a user with cluster-admin permissions.

Procedure

  1. Create the openshift-mtv project:

    $ cat << EOF | oc apply -f -
    apiVersion: project.openshift.io/v1
    kind: Project
    metadata:
      name: openshift-mtv
    EOF
  2. Create an OperatorGroup CR called migration:

    $ cat << EOF | oc apply -f -
    apiVersion: operators.coreos.com/v1
    kind: OperatorGroup
    metadata:
      name: migration
      namespace: openshift-mtv
    spec:
      targetNamespaces:
        - openshift-mtv
    EOF
  3. Create a Subscription CR for the Operator:

    $ cat << EOF | oc apply -f -
    apiVersion: operators.coreos.com/v1alpha1
    kind: Subscription
    metadata:
      name: mtv-operator
      namespace: openshift-mtv
    spec:
      channel: release-v2.2.0
      installPlanApproval: Automatic
      name: mtv-operator
      source: redhat-operators
      sourceNamespace: openshift-marketplace
      startingCSV: "mtv-operator.2.2.0"
    EOF
  4. Create a ForkliftController CR:

    $ cat << EOF | oc apply -f -
    apiVersion: forklift.konveyor.io/v1beta1
    kind: ForkliftController
    metadata:
      name: forklift-controller
      namespace: openshift-mtv
    spec:
      olm_managed: true
    EOF
  5. Verify that the MTV pods are running:

    $ oc get pods -n openshift-mtv

    Example output

    NAME                                  READY  STATUS   RESTARTS  AGE
    forklift-controller-788bdb4c69-mw268  2/2    Running  0         2m
    forklift-operator-6bf45b8d8-qps9v     1/1    Running  0         5m
    forklift-ui-7cdf96d8f6-xnw5n          1/1    Running  0         2m

Obtaining the MTV web console URL

You can obtain the MTV web console URL from the command line.

Prerequisites

  • You must have the OpenShift Virtualization Operator installed.
  • You must have the MTV Operator installed.
  • You must be logged in as a user with cluster-admin privileges.

Procedure

  1. Obtain the MTV web console URL:

    $ oc get route virt -n openshift-mtv \
      -o custom-columns=:.spec.host

    Example output

    https://virt-openshift-mtv.apps.cluster.openshift.com.

  2. Launch a browser and navigate to the MTV web console.