-
Notifications
You must be signed in to change notification settings - Fork 56
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
WIP: Vagrant #1970
WIP: Vagrant #1970
Conversation
We should fix the 18.04 deps and switch to that. No point in creating up a bunch of dev envs with < 1 year of service life left. |
Turns out git 2.8+ has an option to prevent commits if the user and email isn't configured, much better. |
The latest version installs R and sets up a directory for the userspace package library, but doesn't install the R packages, because they take a very long time and I believe CATMAID itself can take care of that bit. I should add the compile-time dependencies of those packages, though. |
May be some space savings to be had by trying a different box (base image): there are a bunch for ubuntu.
|
The major remaining issue is a big one: I can't access the django dev server. The port forwarding is working (tested with |
This is pretty much done besides the dev server connection issue, which arguably is quite important. It's in a state to be checked out, if anyone wanted to weigh in on that. |
If the dev server is started with
then a bunch more 403s for the same endpoint. Then
EDIT: Or starting the server with 0.0.0.0:8000 and navigating to 127.0.0.1 on the host, also works. Same errors though. Maybe I need to forward some more ports for the websockets? Although those ports seem to be the same ones used when picking up the static files: that works fine. |
Ubuntu 18.04 branch is here - for now, it just strips imagemagick out (although the graphicksmagick stack and pgmagick are still in there taking 10 minutes to build...). Seems to be an issue with one of the npm dependencies now, though. |
Makes it very easy to set up a dev environment in a virtual machine.
Rebased on dev, which removes *magick and therefore significantly speeds up builds. 18.04 is behaving very weirdly with npm dependencies. It seems inconsistent between VM re-provisioning, and the exact same node/npm versions work on 16.04 and fail on 18.04. Some of the dependency issues can be worked around by Still to do:
|
Tom has been heroically debugging the npm issue into the night and it seems like there's some issue regarding [1] laravel/homestead#1239 In the 1804 branch, Tom has solved this by using another overlayfs to ensure that node_modules only lives on the guest, which solves another of my initial problems. All hail Tom. |
😁 Yeah it took a bit to figure out what the issue is. Apparently the problem is a bug in the VirtualBox Guest Additions in versions 6 and later.The reason this is no problem on the 16.04 VM is that it still uses version 5.2.32 and the 18.04 container uses version 6.1.2. Downgrading the Guest Additions on 18.04 seems rather tricky and I couldn't get it work reliably. The This will bite us in 16.04 too should the VirtualBox Guest Additions be upgraded there to v6.x. (I am not sure, but I would guess this is rather unlikely.) If you still consider it useful, I am fine with merging the 16.04 vagrant branch first. Although I haven't tested the |
Let's push on with 18.04 if it's not more difficult that 16.04. I'm working on the postgres bit at the moment - how to access it from the outside. It seems like it's not even running at the moment. |
Closing in favour of #1985 |
Proof of concept of dev environment setup in a VM using vagrant. This eases development on different operating systems, and isolates the database and OS-level dependencies. The host and guest can both transparently edit the code; such changes are persisted in both.
Tools like VScode and PyCharm can connect to remotes over SSH, use the remote python environment etc.
To do
Issues
Notes
venv
, which is meant to be built-in, but isn't in the ubuntu package.Queries