Skip to content

Commit

Permalink
Fixes to clickhouse related configs
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Nov 22, 2024
1 parent db8334a commit edef980
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
21 changes: 20 additions & 1 deletion ansible/group_vars/clickhouse/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ clickhouse_distributed_ddl:
clickhouse_default_profiles:
default:
readonly: 2
readonly:
readonly: 1
write:
readonly: 0

Expand All @@ -168,10 +170,27 @@ clickhouse_default_users:
- "127.0.0.1"
profile: default
quota: default
- user:
name: readonly
password_sha256_hex: "{{ lookup('amazon.aws.aws_ssm', '/oonidevops/secrets/clickhouse_readonly_password', profile='oonidevops_user_prod') | hash('sha256') }}"
networks:
- "0.0.0.0/0"
profile: readonly
quota: default
- user:
name: write
password_sha256_hex: "{{ lookup('amazon.aws.aws_secret', 'oonidevops/clickhouse_write_password', profile='oonidevops_user_prod') | hash('sha256') }}"
password_sha256_hex: "{{ lookup('amazon.aws.aws_ssm', '/oonidevops/secrets/clickhouse_write_password', profile='oonidevops_user_prod') | hash('sha256') }}"
networks:
- "0.0.0.0/0"
profile: write
quota: default

clickhouse_default_quotas:
- quota:
name: default
duration: 3600
queries: 0
errors: 0
result_rows: 0
read_rows: 0
execution_time: 0
4 changes: 3 additions & 1 deletion ansible/host_vars/notebook.ooni.org
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ clickhouse_default_profiles:
write:
readonly: 0

clickhouse_version: "24.10.2.80"
clickhouse_release_type: stable
clickhouse_listen_hosts:
- "127.0.0.1"

Expand All @@ -88,7 +90,7 @@ clickhouse_default_users:
quota: default
- user:
name: write
password_sha256_hex: "{{ lookup('amazon.aws.aws_secret', 'oonidevops/clickhouse_write_password', profile='oonidevops_user_prod') | hash('sha256') }}"
password_sha256_hex: "{{ lookup('amazon.aws.aws_ssm', '/oonidevops/secrets/clickhouse_notebook_write_password', profile='oonidevops_user_prod') | hash('sha256') }}"
networks:
- "127.0.0.1"
profile: write
Expand Down
4 changes: 2 additions & 2 deletions ansible/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
tags:
- clickhouse
roles:
- tailnet
#- tailnet
- oonidata_clickhouse

- name: Deploy oonidata worker nodes
Expand All @@ -48,7 +48,7 @@
vars:
enable_jupyterhub: false
enable_oonipipeline_worker: true
clickhouse_url: "clickhouse://write:{{ lookup('amazon.aws.aws_secret', 'oonidevops/clickhouse_write_password', profile='oonidevops_user_prod') | hash('sha256') }}@clickhouse1.prod.ooni.io/ooni"
clickhouse_url: "clickhouse://write:{{ lookup('amazon.aws.aws_ssm', '/oonidevops/secrets/clickhouse_write_password', profile='oonidevops_user_prod') | hash('sha256') }}@clickhouse1.prod.ooni.io/ooni"

- name: Deploy notebook host
hosts: notebook.ooni.org
Expand Down

0 comments on commit edef980

Please sign in to comment.