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: Deploy Loki Helm on AWS guide #14517

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

Conversation

Jayclifford345
Copy link
Contributor

@Jayclifford345 Jayclifford345 commented Oct 17, 2024

This is the successor PR to the SSD PR #14327
After an internal discussion, it was decided to focus deployment guides for helm on either Monolithic or microservice . The Loki team felt more comfortable supporting both of these deployment styles since its closer to what we deploy internally.

This PR is part of a large redesign to improve the helm documentation of Loki.

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 and others added 30 commits October 1, 2024 10:36
Co-authored-by: Tom Glenn <289945+tomglenn@users.noreply.github.com>
Co-authored-by: Tom Glenn <289945+tomglenn@users.noreply.github.com>
Co-authored-by: Tom Glenn <289945+tomglenn@users.noreply.github.com>
Co-authored-by: Tom Glenn <289945+tomglenn@users.noreply.github.com>
Co-authored-by: Tom Glenn <289945+tomglenn@users.noreply.github.com>
Co-authored-by: Tom Glenn <289945+tomglenn@users.noreply.github.com>
Co-authored-by: Poyzan <31743851+poyzannur@users.noreply.github.com>
Co-authored-by: Jens Horstmann <jens@widgetbook.io>
@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 17, 2024
@Jayclifford345 Jayclifford345 changed the title docs: Deploy Loki Helm in Distributed mode AWS guide docs: Deploy Loki Helm in microservice mode AWS guide Oct 17, 2024
@Jayclifford345 Jayclifford345 marked this pull request as ready for review October 18, 2024 16:29
@Jayclifford345 Jayclifford345 requested a review from a team as a code owner October 18, 2024 16:29
@Jayclifford345 Jayclifford345 changed the title docs: Deploy Loki Helm in microservice mode AWS guide docs: Deploy Loki Helm on AWS guide Oct 18, 2024
Copy link
Contributor

@JStickler JStickler left a comment

Choose a reason for hiding this comment

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

[docs team]

docs/sources/setup/install/helm/_index.md Outdated Show resolved Hide resolved
docs/sources/setup/install/helm/deployment-guides/aws.md Outdated Show resolved Hide resolved
docs/sources/setup/install/helm/deployment-guides/aws.md Outdated Show resolved Hide resolved
docs/sources/setup/install/helm/deployment-guides/aws.md Outdated Show resolved Hide resolved
Jayclifford345 and others added 8 commits October 22, 2024 13:17
Co-authored-by: J Stickler <julie.stickler@grafana.com>
Co-authored-by: J Stickler <julie.stickler@grafana.com>
Co-authored-by: J Stickler <julie.stickler@grafana.com>
Co-authored-by: J Stickler <julie.stickler@grafana.com>
Co-authored-by: J Stickler <julie.stickler@grafana.com>
Co-authored-by: J Stickler <julie.stickler@grafana.com>
@Jayclifford345
Copy link
Contributor Author

Ready for another run :)

Copy link
Contributor

@JStickler JStickler left a comment

Choose a reason for hiding this comment

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

[docs team] Looking good! Just a few more things to fix.

@@ -167,59 +173,69 @@ It is not recommended to run microservice mode with `filesystem` storage. For th

## 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](https://min.io/docs/minio/kubernetes/upstream/index.html), 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.

Suggested change
After testing Loki with [MinIO](https://min.io/docs/minio/kubernetes/upstream/index.html), we recommend 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](https://min.io/docs/minio/kubernetes/upstream/index.html), we recommend configuring Loki with an object storage provider. The following examples shows how to configure Loki with different object storage providers:

Comment on lines +217 to +219
chunks: <Your AWS bucket for chunk eg. `aws-loki-dev-chunk`>
ruler: <Your AWS bucket for ruler eg. `aws-loki-dev-ruler`>
admin: <Your AWS bucket for admin eg. `aws-loki-dev-admin`>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
chunks: <Your AWS bucket for chunk eg. `aws-loki-dev-chunk`>
ruler: <Your AWS bucket for ruler eg. `aws-loki-dev-ruler`>
admin: <Your AWS bucket for admin eg. `aws-loki-dev-admin`>
chunks: <Your AWS bucket for chunk, for example, `aws-loki-dev-chunk`>
ruler: <Your AWS bucket for ruler , for example, `aws-loki-dev-ruler`>
admin: <Your AWS bucket for admin , for example, `aws-loki-dev-admin`>

ruler: <Your AWS bucket for ruler eg. `aws-loki-dev-ruler`>
admin: <Your AWS bucket for admin eg. `aws-loki-dev-admin`>
s3:
# s3 URL can be used to specify the endpoint, access key, secret key, and bucket name this works well for S3 compatible storages or are hosting Loki on-premises and want to use S3 as the storage backend. Either use the s3 URL or the individual fields below (AWS endpoint, region, secret).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# s3 URL can be used to specify the endpoint, access key, secret key, and bucket name this works well for S3 compatible storages or are hosting Loki on-premises and want to use S3 as the storage backend. Either use the s3 URL or the individual fields below (AWS endpoint, region, secret).
# s3 URL can be used to specify the endpoint, access key, secret key, and bucket name this works well for S3 compatible storage or if you are hosting Loki on-premises and want to use S3 as the storage backend. Either use the s3 URL or the individual fields below (AWS endpoint, region, secret).

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

It is recommended to run Loki at scale within a cloud environment 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.

Suggested change
It is recommended to run Loki at scale within a cloud environment like AWS, Azure, or GCP. The below guides will show you how to deploy a minimally viable production environment.
We recommend running Loki at scale within a cloud environment like AWS, Azure, or GCP. The below guides will show you how to deploy a minimally viable production environment.

1. **Single Replica**: Run Loki with a single replica. This mode is useful for testing and development or if you are planning to run Loki as a meta-monitoring system.
2. **Multiple Replicas**: Run Loki with multiple replicas. This mode is useful for high availability. This mode is less economical than microservice mode, but it is simpler to operate. We recommend running at least three replicas for high availability.

Once you have selected how many replicas you would like to deploy choose the appropriate `values.yaml` configuration file below and then continue with the deployment steps.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Once you have selected how many replicas you would like to deploy choose the appropriate `values.yaml` configuration file below and then continue with the deployment steps.
Once you have selected how many replicas you would like to deploy, choose the appropriate `values.yaml` configuration file below and then continue with the deployment steps.

s3:
# s3 URL can be used to specify the endpoint, access key, secret key, and bucket name
# s3 URL can be used to specify the endpoint, access key, secret key, and bucket name this works well for S3 compatible storages or are hosting Loki on-premises and want to use S3 as the storage backend. Either use the s3 URL or the individual fields below (AWS endpoint, region, secret).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# s3 URL can be used to specify the endpoint, access key, secret key, and bucket name this works well for S3 compatible storages or are hosting Loki on-premises and want to use S3 as the storage backend. Either use the s3 URL or the individual fields below (AWS endpoint, region, secret).
# s3 URL can be used to specify the endpoint, access key, secret key, and bucket name this works well for S3 compatible storages or if you are hosting Loki on-premises and want to use S3 as the storage backend. Either use the s3 URL or the individual fields below (AWS endpoint, region, secret).

{{< /admonition >}}

```bash
aws s3api create-bucket --bucket < YOUR CHUNK BUCKET NAME eg. `loki-aws-dev-chunks`> --region <S3 region your account is on, eg `eu-west-2`> --create-bucket-configuration LocationConstraint=<S3 region your account is on, 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.

Suggested change
aws s3api create-bucket --bucket < YOUR CHUNK BUCKET NAME eg. `loki-aws-dev-chunks`> --region <S3 region your account is on, eg `eu-west-2`> --create-bucket-configuration LocationConstraint=<S3 region your account is on, eg `eu-west-2`> \
aws s3api create-bucket --bucket <YOUR CHUNK BUCKET NAME e.g. `loki-aws-dev-chunks`> --region <S3 region your account is on, e.g. `eu-west-2`> --create-bucket-configuration LocationConstraint=<S3 region your account is on, e.g. `eu-west-2`> \


```bash
aws s3api create-bucket --bucket < YOUR CHUNK BUCKET NAME eg. `loki-aws-dev-chunks`> --region <S3 region your account is on, eg `eu-west-2`> --create-bucket-configuration LocationConstraint=<S3 region your account is on, eg `eu-west-2`> \
aws s3api create-bucket --bucket <YOUR RULER BUCKET NAME eg. `loki-aws-dev-ruler`> --region <S3 REGION your account is on, eg `eu-west-2`> --create-bucket-configuration LocationConstraint=<S3 REGION your account is on, 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.

Suggested change
aws s3api create-bucket --bucket <YOUR RULER BUCKET NAME eg. `loki-aws-dev-ruler`> --region <S3 REGION your account is on, eg `eu-west-2`> --create-bucket-configuration LocationConstraint=<S3 REGION your account is on, eg `eu-west-2`>
aws s3api create-bucket --bucket <YOUR RULER BUCKET NAME e.g. `loki-aws-dev-ruler`> --region <S3 REGION your account is on, e.g. `eu-west-2`> --create-bucket-configuration LocationConstraint=<S3 REGION your account is on, e.g. `eu-west-2`>

loki:
schemaConfig:
configs:
- from: 2024-04-01
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- from: 2024-04-01
- from: "2024-04-01"


### Loki Helm chart configuration

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 [microservices](https://grafana.com/docs/loki/<LOKI_VERSION>/get-started/deployment-modes/#microservices-mode) mode the second is Loki in [monolithic](https://grafana.com/docs/loki/<LOKI_VERSION>/get-started/deployment-modes/#monolithic-mode) mode with a replication factor of 3. The rest of this guide will focus on deploying Loki in microservices mode. However, there is no difference in the deployment process between the two modes apart from the components you are deploying.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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 [microservices](https://grafana.com/docs/loki/<LOKI_VERSION>/get-started/deployment-modes/#microservices-mode) mode the second is Loki in [monolithic](https://grafana.com/docs/loki/<LOKI_VERSION>/get-started/deployment-modes/#monolithic-mode) mode with a replication factor of 3. The rest of this guide will focus on deploying Loki in microservices mode. However, there is no difference in the deployment process between the two modes apart from the components you are deploying.
Create a `values.yaml` file choosing the configuration options that best suit your requirements. Below there is an example of `values.yaml` files for the Loki Helm chart in [microservices](https://grafana.com/docs/loki/<LOKI_VERSION>/get-started/deployment-modes/#microservices-mode) mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XXL 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.

2 participants