Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
Signed-off-by: Weifeng Wang <[email protected]>
  • Loading branch information
qclaogui committed Nov 21, 2023
1 parent 1b7efe1 commit c0fc32a
Show file tree
Hide file tree
Showing 23 changed files with 721 additions and 93 deletions.
62 changes: 57 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,27 @@ These instructions will get you through the deploying samples with Docker Compos
- [Logs [Loki (Query-Frontend + Querier + Ruler + Distributor + Ingester)]](./docker-compose/microservices-mode/logs)
- [Traces [Tempo (Query-Frontend + Querier + Distributor + Ingester + Compactor)]](./docker-compose/microservices-mode/traces)
- [Metrics [Mimir (Query-Frontend + Querier + Store-Gateway + Distributor + Ingester + Compactor)]](./docker-compose/microservices-mode/metrics)
- [Profiles [Pyroscope (Query-Frontend + Query-Scheduler + Querier + Distributor + Ingester)]](./docker-compose/microservices-mode/profiles)
- [Profiles [Pyroscope (Query-Frontend + Query-Scheduler + Querier + Store-Gateway + Distributor + Ingester + Compactor)]](./docker-compose/microservices-mode/profiles)

### Quick Start(docker-compose)

```shell
git clone https://github.com/qclaogui/codelab-monitoring.git && cd "$(basename "$_" .git)"

make up-monolithic-mode-metrics
```

That's it.

Once all containers are up and running you can search for traces in Grafana.

Navigate to [http://localhost:3000/explore](http://localhost:3000/explore) and select the search tab.

### Clean up(docker-compose)

```shell
make down-monolithic-mode-metrics
```

## Kubernetes

Expand All @@ -66,11 +86,44 @@ These instructions will get you through the deploying samples with Docker Compos
- Logs
- Traces
- [Metrics [Mimir (Query-Frontend + Querier + Store-Gateway + Distributor + Ingester + Compactor)]](./kubernetes/microservices-mode/metrics)
- Profiles
- [Profiles [Pyroscope (Query-Frontend + Query-Scheduler + Querier + Store-Gateway + Distributor + Ingester + Compactor)]](./kubernetes/microservices-mode/profiles)

### Quick Start(kubernetes)

Install dependencies tools

```shell
make help
git clone https://github.com/qclaogui/codelab-monitoring.git && cd "$(basename "$_" .git)"

make install-build-deps
```

Create a cluster and mapping the ingress port 80 to localhost:8080

```shell
make cluster
```

Deploy manifests

```shell
make deploy-monolithic-mode-logs
```

Once all containers are up and running you can search for traces in Grafana.

Navigate to [http://localhost:8080/explore](http://localhost:8080/explore) and select the search tab.

### Clean up(kubernetes)

```shell
make delete-monolithic-mode-logs
```

help

```shell
make help

Usage:
make <target>
Expand All @@ -84,6 +137,7 @@ Dashboards
Lint & fmt
check Check all the mixin files
copyright Add Copyright header to .go files.
fmt Uses Grafana Agent to fmt the river config
Docker compose
up-monolithic-mode-metrics Run monolithic-mode metrics
Expand All @@ -93,8 +147,6 @@ Docker compose
up-monolithic-mode-all-in-one Run monolithic-mode all-in-one
up-read-write-mode-metrics Run read-write-mode metrics
up-read-write-mode-logs Run read-write-mode logs
up-read-write-mode-traces Run read-write-mode traces
up-read-write-mode-profiles Run read-write-mode profiles
up-microservices-mode-metrics Run microservices-mode metrics
up-microservices-mode-logs Run microservices-mode logs
up-microservices-mode-traces Run microservices-mode traces
Expand Down
4 changes: 2 additions & 2 deletions ci/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"dagger.io/dagger"
)

// use golang:1.21.3 container as builder
const goImage = "golang:1.21.3"
// use golang:1.21.4 container as builder
const goImage = "golang:1.21.4"

func main() {
println("Dagger is a programmable CI/CD engine that runs your pipelines in containers.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
services:
agent:
depends_on:
pyroscope:
gateway:
condition: service_started
image: grafana/agent:v0.37.2
volumes:
Expand Down
20 changes: 20 additions & 0 deletions docker-compose/microservices-mode/logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,23 @@ flowchart LR
R -.->|reads | M & I
end
```

## Quick Start

```shell
git clone https://github.com/qclaogui/codelab-monitoring.git && cd "$(basename "$_" .git)"

make up-microservices-mode-logs
```

That's it.

Once all containers are up and running you can search for traces in Grafana.

Navigate to [http://localhost:3000/explore](http://localhost:3000/explore) and select the search tab.

## Clean up

```shell
make down-microservices-mode-logs
```
20 changes: 20 additions & 0 deletions docker-compose/microservices-mode/metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,23 @@ flowchart LR
R --> QF & I & AM & M
end
```

## Quick Start

```shell
git clone https://github.com/qclaogui/codelab-monitoring.git && cd "$(basename "$_" .git)"

make up-microservices-mode-metrics
```

That's it.

Once all containers are up and running you can search for traces in Grafana.

Navigate to [http://localhost:3000/explore](http://localhost:3000/explore) and select the search tab.

## Clean up

```shell
make down-microservices-mode-metrics
```
23 changes: 22 additions & 1 deletion docker-compose/microservices-mode/profiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The below diagram describes how data flows.
```mermaid
flowchart LR
A ---->|writes| D -->|writes| I -->|writes| M
G -.-> |reads | QF -.->|reads | QS -.->|reads | Q
G -.-> |reads | QF -.->|reads | QS -.->|reads | Q -.->|reads | SG -.->|reads| M
subgraph Minio
M{"Object Storage"}
Expand Down Expand Up @@ -40,12 +40,33 @@ flowchart LR
QF("query-frontend")
end
subgraph StoreGateway["pyroscope -target=store-gateway"]
SG("store-gateway")
end
subgraph Querier["pyroscope -target=querier"]
Q("querier") -.->|reads| I
%% Q -.->|coming soon | M
end
```

## Quick Start

```shell
git clone https://github.com/qclaogui/codelab-monitoring.git && cd "$(basename "$_" .git)"

make up-microservices-mode-profiles
```

That's it.

Once all containers are up and running you can search for traces in Grafana.

Navigate to [http://localhost:3000/explore](http://localhost:3000/explore) and select the search tab.

## Clean up

```shell
make down-microservices-mode-profiles
```
24 changes: 23 additions & 1 deletion docker-compose/microservices-mode/profiles/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ services:
depends_on:
ingester:
condition: service_started
image: &pyroscopeImage grafana/pyroscope:1.1.5
image: &pyroscopeImage grafana/pyroscope:1.2.0
volumes:
- ../../common/config/pyroscope/microservices-mode-profiles.yaml:/etc/config.yaml # Note: profiles use microservices-mode-profiles.yaml
ports:
Expand Down Expand Up @@ -75,6 +75,26 @@ services:
aliases:
- pyroscope-memberlist

compactor:
depends_on:
minio:
condition: service_healthy
image: *pyroscopeImage
volumes:
- ../../common/config/pyroscope/microservices-mode-profiles.yaml:/etc/config.yaml # Note: profiles use microservices-mode-profiles.yaml
command:
- -config.file=/etc/config.yaml
- -target=compactor
- -memberlist.cluster-label=profiles-system
- -memberlist.join=pyroscope-memberlist:7946
- -log.level=warn
deploy:
replicas: 1
networks:
default:
aliases:
- pyroscope-memberlist

query-frontend:
depends_on:
minio:
Expand Down Expand Up @@ -110,6 +130,7 @@ services:
- -memberlist.cluster-label=profiles-system
- -memberlist.join=pyroscope-memberlist:7946
- -log.level=warn
- -store-gateway.sharding-ring.replication-factor=1
networks:
default:
aliases:
Expand Down Expand Up @@ -146,6 +167,7 @@ services:
- -memberlist.cluster-label=profiles-system
- -memberlist.join=pyroscope-memberlist:7946
- -log.level=error
- -store-gateway.sharding-ring.replication-factor=1
networks:
default:
aliases:
Expand Down
17 changes: 17 additions & 0 deletions docker-compose/microservices-mode/traces/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,22 @@ flowchart LR
end
```

## Quick Start

```shell
git clone https://github.com/qclaogui/codelab-monitoring.git && cd "$(basename "$_" .git)"

make up-microservices-mode-traces
```

That's it.

Once all containers are up and running you can search for traces in Grafana.

Navigate to [http://localhost:3000/explore](http://localhost:3000/explore) and select the search tab.

## Clean up

```shell
make down-microservices-mode-traces
```
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ services:
rules load /tempo-mixin/rules.yaml /tempo-mixin/alerts.yaml
pyroscope:
image: grafana/pyroscope:1.1.5
image: grafana/pyroscope:1.2.0
volumes:
- ../../common/config/pyroscope/monolithic-mode-profiles.yaml:/etc/config.yaml
command:
Expand Down
20 changes: 20 additions & 0 deletions docker-compose/monolithic-mode/logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,23 @@ flowchart LR
CP-N["Loki Components ..."]
end
```

## Quick Start

```shell
git clone https://github.com/qclaogui/codelab-monitoring.git && cd "$(basename "$_" .git)"

make up-monolithic-mode-logs
```

That's it.

Once all containers are up and running you can search for traces in Grafana.

Navigate to [http://localhost:3000/explore](http://localhost:3000/explore) and select the search tab.

## Clean up

```shell
make down-monolithic-mode-logs
```
20 changes: 20 additions & 0 deletions docker-compose/monolithic-mode/metrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,23 @@ flowchart LR
CP-N["Mimir Components ..."]
end
```

## Quick Start

```shell
git clone https://github.com/qclaogui/codelab-monitoring.git && cd "$(basename "$_" .git)"

make up-monolithic-mode-metrics
```

That's it.

Once all containers are up and running you can search for traces in Grafana.

Navigate to [http://localhost:3000/explore](http://localhost:3000/explore) and select the search tab.

## Clean up

```shell
make down-monolithic-mode-metrics
```
20 changes: 20 additions & 0 deletions docker-compose/monolithic-mode/profiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,23 @@ flowchart LR
Q("querier")
end
```

## Quick Start

```shell
git clone https://github.com/qclaogui/codelab-monitoring.git && cd "$(basename "$_" .git)"

make up-monolithic-mode-profiles
```

That's it.

Once all containers are up and running you can search for traces in Grafana.

Navigate to [http://localhost:3000/explore](http://localhost:3000/explore) and select the search tab.

## Clean up

```shell
make down-monolithic-mode-profiles
```
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ include:
# Monolithic mode (Profiles)
services:
pyroscope:
image: grafana/pyroscope:1.1.5
image: grafana/pyroscope:1.2.0
volumes:
- ../../common/config/pyroscope/monolithic-mode-profiles.yaml:/etc/config.yaml
command:
Expand Down
20 changes: 20 additions & 0 deletions docker-compose/monolithic-mode/traces/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,23 @@ flowchart LR
CP-N["`Tempo Components ...`"]
end
```

## Quick Start

```shell
git clone https://github.com/qclaogui/codelab-monitoring.git && cd "$(basename "$_" .git)"

make up-monolithic-mode-traces
```

That's it.

Once all containers are up and running you can search for traces in Grafana.

Navigate to [http://localhost:3000/explore](http://localhost:3000/explore) and select the search tab.

## Clean up

```shell
make down-monolithic-mode-traces
```
Loading

0 comments on commit c0fc32a

Please sign in to comment.