learning-unlimited / ESP-Website

A website to help manage the logistics of large, short-term educational programs
83 stars 57 forks source link

Fabric/Vagrant dev setup on Windows is still very difficult #1432

Open mgersh opened 9 years ago

mgersh commented 9 years ago

This is kind of a meta-issue to keep track of a fairly general problem.

We had three people try to use fabric/Vagrant to set up a dev server on Windows. Only one succeeded, and it still took him a fairly long time messing with dependencies. It seems that the issues are particularly with installing fabric and fabtools. Another eventually succeeded in getting everything installed, but couldn't 'vagrant ssh'; we suspect that it was an issue with a firewall but couldn't figure out how to configure her firewall to allow it. The third was still having trouble installing dependencies by the time she had to leave.

benjaminjkraft commented 9 years ago

I believe the main dependency issue was installing PyCrypto (required by python's ssh package, which is required by fabric), because that involves compiling C extensions, and therefore pip install will often fail or silently not work. PyCrypto was also an issue on one of the Macs we were trying to install it on; it's possible that in that case installing newer Mac dev tools would have helped.

jerrywu64 commented 9 years ago

Right, there was an issue where trying to install fabric caused me to have to go online and install the microsoft visual c++ compiler or something, which fixed my fabric install issue, at which point I ran into random other problems. Assuming I'm not forgetting anything.

On Tue, Oct 28, 2014 at 1:46 AM, Ben Kraft notifications@github.com wrote:

I believe the main dependency issue was installing PyCrypto (required by python's ssh package, which is required by fabric), because that involves compiling C extensions, and therefore pip install will often fail or silently not work. PyCrypto was also an issue on one of the Macs we were trying to install it on; it's possible that in that case installing newer Mac dev tools would have helped.

— Reply to this email directly or view it on GitHub https://github.com/learning-unlimited/ESP-Website/issues/1432#issuecomment-60712540 .

milescalabresi commented 8 years ago

The PyCrypto and the VC++ compiler issues are still present as of now, though Michael's documentation plus the Python error messages are quite useful. That said, there are two additional difficulties that I haven't seen documented:

  1. if your host port is used by another process, you need to kill the other process or change the port for the VM
  2. fabric gets very sad when your path to working directory name has a space in it
  3. I had to add an ssh client to the PATH variable, and I had to open the shell and then run the restart command (vagrant doesn't seem to like passing sudo service memcached restart via Git) to fix the known memcached issue
milescalabresi commented 4 years ago

Minor addition: add ALLOWED_HOSTS = ['localhost'] to local_settings.py

hwatheod commented 3 years ago

When running fab setup, I ran into a whole bunch of permission issues where pip complained about an EnvironmentError because it couldn't write to certain directories on the VM. I did vagrant ssh and then sudo chmod 777 on each of those directories on the VM.

hwatheod commented 3 years ago

If you get an error like this while downloading updates

[vagrant@127.0.0.1:2222] out: E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease is not valid yet (invalid for another 2min 52s). Updates for this repository will not be applied.

it means that the clock on the VM has gotten out of sync with the real time. I have no idea what causes this, but doing vagrant halt and then vagrant up resolved the issue.

milescalabresi commented 1 year ago

A few modest improvements that we can do:

I started these on https://github.com/learning-unlimited/ESP-Website/tree/small-devserver-fixes