Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ooni/devops
Browse files Browse the repository at this point in the history
* 'main' of github.com:ooni/devops:
  Consolidate dev and prod deployments and switch th back to DO (#96)
  • Loading branch information
hellais committed Oct 1, 2024
2 parents 5ebee1c + 4876b9e commit a538398
Show file tree
Hide file tree
Showing 30 changed files with 977 additions and 536 deletions.
26 changes: 21 additions & 5 deletions ansible/roles/prometheus/templates/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ scrape_configs:
password: '{{ prometheus_metrics_password_dev }}'
static_configs:
- targets:
- oohelperd.th.dev.ooni.io
- ooniauth.dev.ooni.io
- oonirun.dev.ooni.io
- ooniprobe.dev.ooni.io

- job_name: 'ooniapi-services-prod'
scrape_interval: 5s
Expand All @@ -110,11 +112,25 @@ scrape_configs:
password: '{{ prometheus_metrics_password_prod }}'
static_configs:
- targets:
- ooniauth.api.prod.ooni.io
- oonirun.api.prod.ooni.io
- ooniprobe.api.prod.ooni.io
- oohelperd.th.prod.ooni.io
- ooniauth.prod.ooni.io
- oonirun.prod.ooni.io
- ooniprobe.prod.ooni.io

- job_name: 'oonith-prod'
scrape_interval: 5s
scheme: http
metrics_path: "/metrics"
basic_auth:
username: 'prom'
password: '{{ prometheus_metrics_password_prod }}'
static_configs:
- targets:
- 0.do.th.prod.ooni.io:9001
- 0.do.th.prod.ooni.io
- 1.do.th.prod.ooni.io:9001
- 1.do.th.prod.ooni.io
- 2.do.th.prod.ooni.io
- 2.do.th.prod.ooni.io:9001

- job_name: 'ooni-web'
scrape_interval: 5m
Expand Down
25 changes: 25 additions & 0 deletions ansible/roles/prometheus/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ blackbox_jobs:
- "https://2.th.ooni.org/"
- "https://3.th.ooni.org/"
- "https://4.th.ooni.org/"
- "https://5.th.ooni.org/"
- "https://6.th.ooni.org/"

- name: "ooni collector"
module: "ooni_collector_ok"
Expand Down Expand Up @@ -73,21 +75,44 @@ blackbox_jobs:
module: "http_2xx"
targets:
- "https://api.ooni.io/api/v1/measurements"
- "https://api.ooni.org/api/v1/measurements"

- name: "ooni API test-list urls"
module: "https_2xx_json_meta"
targets:
- "https://api.ooni.io/api/v1/test-list/urls?country_code=US"
- "https://api.ooni.org/api/v1/test-list/urls?country_code=US"

- name: "ooni API test-helpers"
module: "https_2xx_json"
targets:
- "https://api.ooni.io/api/v1/test-helpers"
- "https://api.ooni.org/api/v1/test-helpers"

- name: "ooni API priv global overview"
module: "https_2xx_json"
targets:
- "https://api.ooni.io/api/_/global_overview"
- "https://api.ooni.org/api/_/global_overview"

# Note: this always returns true by design
- name: "OONI API check_report_id"
module: "https_2xx_json"
targets:
- "https://api.ooni.io/api/_/check_report_id?report_id=RANDOM"
- "https://api.ooni.org/api/_/check_report_id?report_id=RANDOM"

- name: "OONI API raw_measurement"
module: "https_2xx_json"
targets:
- "https://api.ooni.io/api/v1/raw_measurement?measurement_uid=20240924151005.116855_IT_httpinvalidrequestline_f63463817af9eebe"
- "https://api.ooni.org/api/v1/raw_measurement?measurement_uid=20240924151005.116855_IT_httpinvalidrequestline_f63463817af9eebe"

- name: "OONI Run v2 API"
module: "https_2xx_json"
targets:
- "https://api.ooni.org/api/v2/oonirun/links/10009"
- "https://api.ooni.org/api/v2/oonirun/links/10009/revisions"

# end of API #

Expand Down
43 changes: 43 additions & 0 deletions tf/environments/dev/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a538398

Please sign in to comment.