mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
146 lines
6.4 KiB
Plaintext
146 lines
6.4 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * observability/logging/log_storage/installing-log-storage.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="cluster-logging-deploy-es-cli_{context}"]
|
|
= Installing the {es-op} by using the CLI
|
|
|
|
You can use the {oc-first} to install the {es-op}.
|
|
|
|
.Prerequisites
|
|
|
|
* Ensure that you have the necessary persistent storage for Elasticsearch. Note that each Elasticsearch node requires its own storage volume.
|
|
+
|
|
[NOTE]
|
|
====
|
|
If you use a local volume for persistent storage, do not use a raw block volume, which is described with `volumeMode: block` in the `LocalVolume` object. Elasticsearch cannot use raw block volumes.
|
|
====
|
|
+
|
|
Elasticsearch is a memory-intensive application. By default, {product-title} installs three Elasticsearch nodes with memory requests and limits of 16 GB. This initial set of three {product-title} nodes might not have enough memory to run Elasticsearch within your cluster. If you experience memory issues that are related to Elasticsearch, add more Elasticsearch nodes to your cluster rather than increasing the memory on existing nodes.
|
|
|
|
ifdef::openshift-origin[]
|
|
* Ensure that you have downloaded the {cluster-manager-url-pull} as shown in "Obtaining the installation program" in the installation documentation for your platform.
|
|
+
|
|
If you have the pull secret, add the `redhat-operators` catalog to the `OperatorHub` custom resource (CR) as shown in *Configuring {product-title} to use Red Hat Operators*.
|
|
endif::[]
|
|
|
|
* You have administrator permissions.
|
|
* You have installed the {oc-first}.
|
|
|
|
.Procedure
|
|
|
|
. Create a `Namespace` object as a YAML file:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: openshift-operators-redhat <1>
|
|
annotations:
|
|
openshift.io/node-selector: ""
|
|
labels:
|
|
openshift.io/cluster-monitoring: "true" <2>
|
|
----
|
|
<1> You must specify the `openshift-operators-redhat` namespace. To prevent possible conflicts with metrics, configure the Prometheus Cluster Monitoring stack to scrape metrics from the `openshift-operators-redhat` namespace and not the `openshift-operators` namespace. The `openshift-operators` namespace might contain community Operators, which are untrusted and could publish a metric with the same name as
|
|
ifdef::openshift-rosa[]
|
|
a ROSA
|
|
endif::[]
|
|
ifdef::openshift-dedicated[]
|
|
an {product-title}
|
|
endif::[]
|
|
metric, which would cause conflicts.
|
|
<2> String. You must specify this label as shown to ensure that cluster monitoring scrapes the `openshift-operators-redhat` namespace.
|
|
|
|
. Apply the `Namespace` object by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc apply -f <filename>.yaml
|
|
----
|
|
|
|
. Create an `OperatorGroup` object as a YAML file:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
apiVersion: operators.coreos.com/v1
|
|
kind: OperatorGroup
|
|
metadata:
|
|
name: openshift-operators-redhat
|
|
namespace: openshift-operators-redhat <1>
|
|
spec: {}
|
|
----
|
|
<1> You must specify the `openshift-operators-redhat` namespace.
|
|
|
|
. Apply the `OperatorGroup` object by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc apply -f <filename>.yaml
|
|
----
|
|
|
|
. Create a `Subscription` object to subscribe the namespace to the {es-op}:
|
|
+
|
|
.Example Subscription
|
|
[source,yaml]
|
|
----
|
|
apiVersion: operators.coreos.com/v1alpha1
|
|
kind: Subscription
|
|
metadata:
|
|
name: elasticsearch-operator
|
|
namespace: openshift-operators-redhat <1>
|
|
spec:
|
|
channel: stable-x.y <2>
|
|
installPlanApproval: Automatic <3>
|
|
source: redhat-operators <4>
|
|
sourceNamespace: openshift-marketplace
|
|
name: elasticsearch-operator
|
|
----
|
|
<1> You must specify the `openshift-operators-redhat` namespace.
|
|
<2> Specify `stable`, or `stable-x.y` as the channel. See the following note.
|
|
<3> `Automatic` allows the Operator Lifecycle Manager (OLM) to automatically update the Operator when a new version is available. `Manual` requires a user with appropriate credentials to approve the Operator update.
|
|
<4> Specify `redhat-operators`. If your {product-title} cluster is installed on a restricted network, also known as a disconnected cluster,
|
|
specify the name of the `CatalogSource` object created when you configured the Operator Lifecycle Manager (OLM).
|
|
+
|
|
[NOTE]
|
|
====
|
|
Specifying `stable` installs the current version of the latest stable release. Using `stable` with `installPlanApproval: "Automatic"` automatically upgrades your Operators to the latest stable major and minor release.
|
|
|
|
Specifying `stable-x.y` installs the current minor version of a specific major release. Using `stable-x.y` with `installPlanApproval: "Automatic"` automatically upgrades your Operators to the latest stable minor release within the major release.
|
|
====
|
|
|
|
. Apply the subscription by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc apply -f <filename>.yaml
|
|
----
|
|
+
|
|
The {es-op} is installed to the `openshift-operators-redhat` namespace and copied to each project in the cluster.
|
|
|
|
.Verification
|
|
|
|
. Run the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get csv -n --all-namespaces
|
|
----
|
|
|
|
. Observe the output and confirm that pods for the {es-op} exist in each namespace
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
NAMESPACE NAME DISPLAY VERSION REPLACES PHASE
|
|
default elasticsearch-operator.v5.8.1 OpenShift Elasticsearch Operator 5.8.1 elasticsearch-operator.v5.8.0 Succeeded
|
|
kube-node-lease elasticsearch-operator.v5.8.1 OpenShift Elasticsearch Operator 5.8.1 elasticsearch-operator.v5.8.0 Succeeded
|
|
kube-public elasticsearch-operator.v5.8.1 OpenShift Elasticsearch Operator 5.8.1 elasticsearch-operator.v5.8.0 Succeeded
|
|
kube-system elasticsearch-operator.v5.8.1 OpenShift Elasticsearch Operator 5.8.1 elasticsearch-operator.v5.8.0 Succeeded
|
|
non-destructive-test elasticsearch-operator.v5.8.1 OpenShift Elasticsearch Operator 5.8.1 elasticsearch-operator.v5.8.0 Succeeded
|
|
openshift-apiserver-operator elasticsearch-operator.v5.8.1 OpenShift Elasticsearch Operator 5.8.1 elasticsearch-operator.v5.8.0 Succeeded
|
|
openshift-apiserver elasticsearch-operator.v5.8.1 OpenShift Elasticsearch Operator 5.8.1 elasticsearch-operator.v5.8.0 Succeeded
|
|
...
|
|
----
|