|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * security/file_integrity_operator/file-integrity-operator-installation.adoc |
| 4 | + |
| 5 | +[id="installing-file-integrity-operator-using-cli_{context}"] |
| 6 | += Installing the File Integrity Operator using the CLI |
| 7 | + |
| 8 | +.Prerequisites |
| 9 | + |
| 10 | +* You must have `admin` privileges. |
| 11 | + |
| 12 | +.Procedure |
| 13 | + |
| 14 | +. Create a `Namespace` object YAML file by running: |
| 15 | ++ |
| 16 | +[source,terminal] |
| 17 | +---- |
| 18 | +$ oc create -f <file-name>.yaml |
| 19 | +---- |
| 20 | ++ |
| 21 | +.Example output |
| 22 | +[source,yaml] |
| 23 | +---- |
| 24 | +apiVersion: v1 |
| 25 | +kind: Namespace |
| 26 | +metadata: |
| 27 | + name: openshift-file-integrity |
| 28 | +---- |
| 29 | + |
| 30 | +. Create the `OperatorGroup` object YAML file: |
| 31 | ++ |
| 32 | +[source,terminal] |
| 33 | +---- |
| 34 | +$ oc create -f <file-name>.yaml |
| 35 | +---- |
| 36 | ++ |
| 37 | +.Example output |
| 38 | +[source,yaml] |
| 39 | +---- |
| 40 | +apiVersion: operators.coreos.com/v1 |
| 41 | +kind: OperatorGroup |
| 42 | +metadata: |
| 43 | + name: file-integrity-operator |
| 44 | + namespace: openshift-file-integrity |
| 45 | +spec: |
| 46 | + targetNamespaces: |
| 47 | + - openshift-file-integrity |
| 48 | +---- |
| 49 | + |
| 50 | +. Set the {product-title} major and minor version as an environment variable, which is used as the channel value in the next step: |
| 51 | ++ |
| 52 | +[source,terminal] |
| 53 | +---- |
| 54 | +$ OC_VERSION=$(oc version -o yaml | grep openshiftVersion | grep -o '[0-9]*[.][0-9]*' | head -1) |
| 55 | +---- |
| 56 | + |
| 57 | +. Create the `Subscription` object YAML file: |
| 58 | ++ |
| 59 | +[source,terminal] |
| 60 | +---- |
| 61 | +$ oc create -f <file-name>.yaml |
| 62 | +---- |
| 63 | ++ |
| 64 | +.Example output |
| 65 | +[source,yaml] |
| 66 | +---- |
| 67 | +apiVersion: operators.coreos.com/v1alpha1 |
| 68 | +kind: Subscription |
| 69 | +metadata: |
| 70 | + name: file-integrity-operator |
| 71 | + namespace: openshift-file-integrity |
| 72 | +spec: |
| 73 | + channel: "${OC_VERSION}" |
| 74 | + installPlanApproval: Automatic |
| 75 | + name: file-integrity-operator |
| 76 | + source: redhat-operators |
| 77 | + sourceNamespace: openshift-marketplace |
| 78 | +---- |
| 79 | + |
| 80 | +.Verification |
| 81 | + |
| 82 | +. Verify the installation succeeded by inspecting the CSV file: |
| 83 | ++ |
| 84 | +[source,terminal] |
| 85 | +---- |
| 86 | +$ oc get csv -n openshift-file-integrity |
| 87 | +---- |
| 88 | + |
| 89 | +. Verify that the File Integrity Operator is up and running: |
| 90 | ++ |
| 91 | +[source,terminal] |
| 92 | +---- |
| 93 | +$ oc get deploy -n openshift-file-integrity |
| 94 | +---- |
0 commit comments