Skip to content

Commit

Permalink
Grafana tempo (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
sekka1 authored Apr 11, 2022
1 parent 40c9ffa commit 9e8f417
Show file tree
Hide file tree
Showing 11 changed files with 264 additions and 207 deletions.

This file was deleted.

This file was deleted.

116 changes: 0 additions & 116 deletions terraform-environments/aws/dev/helm/kube-prometheus-stack/main.tf

This file was deleted.

This file was deleted.

17 changes: 17 additions & 0 deletions terraform-environments/aws/dev/helm/opentelemetry/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# OpenTelemetry

Doc: https://opentelemetry.io/docs/

## Install sequence

1. opentelemetry-operator
2. opentelemetry-collector
3. grafana-tempo-server

## Data Path

1. App with OpenTelemetry SDK
2. App sends to an OpenTelemetry Collector
3. The OpenTelemetry Collector exporter sends to a Tempo server
4. Grafana adds the Tempo server as the datasource
5. User can query the Grafana frontend the traces
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
terraform {
source = "github.com/ManagedKube/kubernetes-ops.git//terraform-modules/aws/helm/helm_generic?ref=v1.0.9"
}

# Include all settings from the root terragrunt.hcl file
include {
path = find_in_parent_folders()
}

dependency "eks" {
config_path = "${get_terragrunt_dir()}/../../../0200-eks"

mock_outputs = {
vpc_id = "vpc-abcd1234"
vpc_cidr_block = "10.0.0.0/16"
public_subnet_ids = ["subnet-abcd1234", "subnet-bcd1234a", ]
}
mock_outputs_allowed_terraform_commands = ["validate", ]
}

# Generate a Kubernetes provider configuration for authenticating against the EKS cluster.
generate "k8s_helm" {
path = "k8s_helm_provider.tf"
if_exists = "overwrite_terragrunt"
contents = templatefile(
find_in_parent_folders("provider_k8s_helm_for_eks.template.hcl"),
{
eks_cluster_name = dependency.eks.outputs.cluster_id,
kubergrunt_exec = get_env("KUBERGRUNT_EXEC", "kubergrunt")
},
)
}

# ---------------------------------------------------------------------------------------------------------------------
# Locals are named constants that are reusable within the configuration.
# ---------------------------------------------------------------------------------------------------------------------
locals {
# Automatically load common variables shared across all accounts
common_vars = read_terragrunt_config(find_in_parent_folders("common.hcl"))

# Extract the name prefix for easy access
name_prefix = local.common_vars.locals.name_prefix

# Automatically load account-level variables
account_vars = read_terragrunt_config(find_in_parent_folders("account.hcl"))

# Extract the account_name for easy access
account_name = local.account_vars.locals.account_name

# Automatically load region-level variables
region_vars = read_terragrunt_config(find_in_parent_folders("region.hcl"))

# Extract the region for easy access
aws_region = local.region_vars.locals.aws_region
}

# ---------------------------------------------------------------------------------------------------------------------
# MODULE PARAMETERS
# These are the variables we have to pass in to use the module specified in the terragrunt configuration above
# ---------------------------------------------------------------------------------------------------------------------
inputs = {
repository = "https://grafana.github.io/helm-charts"
official_chart_name = "tempo"
user_chart_name = "tempo"
helm_version = "0.14.2"
namespace = "monitoring"
helm_values = file("values.yaml")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# source: https://github.com/grafana/helm-charts/tree/main/charts/tempo
---
persistence:
enabled: true
# storageClassName: local-path
accessModes:
- ReadWriteOnce
size: 25Gi
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
terraform {
source = "github.com/ManagedKube/kubernetes-ops.git//terraform-modules/aws/kubernetes/manifest_set?ref=v2.0.12"
}

# Include all settings from the root terragrunt.hcl file
include {
path = find_in_parent_folders()
}

dependency "eks" {
config_path = "${get_terragrunt_dir()}/../../../0200-eks"

mock_outputs = {
vpc_id = "vpc-abcd1234"
vpc_cidr_block = "10.0.0.0/16"
public_subnet_ids = ["subnet-abcd1234", "subnet-bcd1234a", ]
}
mock_outputs_allowed_terraform_commands = ["validate", ]
}

# Generate a Kubernetes provider configuration for authenticating against the EKS cluster.
generate "k8s_helm" {
path = "k8s_helm_provider.tf"
if_exists = "overwrite_terragrunt"
contents = templatefile(
find_in_parent_folders("provider_k8s_helm_for_eks.template.hcl"),
{
eks_cluster_name = dependency.eks.outputs.cluster_id,
kubergrunt_exec = get_env("KUBERGRUNT_EXEC", "kubergrunt")
},
)
}

# ---------------------------------------------------------------------------------------------------------------------
# Locals are named constants that are reusable within the configuration.
# ---------------------------------------------------------------------------------------------------------------------
locals {
# Automatically load common variables shared across all accounts
common_vars = read_terragrunt_config(find_in_parent_folders("common.hcl"))

# Extract the name prefix for easy access
name_prefix = local.common_vars.locals.name_prefix

# Automatically load account-level variables
account_vars = read_terragrunt_config(find_in_parent_folders("account.hcl"))

# Extract the account_name for easy access
account_name = local.account_vars.locals.account_name

# Automatically load region-level variables
region_vars = read_terragrunt_config(find_in_parent_folders("region.hcl"))

# Extract the region for easy access
aws_region = local.region_vars.locals.aws_region

}

# ---------------------------------------------------------------------------------------------------------------------
# MODULE PARAMETERS
# These are the variables we have to pass in to use the module specified in the terragrunt configuration above
# ---------------------------------------------------------------------------------------------------------------------
inputs = {
upload_source_path = "${get_terragrunt_dir()}"
upload_directory = "yaml"
fileset_pattern = "**/*.yaml"
template_vars = {}
}
Loading

0 comments on commit 9e8f417

Please sign in to comment.