diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 139f0264..8872341a 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -31,8 +31,11 @@ change-title-escapes: '\<*_&#@`' # You can add # and @ to disable mentions, and version-template: '$COMPLETE' no-changes-template: 'This release contains minor changes and bugfixes.' template: | + # Release v$NEXT_MINOR_VERSION + A simple command to run Grafana LGTMP Stack in Docker or Kubernetes. + ## What's Changed $CHANGES @@ -58,21 +61,21 @@ footer: | | Port-mapping | Component | Description | | --- | --- | --- | - | `12345:12345` | [Grafana Agent][7] | Eexpose `12345` port so we can directly access `grafana-agent` inside container | - | `33100:3100` | [Loki][1] | Expose `33100` port so we can directly access `loki` inside container | - | `3000:3000` | [Grafana][2] | Expose `3000` port so we can directly access `grafana` inside container | - | `33200:3200` | [Tempo][3] | Expose `33200` port so we can directly access `tempo` inside container | - | `38080:8080` | [Mimir][4] | Expose `38080` port so we can directly access `mimir` inside container | - | `34040:4040` | [Pyroscope][5] | Expose `34040` port so we can directly access `pyroscope` inside container | - | `9001:9001` | [Minio][6] | Expose `9001` port so we can access `minio` console with `MINIO_ROOT_USER=lgtmp`, `MINIO_ROOT_PASSWORD=supersecret` | + | `12345:12345`, `4317`, `4318`, `6831` | [Grafana Agent][1] | Eexpose `12345` port so we can directly access `grafana-agent` inside container | + | `33100:3100` | [Loki][2] | Expose `33100` port so we can directly access `loki` inside container | + | `3000:3000`, `6060` | [Grafana][3] | Expose `3000` port so we can directly access `grafana` inside container | + | `33200:3200`, `4317`, `4318` | [Tempo][4] | Expose `33200` port so we can directly access `tempo` inside container | + | `38080:8080` | [Mimir][5] | Expose `38080` port so we can directly access `mimir` inside container | + | `34040:4040` | [Pyroscope][6] | Expose `34040` port so we can directly access `pyroscope` inside container | + | `9001:9001`, `9000` | [Minio][7] | Expose `9001` port so we can access `minio` console with `MINIO_ROOT_USER=lgtmp`, `MINIO_ROOT_PASSWORD=supersecret` | - [7]: https://github.com/grafana/agent - [1]: https://github.com/grafana/loki - [2]: https://github.com/grafana/grafana - [3]: https://github.com/grafana/tempo - [4]: https://github.com/grafana/mimir - [5]: https://github.com/grafana/pyroscope - [6]: https://github.com/minio/minio + [1]: https://github.com/grafana/agent + [2]: https://github.com/grafana/loki + [3]: https://github.com/grafana/grafana + [4]: https://github.com/grafana/tempo + [5]: https://github.com/grafana/mimir + [6]: https://github.com/grafana/pyroscope + [7]: https://github.com/minio/minio ## Helpful Links @@ -83,3 +86,4 @@ footer: | - - - + - [Grafana Agent Configuration Generator](https://github.com/grafana/agent-configurator) a tool allows for easy configuration of Grafana Agents Flow system diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 4e106f4c..d3e71409 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -41,7 +41,10 @@ jobs: with: token: ${{ secrets.QCBOT_TOKEN }} title: Add release notes for ${{ steps.draft.outputs.tag_name }} - commit-message: Add release notes for ${{ steps.draft.outputs.tag_name }} + commit-message: | + Add release notes for ${{ steps.draft.outputs.tag_name }} + + Signed-off-by: 🤖GitHub Actions[Bot] <41898282+github-actions[bot]@users.noreply.github.com> committer: 🤖GitHub Actions[Bot] <41898282+github-actions[bot]@users.noreply.github.com> body: | 🤖 Copy release notes from Draft @@ -56,8 +59,8 @@ jobs:
- > Auto-generated by [Release Drafter GitHub Action][1] + > Auto-generated by [Release Drafter GitHub Action][0] - [1]: https://github.com/qclaogui/codelab-monitoring/blob/main/.github/workflows/release-drafter.yml - labels: kind/improvement, skip-release-notes + [0]: https://github.com/qclaogui/codelab-monitoring/blob/main/.github/workflows/release-drafter.yml + labels: kind/docs, skip-release-notes branch: update-release-notes diff --git a/Makefile b/Makefile index d8744319..339ec267 100644 --- a/Makefile +++ b/Makefile @@ -402,8 +402,7 @@ delete-microservices-mode-traces: delete-memcached ##@ Grafana Agent Integrations -.PHONY: deploy-memcached -deploy-memcached: deploy-grafana ## Deploy integration memcached manifests +deploy-memcached: deploy-grafana $(info ******************** deploy integration memcached manifests ********************) @$(KUSTOMIZE) build --enable-helm kubernetes/common/memcached | kubectl apply -f - delete-memcached: delete-minio diff --git a/README.md b/README.md index 550b32a9..588bcd69 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,15 @@ # Provisioning Scalable Observability Workspace -

- - - - - License - - - GitHub Last Commit - -

+![CI](https://github.com/qclaogui/codelab-monitoring/actions/workflows/ci.yml/badge.svg) +![Go version](https://img.shields.io/github/go-mod/go-version/qclaogui/codelab-monitoring) +![License](https://img.shields.io/github/license/qclaogui/codelab-monitoring.svg) +![GitHub Last Commit](https://img.shields.io/github/last-commit/qclaogui/codelab-monitoring) + +A simple command to run Grafana LGTMP Stack in Docker or Kubernetes. ## Quick Start -Open a new terminal window to create `compose.yaml`, an simple use case `compose.yaml` like so: +Open a new terminal to create `compose.yaml`, an simple use case `compose.yaml` like so: ```yaml # include is available in Docker Compose version 2.20 and later, and Docker Desktop version 4.22 and later. @@ -25,8 +20,7 @@ services: github-exporter: # https://github.com/qclaogui/codelab-monitoring/blob/main/docker-compose/common/config/agent-flow/modules/docker/README.md labels: - # want metrics just set false to true - metrics.agent.grafana.com/scrape: false + metrics.agent.grafana.com/scrape: false # want metrics just set false to true image: githubexporter/github-exporter:1.1.0 environment: - REPOS=qclaogui/codelab-monitoring @@ -50,7 +44,6 @@ For more examples, See: [examples/](./examples/) ```shell ❯ make help - Usage: make @@ -93,7 +86,6 @@ Kubernetes deploy-microservices-mode-traces Deploy microservices-mode Tempo for traces Grafana Agent Integrations - deploy-memcached Deploy integration memcached manifests deploy-mysql Deploy integration mysql manifests deploy-redis Deploy integration redis manifests @@ -116,11 +108,11 @@ General ## Docker Compose -These instructions will get you through the deploying samples with Docker Compose. +The easiest way to run project locally is to use docker compose, these instructions will get you through the deploying samples with Docker Compose. ***Prerequisites:*** Make sure that you have Docker and Docker Compose installed -> NOTE: +> [!NOTE] > `include` is available in Docker Compose version 2.20 and later, and Docker Desktop version 4.22 and later. ### [Monolithic mode (单体模式)](./docker-compose/monolithic-mode) @@ -153,8 +145,6 @@ git clone https://github.com/qclaogui/codelab-monitoring.git && cd "$(basename " make up-monolithic-mode-all-in-one ``` -That's it. - Once all containers are up and running you can search for metrics in Grafana. Navigate to [http://localhost:3000/explore](http://localhost:3000/explore) and select the search tab. @@ -251,3 +241,34 @@ Flags: Use "lgtmp [command] --help" for more information about a command. ``` + +## Grafana LGTMP Stack default port-mapping + +| Port-mapping | Component | Description | +| --- | --- | --- | +| `12345:12345`, `4317`, `4318`, `6831` | [Grafana Agent][1] | Eexpose `12345` port so we can directly access `grafana-agent` inside container | +| `33100:3100` | [Loki][2] | Expose `33100` port so we can directly access `loki` inside container | +| `3000:3000`, `6060` | [Grafana][3] | Expose `3000` port so we can directly access `grafana` inside container | +| `33200:3200`, `4317`, `4318` | [Tempo][4] | Expose `33200` port so we can directly access `tempo` inside container | +| `38080:8080` | [Mimir][5] | Expose `38080` port so we can directly access `mimir` inside container | +| `34040:4040` | [Pyroscope][6] | Expose `34040` port so we can directly access `pyroscope` inside container | +| `9001:9001`, `9000` | [Minio][7] | Expose `9001` port so we can access `minio` console with `MINIO_ROOT_USER=lgtmp`, `MINIO_ROOT_PASSWORD=supersecret` | + +[1]: https://github.com/grafana/agent +[2]: https://github.com/grafana/loki +[3]: https://github.com/grafana/grafana +[4]: https://github.com/grafana/tempo +[5]: https://github.com/grafana/mimir +[6]: https://github.com/grafana/pyroscope +[7]: https://github.com/minio/minio + +## Helpful Links + +- +- +- +- +- +- +- +- [Grafana Agent Configuration Generator](https://github.com/grafana/agent-configurator) a tool allows for easy configuration of Grafana Agents Flow system diff --git a/fs.go b/fs.go index 344c8bf0..ab66c0a1 100644 --- a/fs.go +++ b/fs.go @@ -18,7 +18,7 @@ import ( //go:embed .lgtmp.tar var DirFS embed.FS -//go:generate tar cf .lgtmp.tar .bingo docker-compose kubernetes monitoring-mixins tools Makefile compose.yaml +//go:generate tar cf .lgtmp.tar .bingo docker-compose kubernetes monitoring-mixins tools Makefile var GenDir = ".lgtmp" func init() { diff --git a/kubernetes/k3d-k3s-config.yaml b/kubernetes/k3d-k3s-config.yaml index c6273c27..ee25ceee 100644 --- a/kubernetes/k3d-k3s-config.yaml +++ b/kubernetes/k3d-k3s-config.yaml @@ -7,7 +7,7 @@ agents: 2 kubeAPI: hostIP: "127.0.0.1" hostPort: "6550" -image: rancher/k3s:v1.29.2-k3s1 +image: rancher/k3s:v1.29.3-k3s1 ports: # mapping the ingress port 80 to localhost:8080 - port: 8080:80