-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move docker files around for consistency
- Loading branch information
1 parent
9a42562
commit 72b3ed9
Showing
17 changed files
with
146 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This is for top-level docker compositions which run the entire NUTC stack | ||
# Anything in dev should work for local development and uses emulators | ||
# Note: local-dev/grafana-only will just run grafana, allowing you to run the exchange locally (quicker dev cycles) | ||
# TODO: create sandbox-prod |
3 changes: 3 additions & 0 deletions
3
exchange/docker/dev/docker-compose.yml → ...local-dev/grafana-only/docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
docker/production/competition/grafana-only/docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Used if you're running the exchange outside of docker (for quick dev cycles), | ||
# but still want to use grafana/prometheus | ||
|
||
services: | ||
# Exposed on port 9000 | ||
prometheus: | ||
image: prom/prometheus | ||
ports: | ||
- "9090:9090" | ||
|
||
# allow prometheus to access exchange on the host | ||
extra_hosts: | ||
- "host.docker.internal:host-gateway" | ||
volumes: | ||
- ./prometheus.yml:/etc/prometheus/prometheus.yml | ||
command: | ||
- '--config.file=/etc/prometheus/prometheus.yml' | ||
- '--storage.tsdb.retention.time=12h' | ||
networks: | ||
- net | ||
|
||
grafana: | ||
image: grafana/grafana | ||
|
||
# Ensure you have the following set in your .bashrc/.zshrc | ||
#export UID=$(id -u) | ||
#export GID=$(id -g) | ||
user: "${UID}:${GID}" | ||
|
||
ports: | ||
- "3000:3000" | ||
environment: | ||
- GF_SECURITY_ALLOW_EMBEDDING=true | ||
- GF_AUTH_ANONYMOUS_ENABLED=true | ||
- GF_AUTH_ANONYMOUS_ORG_NAME=MAIN | ||
- GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer | ||
volumes: | ||
- ./grafana_data:/var/lib/grafana | ||
networks: | ||
- net | ||
|
||
networks: | ||
net: | ||
ipam: | ||
config: | ||
- subnet: 172.20.0.0/16 |
53 changes: 53 additions & 0 deletions
53
docker/production/competition/grafana-only/grafana_data/alerting/1/__default__.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
{{ define "__subject" }}[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ if gt (.Alerts.Resolved | len) 0 }}, RESOLVED:{{ .Alerts.Resolved | len }}{{ end }}{{ end }}] {{ .GroupLabels.SortedPairs.Values | join " " }} {{ if gt (len .CommonLabels) (len .GroupLabels) }}({{ with .CommonLabels.Remove .GroupLabels.Names }}{{ .Values | join " " }}{{ end }}){{ end }}{{ end }} | ||
|
||
{{ define "__text_values_list" }}{{ if len .Values }}{{ $first := true }}{{ range $refID, $value := .Values -}} | ||
{{ if $first }}{{ $first = false }}{{ else }}, {{ end }}{{ $refID }}={{ $value }}{{ end -}} | ||
{{ else }}[no value]{{ end }}{{ end }} | ||
|
||
{{ define "__text_alert_list" }}{{ range . }} | ||
Value: {{ template "__text_values_list" . }} | ||
Labels: | ||
{{ range .Labels.SortedPairs }} - {{ .Name }} = {{ .Value }} | ||
{{ end }}Annotations: | ||
{{ range .Annotations.SortedPairs }} - {{ .Name }} = {{ .Value }} | ||
{{ end }}{{ if gt (len .GeneratorURL) 0 }}Source: {{ .GeneratorURL }} | ||
{{ end }}{{ if gt (len .SilenceURL) 0 }}Silence: {{ .SilenceURL }} | ||
{{ end }}{{ if gt (len .DashboardURL) 0 }}Dashboard: {{ .DashboardURL }} | ||
{{ end }}{{ if gt (len .PanelURL) 0 }}Panel: {{ .PanelURL }} | ||
{{ end }}{{ end }}{{ end }} | ||
|
||
{{ define "default.title" }}{{ template "__subject" . }}{{ end }} | ||
|
||
{{ define "default.message" }}{{ if gt (len .Alerts.Firing) 0 }}**Firing** | ||
{{ template "__text_alert_list" .Alerts.Firing }}{{ if gt (len .Alerts.Resolved) 0 }} | ||
|
||
{{ end }}{{ end }}{{ if gt (len .Alerts.Resolved) 0 }}**Resolved** | ||
{{ template "__text_alert_list" .Alerts.Resolved }}{{ end }}{{ end }} | ||
|
||
|
||
{{ define "__teams_text_alert_list" }}{{ range . }} | ||
Value: {{ template "__text_values_list" . }} | ||
Labels: | ||
{{ range .Labels.SortedPairs }} - {{ .Name }} = {{ .Value }} | ||
{{ end }} | ||
Annotations: | ||
{{ range .Annotations.SortedPairs }} - {{ .Name }} = {{ .Value }} | ||
{{ end }} | ||
{{ if gt (len .GeneratorURL) 0 }}Source: [{{ .GeneratorURL }}]({{ .GeneratorURL }}) | ||
|
||
{{ end }}{{ if gt (len .SilenceURL) 0 }}Silence: [{{ .SilenceURL }}]({{ .SilenceURL }}) | ||
|
||
{{ end }}{{ if gt (len .DashboardURL) 0 }}Dashboard: [{{ .DashboardURL }}]({{ .DashboardURL }}) | ||
|
||
{{ end }}{{ if gt (len .PanelURL) 0 }}Panel: [{{ .PanelURL }}]({{ .PanelURL }}) | ||
|
||
{{ end }} | ||
{{ end }}{{ end }} | ||
|
||
|
||
{{ define "teams.default.message" }}{{ if gt (len .Alerts.Firing) 0 }}**Firing** | ||
{{ template "__teams_text_alert_list" .Alerts.Firing }}{{ if gt (len .Alerts.Resolved) 0 }} | ||
|
||
{{ end }}{{ end }}{{ if gt (len .Alerts.Resolved) 0 }}**Resolved** | ||
{{ template "__teams_text_alert_list" .Alerts.Resolved }}{{ end }}{{ end }} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
global: | ||
scrape_interval: 2s | ||
|
||
scrape_configs: | ||
- job_name: 'exchange-sandbox' | ||
static_configs: | ||
- targets: ['host.docker.internal:4152'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
global: | ||
scrape_interval: 2s | ||
|
||
scrape_configs: | ||
- job_name: 'exchange-sandbox' | ||
static_configs: | ||
- targets: ['nutc-exchange1:4152', 'nutc-exchange2:4152'] |