Using Vagrant?
by Daniel Buckmaster · in Torque 3D Professional · 04/25/2014 (7:54 pm) · 13 replies
Just wanted to see if anyone's tried using Vagrant for game dev before. I have a feeling it could come in handy when T3D eventually goes a little more cross-platform!
About the author
Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!
#2
05/02/2014 (1:20 am)
Were you booting into Windows VMs? Or running dedicated servers?
#3
So I have the following Windows VMS:
-> XP SP3
-> Windows Vista
-> WIndows 7
-> Windows 8
I also have Linux VMs for both server and client. I basically boot in to them, test the game client or server and then boot out of them when I am done.
I have a couple of PCs at home that I use, so sometimes they will be running one or multiple VMs so I can test Client connectivity ... Server durability ... etc.
I also use the snapshot feature on the VMs ... so when I do a base install and add all the required libraries, I do a snapshot ... if something breaks I can revert to my snapshot and have a clean lab machine again ... also saves me from having to uninstall all the time. :)
05/02/2014 (5:54 am)
Both ... I basically create VMs of various Operating Systems to test my installers and game play on various machines.So I have the following Windows VMS:
-> XP SP3
-> Windows Vista
-> WIndows 7
-> Windows 8
I also have Linux VMs for both server and client. I basically boot in to them, test the game client or server and then boot out of them when I am done.
I have a couple of PCs at home that I use, so sometimes they will be running one or multiple VMs so I can test Client connectivity ... Server durability ... etc.
I also use the snapshot feature on the VMs ... so when I do a base install and add all the required libraries, I do a snapshot ... if something breaks I can revert to my snapshot and have a clean lab machine again ... also saves me from having to uninstall all the time. :)
#4
05/29/2014 (12:53 am)
So I set up a very basic Vagrant configuration in this branch if anyone's interested in building a Linux dedicated server.- Install Vagrant and VirtualBox
- Fetch from eightyeight/Torque3D and checkout branch vagrant
- In a command prompt (preferably git bash, unless you've installed a command-line ssh), navigate to the T3D root directory and run vagrant up
- After the VM has booted, run vagrant ssh and navigate to /vagrant
- Follow the numbered instructions on this wiki page
#5
05/29/2014 (7:15 am)
How does VirtualBox handle NAT? I'm looking at a similar setup for not entirely different purposes with VMWare....
#7
www.virtualbox.org/manual/ch06.html
I have found it very flexible with regards to this.
07/11/2014 (2:47 am)
Virtual Box has about 6 different modes for networking.www.virtualbox.org/manual/ch06.html
I have found it very flexible with regards to this.
#8
I'm looking at packer (www.packer.io) too - nothing quite like being able to automate creation and provisioning of new VMs....
07/11/2014 (6:33 am)
I'm having fits with VMware at the moment - the guest tools seem to die if you ask it to perform a long operation in the guest OS.I'm looking at packer (www.packer.io) too - nothing quite like being able to automate creation and provisioning of new VMs....
#9
I have had some success with the API from Digital Ocean ... so many things to do so little time. 8-{
07/11/2014 (6:36 am)
The last time I really used VMWare was in the good old days of VMWare Workstation. So unfortunately I will not be able to help you there. My main focus is Virtual Box, Vagrant, and Chef ... although I am now looking at OpenStack for cloud services instead.I have had some success with the API from Digital Ocean ... so many things to do so little time. 8-{
#10
I'm just interested in being able to spin up different known environments for testing. For that to be really useful though I'd need a Windows VM, which sounds like an involved process :P.
07/11/2014 (10:05 am)
Oh gosh... trying to sort out the differences between Vagrant, Packer, Docker... then add Puppet and Chef and understand how it all fits with the idea of deploying these boxes to AWS or DO. Erk.I'm just interested in being able to spin up different known environments for testing. For that to be really useful though I'd need a Windows VM, which sounds like an involved process :P.
#11
And I think I got around my VMware issue - vmrun has a time-out that I had gotten around using parenthesis in my shell scripts to sub-shell. It let the guest tools "think" enough to keep it alive, but trying to do too much at one whack apparently was killing it. So now I'm trying to break it down into bite-sized work chunks - so far it seems to be working.
Anyway, thanks for the feedback guys! Handy dandy!
My next step - master Xen....
07/11/2014 (12:48 pm)
Packer would make setting up the vm a fairly quick and iterative process. I really only need three different build environments at work (and all three are flavors of OpenSuSE - 11.4x32, 12.2x32, and 12.2x64 - with minor setup variations) but they have to be consistent and reproducible.And I think I got around my VMware issue - vmrun has a time-out that I had gotten around using parenthesis in my shell scripts to sub-shell. It let the guest tools "think" enough to keep it alive, but trying to do too much at one whack apparently was killing it. So now I'm trying to break it down into bite-sized work chunks - so far it seems to be working.
Anyway, thanks for the feedback guys! Handy dandy!
My next step - master Xen....
#12
07/12/2014 (5:31 am)
Something like this will also hopefully be useful for building binaries - spin up a VM for your target platform, compile, and grab the artifacts...
#13
I wrote a Lua script that parses output from zypper's and rpm's "tell me what's installed" functionality and builds shell scripts to install those same repositories and packages. This makes it much easier to provision a VM to match a given environment with Packer. Still experimenting....
07/14/2014 (7:32 am)
That's exactly what I'm putting together for work. Except that I don't really need Packer; the VMs with the build environments are already set up. I want to learn to use it anyway because it will be handy on other projects.I wrote a Lua script that parses output from zypper's and rpm's "tell me what's installed" functionality and builds shell scripts to install those same repositories and packages. This makes it much easier to provision a VM to match a given environment with Packer. Still experimenting....
Torque Owner Quinton Delpeche
Gobbo Games
I merely switched to VirtualBox as it was easier for me to move my appliances and virtual machines between my office and home.