//Module included in the following assemblies
//
//post_installation_configuration/multiarch-tuning-operator.adoc

:_mod-docs-content-type: PROCEDURE
[id="multi-architecture-installing-using-cli_{context}"]
= Installing the Multiarch Tuning Operator by using the CLI

You can install the Multiarch Tuning Operator by using the {oc-first}.

.Prerequisites

* You have installed `oc`.
* You have logged in to `oc` as a user with `cluster-admin` privileges.

.Procedure

. Create a new project named `openshift-multiarch-tuning-operator` by running the following command:
+
[source,terminal]
----
$ oc create ns openshift-multiarch-tuning-operator
----

. Create an `OperatorGroup` object:

.. Create a YAML file with the configuration for creating an `OperatorGroup` object.
+
.Example YAML configuration for creating an `OperatorGroup` object:
[source,yaml]
----
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
  name: openshift-multiarch-tuning-operator
  namespace: openshift-multiarch-tuning-operator
spec: {}
----

.. Create the `OperatorGroup` object by running the following command:
+
[source,terminal]
----
$ oc create -f <file_name> <1>
----
<1> Replace `<file_name>` with the name of the YAML file that contains the `OperatorGroup` object configuration.

. Create a `Subscription` object:

.. Create a YAML file with the configuration for creating a `Subscription` object.
+
.Example YAML configuration for creating a `Subscription` object:
[source,yaml]
----
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: openshift-multiarch-tuning-operator
  namespace: openshift-multiarch-tuning-operator
spec:
  channel: tech-preview
  name: multiarch-tuning-operator
  source: redhat-operators
  sourceNamespace: openshift-marketplace
  installPlanApproval: Automatic
  startingCSV: multiarch-tuning-operator.v0.9.0
----

.. Create the `Subscription` object by running the following command:
+
[source,terminal]
----
$ oc create -f <file_name> <1>
----
<1> Replace `<file_name>` with the name of the YAML file that contains the `Subscription` object configuration.

[NOTE]
====
For more details about configuring the `Subscription` object and `OperatorGroup` object, see "Installing from OperatorHub using the CLI".
====

.Verification

. To verify that the Multiarch Tuning Operator is installed, run the following command:
+
[source,terminal]
----
$ oc get csv -n openshift-multiarch-tuning-operator
----
+
.Example output
[source,terminal]
----
NAME                               DISPLAY                     VERSION   REPLACES   PHASE
multiarch-tuning-operator.v0.9.0   Multiarch Tuning Operator   0.9.0                Succeeded
----
+
The installation is successful if the Operator is in `Succeeded` phase.

. Optional: To verify that the `OperatorGroup` object is created, run the following command:
+
[source,terminal]
----
$ oc get operatorgroup -n openshift-multiarch-tuning-operator
----
+
.Example output
[source,terminal]
----
NAME                                        AGE
openshift-multiarch-tuning-operator-q8zbb   133m
----

. Optional: To verify that the `Subscription` object is created, run the following command:
+
[source,terminal]
----
$ oc get subscription -n openshift-multiarch-tuning-operator
----
+
.Example output
[source,terminal]
----
NAME                        PACKAGE                     SOURCE                              CHANNEL
multiarch-tuning-operator   multiarch-tuning-operator   multiarch-tuning-operator-catalog   tech-preview
----
