Skip to content

Commit

Permalink
Update release-drafter.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Weifeng Wang <[email protected]>

add pr label check

Signed-off-by: Weifeng Wang <[email protected]>

Update README.md
  • Loading branch information
qclaogui committed Mar 27, 2024
1 parent 753cf91 commit 9a6c61c
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 51 deletions.
40 changes: 25 additions & 15 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,46 @@ name-template: 'v$NEXT_MINOR_VERSION'
tag-template: 'v$NEXT_MINOR_VERSION'
categories:
- title: '💥 Breaking Changes'
collapse-after: 15
label: 'kind/breaking'
- title: '🚀 Features'
collapse-after: 15
labels:
- 'kind/feature'
- title: '🎯 Improvements'
collapse-after: 15
labels:
- 'kind/improvement'
- title: '🐛 Bug Fixes'
collapse-after: 15
labels:
- 'kind/bug'
- title: '🧰 Maintenance'
collapse-after: 15
labels:
- 'area/tech-debt'
- 'area/ci'
- 'kind/maintenance'
- title: '📝 Documentation'
collapse-after: 10
labels:
- 'area/docs'
- 'kind/docs'
- title: '⬆️ Dependencies'
collapse-after: 10
labels:
- 'dependencies'
collapse-after: 5

change-template: '- $TITLE (#$NUMBER)'
change-title-escapes: '\<*_&#@`' # You can add # and @ to disable mentions, and add ` to disable code blocks.
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
Expand All @@ -58,21 +67,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
Expand All @@ -83,3 +92,4 @@ footer: |
- <https://github.com/k3d-io/k3d>
- <https://github.com/k3s-io/k3s>
- <https://github.com/grafana/grafana>
- [Grafana Agent Configuration Generator](https://github.com/grafana/agent-configurator) a tool allows for easy configuration of Grafana Agents Flow system
19 changes: 19 additions & 0 deletions .github/workflows/pr-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check PR labels

on:
pull_request:
types: [labeled, unlabeled, opened, edited, synchronize]

jobs:
enforce-kind:
name: Enforce a valid PR category
runs-on: ubuntu-latest
steps:
- name: Check if a valid PR category is present
env:
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
run: |
if ! jq --exit-status 'any(test("kind/feature") or test("kind/docs") or test("kind/improvement") or test("kind/bug") or test("kind/maintenance") or test("dependencies") or test("skip-release-notes") or test("area/tech-debt"))' >/dev/null <<< $LABELS; then
echo "::error ::Please set either kind/feature, kind/docs, kind/improvement, kind/bug, kind/maintenance, dependencies, skip-release-notes or area/tech-debt as label"
exit 1
fi
14 changes: 7 additions & 7 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ on:
branches:
- main

permissions:
contents: read

jobs:
update_release_draft:
name: Trigger a draft release update
Expand Down Expand Up @@ -41,7 +38,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
Expand All @@ -56,8 +56,8 @@ jobs:
</details>
<br />
> 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
File renamed without changes.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
69 changes: 44 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,24 @@
# Provisioning Scalable Observability Workspace

<p align="center">
<a href="https://github.com/qclaogui/codelab-monitoring/actions/workflows/ci.yml">
<img src="https://github.com/qclaogui/codelab-monitoring/actions/workflows/ci.yml/badge.svg">
</a>
<a href="https://github.com/qclaogui/codelab-monitoring/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/qclaogui/codelab-monitoring.svg" alt="License">
</a>
<a href="https://github.com/qclaogui/codelab-monitoring/tags">
<img src="https://img.shields.io/github/last-commit/qclaogui/codelab-monitoring" alt="GitHub Last Commit">
</a>
</p>
![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.
include:
- path: https://github.com/qclaogui/codelab-monitoring.git#main:docker-compose/monolithic-mode/logs/compose.yaml # Just Metrics and Logs
include: # include is available in Docker Compose version 2.20 and later, and Docker Desktop version 4.22 and later.
- path: https://github.com/qclaogui/codelab-monitoring.git#main:docker-compose/monolithic-mode/logs/compose.yaml

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
labels: # https://github.com/qclaogui/codelab-monitoring/blob/main/docker-compose/common/config/agent-flow/modules/docker/README.md
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
Expand All @@ -50,7 +42,6 @@ For more examples, See: [examples/](./examples/)

```shell
❯ make help

Usage:
make <target>

Expand Down Expand Up @@ -93,7 +84,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

Expand All @@ -116,11 +106,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)
Expand Down Expand Up @@ -153,8 +143,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.
Expand Down Expand Up @@ -251,3 +239,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
- <https://grafana.com/docs/>
- <https://github.com/grafana/agent-modules>
- <https://github.com/docker/compose>
- <https://grafana.com/docs/agent/latest/flow/reference/components/>
- <https://github.com/k3d-io/k3d>
- <https://github.com/k3s-io/k3s>
- <https://github.com/grafana/grafana>
- [Grafana Agent Configuration Generator](https://github.com/grafana/agent-configurator) a tool allows for easy configuration of Grafana Agents Flow system
2 changes: 1 addition & 1 deletion fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion kubernetes/k3d-k3s-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9a6c61c

Please sign in to comment.