python / psf-salt

PSF infrastructure configuration
MIT License
108 stars 57 forks source link

Fix local dev #323

Closed cegerhardson closed 7 months ago

cegerhardson commented 7 months ago

These changes prepare hg for future X-Forwarded-For, and rate-limiting configurations.

To test that this is working locally:

  1. bring up the salt-master, laptop:psf-salt user$ vagrant up salt-master
  2. bring up the loadbalancer, laptop:psf-salt user$ vagrant up loadbalancer
  3. bring up hg, laptop:psf-salt user$ vagrant up hg
  4. in another window, ssh into the vagrant hg box, vagrant shh hg
  5. install curl sudo apt install curl
  6. to test localhost, for i in {1..20}; do curl -o /dev/null -s -w "%{http_code}\n" -k -H "Host: hg.python.org" https://127.0.0.1:9000; done
  7. to test loadbalancer, for i in {1..20}; do curl -o /dev/null -s -w "%{http_code}\n" -k -H "Host: hg.python.org" https://192.168.50.19/; done
ewdurbin commented 7 months ago
vagrant@hg:~$ curl -o /dev/null -s -w "%{http_code}\n" -k -H "Host: hg.python.org" https://192.168.50.19/
000

Is that the expected result?

cegerhardson commented 7 months ago
vagrant@hg:~$ curl -o /dev/null -s -w "%{http_code}\n" -k -H "Host: hg.python.org" https://192.168.50.19/
000

Is that the expected result?

I get 200s after bringing the loadbalancer up

ewdurbin commented 7 months ago

Hm, okay. I had to destroy everything and bring it back up, but it does work.