Skip to content

Commit

Permalink
updated single node helm, moved deployment guide, removed ssd guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Jayclifford345 committed Oct 18, 2024
1 parent 4397b1d commit a9bc24a
Show file tree
Hide file tree
Showing 7 changed files with 550 additions and 736 deletions.
3 changes: 1 addition & 2 deletions docs/sources/setup/install/helm/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ If you are installing Grafana Enterprise Logs, follow the [GEL Helm installation

The following guides provide step-by-step instructions for deploying Loki on cloud providers:

- [Deploy Loki Simple Scalable Helm chart on AWS]({{< relref "./install-scalable/aws" >}})
- [Deploy Loki Distributed Helm chart on AWS]({{< relref "./install-microservices/aws" >}})
- [Amazon EKS]({{< relref "./deployment-guides/aws.md" >}})

## Reference

Expand Down
13 changes: 13 additions & 0 deletions docs/sources/setup/install/helm/deployment-guides/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Cloud Deployment Guides
menuTitle: Cloud Deployment Guides
description: Step-by-step instructions for deploying Loki on cloud providers.
weight: 500
keywords:
---

# Cloud Deployment Guides

The following guides provide step-by-step instructions for deploying Loki on cloud providers:

- [Deploy Loki on AWS]({{< relref "./aws" >}})
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
title: Deploy the distributed Helm chart on AWS
title: Deploy the Loki Helm chart on AWS
menuTitle: Deploy on AWS
description: Installing Loki in distributed mode using the Helm chart on AWS.
weight: 300
description: Installing the Loki Helm chart on AWS.
keywords:
---

# Deploy the distributed Helm chart on AWS
# Deploy the Loki Helm chart on AWS

This guide shows how to deploy a minimally viable Loki in distributed mode on AWS using the Helm chart. To run through this guide, we expect you to have the necessary tools and permissions to deploy resources on AWS, such as:
This guide shows how to deploy a minimally viable Loki in either **distributed** or **monolithic** mode on AWS using the Helm chart. To run through this guide, we expect you to have the necessary tools and permissions to deploy resources on AWS, such as:

- Full access to EKS (Amazon Elastic Kubernetes Service)
- Full access to S3 (Amazon Simple Storage Service)
Expand Down Expand Up @@ -302,7 +301,9 @@ Loki by default does not come with any authentication. Since we will be deployin

### Loki Helm chart configuration

Create a `values.yaml` file with the following content:
Create a `values.yaml` file choosing the configuration options that best suit your requirements. Below there are two examples of `values.yaml` files for the Loki Helm chart. The first template is Loki in distributed mode the second is Loki in monolithic mode with a replication factor of 3. The rest of this guide will focus on deploying Loki in distributed mode. However, there is no difference in the deployment process between the two modes apart from the components you are deploying.

{{< collapse title="Distributed" >}}

```yaml
loki:
Expand Down Expand Up @@ -336,7 +337,7 @@ Create a `values.yaml` file with the following content:
storage:
type: s3
s3:
region: eu-west-2
region: <Insert s3 bucket region> # eu-west-2
bucketnames: <Insert s3 bucket name> # Your actual S3 bucket name (loki-aws-dev-ruler)
s3forcepathstyle: false
alertmanager_url: http://prom:9093 # The URL of the Alertmanager to send alerts (Prometheus, Mimir, etc.)
Expand Down Expand Up @@ -435,6 +436,114 @@ Create a `values.yaml` file with the following content:
replicas: 0

```
{{< /collapse >}}

{{< collapse title="Monolithic" >}}

```yaml
loki:
commonConfig:
replication_factor: 3
schemaConfig:
configs:
- from: 2024-04-01
store: tsdb
object_store: s3
schema: v13
index:
prefix: loki_index_
period: 24h
storage_config:
aws:
region: <Insert s3 bucket region> # eu-west-2
bucketnames: <Insert s3 bucket name> # Your actual S3 bucket name for chunks
s3forcepathstyle: false
pattern_ingester:
enabled: true
limits_config:
allow_structured_metadata: true
volume_enabled: true
retention_period: 672h # 28 days retention
compactor:
retention_enabled: true
delete_request_store: s3
ruler:
enable_api: true
storage:
type: s3
s3:
region: <Insert s3 bucket region> # eu-west-2
bucketnames: <Insert s3 bucket name> # Your actual S3 bucket name for ruler
s3forcepathstyle: false
alertmanager_url: http://prom:9093 # The URL of the Alertmanager to send alerts (Prometheus, Mimir, etc.)

storage:
type: s3
bucketNames:
chunks: "<Insert s3 bucket name>" # Your actual S3 bucket name (loki-aws-dev-chunks)
ruler: "<Insert s3 bucket name>" # Your actual S3 bucket name (loki-aws-dev-ruler)
# admin: "<Insert s3 bucket name>" # Your actual S3 bucket name (loki-aws-dev-admin) - GEL customers only
s3:
region: <Insert s3 bucket region> # eu-west-2
#insecure: false
# s3forcepathstyle: false


serviceAccount:
create: true
annotations:
"eks.amazonaws.com/role-arn": "arn:aws:iam::182399686258:role/LokiServiceAccountRole" # The service role you created

deploymentMode: SingleBinary


# This exposes the Loki gateway so it can be written to and queried externaly
gateway:
service:
type: LoadBalancer
basicAuth:
enabled: true
existingSecret: loki-basic-auth


singleBinary:
replicas: 3
persistence:
storageClass: gp2
accessModes:
- ReadWriteOnce
size: 30Gi

# Zero out replica counts of other deployment modes
backend:
replicas: 0
read:
replicas: 0
write:
replicas: 0

ingester:
replicas: 0
querier:
replicas: 0
queryFrontend:
replicas: 0
queryScheduler:
replicas: 0
distributor:
replicas: 0
compactor:
replicas: 0
indexGateway:
replicas: 0
bloomCompactor:
replicas: 0
bloomGateway:
replicas: 0

```

{{< /collapse >}}

{{< admonition type="caution" >}}
Make sure to replace the placeholders with your actual values.
Expand Down Expand Up @@ -529,7 +638,7 @@ You should see the Loki Gateway service with an external IP address. This is the
loki-gateway LoadBalancer 10.100.201.74 12345678975675456-1433434453245433545656563.eu-west-2.elb.amazonaws.com 80:30707/TCP 46m
```

Congratulations! You have successfully deployed Loki in distributed mode on AWS using the Helm chart. Before we finish, let's test the deployment.
Congratulations! You have successfully deployed Loki on AWS using the Helm chart. Before we finish, let's test the deployment.
## Testing Your Loki Deployment
Expand Down
27 changes: 20 additions & 7 deletions docs/sources/setup/install/helm/install-microservices/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ We do not recommended to run Microservice mode with `filesystem` storage. For th
helm repo add grafana https://grafana.github.io/helm-charts
```

2. Update the chart repository:
1. Update the chart repository:

```bash
helm repo update
```

3. Create the configuration file `values.yaml`. The example below illustrates how to deploy Loki in test mode using MinIO as storage:
1. Create the configuration file `values.yaml`. The example below illustrates how to deploy Loki in test mode using MinIO as storage:

```yaml
loki:
Expand Down Expand Up @@ -122,7 +122,7 @@ We do not recommended to run Microservice mode with `filesystem` storage. For th
enabled: true
```

4. Install or upgrade the Loki deployment.
1. Install or upgrade the Loki deployment.
- To install:
```bash
helm install --values values.yaml loki grafana/loki
Expand Down Expand Up @@ -176,9 +176,10 @@ After testing Loki with [MinIO](https://min.io/docs/minio/kubernetes/upstream/in
When deploying Loki using S3 Storage **DO NOT** use the default bucket names; `chunk`, `ruler` and `admin`. Choose a unique name for each bucket. For more information see the following [security update](https://grafana.com/blog/2024/06/27/grafana-security-update-grafana-loki-and-unintended-data-write-attempts-to-amazon-s3-buckets/). This caution does not apply when you are using MinIO. When using MinIO we recommend using the default bucket names.
{{< /admonition >}}

{{< code >}}

```s3
{{< collapse title="S3" >}}

```yaml
# Example configuration for Loki with S3 storage
loki:
Expand Down Expand Up @@ -274,8 +275,11 @@ loki:
replicas: 0
```
{{< /collapse >}}

{{< collapse title="Azure" >}}

```azure
```yaml
# Example configuration for Loki with Azure Blob Storage
loki:
Expand Down Expand Up @@ -355,10 +359,19 @@ singleBinary:
replicas: 0
```
{{< /code >}}
{{< /collapse >}}

To configure other storage providers, refer to the [Helm Chart Reference]({{< relref "../reference" >}}).

## Deploying the Loki Helm chart to a Production Environment

{{< admonition type="note" >}}
We are actively working on providing more guides for deploying Loki in production.
{{< /admonition >}}

It is recommended to run Loki at scale within in a cloud environment like AWS, Azure, or GCP. The below guides will show you how to deploy a minimally viable production environment.
- [Deploy Loki on AWS]({{< relref "../deployment-guides/aws" >}})

## Next Steps
* Configure an agent to [send log data to Loki](/docs/loki/<LOKI_VERSION>/send-data/).
* Monitor the Loki deployment using the [Meta Monitoring Helm chart](/docs/loki/<LOKI_VERSION>/setup/install/helm/monitor-and-alert/)
Loading

0 comments on commit a9bc24a

Please sign in to comment.