Skip to content

Commit 9475bf4

Browse files
authored
Merge pull request #278 from ooni/ooni-data
Add docs for ooni-data
2 parents cb9336e + 713b027 commit 9475bf4

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

ansible/roles/oonidata_airflow/tasks/main.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
- name: Install required apt packages
2+
ansible.builtin.apt:
3+
name:
4+
- build-essential
5+
- python-dev
6+
- g++
7+
state: latest
8+
update_cache: yes
9+
install_recommends: no
10+
11+
112
- name: Ensure Airflow group
213
ansible.builtin.group:
314
name: "airflow"

docs/Runbooks.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,37 @@
22

33
Below you will find runbooks for common tasks and operations to manage our infra.
44

5+
## OONI Data Pipeline
6+
7+
### Deploying updates
8+
9+
There are two main ways to update the OONI Data pipeline codebase.
10+
11+
1. Faster iterative approach
12+
2. More stable ansible based
13+
14+
#### Faster iterative appraoch
15+
16+
This is mostly useful for while you are developing and need a quick turnaround.
17+
18+
1. Login to `clickhouse1.prod.ooni.io`
19+
2. Update the codebase via git using `cd /opt/airflow/oonidata/oonipipeline && sudo -u airflow git pull`
20+
3. Upgrade the pip oonipipeline installation using `sudo -u miniconda /opt/miniconda/bin/pip install --upgrade /opt/airflow/oonidata/oonipipeline/`
21+
4. You can check the version by running `sudo -u airflow CONFIG_FILE=/etc/ooni/pipeline/oonipipeline-config.toml /opt/miniconda/bin/python -m oonipipeline.main --version`
22+
23+
#### Ansible based
24+
25+
TODO
26+
27+
#### Deploying updates
28+
29+
Backfilling event detector tables
30+
31+
You can run a backfill task using the `event-detector` command, like so:
32+
```
33+
sudo -u airflow CONFIG_FILE=/etc/ooni/pipeline/oonipipeline-config.toml /opt/miniconda/bin/python -m oonipipeline.main event-detector --start-at 2024-01-01 --end-at 2025-01-01
34+
```
35+
536
## Monitoring deployment runbook
637

738
The monitoring stack is deployed and configured by

0 commit comments

Comments
 (0)