From d1d7d90b6c4ed1b4a8049df2c4755ce9a4a811c6 Mon Sep 17 00:00:00 2001 From: J Stickler Date: Wed, 24 Apr 2024 13:00:50 -0400 Subject: [PATCH] docs: Add Azure example configuration snippets (#12725) (#12759) Co-authored-by: Paul Rogers <129207811+paul1r@users.noreply.github.com> --- docs/sources/configure/examples.md | 65 +++++++++++++++++++ .../16-Azure-Account-Name-Example.yaml | 16 +++++ .../17-Azure-Service-Principal-Example.yaml | 14 ++++ 3 files changed, 95 insertions(+) create mode 100644 docs/sources/configure/examples/16-Azure-Account-Name-Example.yaml create mode 100644 docs/sources/configure/examples/17-Azure-Service-Principal-Example.yaml diff --git a/docs/sources/configure/examples.md b/docs/sources/configure/examples.md index eb5369c8dc23..df9302d6f71c 100644 --- a/docs/sources/configure/examples.md +++ b/docs/sources/configure/examples.md @@ -422,3 +422,68 @@ storage_config: ``` + +## 15-Memberlist-Ring-Snippet.yaml + +```yaml + +# This partial configuration uses memberlist for the ring. + +common: + ring: + kvstore: + store: memberlist + replication_factor: 1 + path_prefix: /loki + +memberlist: + join_members: + # You can use a headless k8s service for all distributor, ingester and querier components. + - loki-gossip-ring.loki.svc.cluster.local:7946 # :7946 is the default memberlist port. + +``` + + +## 16-Azure-Account-Name-Example.yaml + +```yaml + +# This partial configuration uses Azure for chunk storage +storage_config: + azure: + # For the account-key, see docs: https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal + account_key: + account_name: + container_name: + use_managed_identity: false + # Providing a user assigned ID will override use_managed_identity + #user_assigned_id: + request_timeout: 0 + # Configure `endpoint_suffix` if you are using private azure cloud like azure stack hub and will use this endpoint suffix to compose container and blob storage URL. Ex: https://account_name.endpoint_suffix/container_name/blob_name + #endpoint_suffix: + # If `connection_string` is set, the `account_name` and `endpoint_suffix` values will not be used. Use this method over `account_key` if you need to authenticate via an SAS token. Or if you use the Azurite emulator. + #connection_string: + +``` + + +## 17-Azure-Service-Principal-Example.yaml + +```yaml + +# This partial configuration uses Azure for chunk storage and a service principal for authentication +storage_config: + azure: + use_service_principal: true + # Azure tenant ID used to authenticate through Azure OAuth + tenant_id: + # Azure Service Principal ID + client_id: + # Azure Service Principal secret key + client_secret: + # See https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction#containers + container_name: + request_timeout: 0 + +``` + diff --git a/docs/sources/configure/examples/16-Azure-Account-Name-Example.yaml b/docs/sources/configure/examples/16-Azure-Account-Name-Example.yaml new file mode 100644 index 000000000000..2fd51b29ed83 --- /dev/null +++ b/docs/sources/configure/examples/16-Azure-Account-Name-Example.yaml @@ -0,0 +1,16 @@ +# doc-example:skip-validation=true +# This partial configuration uses Azure for chunk storage +storage_config: + azure: + # For the account-key, see docs: https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage?tabs=azure-portal + account_key: + account_name: + container_name: + use_managed_identity: false + # Providing a user assigned ID will override use_managed_identity + #user_assigned_id: + request_timeout: 0 + # Configure `endpoint_suffix` if you are using private azure cloud like azure stack hub and will use this endpoint suffix to compose container and blob storage URL. Ex: https://account_name.endpoint_suffix/container_name/blob_name + #endpoint_suffix: + # If `connection_string` is set, the `account_name` and `endpoint_suffix` values will not be used. Use this method over `account_key` if you need to authenticate via an SAS token. Or if you use the Azurite emulator. + #connection_string: \ No newline at end of file diff --git a/docs/sources/configure/examples/17-Azure-Service-Principal-Example.yaml b/docs/sources/configure/examples/17-Azure-Service-Principal-Example.yaml new file mode 100644 index 000000000000..61667b3696e8 --- /dev/null +++ b/docs/sources/configure/examples/17-Azure-Service-Principal-Example.yaml @@ -0,0 +1,14 @@ +# doc-example:skip-validation=true +# This partial configuration uses Azure for chunk storage and a service principal for authentication +storage_config: + azure: + use_service_principal: true + # Azure tenant ID used to authenticate through Azure OAuth + tenant_id: + # Azure Service Principal ID + client_id: + # Azure Service Principal secret key + client_secret: + # See https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction#containers + container_name: + request_timeout: 0 \ No newline at end of file