Skip to content

Commit

Permalink
clean-up: remove wiki in infra (#1687)
Browse files Browse the repository at this point in the history
* clean-up: remove wiki in infra

* clean-up: remove mediawiki env from forget and generate secrets
  • Loading branch information
lfaucon authored Jul 20, 2023
1 parent 8d4924a commit 65a13e8
Show file tree
Hide file tree
Showing 22 changed files with 3 additions and 807 deletions.
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
comments, commits, code, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

Expand Down
2 changes: 1 addition & 1 deletion infra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ If for any reason you're not able to set up a virtual machine on your computer -
- Connect to the SSH port 22
- As root, run `visudo` to edit `/etc/sudoers` and change the line `%sudo ALL=(ALL:ALL) ALL` into `%sudo ALL=(ALL:ALL) NOPASSWD:ALL` to allow members of the `sudo` group to execute commands as root without entering their password
- Adapt `ansible/inventory.yml` file to reflect how you connect to the host you configure (if you don't have the necessary setup, don't set `letsencrypt_email` variable)
- One way to use the `ansible_host`, `domain_name`, `api_domain_name`, `mediawiki_domain_name` and `grafana_domain_name` variables is to let them as is (`tournesol-vm`, `tournesol-api`, `tournesol-wiki` and `tournesol-grafana`) and to put a `<VM_IP> tournesol-vm tournesol-api tournesol-wiki tournesol-grafana` line in your `/etc/hosts` file
- One way to use the `ansible_host`, `domain_name`, `api_domain_name`, and `grafana_domain_name` variables is to let them as is (`tournesol-vm`, `tournesol-api`, and `tournesol-grafana`) and to put a `<VM_IP> tournesol-vm tournesol-api tournesol-grafana` line in your `/etc/hosts` file
- Check the administrators list in `ansible/group_vars/tournesol.yml`
- Add users dot files in `ansible/roles/users/files/admin-users` to match administrators tastes and set the `authorized_keys` for each of them either in `ansible/group_vars/tournesol.yml` or in `ansible/roles/users/files/admin-users/<username>/.ssh/authorized_keys`
- Run `source ./ansible/scripts/generate-secrets.sh` to generate secrets
Expand Down
32 changes: 0 additions & 32 deletions infra/ansible/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ all:
frontend_csp_script_src: "https://www.youtube.com/iframe_api https://www.youtube.com/s/player/"
frontend_presidentielle_2022_enabled: true

mediawiki_domain_name: tournesol-wiki
mediawiki_scheme: http
mediawiki_database_name: mediawiki
mediawiki_database_user: mediawiki

monitored_urls:
- https://staging.tournesol.app/
- https://api.staging.tournesol.app/admin
Expand All @@ -64,8 +59,6 @@ all:
ml_train_schedule: "*-*-* 0,6,12,18:20:00" # every 6 hours
tournesol_api_createdataset_schedule: "Mon 00:02" # weekly, before the new week

mediawiki_backup_schedule: "*-*-* 0,6,12,18:10:00" # every 6 hours

postgresql_backup_schedule: "*-*-* 0,6,12,18:00:00" # every 6 hours

# Staging Vultr VM
Expand Down Expand Up @@ -106,11 +99,6 @@ all:
# Setting this triggers TLS configuration
letsencrypt_email: tournesol.application@gmail.com

mediawiki_domain_name: "wiki.{{domain_name}}"
mediawiki_scheme: https
mediawiki_database_name: mediawiki
mediawiki_database_user: mediawiki

monitored_urls:
- https://tournesol.app/
- https://api.tournesol.app/admin
Expand All @@ -133,8 +121,6 @@ all:
ml_train_schedule: "*-*-* 0,6,12,18:20:00" # every 6 hours
tournesol_api_createdataset_schedule: "Mon 00:02" # weekly, before the new week

mediawiki_backup_schedule: "*-*-* 0,6,12,18:10:00" # every 6 hours

postgresql_backup_schedule: "*-*-* 0,6,12,18:00:00" # every 6 hours

export_backups_schedule: "*-*-* 0,6,12,18:30:00" # every 6 hours
Expand Down Expand Up @@ -179,11 +165,6 @@ all:
# Setting this triggers TLS configuration
letsencrypt_email: tournesol.application@gmail.com

mediawiki_domain_name: "wiki.{{domain_name}}"
mediawiki_scheme: https
mediawiki_database_name: mediawiki
mediawiki_database_user: mediawiki

monitored_urls:
- https://staging.tournesol.app/
- https://api.staging.tournesol.app/admin
Expand Down Expand Up @@ -213,8 +194,6 @@ all:
ml_train_schedule: "*-*-* 0,6,12,18:20:00" # every 6 hours
tournesol_api_createdataset_schedule: "Mon 00:02" # weekly, before the new week

mediawiki_backup_schedule: "*-*-* 0,6,12,18:10:00" # every 6 hours

postgresql_backup_schedule: "*-*-* 0,6,12,18:00:00" # every 6 hours

export_backups_schedule: "*-*-* 0,6,12,18:30:00" # every 6 hours
Expand All @@ -224,14 +203,3 @@ all:
vars:
ansible_python_interpreter: /usr/bin/python3
ansible_ssh_pipelining: true
mediawiki_extensions:
# These commits refer to the branch "REL1_36" on each repository, as observed on 2021-10-19.
- name: Math
url: https://github.com/wikimedia/mediawiki-extensions-Math/archive/93b1252386dcd8658a285571a76cea0c6852bb0e.zip
output_dir: mediawiki-extensions-Math-93b1252386dcd8658a285571a76cea0c6852bb0e
- name: PluggableAuth
url: https://github.com/wikimedia/mediawiki-extensions-PluggableAuth/archive/087cb4c82e57971c8e65e40ad40e83e971377ee9.zip
output_dir: mediawiki-extensions-PluggableAuth-087cb4c82e57971c8e65e40ad40e83e971377ee9
- name: OpenIDConnect
url: https://github.com/wikimedia/mediawiki-extensions-OpenIDConnect/archive/da7914745ae62816cb7c37578a4aa8a0894b8a87.zip
output_dir: mediawiki-extensions-OpenIDConnect-da7914745ae62816cb7c37578a4aa8a0894b8a87
5 changes: 1 addition & 4 deletions infra/ansible/roles/django/templates/tournesol.j2
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,13 @@ server {
if ($host = {{api_domain_name}}) {
return 301 https://$host$request_uri;
}
if ($host = {{mediawiki_domain_name}}) {
return 301 https://$host$request_uri;
}
if ($host = {{grafana_domain_name}}) {
return 301 https://$host$request_uri;
}

listen 80 deferred;

server_name {{domain_name}} {{api_domain_name}} {{mediawiki_domain_name}} {{grafana_domain_name}};
server_name {{domain_name}} {{api_domain_name}} {{grafana_domain_name}};
return 404;
}
{% endif %}
58 changes: 0 additions & 58 deletions infra/ansible/roles/mediawiki/handlers/main.yml

This file was deleted.

Loading

0 comments on commit 65a13e8

Please sign in to comment.