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
-
In the OpenShift Container Platform web console, click Operators
OperatorHub. - Use the Filter by keyword field to search for mtv-operator.
- Click Migration Tookit for Virtualization Operator and then click Install.
- On the Install Operator page, click Install.
-
Click Operators
Installed Operators to verify that Migration Tookit for Virtualization Operator appears in the openshift-mtv project with the status Succeeded. - Click Migration Tookit for Virtualization Operator.
- Under Provided APIs, locate the ForkliftController, and click Create Instance.
- Click Create.
-
Click Workloads
Pods 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
- Log in to the OpenShift Container Platform web console.
-
Click Networking
Routes. -
Select the
openshift-mtv
project in the Project: list. -
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
Create the openshift-mtv project:
$ cat << EOF | oc apply -f - apiVersion: project.openshift.io/v1 kind: Project metadata: name: openshift-mtv EOF
Create an
OperatorGroup
CR calledmigration
:$ cat << EOF | oc apply -f - apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: migration namespace: openshift-mtv spec: targetNamespaces: - openshift-mtv EOF
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
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
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
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.
- Launch a browser and navigate to the MTV web console.