Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Embeded] Add an email testing server #82

Merged
merged 1 commit into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ footer: |
| `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` |
| `39000:9000`, `2500`, `1100` | [Inbucket][8] | Expose `39000` port to use for the email testing server web interface. |

[1]: https://github.com/grafana/agent
[2]: https://github.com/grafana/loki
Expand All @@ -83,6 +84,7 @@ footer: |
[5]: https://github.com/grafana/mimir
[6]: https://github.com/grafana/pyroscope
[7]: https://github.com/minio/minio
[8]: https://github.com/inbucket/inbucket

## Helpful Links

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ Use "lgtmp [command] --help" for more information about a command.
| `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` |
| `39000:9000`, `2500`, `1100` | [Inbucket][8] | Expose `39000` port to use for the email testing server web interface. |

[1]: https://github.com/grafana/agent
[2]: https://github.com/grafana/loki
Expand All @@ -259,6 +260,7 @@ Use "lgtmp [command] --help" for more information about a command.
[5]: https://github.com/grafana/mimir
[6]: https://github.com/grafana/pyroscope
[7]: https://github.com/minio/minio
[8]: https://github.com/inbucket/inbucket

## Helpful Links

Expand Down
9 changes: 6 additions & 3 deletions docker-compose/common/compose-include/grafana.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

# Note:
# include is available in Docker Compose version 2.20 and later, and Docker Desktop version 4.22 and later.
include:
- path: ./inbucket.yaml

services:
grafana:
labels:
Expand All @@ -18,8 +23,6 @@ services:
- ../../../monitoring-mixins/memcached-mixin/deploy/dashboards_out:/var/lib/grafana/dashboards/memcached-mixin
# - ../../../monitoring-mixins/tempo-mixin/deploy/dashboards_out:/var/lib/grafana/dashboards/tempo-mixin
environment:
- GF_LOG_LEVEL=warn
- GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD:-admin_password}
- GF_FEATURE_TOGGLES_ENABLE=traceqlEditor tracesEmbeddedFlameGraph traceqlSearch correlations metricsSummary traceToMetrics traceToProfiles
GF_FEATURE_TOGGLES_ENABLE: traceqlEditor tracesEmbeddedFlameGraph traceqlSearch correlations metricsSummary traceToMetrics traceToProfiles
ports:
- "3000:3000"
17 changes: 17 additions & 0 deletions docker-compose/common/compose-include/inbucket.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

# Inbucket is an email testing service; it will accept email for any email
# address and make it available to view without a password
#
# https://inbucket.org/packages/docker.html
services:
inbucket:
labels:
metrics.agent.grafana.com/scrape: false
image: inbucket/inbucket:latest
ports:
- 2500 # SMTP
- "39000:9000" # HTTP
- 1100 # POP3
environment:
# https://github.com/inbucket/inbucket/blob/main/doc/config.md
INBUCKET_STORAGE_TYPE: ${INBUCKET_STORAGE_TYPE:-memory}
4 changes: 4 additions & 0 deletions docker-compose/common/config/grafana/grafana.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ disable_total_stats = false
[dashboards]
;default_home_dashboard_path = /usr/share/grafana/public/dashboards/home.json
default_home_dashboard_path = /var/lib/grafana/dashboards/minio-dashboard.json

[smtp]
enabled = true
host = inbucket:2500
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ contactPoints:
type: email
disableResolveMessage: false
settings:
addresses: qclaogui@gmail.com
singleEmail: false
message: my optional message to include
addresses: me@example.com;you@example.com
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ policies:
routes:
- receiver: cp_wangweifeng
object_matchers:
- ['namespace', '=', 'monitoring']
- ['namespace', '=', 'monitoring-system']

13 changes: 7 additions & 6 deletions docker-compose/monolithic-mode/all-in-one/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ include:
- path: ../../common/compose-include/minio.yaml
- path: ../../common/compose-include/memcached.yaml
- path: ../../common/compose-include/load-rules-to-mimir.yaml
- path: ../../common/compose-include/inbucket.yaml

# https://github.com/qclaogui/codelab-monitoring/blob/main/docker-compose/common/config/agent-flow/modules/docker/README.md
x-labels: &profiles-labels
Expand Down Expand Up @@ -216,12 +217,12 @@ services:
- ../../../monitoring-mixins/memcached-mixin/deploy/dashboards_out:/var/lib/grafana/dashboards/memcached-mixin
# - ../../../monitoring-mixins/tempo-mixin/deploy/dashboards_out:/var/lib/grafana/dashboards/tempo-mixin
environment:
- GF_LOG_LEVEL=warn
- GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD:-admin_password}
- GF_FEATURE_TOGGLES_ENABLE=traceqlEditor tracesEmbeddedFlameGraph traceqlSearch correlations metricsSummary traceToMetrics traceToProfiles
- GF_DIAGNOSTICS_PROFILING_ENABLED=true
- GF_DIAGNOSTICS_PROFILING_ADDR=0.0.0.0
- GF_DIAGNOSTICS_PROFILING_PORT=6060
GF_LOG_LEVEL: ${GF_LOG_LEVEL:-warn}
GF_SECURITY_ADMIN_PASSWORD: ${GF_SECURITY_ADMIN_PASSWORD:-admin}
GF_FEATURE_TOGGLES_ENABLE: traceqlEditor tracesEmbeddedFlameGraph traceqlSearch correlations metricsSummary traceToMetrics traceToProfiles
GF_DIAGNOSTICS_PROFILING_ENABLED: true
GF_DIAGNOSTICS_PROFILING_ADDR: 0.0.0.0
GF_DIAGNOSTICS_PROFILING_PORT: 6060
ports:
- "3000:3000"