Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion logging/cluster-logging-deploying.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include::_attributes/common-attributes.adoc[]

toc::[]

You can install the {logging-title} by deploying the Red Hat OpenShift Logging Operator. The {logging} Operator creates and manages the components of the logging stack.
You can install the {logging-title} by deploying the {clo}. The {clo} creates and manages the components of the logging stack.

[IMPORTANT]
====
Expand Down
15 changes: 0 additions & 15 deletions logging/log_storage/cluster-logging-loki.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,6 @@ toc::[]
In {logging} documentation, _LokiStack_ refers to the {logging} supported combination of Loki and web proxy with {product-title} authentication integration. LokiStack's proxy uses {product-title} authentication to enforce multi-tenancy. _Loki_ refers to the log store as either the individual component or an external store.

include::modules/logging-creating-new-group-cluster-admin-user-role.adoc[leveloffset=+1]

include::modules/logging-loki-storage.adoc[leveloffset=+1]

include::modules/logging-loki-storage-aws.adoc[leveloffset=+2]

include::modules/logging-loki-storage-azure.adoc[leveloffset=+2]

include::modules/logging-loki-storage-gcp.adoc[leveloffset=+2]

include::modules/logging-loki-storage-minio.adoc[leveloffset=+2]

include::modules/logging-loki-storage-odf.adoc[leveloffset=+2]

include::modules/logging-loki-storage-swift.adoc[leveloffset=+2]

include::modules/logging-loki-retention.adoc[leveloffset=+1]
include::modules/loki-rate-limit-errors.adoc[leveloffset=+1]

Expand Down
39 changes: 34 additions & 5 deletions logging/log_storage/installing-log-storage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,52 @@ include::_attributes/attributes-openshift-dedicated.adoc[]

toc::[]

You can use the {oc-first} or the {product-title} web console to install a log store on your {product-title} cluster.
You can use the {oc-first} or the {product-title} web console to deploy a log store on your {product-title} cluster.

include::snippets/logging-elastic-dep-snip.adoc[]

[id="installing-log-storage-loki"]
== Installing a Loki log store
== Deploying a Loki log store

You can use the {loki-op} to install an internal Loki log store on your {product-title} cluster.
You can use the {loki-op} to deploy an internal Loki log store on your {product-title} cluster.
After install the {loki-op}, you must configure Loki object storage by creating a secret, and create a `LokiStack` custom resource (CR).

include::modules/loki-deployment-sizing.adoc[leveloffset=+2]

// Loki console install
include::modules/logging-loki-gui-install.adoc[leveloffset=+2]
include::modules/loki-create-object-storage-secret-console.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources
* xref:../../logging/log_storage/installing-log-storage.adoc#logging-loki-storage_installing-log-storage[Loki object storage]

include::modules/create-lokistack-cr-console.adoc[leveloffset=+2]

// Loki CLI install
include::modules/logging-loki-cli-install.adoc[leveloffset=+2]
include::modules/loki-create-object-storage-secret-cli.adoc[leveloffset=+2]

[role="_additional-resources"]
.Additional resources
* xref:../../logging/log_storage/installing-log-storage.adoc#logging-loki-storage_installing-log-storage[Loki object storage]

include::modules/create-lokistack-cr-cli.adoc[leveloffset=+2]

// Loki object storage
include::modules/logging-loki-storage.adoc[leveloffset=+1]
// create object storage
include::modules/logging-loki-storage-aws.adoc[leveloffset=+2]
include::modules/logging-loki-storage-azure.adoc[leveloffset=+2]
include::modules/logging-loki-storage-gcp.adoc[leveloffset=+2]
include::modules/logging-loki-storage-minio.adoc[leveloffset=+2]
include::modules/logging-loki-storage-odf.adoc[leveloffset=+2]
include::modules/logging-loki-storage-swift.adoc[leveloffset=+2]

[id="installing-log-storage-es"]
== Installing an Elasticsearch log store
== Deploying an Elasticsearch log store

You can use the {es-op} to install an internal Elasticsearch log store on your {product-title} cluster.
You can use the {es-op} to deploy an internal Elasticsearch log store on your {product-title} cluster.

include::snippets/logging-elastic-dep-snip.adoc[]
include::modules/logging-es-storage-considerations.adoc[leveloffset=+2]
Expand Down
16 changes: 8 additions & 8 deletions modules/cluster-logging-about-crd.adoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Module included in the following assemblies:
//
// * logging/cluster-logging.adoc
// * logging/cluster-logging-deploying.adoc

:_mod-docs-content-type: CONCEPT
:_mod-docs-content-type: REFERENCE
[id="cluster-logging-about-crd_{context}"]
= About the ClusterLogging custom resource

Expand All @@ -11,15 +11,15 @@ To make changes to your {logging} environment, create and modify the `ClusterLog
.Sample `ClusterLogging` custom resource (CR)
[source,yaml]
----
apiVersion: "logging.openshift.io/v1"
kind: "ClusterLogging"
apiVersion: logging.openshift.io/v1
kind: ClusterLogging
metadata:
name: "instance" <1>
namespace: "openshift-logging" <2>
name: instance <1>
namespace: openshift-logging <2>
spec:
managementState: "Managed" <3>
managementState: Managed <3>
# ...
----
<1> The CR name must be `instance`.
<2> The CR must be installed to the `openshift-logging` namespace.
<3> The Red Hat OpenShift Logging Operator management state. When set to `unmanaged` the operator is in an unsupported state and will not get updates.
<3> The {clo} management state. When the state is set to `unmanaged`, the Operator is in an unsupported state and does not receive updates.
17 changes: 17 additions & 0 deletions modules/configuring-log-storage-cr.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,23 @@ spec:
<2> Optional configuration options for the Elasticsearch log store.
<3> Specify the redundancy type. This value can be `ZeroRedundancy`, `SingleRedundancy`, `MultipleRedundancy`, or `FullRedundancy`.
<4> Optional configuration options for LokiStack.
+
.Example `ClusterLogging` CR to specify LokiStack as the log store
[source,yaml]
----
apiVersion: logging.openshift.io/v1
kind: ClusterLogging
metadata:
name: instance
namespace: openshift-logging
spec:
managementState: Managed
logStore:
type: lokistack
lokistack:
name: logging-loki
# ...
----

. Apply the `ClusterLogging` CR by running the following command:
+
Expand Down
90 changes: 90 additions & 0 deletions modules/create-lokistack-cr-cli.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// Module included in the following assemblies:
//
// * logging/log_storage/installing-log-storage.adoc

:_mod-docs-content-type: PROCEDURE
[id="create-lokistack-cr-cli_{context}"]
= Creating a LokiStack custom resource by using the CLI

You can create a `LokiStack` custom resource (CR) by using the {oc-first}.

.Prerequisites

* You have administrator permissions.
* You installed the {loki-op}.
* You installed the {oc-first}.

.Procedure

. Create a `LokiStack` CR:
+
.Example `LokiStack` CR
[source,yaml]
----
apiVersion: loki.grafana.com/v1
kind: LokiStack
metadata:
name: logging-loki
namespace: openshift-logging
spec:
size: 1x.small # <1>
storage:
schemas:
- version: v12
effectiveDate: "2022-06-01"
secret:
name: logging-loki-s3 # <2>
type: s3 # <3>
storageClassName: <storage_class_name> # <4>
tenants:
mode: openshift-logging
----
<1> Supported size options for production instances of Loki are `1x.small` and `1x.medium`.
<2> Enter the name of your log store secret.
<3> Enter the type of your log store secret.
<4> Enter the name of a storage class for temporary storage. For best performance, specify a storage class that allocates block storage. Available storage classes for your cluster can be listed by using `oc get storageclasses`.

. Apply the `LokiStack` CR:
+
[source,terminal]
----
$ oc apply -f <filename>.yaml
----

.Verification

* Verify the installation by listing the pods in the `openshift-logging` project by running the following command and observing the output:
+
[source,terminal]
----
$ oc get pods -n openshift-logging
----
+
Confirm that you see several pods for components of the {logging}, similar to the following list:
+
.Example output
[source,terminal]
----
NAME READY STATUS RESTARTS AGE
cluster-logging-operator-78fddc697-mnl82 1/1 Running 0 14m
collector-6cglq 2/2 Running 0 45s
collector-8r664 2/2 Running 0 45s
collector-8z7px 2/2 Running 0 45s
collector-pdxl9 2/2 Running 0 45s
collector-tc9dx 2/2 Running 0 45s
collector-xkd76 2/2 Running 0 45s
logging-loki-compactor-0 1/1 Running 0 8m2s
logging-loki-distributor-b85b7d9fd-25j9g 1/1 Running 0 8m2s
logging-loki-distributor-b85b7d9fd-xwjs6 1/1 Running 0 8m2s
logging-loki-gateway-7bb86fd855-hjhl4 2/2 Running 0 8m2s
logging-loki-gateway-7bb86fd855-qjtlb 2/2 Running 0 8m2s
logging-loki-index-gateway-0 1/1 Running 0 8m2s
logging-loki-index-gateway-1 1/1 Running 0 7m29s
logging-loki-ingester-0 1/1 Running 0 8m2s
logging-loki-ingester-1 1/1 Running 0 6m46s
logging-loki-querier-f5cf9cb87-9fdjd 1/1 Running 0 8m2s
logging-loki-querier-f5cf9cb87-fp9v5 1/1 Running 0 8m2s
logging-loki-query-frontend-58c579fcb7-lfvbc 1/1 Running 0 8m2s
logging-loki-query-frontend-58c579fcb7-tjf9k 1/1 Running 0 8m2s
logging-view-plugin-79448d8df6-ckgmx 1/1 Running 0 46s
----
49 changes: 49 additions & 0 deletions modules/create-lokistack-cr-console.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Module included in the following assemblies:
//
// * logging/log_storage/installing-log-storage.adoc

:_mod-docs-content-type: PROCEDURE
[id="create-lokistack-cr-console_{context}"]
= Creating a LokiStack custom resource by using the web console

You can create a `LokiStack` custom resource (CR) by using the {product-title} web console.

.Prerequisites

* You have administrator permissions.
* You have access to the {product-title} web console.
* You installed the {loki-op}.

.Procedure

. Go to the *Operators* -> *Installed Operators* page. Click the *All instances* tab.

. From the *Create new* drop-down list, select *LokiStack*.

. Select *YAML view*, and then use the following template to create a `LokiStack` CR:
+
[source,yaml]
----
apiVersion: loki.grafana.com/v1
kind: LokiStack
metadata:
name: logging-loki <1>
namespace: openshift-logging
spec:
size: 1x.small <2>
storage:
schemas:
- version: v12
effectiveDate: '2022-06-01'
secret:
name: logging-loki-s3 <3>
type: s3 <4>
storageClassName: <storage_class_name> <5>
tenants:
mode: openshift-logging
----
<1> Use the name `logging-loki`.
<2> Select your Loki deployment size.
<3> Specify the secret used for your log storage.
<4> Specify the corresponding storage type.
<5> Enter the name of a storage class for temporary storage. For best performance, specify a storage class that allocates block storage. Available storage classes for your cluster can be listed by using the `oc get storageclasses` command.
84 changes: 9 additions & 75 deletions modules/logging-loki-cli-install.adoc
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
// Module is included in the following assemblies:
// logging/cluster-logging-loki.adoc
// logging/log_storage/installing-log-storage.adoc

:_mod-docs-content-type: PROCEDURE
[id="logging-loki-cli-install_{context}"]
= Installing {loki-op} using the {product-title} CLI
= Installing {loki-op} by using the CLI

To install and configure logging on your {product-title} cluster, additional Operators must be installed. This can be done from the {product-title} CLI.

{Product-title} Operators use custom resources (CR) to manage applications and their components. High-level configuration and settings are provided by the user within a CR. The Operator translates high-level directives into low-level actions, based on best practices embedded within the Operator’s logic. A custom resource definition (CRD) defines a CR and lists all the configurations available to users of the Operator. Installing an Operator creates the CRDs, which are then used to generate CRs.

.Prerequisites

* Supported object store (AWS S3, Google Cloud Storage, Azure, Swift, Minio, OpenShift Data Foundation)
* You have administrator permissions.
* You installed the {oc-first}.
* You have access to a supported object store. For example: AWS S3, Google Cloud Storage, Azure, Swift, Minio, or {rh-storage}.

.Procedure

. Install the {loki-op} by creating the following objects:

.. Create a `Subscription` object YAML file (for example, `olo-sub.yaml`) to
subscribe a namespace to the Loki Operator using the template below:
+
[source,terminal]
----
$ oc create -f <file-name>.yaml
----
. Create a `Subscription` object:
+
[source,yaml]
----
Expand All @@ -47,70 +42,9 @@ spec:
<2> Specify `stable`, or `stable-5.<y>` as the channel.
<3> 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 you created when you configured the Operator Lifecycle Manager (OLM).

. Create a LokiStack instance:

.. Create an `instance` object YAML file (for example, `logging-loki.yaml`) using the template below:
+
[source,terminal]
----
$ oc create -f <file-name>.yaml
----
. Apply the `Subscription` object:
+
[source,yaml]
----
apiVersion: loki.grafana.com/v1
kind: LokiStack
metadata:
name: logging-loki
namespace: openshift-logging
spec:
size: 1x.small # <1>
storage:
schemas:
- version: v12
effectiveDate: "2022-06-01"
secret:
name: logging-loki-s3 # <2>
type: s3 # <3>
storageClassName: <storage_class_name> # <4>
tenants:
mode: openshift-logging
----
<1> Supported size options for production instances of Loki are `1x.small` and `1x.medium`.
<2> Enter the name of your log store secret.
<3> Enter the type of your log store secret.
<4> Enter the name of an existing storage class for temporary storage. For best performance, specify a storage class that allocates block storage. Available storage classes for your cluster can be listed using `oc get storageclasses`.

.Verification

Verify the installation by listing the pods in the *openshift-logging* project by running the following command:

[source,terminal]
----
$ oc get pods -n openshift-logging
----

You should see several pods for components of the Logging subsystem, similar to the following list:

.Example output
[source,terminal]
----
$ oc get pods -n openshift-logging
NAME READY STATUS RESTARTS AGE
cluster-logging-operator-fb7f7cf69-8jsbq 1/1 Running 0 98m
collector-222js 2/2 Running 0 18m
collector-g9ddv 2/2 Running 0 18m
collector-hfqq8 2/2 Running 0 18m
collector-sphwg 2/2 Running 0 18m
collector-vv7zn 2/2 Running 0 18m
collector-wk5zz 2/2 Running 0 18m
logging-view-plugin-6f76fbb78f-n2n4n 1/1 Running 0 18m
lokistack-sample-compactor-0 1/1 Running 0 42m
lokistack-sample-distributor-7d7688bcb9-dvcj8 1/1 Running 0 42m
lokistack-sample-gateway-5f6c75f879-bl7k9 2/2 Running 0 42m
lokistack-sample-gateway-5f6c75f879-xhq98 2/2 Running 0 42m
lokistack-sample-index-gateway-0 1/1 Running 0 42m
lokistack-sample-ingester-0 1/1 Running 0 42m
lokistack-sample-querier-6b7b56bccc-2v9q4 1/1 Running 0 42m
lokistack-sample-query-frontend-84fb57c578-gq2f7 1/1 Running 0 42m
$ oc apply -f <filename>.yaml
----
Loading