Skip to content

Commit

Permalink
Fixed mage commands, docs, compatibility testing notes.
Browse files Browse the repository at this point in the history
  • Loading branch information
DazEdword committed Jan 7, 2025
1 parent 55ec452 commit b438f39
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Observability stack with Prometheus, LGTM (Grafana), Open Telemetry.

This repository includes a multi-cluster setup serving as a practical Grafana example, with Prometheus as a data source.
The setup is based on Kind local cluster, and it's completely self contained, designed to run locally in UNIX systems.
Sucessfully tested in Linux Mint 22 (Wilma) and macOS Sequoia 15.1.

Cluster 1 (`kind-observability-stack`) has the full Grafana LGTM stack and a Prometheus instance, configured write receiver.
It also includes a service monitoring setup and a dashboard to monitor the Prometheus installation itself.
Expand All @@ -24,6 +25,7 @@ Pre-setup:
Dev dependencies:
- `mage` 1.15.0
- `kubectl` v1.31.2
- `kubectx` 0.9.5
- `kind` v0.24.0
- `kustomize` v5.4.1
- `kubefwd` 1.22.5
Expand All @@ -35,7 +37,7 @@ Dev dependencies:
Dev dependencies can be installed manually, or automatically via `brew`:

```sh
# create kind observability cluster
# install brew dev dependencies
mage setup
```

Expand Down
8 changes: 6 additions & 2 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type LGTM mg.Namespace
type Apps mg.Namespace

func Setup() error {
if err := sh.RunV("brew", "install", "mage", "kubectl", "kind", "kustomize", "txn2/tap/kubefwd", "helm", "jq"); err != nil {
if err := sh.RunV("brew", "install", "mage", "kubectl", "kubectx", "kind", "kustomize", "txn2/tap/kubefwd", "helm", "jq"); err != nil {
return err
}

Expand All @@ -28,7 +28,7 @@ func Setup() error {
func All() error {
mg.Deps(Kind.CreateOlly, Kind.CreateApps)

// separated deifferent install deps since they are designed in mage to run exactly once
// separated different install deps since they are designed in mage to run exactly once
mg.SerialDeps(Prometheus.InstallGlobal, Prometheus.DeployGlobal, LGTM.Deploy)
mg.SerialDeps(Prometheus.InstallWriter, Prometheus.DeployRemote, Apps.Deploy)

Expand Down Expand Up @@ -185,6 +185,10 @@ func (Prometheus) Forward() error {
}

func (LGTM) Deploy() error {
if err := sh.RunV("helm", "repo", "add", "grafana", "https://grafana.github.io/helm-charts"); err != nil {
return err
}

if err := sh.RunV("helm", "upgrade", "-f", "deploy/lgtm/values.yaml", "observability-stack", "grafana/lgtm-distributed", "--create-namespace", "--namespace", "monitoring", "--install"); err != nil {
return err
}
Expand Down

0 comments on commit b438f39

Please sign in to comment.