Skip to content

Commit 258a0d2

Browse files
authored
Merge pull request #68952 from abrennan89/cleanup-loki-storage
OBSDOCS-674: Split LokiStack CR into own modules, move object storage docs
2 parents 937a417 + 1e63229 commit 258a0d2

18 files changed

+343
-247
lines changed

logging/cluster-logging-deploying.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ include::_attributes/attributes-openshift-dedicated.adoc[]
77

88
toc::[]
99

10-
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.
10+
You can install the {logging-title} by deploying the {clo}. The {clo} creates and manages the components of the logging stack.
1111

1212
[IMPORTANT]
1313
====

logging/log_storage/cluster-logging-loki.adoc

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,6 @@ In {logging} documentation, _LokiStack_ refers to the {logging} supported combin
1010

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

13-
include::modules/logging-loki-storage.adoc[leveloffset=+1]
14-
15-
include::modules/logging-loki-storage-aws.adoc[leveloffset=+2]
16-
17-
include::modules/logging-loki-storage-azure.adoc[leveloffset=+2]
18-
19-
include::modules/logging-loki-storage-gcp.adoc[leveloffset=+2]
20-
21-
include::modules/logging-loki-storage-minio.adoc[leveloffset=+2]
22-
23-
include::modules/logging-loki-storage-odf.adoc[leveloffset=+2]
24-
25-
include::modules/logging-loki-storage-swift.adoc[leveloffset=+2]
26-
2713
include::modules/logging-loki-restart-hardening.adoc[leveloffset=+1]
2814

2915
[role="_additional-resources"]

logging/log_storage/installing-log-storage.adoc

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,52 @@ include::_attributes/attributes-openshift-dedicated.adoc[]
77

88
toc::[]
99

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

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

1414
[id="installing-log-storage-loki"]
15-
== Installing a Loki log store
15+
== Deploying a Loki log store
1616

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

1920
include::modules/loki-deployment-sizing.adoc[leveloffset=+2]
21+
22+
// Loki console install
2023
include::modules/logging-loki-gui-install.adoc[leveloffset=+2]
24+
include::modules/loki-create-object-storage-secret-console.adoc[leveloffset=+2]
25+
26+
[role="_additional-resources"]
27+
.Additional resources
28+
* xref:../../logging/log_storage/installing-log-storage.adoc#logging-loki-storage_installing-log-storage[Loki object storage]
29+
30+
include::modules/create-lokistack-cr-console.adoc[leveloffset=+2]
31+
32+
// Loki CLI install
2133
include::modules/logging-loki-cli-install.adoc[leveloffset=+2]
34+
include::modules/loki-create-object-storage-secret-cli.adoc[leveloffset=+2]
35+
36+
[role="_additional-resources"]
37+
.Additional resources
38+
* xref:../../logging/log_storage/installing-log-storage.adoc#logging-loki-storage_installing-log-storage[Loki object storage]
39+
40+
include::modules/create-lokistack-cr-cli.adoc[leveloffset=+2]
41+
42+
// Loki object storage
43+
include::modules/logging-loki-storage.adoc[leveloffset=+1]
44+
// create object storage
45+
include::modules/logging-loki-storage-aws.adoc[leveloffset=+2]
46+
include::modules/logging-loki-storage-azure.adoc[leveloffset=+2]
47+
include::modules/logging-loki-storage-gcp.adoc[leveloffset=+2]
48+
include::modules/logging-loki-storage-minio.adoc[leveloffset=+2]
49+
include::modules/logging-loki-storage-odf.adoc[leveloffset=+2]
50+
include::modules/logging-loki-storage-swift.adoc[leveloffset=+2]
2251

2352
[id="installing-log-storage-es"]
24-
== Installing an Elasticsearch log store
53+
== Deploying an Elasticsearch log store
2554

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

2857
include::snippets/logging-elastic-dep-snip.adoc[]
2958
include::modules/logging-es-storage-considerations.adoc[leveloffset=+2]
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Module included in the following assemblies:
22
//
3-
// * logging/cluster-logging.adoc
3+
// * logging/cluster-logging-deploying.adoc
44

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

@@ -11,15 +11,15 @@ To make changes to your {logging} environment, create and modify the `ClusterLog
1111
.Sample `ClusterLogging` custom resource (CR)
1212
[source,yaml]
1313
----
14-
apiVersion: "logging.openshift.io/v1"
15-
kind: "ClusterLogging"
14+
apiVersion: logging.openshift.io/v1
15+
kind: ClusterLogging
1616
metadata:
17-
name: "instance" <1>
18-
namespace: "openshift-logging" <2>
17+
name: instance <1>
18+
namespace: openshift-logging <2>
1919
spec:
20-
managementState: "Managed" <3>
20+
managementState: Managed <3>
2121
# ...
2222
----
2323
<1> The CR name must be `instance`.
2424
<2> The CR must be installed to the `openshift-logging` namespace.
25-
<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.
25+
<3> The {clo} management state. When the state is set to `unmanaged`, the Operator is in an unsupported state and does not receive updates.

modules/configuring-log-storage-cr.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,23 @@ spec:
4646
<2> Optional configuration options for the Elasticsearch log store.
4747
<3> Specify the redundancy type. This value can be `ZeroRedundancy`, `SingleRedundancy`, `MultipleRedundancy`, or `FullRedundancy`.
4848
<4> Optional configuration options for LokiStack.
49+
+
50+
.Example `ClusterLogging` CR to specify LokiStack as the log store
51+
[source,yaml]
52+
----
53+
apiVersion: logging.openshift.io/v1
54+
kind: ClusterLogging
55+
metadata:
56+
name: instance
57+
namespace: openshift-logging
58+
spec:
59+
managementState: Managed
60+
logStore:
61+
type: lokistack
62+
lokistack:
63+
name: logging-loki
64+
# ...
65+
----
4966

5067
. Apply the `ClusterLogging` CR by running the following command:
5168
+

modules/create-lokistack-cr-cli.adoc

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * logging/log_storage/installing-log-storage.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="create-lokistack-cr-cli_{context}"]
7+
= Creating a LokiStack custom resource by using the CLI
8+
9+
You can create a `LokiStack` custom resource (CR) by using the {oc-first}.
10+
11+
.Prerequisites
12+
13+
* You have administrator permissions.
14+
* You installed the {loki-op}.
15+
* You installed the {oc-first}.
16+
17+
.Procedure
18+
19+
. Create a `LokiStack` CR:
20+
+
21+
.Example `LokiStack` CR
22+
[source,yaml]
23+
----
24+
apiVersion: loki.grafana.com/v1
25+
kind: LokiStack
26+
metadata:
27+
name: logging-loki
28+
namespace: openshift-logging
29+
spec:
30+
size: 1x.small # <1>
31+
storage:
32+
schemas:
33+
- version: v12
34+
effectiveDate: "2022-06-01"
35+
secret:
36+
name: logging-loki-s3 # <2>
37+
type: s3 # <3>
38+
storageClassName: <storage_class_name> # <4>
39+
tenants:
40+
mode: openshift-logging
41+
----
42+
<1> Supported size options for production instances of Loki are `1x.small` and `1x.medium`.
43+
<2> Enter the name of your log store secret.
44+
<3> Enter the type of your log store secret.
45+
<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`.
46+
47+
. Apply the `LokiStack` CR:
48+
+
49+
[source,terminal]
50+
----
51+
$ oc apply -f <filename>.yaml
52+
----
53+
54+
.Verification
55+
56+
* Verify the installation by listing the pods in the `openshift-logging` project by running the following command and observing the output:
57+
+
58+
[source,terminal]
59+
----
60+
$ oc get pods -n openshift-logging
61+
----
62+
+
63+
Confirm that you see several pods for components of the {logging}, similar to the following list:
64+
+
65+
.Example output
66+
[source,terminal]
67+
----
68+
NAME READY STATUS RESTARTS AGE
69+
cluster-logging-operator-78fddc697-mnl82 1/1 Running 0 14m
70+
collector-6cglq 2/2 Running 0 45s
71+
collector-8r664 2/2 Running 0 45s
72+
collector-8z7px 2/2 Running 0 45s
73+
collector-pdxl9 2/2 Running 0 45s
74+
collector-tc9dx 2/2 Running 0 45s
75+
collector-xkd76 2/2 Running 0 45s
76+
logging-loki-compactor-0 1/1 Running 0 8m2s
77+
logging-loki-distributor-b85b7d9fd-25j9g 1/1 Running 0 8m2s
78+
logging-loki-distributor-b85b7d9fd-xwjs6 1/1 Running 0 8m2s
79+
logging-loki-gateway-7bb86fd855-hjhl4 2/2 Running 0 8m2s
80+
logging-loki-gateway-7bb86fd855-qjtlb 2/2 Running 0 8m2s
81+
logging-loki-index-gateway-0 1/1 Running 0 8m2s
82+
logging-loki-index-gateway-1 1/1 Running 0 7m29s
83+
logging-loki-ingester-0 1/1 Running 0 8m2s
84+
logging-loki-ingester-1 1/1 Running 0 6m46s
85+
logging-loki-querier-f5cf9cb87-9fdjd 1/1 Running 0 8m2s
86+
logging-loki-querier-f5cf9cb87-fp9v5 1/1 Running 0 8m2s
87+
logging-loki-query-frontend-58c579fcb7-lfvbc 1/1 Running 0 8m2s
88+
logging-loki-query-frontend-58c579fcb7-tjf9k 1/1 Running 0 8m2s
89+
logging-view-plugin-79448d8df6-ckgmx 1/1 Running 0 46s
90+
----
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * logging/log_storage/installing-log-storage.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="create-lokistack-cr-console_{context}"]
7+
= Creating a LokiStack custom resource by using the web console
8+
9+
You can create a `LokiStack` custom resource (CR) by using the {product-title} web console.
10+
11+
.Prerequisites
12+
13+
* You have administrator permissions.
14+
* You have access to the {product-title} web console.
15+
* You installed the {loki-op}.
16+
17+
.Procedure
18+
19+
. Go to the *Operators* -> *Installed Operators* page. Click the *All instances* tab.
20+
21+
. From the *Create new* drop-down list, select *LokiStack*.
22+
23+
. Select *YAML view*, and then use the following template to create a `LokiStack` CR:
24+
+
25+
[source,yaml]
26+
----
27+
apiVersion: loki.grafana.com/v1
28+
kind: LokiStack
29+
metadata:
30+
name: logging-loki <1>
31+
namespace: openshift-logging
32+
spec:
33+
size: 1x.small <2>
34+
storage:
35+
schemas:
36+
- version: v12
37+
effectiveDate: '2022-06-01'
38+
secret:
39+
name: logging-loki-s3 <3>
40+
type: s3 <4>
41+
storageClassName: <storage_class_name> <5>
42+
tenants:
43+
mode: openshift-logging
44+
----
45+
<1> Use the name `logging-loki`.
46+
<2> Select your Loki deployment size.
47+
<3> Specify the secret used for your log storage.
48+
<4> Specify the corresponding storage type.
49+
<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.

modules/logging-loki-cli-install.adoc

Lines changed: 9 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,23 @@
11
// Module is included in the following assemblies:
2-
// logging/cluster-logging-loki.adoc
2+
// logging/log_storage/installing-log-storage.adoc
3+
34
:_mod-docs-content-type: PROCEDURE
45
[id="logging-loki-cli-install_{context}"]
5-
= Installing {loki-op} using the {product-title} CLI
6+
= Installing {loki-op} by using the CLI
67

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

910
{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.
1011

1112
.Prerequisites
1213

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

17-
. Install the {loki-op} by creating the following objects:
18-
19-
.. Create a `Subscription` object YAML file (for example, `olo-sub.yaml`) to
20-
subscribe a namespace to the Loki Operator using the template below:
21-
+
22-
[source,terminal]
23-
----
24-
$ oc create -f <file-name>.yaml
25-
----
20+
. Create a `Subscription` object:
2621
+
2722
[source,yaml]
2823
----
@@ -47,70 +42,9 @@ spec:
4742
<2> Specify `stable`, or `stable-5.<y>` as the channel.
4843
<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).
4944

50-
. Create a LokiStack instance:
51-
52-
.. Create an `instance` object YAML file (for example, `logging-loki.yaml`) using the template below:
53-
+
54-
[source,terminal]
55-
----
56-
$ oc create -f <file-name>.yaml
57-
----
45+
. Apply the `Subscription` object:
5846
+
59-
[source,yaml]
60-
----
61-
apiVersion: loki.grafana.com/v1
62-
kind: LokiStack
63-
metadata:
64-
name: logging-loki
65-
namespace: openshift-logging
66-
spec:
67-
size: 1x.small # <1>
68-
storage:
69-
schemas:
70-
- version: v12
71-
effectiveDate: "2022-06-01"
72-
secret:
73-
name: logging-loki-s3 # <2>
74-
type: s3 # <3>
75-
storageClassName: <storage_class_name> # <4>
76-
tenants:
77-
mode: openshift-logging
78-
----
79-
<1> Supported size options for production instances of Loki are `1x.small` and `1x.medium`.
80-
<2> Enter the name of your log store secret.
81-
<3> Enter the type of your log store secret.
82-
<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`.
83-
84-
.Verification
85-
86-
Verify the installation by listing the pods in the *openshift-logging* project by running the following command:
87-
88-
[source,terminal]
89-
----
90-
$ oc get pods -n openshift-logging
91-
----
92-
93-
You should see several pods for components of the Logging subsystem, similar to the following list:
94-
95-
.Example output
9647
[source,terminal]
9748
----
98-
$ oc get pods -n openshift-logging
99-
NAME READY STATUS RESTARTS AGE
100-
cluster-logging-operator-fb7f7cf69-8jsbq 1/1 Running 0 98m
101-
collector-222js 2/2 Running 0 18m
102-
collector-g9ddv 2/2 Running 0 18m
103-
collector-hfqq8 2/2 Running 0 18m
104-
collector-sphwg 2/2 Running 0 18m
105-
collector-vv7zn 2/2 Running 0 18m
106-
collector-wk5zz 2/2 Running 0 18m
107-
logging-view-plugin-6f76fbb78f-n2n4n 1/1 Running 0 18m
108-
lokistack-sample-compactor-0 1/1 Running 0 42m
109-
lokistack-sample-distributor-7d7688bcb9-dvcj8 1/1 Running 0 42m
110-
lokistack-sample-gateway-5f6c75f879-bl7k9 2/2 Running 0 42m
111-
lokistack-sample-gateway-5f6c75f879-xhq98 2/2 Running 0 42m
112-
lokistack-sample-index-gateway-0 1/1 Running 0 42m
113-
lokistack-sample-ingester-0 1/1 Running 0 42m
114-
lokistack-sample-querier-6b7b56bccc-2v9q4 1/1 Running 0 42m
115-
lokistack-sample-query-frontend-84fb57c578-gq2f7 1/1 Running 0 42m
49+
$ oc apply -f <filename>.yaml
11650
----

0 commit comments

Comments
 (0)