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

Consolidate dev and prod deployments and switch th back to DO #96

Merged
merged 66 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
f4d84a5
Add support for creating digital ocean droplets for test helpers
hellais Sep 5, 2024
739e666
refactor: add clickhouse proxy config to oonibackend proxy
DecFox Sep 9, 2024
f45e8ba
Merge branch 'main' into digital-ocean-th
DecFox Sep 9, 2024
3998063
Add findings deployment to prod
hellais Sep 13, 2024
85b3e27
Set first_run on oonifindings service
hellais Sep 13, 2024
7d72a40
Implement ooniapi_acm_certificate module
hellais Sep 13, 2024
b1dbe8e
Make naming of variables consistent with other modules
hellais Sep 13, 2024
fdaa585
Drop SAN list from dev env
hellais Sep 13, 2024
264350e
Add api.ooni.org alternate name to prod environment
hellais Sep 13, 2024
d4f32d3
Merge branch 'findings-prod' into digital-ocean-th
DecFox Sep 16, 2024
ae47654
feat: add ssh-keys and ipv6 support
DecFox Sep 16, 2024
a1cf80a
Add unattended upgrade to digitalocean
hellais Sep 17, 2024
3f7dbf7
add auto-update to th host
DecFox Sep 17, 2024
a27010c
fix: restore ooni_backendproxy
DecFox Sep 17, 2024
e47bc84
Improve name of do droplet for th
hellais Sep 17, 2024
f08c93f
Temporarily disable unattended upgrades
hellais Sep 17, 2024
348a8a9
Fix cloud-init setup of ooni_backendproxy
hellais Sep 17, 2024
680185e
Fix typo in domain front suffix
hellais Sep 17, 2024
835f8fe
Setup alternate domains for test helpers
hellais Sep 17, 2024
ac0001c
Add support for passing th domains into rules
hellais Sep 17, 2024
1f4bd54
Drop the OONI test helper cluster from dev
hellais Sep 17, 2024
b5977c2
Tweak the task sizes and instance sizes of dev
hellais Sep 17, 2024
e02c1cd
Drop direct target group
hellais Sep 17, 2024
e6bee74
Tweak auto-scaling groups
hellais Sep 17, 2024
336cc95
Drop test oohelperd from config
hellais Sep 17, 2024
7b7f336
Add support for accessing services directly via hostname
hellais Sep 17, 2024
b82221b
Setup per-domain based routing for targets
hellais Sep 17, 2024
b921a2b
Re-add dev monitoring targets
hellais Sep 18, 2024
65009cc
Fix endpoints
hellais Sep 18, 2024
eef5e34
add th droplets to prod
DecFox Sep 24, 2024
93ee8dd
Bump instance size of backendproxy
hellais Sep 24, 2024
9d7b8ee
Fix cert validation when FQDN is inside of other zone
hellais Sep 24, 2024
e311d9b
fix: prevent postgresql downgrade
DecFox Sep 24, 2024
f31787f
Fix targets for monitoring of ooniapi services
hellais Sep 24, 2024
5af2063
Merge branch 'digital-ocean-th' of github.com:ooni/devops into digita…
hellais Sep 24, 2024
327fd0e
Add .org targets to blackbox_exporter jobs
hellais Sep 24, 2024
ead1b48
Add support for docker based droplet deployment
hellais Sep 24, 2024
29d2b8b
Add prometheus metrics to docker th
hellais Sep 24, 2024
8888b58
Fix calls
hellais Sep 24, 2024
c219068
Refactoring of how secrets are passed through it
hellais Sep 24, 2024
5ab06e4
Restart sshd in cloud-init
hellais Sep 24, 2024
a80cd99
Fix permissions
hellais Sep 24, 2024
d7cab82
Drop deprecated option
hellais Sep 24, 2024
2f74d5d
Fix docker start command
hellais Sep 24, 2024
9f8e638
Setup DNS records for test helpers on digital ocean
hellais Sep 24, 2024
dbe19d0
Add 0.do.th.prod.ooni.io to monitoring
hellais Sep 25, 2024
6fe205a
Fix scheme of test helpers
hellais Sep 25, 2024
e39466f
Add 1.do.th to monitoring
hellais Sep 25, 2024
5cd2360
Add IPv6 support to docker
hellais Sep 25, 2024
3e64b3a
Adjust ttl of do DNS
hellais Sep 25, 2024
c43edb8
Fix indent of cloud-init
hellais Sep 25, 2024
811fed9
Align dev environment to prod
hellais Sep 25, 2024
dcadff4
Drop non-docker droplet setup from ooni_th_droplet
hellais Sep 25, 2024
85a636b
Add 5-6 to monitoring health
hellais Sep 25, 2024
3ffb782
Adjust task default sizes
hellais Sep 26, 2024
4fd1b32
Increase droplet count for th
hellais Sep 26, 2024
a972ded
Add 2.do to monitoring
hellais Sep 26, 2024
e694d82
Drop th config
hellais Oct 1, 2024
df6a4ef
Add th records to front
hellais Oct 1, 2024
9d580d7
Add comment on what's done in prod
hellais Oct 1, 2024
bc4545f
Move ooniapi_acm_certificate module into top level tf files
hellais Oct 1, 2024
63968c0
Drop oonith_cluster
hellais Oct 1, 2024
461d1a1
Fix configuring certs directly via terraform
hellais Oct 1, 2024
e55f4c7
Switch to nat gateway free network on both prod and dev
hellais Oct 1, 2024
5a75ac1
Reduce the size of the ec2 cluster
hellais Oct 1, 2024
67cf34e
Tweak asg for ecs cluster
hellais Oct 1, 2024
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
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
Loading