The goal is to be able to automatically start a sock proxy and tunnel all http requests through it.
This task includes deciding how to do so and implementing it.
A manual example:
dcaro@vulcanus$ ssh -nf -D 8888 cumin1001.eqiad.wmnet … —---- dcaro@vulcanus$ pip install 'requests[socks]' dcaro@vulcanus$ python >>> import requests >>> res = requests.get("http://alertmanager-eqiad.wikimedia.org/api/v2/silences", proxies={"http": "socks5://127.0.0.1:8888"}).json() >>> len(res) 4894
This should also work for puppetdb queries, but that requires also adding the proper CA to the host.
If possible, that should be automated (ask the user for permission before acting though), in the setup script or the
code itself (that last one might be more complicated), if not, documented.
After this, the user should be able to:
- do a requset from python (a test cookbook) to the alertmanager, see the example before
- get a list of hosts using a cumin puppetdb query (in a test cookbook)