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

Add support for using a SOCKS5 proxy to connect to live replica database #25

Merged
merged 2 commits into from
Oct 7, 2023

Conversation

audiodude
Copy link
Collaborator

@audiodude audiodude commented Oct 7, 2023

This should be documented somewhere, but for now the steps are:

  1. Sign up for a toolforge account.
  2. Set up your ~/.ssh/config so you can easily login to toolforge
  3. Run a SOCKS5 proxy with ssh -D 0.0.0.0:1080 login.toolforge.org
  4. Update default_config.yaml or add a config.yaml in the same directory, with values for the keys:
    • REPLICA_SOCKS5_PROXY_HOST -- The IP or hostname of the Docker host where the proxy is running.
    • REPLICA_SOCKS5_PROXY_PORT -- The port you used for -D above
    • REPLICA_DOMAIN -- Set to: 'analytics.db.svc.wikimedia.cloud'
    • REPLICA_USER -- Your MariaDB credentials, found in replica.my.cnf in your toolforge home directory
    • REPLICA_PASSWORD -- Same as above, but the password

Also this PR removes some values from default_config that aren't referenced anywhere in the code (REPLICA_DOMAIN and REPLICA_HOST)

Copy link
Collaborator

@siddharthvp siddharthvp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat! Can confirm this works.

docker-compose.yml Show resolved Hide resolved
@audiodude audiodude merged commit 822379a into main Oct 7, 2023
1 check passed
@audiodude audiodude deleted the socks-proxy branch October 7, 2023 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants