Page 1 of 1

Vagrant Development Environment

Posted: Sun Apr 05, 2015 1:06 pm
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

Re: Vagrant Development Environiment

Posted: Mon Apr 06, 2015 1:25 am
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.

Re: Vagrant Development Environiment

Posted: Mon Apr 06, 2015 1:34 am
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.

Re: Vagrant Development Environiment

Posted: Mon Apr 06, 2015 10:27 am
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.

Re: Vagrant Development Environiment

Posted: Mon Apr 06, 2015 12:01 pm
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!

Re: Vagrant Development Environiment

Posted: Thu Apr 09, 2015 9:08 pm
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.

Re: Vagrant Development Environiment

Posted: Fri Apr 10, 2015 3:26 am
by Muazzam
alexander wrote: [..]
Vragrantfile
[..]
*Vagrantfile. Please correct it.

Re: Vagrant Development Environiment

Posted: Fri Apr 10, 2015 4:23 am
by Roman
muazzam wrote:
alexander wrote: [..]
Vragrantfile
[..]
*Vagrantfile. Please correct it.
This post has a lot to correct.

Re: Vagrant Development Environiment

Posted: Fri Apr 10, 2015 9:33 am
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

Re: Vagrant Development Environiment

Posted: Fri Apr 10, 2015 11:04 am
by Roman
The topic title is incorrect. "enviroNMent" is correct.

Re: Vagrant Development Environiment

Posted: Fri Apr 10, 2015 12:23 pm
by alexander
Roman wrote:The topic title is incorrect. "enviroNMent" is correct.
Fixed thank you.

Re: Vagrant Development Environment

Posted: Fri Apr 10, 2015 2:10 pm
by Roman
All files in the folder that contains
Files contain, not containS.

Re: Vagrant Development Environment

Posted: Fri Apr 10, 2015 3:31 pm
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.

Re: Vagrant Development Environment

Posted: Fri Apr 10, 2015 4:19 pm
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.