5 ms·
I recently acquired a Macbook as my laptop. Vagrant had been a ridiculous blessing. Instead of fiddling around with Macports and Brew and all that nonsense[0],
by chewxy 13y ago
I recently acquired a Macbook as my laptop. Vagrant had been a ridiculous blessing. Instead of fiddling around with Macports and Brew and all that nonsense[0], I just Vagrant Up a Ubuntu instance and tadah!
[0] Seriously, developing in R and Python in a OS X environment where you need stuff like Gtk and CairoDevice, it can drive you to tears. Go on OS X was a pleasure.
- aroman 13y agoHow do you use Vagrant, exactly? Are these Ubuntu instances VirtualBox instances, or are you interacting over SSH, or what?
- chewxy 13y agohttps://github.com/AnthonyNystrom/python-dev-bootstrap https://github.com/AnthonyNystrom/python-dev-bootstrap ; Also check out Rove.io (formerly called Hospice.io) Basically, I code in OS X (sublime text), but the environment the code is run in is essentially Ubuntu (or whatever nonsensical CentOS slow ass thing that I may have to deploy for)
- aroman 13y agoAh I see, very cool. You mentioned something about Gtk and Cairo — do you ever interact with the VM graphically, or do you only use it as (what amounts to, I suppose) a networked Linux sandbox running inside OS X. Also, how do you push code to the instance to run/deploy the code?
- deleted 13y ago[deleted]
- aethr 13y agoVagrant mounts a filesystem at /vagrant on the guest vm with the contents of the folder where your Vagrantfile is. Typically this means you include a Vagrantfile in the root dir of your project, and then your entire project folder is available on the guest box. I strongly suggest investigating the NFS mount option for this feature if you're using Virtualbox, as the performance difference is substantial over Virtualbox shared folders (which is the default for the /vagrant mount). Edit: typo
- chewxy 13y agoI've not tried running anything graphically. My previous machines for the past 7 or so years have been linux. I have my own bootstrap scripts for Python and R and some of the libs require RGtk2 and stuff, which couldn't really work on OS X without a lot of fiddling (but installing them on Ubuntu machines were a breeze). So when my bootstrap scripts failed, I ran them on a Vagrant based instance instead. Problem solved.
- barkingcat 13y agoBoth. Vagrant creates a virtualbox vm and does the appropriate networking bits to let you ssh into it easily. Even does portforwarding so you can easily reach webservers on the vm on an easy to remember port # from the host (ie localhost:8080 is vm1, localhost:8081 is vm2, etc)
- sehrope 13y agoSimilar setup for me as well. I usually develop on my Linux desktop but I also have a MacBook Air. I'd go nuts if I had to actually configure Postgres or an MQ server on it (or even manually in a VM). With Vagrant I have the exact same VM for both machines and its setup via a single "vagrant up". An even more extreme example is a testing VM I setup with 5 copies of Postgres installed[1]. No mucking about locally and it's one command to spin it up. Way better than manually setting it up and so much easier to share too. [1]: https://github.com/jackdb/pgjdbc-test-vm https://github.com/jackdb/pgjdbc-test-vm
- sheff 13y agoYour testing VM setup sounds like it might be really useful for the pgjdbc-ng project (a project to create a new JDBC driver for Postgres). I was looking through the project issues on Github yesterday, prior to starting to play around with it and your comment reminded me that one of them was a note from the main developer asking for suggestions on automated testing. Perhaps you could send a pull request ? See : https://github.com/impossibl/pgjdbc-ng/issues/31 https://github.com/impossibl/pgjdbc-ng/issues/31
- sehrope 13y agoThat's a great idea. Funny that I've been tracking the ng driver out of technical curiosity and that didn't really cross my mind!