Vagrant Development Environment

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Post Reply
User avatar
alexander
Posts: 20
Joined: Wed May 22, 2013 12:02 am
Location: The Netherlands

Vagrant Development Environment

Post by alexander »

Today I found this. I got really excited and made a Vagrantfile which installs everything you need for os development in an ubuntu 14.04 LTS server instance. I also made a little bash script that downloads, builds and installs a gcc cross compiler to /opt/cross. To start using this create a folder and download the Vagrantfile and installcross.sh files to it. Make sure you have VirtualBox and Vagrant installed on your system. Open a command prompt(bash, cmd, etc.) in the folder you created and run: vagrant up. After it is done run vagrant ssh to ssh into you newly generated development box. When you are done just exit out of ssh and run vagrant halt. Whenever you want to start developing again just run vagrant up and vagrant ssh again. All files in the folder that contains your Vagrantfile will be mounted in the box on /vagrant. So to install the cross compiler just run /vagrant/installcross.sh. You only have to add /opt/cross/bin to your $PATH to be able to use the i686-elf-* programs.

Vagrantfile: here
installcross.sh has been merged into Vagrantfile so that when you run vagrant up for the first time(or vagrant provision if you used this before the merge) it even installs the cross compiler into /opt/cross. I might make it so that it automatically changes the .bashrc file for the vagrant user to add /opt/cross/bin to the path automatically too.
zipfile with the file: here

Hope you find this useful,
Alexander
Last edited by alexander on Fri Apr 10, 2015 12:23 pm, edited 3 times in total.
User avatar
beyondsociety
Member
Member
Posts: 39
Joined: Tue Oct 17, 2006 10:35 pm
Location: Eagle, ID (USA)
Contact:

Re: Vagrant Development Environiment

Post by beyondsociety »

Wow that's pretty interesting, thanks for the info. When I have some time, I may resurrect one of my older computers for this.
"I think it may be time for some guru meditation"
"Barbarians don't do advanced wizardry"
User avatar
alexander
Posts: 20
Joined: Wed May 22, 2013 12:02 am
Location: The Netherlands

Re: Vagrant Development Environiment

Post by alexander »

Yeah and the fun thing is that I could've put the installcross.sh script inside Vagrantfile and with that everyone would get the same dev environment when you share the Vagrantfile in a repository.
User avatar
beyondsociety
Member
Member
Posts: 39
Joined: Tue Oct 17, 2006 10:35 pm
Location: Eagle, ID (USA)
Contact:

Re: Vagrant Development Environiment

Post by beyondsociety »

I had a chance to read through the documentation and I noticed the repo option which is a nice feature to have. I've been wanting to setup a build server for quite a while but never got around to it, this makes it a lot easier to get something up and running. The list of pre-built os images and options for other emulators is also nice.
"I think it may be time for some guru meditation"
"Barbarians don't do advanced wizardry"
User avatar
alexander
Posts: 20
Joined: Wed May 22, 2013 12:02 am
Location: The Netherlands

Re: Vagrant Development Environiment

Post by alexander »

I just merged the installcross.sh script into Vagrantfile. So when you run vagrant up for the first time it will install the cross compiler too!
User avatar
eino
Member
Member
Posts: 49
Joined: Fri Sep 16, 2011 10:00 am
Location: Finland

Re: Vagrant Development Environiment

Post by eino »

Make sure you mount the folder with the source from your host machine. Vagrant sometimes reinstalls the virtual machine when booting it up.
I'm Eino Tuominen from Finland, a web software dev learning low level stuff and reading / trying out kernel dev
User avatar
Muazzam
Member
Member
Posts: 543
Joined: Mon Jun 16, 2014 5:59 am
Location: Shahpur, Layyah, Pakistan

Re: Vagrant Development Environiment

Post by Muazzam »

alexander wrote: [..]
Vragrantfile
[..]
*Vagrantfile. Please correct it.
User avatar
Roman
Member
Member
Posts: 568
Joined: Thu Mar 27, 2014 3:57 am
Location: Moscow, Russia
Contact:

Re: Vagrant Development Environiment

Post by Roman »

muazzam wrote:
alexander wrote: [..]
Vragrantfile
[..]
*Vagrantfile. Please correct it.
This post has a lot to correct.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
User avatar
alexander
Posts: 20
Joined: Wed May 22, 2013 12:02 am
Location: The Netherlands

Re: Vagrant Development Environiment

Post by alexander »

Roman wrote:
muazzam wrote:
alexander wrote: [..]
Vragrantfile
[..]
*Vagrantfile. Please correct it.
This post has a lot to correct.
Ok I had that wrong all over the place(the github repo was even called VragrantOSSetup). I think I fixed it now. If you seen any more please notify me.

Thanks in advance,
Alexander
User avatar
Roman
Member
Member
Posts: 568
Joined: Thu Mar 27, 2014 3:57 am
Location: Moscow, Russia
Contact:

Re: Vagrant Development Environiment

Post by Roman »

The topic title is incorrect. "enviroNMent" is correct.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
User avatar
alexander
Posts: 20
Joined: Wed May 22, 2013 12:02 am
Location: The Netherlands

Re: Vagrant Development Environiment

Post by alexander »

Roman wrote:The topic title is incorrect. "enviroNMent" is correct.
Fixed thank you.
User avatar
Roman
Member
Member
Posts: 568
Joined: Thu Mar 27, 2014 3:57 am
Location: Moscow, Russia
Contact:

Re: Vagrant Development Environment

Post by Roman »

All files in the folder that contains
Files contain, not containS.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Vagrant Development Environment

Post by gerryg400 »

Roman wrote:
All files in the folder that contains
Files contain, not containS.
No...

Actually the post says
All files in the folder that contains your Vagrantfile will be mounted in the box on /vagrant.
This is correct English. Hmm, perhaps the OP has already fixed the post.
If a trainstation is where trains stop, what is a workstation ?
User avatar
Roman
Member
Member
Posts: 568
Joined: Thu Mar 27, 2014 3:57 am
Location: Moscow, Russia
Contact:

Re: Vagrant Development Environment

Post by Roman »

gerryg400 wrote:
Roman wrote:
All files in the folder that contains
Files contain, not containS.
No...

Actually the post says
All files in the folder that contains your Vagrantfile will be mounted in the box on /vagrant.
This is correct English. Hmm, perhaps the OP has already fixed the post.
Oops! I misread it, sorry.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay
Post Reply