-
Notifications
You must be signed in to change notification settings - Fork 57
Set up Vagrant #769
Comments
Notes:
|
Ok, the guide linked to above is not working, I'm getting a Chef error no matter which base box I use: |
I understand the appeal of being able to use your native text editor and ssh into the VM headlessly (no-GUI for the VM), but we can already get consistent VM environments (actually, much more consistent because we won't have to worry about) with the vanilla VirtualBox export/import functions. A properly set up vagrant environment would also (I believe) finally allow Windows devs to test Reservations with Internet Explorer. I guess, if vagrant is hard to set up, I'm confused why we're pursuing it when it really does just use VirtualBox as a backend. Have we considered Docker or vanilla VirtualBox, instead? |
I feel like the Vagrant VMs are just much lower overhead since they don't have a lot of the UI stuff running in the background. I also feel like the difference between setting up a VM image for vanilla VirtualBox and for Vagrant is pretty small; if I can't get it working tonight we can revisit the idea but it really shouldn't be so hard. As far as I can tell, Docker is more suited to production environments (see here), but it would also require running a VM when used on Windows anyway (see here) so I'm not sure how it would be better. I'm torn; I've liked having my development environment completely isolated within my VirtualBox VM but at the same time it's definitely resulted in a slower system. I'm still getting used to dealing with Git on Windows (and trying to find a good shell to work in) but I feel like Vagrant would ultimately be simpler and easier to work with (assuming proper use of version control). |
Docker would be better in the sense that we would be able to upload and download entire server containers to/from Jenkins for testing, devving, and deployment. (i.e, no more asking Mike for the database, it would be a simple download and running of the entire affected container for perfect simulation) It would, unlike vagrant, also not require Linuxers to run a full VM (although I admit I do that anyway). :P How would Windows users using Windows editors work wrt CLRF under vagrant? We'd have to be extra careful about making sure Windows users sanitize their systems before we allow them to push any code, if using a Windows-based editor. @mnquintana has some pretty strong feelings against using Windows as a dev env, and I don't know how vagrant solves these problems, if at all. We should check with him before pursuing vagrant too far. |
I hear what you're saying; I think the CLRF issue can be dealt with through Git, but it may be better for people to have consistent complete development environments regardless. That being said, since not everyone may want to dual-boot, if we can give people an option for using their desired OS for coding / manual testing and ensure a consistent runtime environment, that could still be valuable as an alternative. I'm trying to base a new attempt on this repo, hopefully this will work better than figuring out Chef (I felt way out of my depth there... oy). |
Pushed a new version of the Vagrantfile with some companion shell scripts to this branch. It's currently trying to install Ruby (and has been for 20 mins)... I'm not sure why it's taking so long but I'm going to leave it overnight and see if it even finishes. I'm pretty close to giving up on this, it just doesn't feel like it will be worth it. More updates to come! |
Woo hoo! I think it worked! Not sure why it was taking so long, just re-running to try and fix a few final errors but hopefully we have an initial working Vagrant setup. |
Ok, Ruby version 2.1.2 installed fine but 2.1.1 is failing to build. It looks like there's a weird YAML dependency difference between the two versions, but I don't know if that explains why the build is failing:
Thoughts? |
There's a ruby-build workaround posted here. That help? It looks like the readline error only affects 2.1.0 and 2.1.1, and only on some machines. |
@caseywatts mentioned that there had been some problems with vagrant during the spring course. I'm setting up a USB/dualboot solution right now, @orenyk might you want to test the result later today? |
I've used Vagrant a little, here's what I've found: I use the precise32 box, which is a standard Ubuntu 12.04 LTS 32-bit box. Here's the portion of the Vagrantfile I use (I don't really use any options): # -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "hashicorp/precise32"
end How to set everything up:
ask if you have any questions :) |
Thanks @jasonkliu that's really helpful! Have you figured out a way to make the windows command line not suck so much? :-P |
I generally advise against 32bit OSes; they're still supported by the Linux community, but it's definitely a second-class citizen and undergoes less testing than 64-bit versions of the software. (Within a few years I expect ARM to be better supported than 32-bit for newer applications.) You should definitely never use Ubuntu 12.04 anymore; that's been deprecated since April in favor of 14.04 LTS and will cause more problems with package versions than are really worth putting up with. I noticed that your instructions are specific to OS X, unless there's also a |
also, we should defer to @caseywatts and @mnquintana, who have had experience with Windows developers attempting to use vagrant in a class setting. |
@dgoerger The process is exactly the same for windows except for step 1 I just installed from the website (the binary from @orenyk In regards to the Windows comand line, no dice. Here's a couple options I've tried: sadly, all the options I've tried aren't great 💭 |
oh by the way, if you want to switch to linux, here are some short recommendations, from beginner to expert difficulty: ubuntu: crunchbang: arch linux: |
I would recommend mint over ubuntu as a beginner distro personally, as it doesn't have spyware or the ugly ui. Back on topic, how's the virtual usb @dgoerger ? |
@jasonkliu thanks for the clarification! I was just worried seeing all of the Mac instructions, because Oren's trying to get it working on Windows, and Ubuntu 12.04 LTS has five years' support, sure, but that's misleading because that just means Canonical is willing to backport major (and only major) security fixes for that long. The version of I'm a big fan of Fedora for the reason of newer packages and ease of packaging newer versions locally into rpms, although I did use Ubuntu and Debian for five years before switching last November. Debian-based OSes are usually more stable than Fedora or Arch, but that Debian-testing phase comes at the cost of everything being a year out-of-date by the time it's released as a final product. +1 Mint's superior default UI and lack of built-in spyware (relative to Ubuntu 12.10+). The FSF denounced Ubuntu as spyware back in 2012, and I agree with this assessment. There was never any reason to begin automatically submitting desktop search queries to Amazon.com (the same search to find your local programs and files), but Canonical did it anyway. @squidgetx @orenyk: I GOT THE USB/VM TO WORK(!). It required some investigation to get it booting off a USB (it must be booted into rescue mode and then from there you need to reinstall the latest kernel to have it work with real physical hardware versus virtualized hardware), but it works! Once we have a working USB, we can clone it nbd. It's horrifically slow opening programs off USB 2.0 (no surprise there), but has regular snappy OS speed once the program's loaded into memory. I'm going to make a few more tweaks to the image before uploading it for wider testing. 😀 |
I checked out the USB with @dgoerger today and it booted without issue on my laptop and looked great! If we upgrade to Ruby 2.1.2 I think I'll also have a working Vagrant setup, but I'd strongly recommend the USB / VM route. I'll leave this open pending the Ruby upgrade and verification. |
In the interest of time, and given the fact that we currently have a beautiful VM to work with thanks to @dgoerger, I'm closing this issue. When it comes time to export the app we can revisit this question, but I think that given sufficiently well-documented dependencies we don't have to provide a Vagrant setup. |
We should set up Vagrant so that we can ensure consistent development environments. This will require:
.gitignore
fileThis article might be useful.
The text was updated successfully, but these errors were encountered: