-
Notifications
You must be signed in to change notification settings - Fork 3
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
refactor: make backend-hel functional as the test server #119
Open
DecFox
wants to merge
21
commits into
main
Choose a base branch
from
refactor/backend-deployer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 16 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
137ede2
cleanup: unrequired backend configs
DecFox 7801981
feat: add db configuration for backend-hel
DecFox 8f55d5d
refactor: remove hostname based if blocks
DecFox e86bb9c
set host vars from ansible vault
DecFox 7ea5778
refactor: consolidate all conditionals to generic
DecFox 118a3ab
refactor: configure ec2 machines from ansible
DecFox a6d6843
feat: init common module for ec2 machines
DecFox 863ae72
refactor: move backendproxy to generic ec2 module
DecFox adf63e5
fix: cidr blocks arrays for ec2 module
DecFox 3b7deeb
fix: eof errors
DecFox d2925ce
fix: more eof errors
DecFox b7ebb36
revert comments
DecFox cfb1049
remove db configs from host_vars
DecFox 6c541be
refactor: changes to allow terraform to apply cleanly
DecFox 01302a4
refactor: changes to allow terraform to apply cleanly
DecFox fe40deb
refactor: apply clickhouse proxy ansible configs
DecFox e4048a2
fix eof
DecFox 093ce47
fix: eof errors
DecFox ddb8a74
refactor: make backend ansible role functional
DecFox 0a3e400
Merge branch 'main' into refactor/backend-deployer
DecFox f51feb3
fix: add password file
DecFox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,13 @@ | ||
--- | ||
- name: Deploy clickhouse proxy | ||
hosts: | ||
- clickhouseproxy.dev.ooni.io | ||
become: true | ||
roles: | ||
- role: bootstrap | ||
- role: nginx | ||
tags: nginx | ||
- role: clickhouse_proxy | ||
vars: | ||
clickhouse_url: "clickhouse3.prod.ooni.io" | ||
clickhouse_port: 9000 |
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
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
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
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
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,10 @@ | ||
s3_ooni_open_data_access_key: "{{ vault_s3_ooni_open_data_access_key }}" | ||
amspg_ooni_org_onion_key: "{{ vault_amspg_ooni_org_onion_key }}" | ||
jwt_encryption_key: "{{ vault_jwt_encryption_key }}" | ||
account_id_hashing_key: "{{ vault_account_id_hashing_key }}" | ||
github_token: "{{ vault_github_token }}" | ||
mail_smtp_password: "{{ vault_mail_smtp_password }}" | ||
base_url: "https://backend-fsn.ooni.org" | ||
tor_targets: "{{ vault_tor_targets }}" | ||
psiphon_config: "{{ vault_orchestra_psiphon_config_file_content }}" | ||
digital_ocean_token: "{{ vault_digital_ocean_token }}" |
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,8 @@ | ||
s3_ooni_open_data_access_key: "{{ vault_s3_ooni_open_data_access_key }}" | ||
jwt_encryption_key: "{{ vault_jwt_encryption_key }}" | ||
account_id_hashing_key: "{{ vault_account_id_hashing_key }}" | ||
github_token: "{{ vault_github_token }}" | ||
mail_smtp_password: "{{ vault_mail_smtp_password }}" | ||
base_url: "https://backend-hel.ooni.org" | ||
tor_targets: "{{ vault_tor_targets }}" | ||
psiphon_config: "{{ vault_orchestra_psiphon_config_file_content }}" |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
non_admin_usernames: [ ] | ||
non_admin_usernames: [] | ||
clickhouse_base_path: /data/clickhouse | ||
|
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 |
---|---|---|
|
@@ -22,3 +22,6 @@ data3.htz-fsn.prod.ooni.nu | |
|
||
[ghs-ams] | ||
openvpn-server1.ooni.io | ||
|
||
[aws-proxy] | ||
clickhouseproxy.dev.ooni.io |
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
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,15 @@ | ||
- name: test nginx config | ||
command: /usr/sbin/nginx -t -c /etc/nginx/nginx.conf | ||
listen: | ||
- restart nginx | ||
- reload nginx | ||
|
||
- name: restart nginx | ||
service: | ||
name: nginx | ||
state: restarted | ||
|
||
- name: reload nginx | ||
service: | ||
name: nginx | ||
state: reloaded |
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,20 @@ | ||
--- | ||
- name: Create the modules-enabled directory if not exists | ||
tags: webserv | ||
ansible.builtin.file: | ||
path: /etc/nginx/modules-enabled | ||
state: directory | ||
mode: 0755 | ||
owner: root | ||
group: root | ||
|
||
- name: Add stream nginx config | ||
tags: webserv | ||
template: | ||
src: templates/99-stream.conf | ||
dest: /etc/nginx/modules-enabled/99-stream.conf | ||
mode: 0755 | ||
owner: root | ||
notify: | ||
- reload nginx | ||
- restart nginx |
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,13 @@ | ||
stream { | ||
upstream clickhouse_backend { | ||
server {{ clickhouse_url }}:{{ clickhouse_port }}; | ||
} | ||
|
||
server { | ||
listen 9000; | ||
|
||
proxy_pass clickhouse_backend; | ||
} | ||
|
||
error_log /var/log/nginx/error.log; | ||
} |
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,11 @@ | ||
--- | ||
ssl_domain: backend-hel.ooni.org | ||
collector_id: 2 | ||
clickhouse_url: "" # fetch from aws secrets | ||
bucket_name: ooni-data-eu-fra-test | ||
collectors: | ||
- "backend-hel.ooni.org" | ||
fastpath_version: 0.86~pr831-395 | ||
analysis_version: 1.12~pr836-413 | ||
deb_bucket_name: ooni-internal-deb | ||
deb_server_name: deb-ci.ooni.org |
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 |
---|---|---|
@@ -1,6 +1,22 @@ | ||
--- | ||
- name: reload nftables | ||
tags: api, webserv | ||
service: name=nftables state=reloaded | ||
|
||
- name: restart clickhouse | ||
service: name=clickhouse-server state=restarted | ||
- name: test nginx config | ||
command: nginx -t | ||
listen: | ||
- restart nginx | ||
- reload nginx | ||
|
||
- name: restart nginx | ||
tags: webserv | ||
service: | ||
name: nginx | ||
state: restarted | ||
|
||
- name: reload nginx | ||
tags: api, deb_ooni, webserv | ||
service: | ||
name: nginx | ||
state: reloaded |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be kept commented out