Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Added Simple Scalable Deployment guide for AWS #14327

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

Jayclifford345
Copy link
Contributor

This PR adds a guide to deploying the official Loki helm to AWS in Simple Scalable. It is worth noting that there are lot of AWS specific commands within this guide. This is hard to escape due to the nature of how Loki is deployed to AWS. I have added cavitates throughout the guide to help reduce the support burden on AWS-specific questions.

I am open to removing these sections but feel the guide would be insufficient for a user attempting to deploy Loki on AWS.

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@Jayclifford345 Jayclifford345 requested a review from a team as a code owner October 1, 2024 09:41
@github-actions github-actions bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Oct 1, 2024
Copy link

@tomglenn tomglenn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work @Jayclifford345 ! 🎉
Left some comments and suggestions. 😄

docs/sources/setup/install/helm/install-scalable/aws.md Outdated Show resolved Hide resolved
docs/sources/setup/install/helm/install-scalable/aws.md Outdated Show resolved Hide resolved
docs/sources/setup/install/helm/install-scalable/aws.md Outdated Show resolved Hide resolved
docs/sources/setup/install/helm/install-scalable/aws.md Outdated Show resolved Hide resolved
docs/sources/setup/install/helm/install-scalable/aws.md Outdated Show resolved Hide resolved
docs/sources/setup/install/helm/install-scalable/aws.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@trevorwhitney trevorwhitney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great Jay! Just a few small comments.

docs/sources/setup/install/helm/install-scalable/aws.md Outdated Show resolved Hide resolved
```bash
aws s3api create-bucket --bucket loki-aws-bucket --region eu-west-2 --create-bucket-configuration LocationConstraint=eu-west-2
```
Make sure to replace the region and bucket name with your desired values. We will revisit the bucket policy later in this guide.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and reiterating, making sure the values used in this doc are claimed by Grafana Labs

docs/sources/setup/install/helm/install-scalable/aws.md Outdated Show resolved Hide resolved
Copy link
Contributor

@poyzannur poyzannur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work Jay, thanks a lot!
Minor comments to clarify examples.

docs/sources/setup/install/helm/install-scalable/aws.md Outdated Show resolved Hide resolved
```bash
aws s3api create-bucket --bucket loki-aws-bucket --region eu-west-2 --create-bucket-configuration LocationConstraint=eu-west-2
```
Make sure to replace the region and bucket name with your desired values. We will revisit the bucket policy later in this guide.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 I added a suggestion above.

docs/sources/setup/install/helm/install-scalable/aws.md Outdated Show resolved Hide resolved
Co-authored-by: Poyzan <31743851+poyzannur@users.noreply.github.com>
@Jayclifford345
Copy link
Contributor Author

Hey @tomglenn, @poyzannur, @trevorwhitney thank you ever so much for the technical reviews. That should be all of your suggestions added. I shall let @JStickler give it the full docs review next and see where we are at. Then I can start filming the video

Copy link
Contributor

@moxious moxious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great PR. Some minor things found but overall a massive improvement/contribution to what's there

@@ -22,6 +22,17 @@ This guide references the Loki Helm chart version 3.0 or greater and contains th

If you are installing Grafana Enterprise Logs, follow the [GEL Helm installation](https://grafana.com/docs/enterprise-logs/<ENTERPRISE_LOGS_VERSION>/setup/helm/).

## Recommended Installation

The recommended installation method for initial deployments is to use the [Loki Simple Scalable Helm chart]({{< relref "./install-scalable" >}}). This chart provides a simple scalable deployment mode for Loki, separating execution paths into read, write, and backend targets. For small to medium-sized deployments, this chart is a good starting point.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great specific opinionated starting point. I'm not wondering what you think I should do.

@@ -21,16 +21,17 @@ The default Helm chart deploys the following components:
- **QueryFrontend component** (2 replicas, maxUnavailable: 1): Manages frontend queries. Up to 1 replica can be unavailable during updates.
- **QueryScheduler component** (2 replicas): Schedules queries.

It is not recommended to run scalable mode with `filesystem` storage. For the purpose of this guide, we will use MinIO as the object storage to provide a complete example.
{{< admonition type="note" >}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't necessarily require a change, but I'm curious why this is the right spot to make this point.

I understand it's important and why it's here, but an alternative could be to guide me down the path of the opinionated right way of doing things, and simply provide a summary block somewhere else saying "we chose to embed the following best practices in this approach"

@@ -165,7 +170,7 @@ It is not recommended to run scalable mode with `filesystem` storage. For the pu

## Object Storage Configuration

After testing Loki with MinIO, it is recommended to configure Loki with an object storage provider. The following examples shows how to configure Loki with different object storage providers:
After testing Loki with MinIO, we recommend to configure Loki with an object storage provider. The following examples shows how to configure Loki with different object storage providers:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest link on word MinIO - https://min.io/docs/minio/kubernetes/upstream/index.html

very minor point but it's more than possible people won't know what this is.

@@ -165,7 +170,7 @@ It is not recommended to run scalable mode with `filesystem` storage. For the pu

## Object Storage Configuration

After testing Loki with MinIO, it is recommended to configure Loki with an object storage provider. The following examples shows how to configure Loki with different object storage providers:
After testing Loki with MinIO, we recommend to configure Loki with an object storage provider. The following examples shows how to configure Loki with different object storage providers:

{{< admonition type="caution" >}}
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

outside the scope of this PR so ignore me but we probably shouldn't ever have this in the docs. The helm chart should ideally block you from foot-gunning in this particular way

period: 24h
storage_config:
aws:
region: <AWS region your bucket is in eg. `eu-west-2`>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to

region: eu-west-2. # Change to suit your AWS region

for parallel structure with next line


It is not recommended to run scalable mode with `filesystem` storage. For the purpose of this guide, we will use MinIO as the object storage to provide a complete example.
{{< admonition type="note" >}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see prevous

We are activley working on providing more guides for deploying Loki in production.
{{< /admonition >}}

It is recommended to run Loki at scale within in a cloud enviroment like AWS, Azure, or GCP. The below guides will show you how to deploy a minimally viable production environment.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Loki Gateway service is a LoadBalancer service that exposes the Loki gateway to the internet. This is where you will write logs to and query logs from. By default NGINX is used as the gateway.

{{< admonition type="caution" >}}
The Loki Gateway service is exposed to the internet. It is recommended to secure the gateway with authentication. Refer to the [Authentication]({{< relref "../../../../operations/authentication" >}}) documentation for more information.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


```

{{< admonition type="caution" >}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha but good. I've never blindly copypastad something off of a website before. Why are you looking at me like that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XL type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants