diff mbox

[v3] support/misc: Adding Vagrant file for provisioning

Message ID 1447887095-16773-1-git-send-email-angelo.compagnucci@gmail.com
State Accepted
Headers show

Commit Message

Angelo Compagnucci Nov. 18, 2015, 10:51 p.m. UTC
This patch adds a Vagrant file to buildroot. With this file
you can provision a complete buildroot developing environment
in minutes on all major platforms (Linux/Mac/Windows).

Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
---
Changelog

v2 -> v3:

* Better handling of virtualbox provider options

v1 -> v2:

* Scraping latest version number from website (suggested by Arnout Vandecappelle)
* Added libc i386 dependency for precompiled toolchains (suggested by Arnout Vandecappelle)

 docs/manual/getting.txt    | 14 +++++++++++
 docs/website/download.html | 17 +++++++++++++
 support/misc/Vagrantfile   | 59 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 90 insertions(+)
 create mode 100644 support/misc/Vagrantfile

Comments

Yann E. MORIN Dec. 20, 2015, 3:28 p.m. UTC | #1
Angelo, All,

On 2015-11-18 23:51 +0100, Angelo Compagnucci spake thusly:
> This patch adds a Vagrant file to buildroot. With this file
> you can provision a complete buildroot developing environment
> in minutes on all major platforms (Linux/Mac/Windows).
> 
> Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
[--SNIP--]
> diff --git a/docs/manual/getting.txt b/docs/manual/getting.txt
> index 3437f93..84e1f54 100644
> --- a/docs/manual/getting.txt
> +++ b/docs/manual/getting.txt
> @@ -10,6 +10,20 @@ November. Release numbers are in the format YYYY.MM, so for example
>  
>  Release tarballs are available at http://buildroot.org/downloads/[].
>  
> +An official https://www.vagrantup.com/[Vagrantfile] is distributed within buildroot for your needs.
> +If you want to setup an isolated buildroot environment on Linux or
> +Mac Os X, paste this line onto your terminal:
> +
> +--------------------
> +curl -O http://git.buildroot.net/buildroot/plain/support/misc/Vagrantfile; vagrant up
> +--------------------
> +
> +If you are on Windows, paste this into your powershell:
> +
> +--------------------
> +(new-object System.Net.WebClient).DownloadFile("http://git.buildroot.net/buildroot/plain/support/misc/Vagrantfile","Vagrantfile"); vagrant up
> +--------------------
> +
>  If you want to follow development, you can use the daily snapshots or
>  make a clone of the Git repository. Refer to the
>  http://buildroot.org/download[Download page] of the Buildroot website
> diff --git a/docs/website/download.html b/docs/website/download.html
> index a6c2ac0..00e24bc 100644
> --- a/docs/website/download.html
> +++ b/docs/website/download.html

Please keep lines <= 80 chars.

Also, I would prefer we do not suggest that this is the recommended way
to run Buildroot. The way you state it: "an official vagrantfile...",
"setup an isolated buildroot environment", makes it sound like that's
highly suggested people use that. I would really like that we explicitly
state that this is provided for convenience to quickly set up a working
environment, but that it is in no way the official way of working (much
less the only official way).

Also, I prefer that there is only one command per line:

    wget blablabla
    vagrant up

Furthermore, I'm not too happy with those download-and-execute stuff.
Why don't we just tell the user to git-clone or download the tarball,
and tell them the Vagrant file is in support/misc/Vagrantfile and let
them deal with that on their own. If they want to use Vagrant, they sure
know how to do it, right?

Finally, I'd just move that out of "Getting Buildroot" into the "system
requirements" chapter, after the "amdatory packages" and before the
"optional packages" chapters.

What I suggest we add is just something like:

    ---8<--- docs/manual/prerequisite.txt
    For your convenience, so you can quickly get up and running with
    Buildroot, we provide a https://www.vagrantup.com/[Vagrantfile] to
    quickly set up a minimal working environment for testing purproses.
    The Vagrant file is located in `support/misc/Vagrantfile` in the
    Buildroot source tree.

    .Note
    This Vagrant file is in not the official way of using Buildroot,
    and is really just provided for convenience to quickly get started.
    You are free to use a classic Linux distribution to run Buildroot,
    and in fact most Buidlroot developpers are doing so and are not
    using that Vagrant file.
    ---8<---

This part is not required: it's already in the manual.

<rant of an old grey beard>
I'm not too fond of all those "tools-of-the-new-millenium". After
Vagrant, are we supposed to add a Puppet or a Chef configuration? Both?
Then what? Docker and/or Rocket files? Oh, may I add a recipe for
creating a chroot? ;-)
</rant>

Regards,
Yann E. MORIN.
Peter Korsgaard Feb. 4, 2016, 4:23 p.m. UTC | #2
>>>>> "Angelo" == Angelo Compagnucci <angelo.compagnucci@gmail.com> writes:

Hi,

First of all - Sorry for the slow response!

 > This patch adds a Vagrant file to buildroot. With this file
 > you can provision a complete buildroot developing environment
 > in minutes on all major platforms (Linux/Mac/Windows).

 > Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>


 > diff --git a/docs/manual/getting.txt b/docs/manual/getting.txt
 > index 3437f93..84e1f54 100644
 > --- a/docs/manual/getting.txt
 > +++ b/docs/manual/getting.txt
 > @@ -10,6 +10,20 @@ November. Release numbers are in the format YYYY.MM, so for example
 
 >  Release tarballs are available at http://buildroot.org/downloads/[].
 
 > +An official https://www.vagrantup.com/[Vagrantfile] is distributed within buildroot for your needs.
 > +If you want to setup an isolated buildroot environment on Linux or
 > +Mac Os X, paste this line onto your terminal:
 > +
 > +--------------------
 > +curl -O http://git.buildroot.net/buildroot/plain/support/misc/Vagrantfile; vagrant up

Next to Yanns comments I would prefer to use wget like we do elsewhere
in Buildroot to download stuff.

Instead of grabbing this from cgit I have instead put the file together
with the release tarballs (https://buildroot.org/downloads).

> --- a/docs/website/download.html
 > +++ b/docs/website/download.html
 > @@ -32,6 +32,23 @@ This and earlier releases (and their PGP signatures) can always be downloaded fr
 
 >  <p>
 
 > +<p>
 > +An official <a href="https://www.vagrantup.com/">Vagrantfile</a>
 > +is distributed within buildroot for your needs.
 > +If you want to setup an isolated buildroot environment on Linux or
 > +Mac Os X, paste this line onto your terminal:
 > +
 > +<pre>
 > +curl -O http://git.buildroot.net/buildroot/plain/support/misc/Vagrantfile; vagrant up
 > +</pre>
 > +
 > +If you are on Windows, paste this into your powershell:
 > +
 > +<pre>
 > +(new-object System.Net.WebClient).DownloadFile("http://git.buildroot.net/buildroot/plain/support/misc/Vagrantfile","Vagrantfile"); vagrant up
 > +</pre>
 > +</p>
 > +

This no longer applies and as Yann mentioned it isn't really needed so
I've dropped this hunk.
 
 > diff --git a/support/misc/Vagrantfile b/support/misc/Vagrantfile
 > new file mode 100644
 > index 0000000..93a7cf8
 > --- /dev/null
 > +++ b/support/misc/Vagrantfile
 > @@ -0,0 +1,59 @@
 > +################################################################################
 > +#
 > +# Vagrantfile
 > +#
 > +################################################################################
 > +
 > +### Change here for more memory/cores ###
 > +VM_MEMORY=1024
 > +VM_CORES=1

I couldn't even build our defconfig with 1G, so I've bumped it to 2GB of RAM.

> +
 > +Vagrant.configure('2') do |config|
 > +	config.vm.box = 'ubuntu/trusty64'
 > +
 > +	config.vm.provider :vmware_fusion do |v, override|
 > +		v.vmx['memsize'] = VM_MEMORY
 > +		v.vmx['numvcpus'] = VM_CORES
 > +	end
 > +
 > +	config.vm.provider :virtualbox do |v, override|
 > +		v.memory = VM_MEMORY
 > +		v.cpus = VM_CORES
 > +		
 > +		required_plugins = %w( vagrant-vbguest )
 > +		required_plugins.each do |plugin|
 > +		  system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin
 > +		end
 > +	end
 > +
 > +	config.vm.provision 'shell' do |s|
 > +		s.inline = 'echo Setting up machine name'
 > +
 > +		require 'open-uri'
 > +		open('http://buildroot.org/download.html') do |f|
 > +			$buildroot_version = f.read.lines.grep(/The latest stable release/)[0]
 > +				.split('<b>')[1].split('</b>')[0]

This is not really robust (in fact it is already broken after the last
website changes), so I've gone back to your first version and simply
defined the BR version in a variable at the top of the file. I'll add it
to my release steps to also update this whenever we release a new
version.


> +		end
 > +
 > +		config.vm.provider :vmware_fusion do |v, override|
 > +			v.vmx['displayname'] = "Buildroot #{$buildroot_version}"
 > +		end
 > +
 > +		config.vm.provider :virtualbox do |v, override|
 > +			v.name = "Buildroot #{$buildroot_version}"
 > +		end
 > +	end
 > +
 > +	config.vm.provision 'shell', inline:
 > +		"sudo dpkg --add-architecture i386
 > +		sudo apt-get -q update
 > +		sudo apt-get -q -y install build-essential libncurses5-dev \
 > +			git bzr cvs mercurial subversion libc6:i386

dependencies.sh also checks for unzip, so I've added that as well.

Committed with these fixes, thanks.
Angelo Compagnucci Feb. 5, 2016, 8:05 a.m. UTC | #3
Dear Peter Korsgaard,

2016-02-04 17:23 GMT+01:00 Peter Korsgaard <peter@korsgaard.com>:
>>>>>> "Angelo" == Angelo Compagnucci <angelo.compagnucci@gmail.com> writes:
>
> Hi,
>
> First of all - Sorry for the slow response!

No problem here! I have patches reviewed and ready to be merged
several months older than this one! I'm feeling lucky!

By my side, thank you for accepting it, honestly I thought there was
some grudge against.

>  > This patch adds a Vagrant file to buildroot. With this file
>  > you can provision a complete buildroot developing environment
>  > in minutes on all major platforms (Linux/Mac/Windows).
>
>  > Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
>
>
>  > diff --git a/docs/manual/getting.txt b/docs/manual/getting.txt
>  > index 3437f93..84e1f54 100644
>  > --- a/docs/manual/getting.txt
>  > +++ b/docs/manual/getting.txt
>  > @@ -10,6 +10,20 @@ November. Release numbers are in the format YYYY.MM, so for example
>
>  >  Release tarballs are available at http://buildroot.org/downloads/[].
>
>  > +An official https://www.vagrantup.com/[Vagrantfile] is distributed within buildroot for your needs.
>  > +If you want to setup an isolated buildroot environment on Linux or
>  > +Mac Os X, paste this line onto your terminal:
>  > +
>  > +--------------------
>  > +curl -O http://git.buildroot.net/buildroot/plain/support/misc/Vagrantfile; vagrant up
>
> Next to Yanns comments I would prefer to use wget like we do elsewhere
> in Buildroot to download stuff.

Argh! That curl was on purpose (probably I'm a novice in the buildroot
world, but not completely thoughtless!), wget it's not distributed
with Mac Os X and it's quite an accomplishment installing it [1]. I'll
send a patch soon.

> Instead of grabbing this from cgit I have instead put the file together
> with the release tarballs (https://buildroot.org/downloads).

Great news!

>> --- a/docs/website/download.html
>  > +++ b/docs/website/download.html
>  > @@ -32,6 +32,23 @@ This and earlier releases (and their PGP signatures) can always be downloaded fr
>
>  >  <p>
>
>  > +<p>
>  > +An official <a href="https://www.vagrantup.com/">Vagrantfile</a>
>  > +is distributed within buildroot for your needs.
>  > +If you want to setup an isolated buildroot environment on Linux or
>  > +Mac Os X, paste this line onto your terminal:
>  > +
>  > +<pre>
>  > +curl -O http://git.buildroot.net/buildroot/plain/support/misc/Vagrantfile; vagrant up
>  > +</pre>
>  > +
>  > +If you are on Windows, paste this into your powershell:
>  > +
>  > +<pre>
>  > +(new-object System.Net.WebClient).DownloadFile("http://git.buildroot.net/buildroot/plain/support/misc/Vagrantfile","Vagrantfile"); vagrant up
>  > +</pre>
>  > +</p>
>  > +
>
> This no longer applies and as Yann mentioned it isn't really needed so
> I've dropped this hunk.

I don't agree too much, giving hints to run buildroot on windows or
Mac Os X it's really important to grow our userbase and I think it
deserve it's own box on the download page!
I'll submit a new patch soon.

>  > diff --git a/support/misc/Vagrantfile b/support/misc/Vagrantfile
>  > new file mode 100644
>  > index 0000000..93a7cf8
>  > --- /dev/null
>  > +++ b/support/misc/Vagrantfile
>  > @@ -0,0 +1,59 @@
>  > +################################################################################
>  > +#
>  > +# Vagrantfile
>  > +#
>  > +################################################################################
>  > +
>  > +### Change here for more memory/cores ###
>  > +VM_MEMORY=1024
>  > +VM_CORES=1
>
> I couldn't even build our defconfig with 1G, so I've bumped it to 2GB of RAM.

Ok!

>
>> +
>  > +Vagrant.configure('2') do |config|
>  > +    config.vm.box = 'ubuntu/trusty64'
>  > +
>  > +    config.vm.provider :vmware_fusion do |v, override|
>  > +            v.vmx['memsize'] = VM_MEMORY
>  > +            v.vmx['numvcpus'] = VM_CORES
>  > +    end
>  > +
>  > +    config.vm.provider :virtualbox do |v, override|
>  > +            v.memory = VM_MEMORY
>  > +            v.cpus = VM_CORES
>  > +
>  > +            required_plugins = %w( vagrant-vbguest )
>  > +            required_plugins.each do |plugin|
>  > +              system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin
>  > +            end
>  > +    end
>  > +
>  > +    config.vm.provision 'shell' do |s|
>  > +            s.inline = 'echo Setting up machine name'
>  > +
>  > +            require 'open-uri'
>  > +            open('http://buildroot.org/download.html') do |f|
>  > +                    $buildroot_version = f.read.lines.grep(/The latest stable release/)[0]
>  > +                            .split('<b>')[1].split('</b>')[0]
>
> This is not really robust (in fact it is already broken after the last
> website changes), so I've gone back to your first version and simply
> defined the BR version in a variable at the top of the file. I'll add it
> to my release steps to also update this whenever we release a new
> version.

Wow! This is exactly what I was looking for!

>> +             end
>  > +
>  > +            config.vm.provider :vmware_fusion do |v, override|
>  > +                    v.vmx['displayname'] = "Buildroot #{$buildroot_version}"
>  > +            end
>  > +
>  > +            config.vm.provider :virtualbox do |v, override|
>  > +                    v.name = "Buildroot #{$buildroot_version}"
>  > +            end
>  > +    end
>  > +
>  > +    config.vm.provision 'shell', inline:
>  > +            "sudo dpkg --add-architecture i386
>  > +            sudo apt-get -q update
>  > +            sudo apt-get -q -y install build-essential libncurses5-dev \
>  > +                    git bzr cvs mercurial subversion libc6:i386
>
> dependencies.sh also checks for unzip, so I've added that as well.

Ops, totally missed that, thank you!

> Committed with these fixes, thanks.

A big thank you!

>
> --
> Bye, Peter Korsgaard

[1] http://stackoverflow.com/questions/4572153/os-x-equivalent-of-linuxs-wget
Yann E. MORIN Feb. 20, 2016, 10:47 a.m. UTC | #4
Angelo, All,

On 2016-02-05 09:05 +0100, Angelo Compagnucci spake thusly:
> 2016-02-04 17:23 GMT+01:00 Peter Korsgaard <peter@korsgaard.com>:
> > Next to Yanns comments I would prefer to use wget like we do elsewhere
> > in Buildroot to download stuff.
> 
> Argh! That curl was on purpose (probably I'm a novice in the buildroot
> world, but not completely thoughtless!), wget it's not distributed
> with Mac Os X and it's quite an accomplishment installing it [1].

Three things:

  - wget is available from MacPorts, Homebrew and Fink; it is easy to
    install; their documentation is pretty explicit (at leat for me who
    does not even have a Mac, and never ever touched one).

  - if you consider wget to be hard to install, what about Vagrant? I
    doubt it is installed on a stock MacOS; surely the user will *have*
    to install stuff on his system...

  - if someone is not able to replace the wget incantation with a similar
    curl incantation (or the opposite), then there's a deeper problem;
    this is really 101 [1]...

So, totally irrelevant...

> I'll send a patch soon.

Which has already been applied, which is a little bit sad... :-(

[1] https://en.wikipedia.org/wiki/101_%28number%29#In_education

Regards,
Yann E. MORIN.
Yann E. MORIN Feb. 20, 2016, 10:56 a.m. UTC | #5
Angelo, All,

On 2016-02-05 09:05 +0100, Angelo Compagnucci spake thusly:
> 2016-02-04 17:23 GMT+01:00 Peter Korsgaard <peter@korsgaard.com>:
> > This no longer applies and as Yann mentioned it isn't really needed so
> > I've dropped this hunk.
> 
> I don't agree too much, giving hints to run buildroot on windows or
> Mac Os X it's really important to grow our userbase and I think it
> deserve it's own box on the download page!

I think we should have just pointed to the Vagrant file, nothing more.

Really, if someone knows what a Vagrant file is, they surely know how to
use it, no? Or are you going to further expand that section with help on
how to use Vagrant? And Puppet, Chef and the clique?

> I'll submit a new patch soon.

We should stop at some point, and really expect that the user knows at
least some basic requirements. And I believe basic knowledge of Linux,
the command line, and a little bit of gray matter are required.

(and maybe I should stop ranting. ;-] )

Regards,
Yann E. MORIN.
Angelo Compagnucci Feb. 20, 2016, 10:57 a.m. UTC | #6
Dear Yann E. MORIN,

2016-02-20 11:47 GMT+01:00 Yann E. MORIN <yann.morin.1998@free.fr>:
> Angelo, All,
>
> On 2016-02-05 09:05 +0100, Angelo Compagnucci spake thusly:
>> 2016-02-04 17:23 GMT+01:00 Peter Korsgaard <peter@korsgaard.com>:
>> > Next to Yanns comments I would prefer to use wget like we do elsewhere
>> > in Buildroot to download stuff.
>>
>> Argh! That curl was on purpose (probably I'm a novice in the buildroot
>> world, but not completely thoughtless!), wget it's not distributed
>> with Mac Os X and it's quite an accomplishment installing it [1].
>
> Three things:
>
>   - wget is available from MacPorts, Homebrew and Fink; it is easy to
>     install; their documentation is pretty explicit (at leat for me who
>     does not even have a Mac, and never ever touched one).
>
>   - if you consider wget to be hard to install, what about Vagrant? I
>     doubt it is installed on a stock MacOS; surely the user will *have*
>     to install stuff on his system...
>
>   - if someone is not able to replace the wget incantation with a similar
>     curl incantation (or the opposite), then there's a deeper problem;
>     this is really 101 [1]...
>
> So, totally irrelevant...
>
>> I'll send a patch soon.
>
> Which has already been applied, which is a little bit sad... :-(

Honestly I don't understand the rant. To goal here is to have
buildroot running on Mac Os X without too much effort.

Why the heck I should install macports or fink or whatever other tool
in this world only to have wget when curl is already there?
Then we should also write some documentation on which of this tree way
to install wget is preferred ...

Installing vagrant is indeed straightforward, download the dmg file
and double click it.

Sincerely, Angelo.

>
> [1] https://en.wikipedia.org/wiki/101_%28number%29#In_education
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
Angelo Compagnucci Feb. 20, 2016, 11:07 a.m. UTC | #7
Dear Yann E. MORIN ,

2016-02-20 11:56 GMT+01:00 Yann E. MORIN <yann.morin.1998@free.fr>:
> Angelo, All,
>
> On 2016-02-05 09:05 +0100, Angelo Compagnucci spake thusly:
>> 2016-02-04 17:23 GMT+01:00 Peter Korsgaard <peter@korsgaard.com>:
>> > This no longer applies and as Yann mentioned it isn't really needed so
>> > I've dropped this hunk.
>>
>> I don't agree too much, giving hints to run buildroot on windows or
>> Mac Os X it's really important to grow our userbase and I think it
>> deserve it's own box on the download page!
>
> I think we should have just pointed to the Vagrant file, nothing more.
>
> Really, if someone knows what a Vagrant file is, they surely know how to
> use it, no? Or are you going to further expand that section with help on
> how to use Vagrant? And Puppet, Chef and the clique?

Obviously, I'm not in the position to steer the project in a way or
another, but IMHO giving a little bit of advice on how to run
Buildroot on others OSes could only benefit the project as a whole.

And please stop with that Puppet, Chef and other amenities, they are
not meant to rapidly build a virtual machine with some software inside
and nobody talked about them than you.

As I stated before, the goal here is to give the opportunity to the
people who cannot run Buildroot natively to use it anyway, in a simple
to run Vm.

Nothing more nothing less.

>
>> I'll submit a new patch soon.
>
> We should stop at some point, and really expect that the user knows at
> least some basic requirements. And I believe basic knowledge of Linux,
> the command line, and a little bit of gray matter are required.

Again, giving advice and being friendly on how a user wants to run
buildroot in his own machine could only benefit the project.

And little bit of modernity sometime it's not so bad!

> (and maybe I should stop ranting. ;-] )

Yes, I also think so :)

Sincerely, Angelo

>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
Peter Korsgaard Feb. 20, 2016, 8:19 p.m. UTC | #8
>>>>> "Angelo" == Angelo Compagnucci <angelo.compagnucci@gmail.com> writes:

Hi,

 > Obviously, I'm not in the position to steer the project in a way or
 > another, but IMHO giving a little bit of advice on how to run
 > Buildroot on others OSes could only benefit the project as a whole.

 > And please stop with that Puppet, Chef and other amenities, they are
 > not meant to rapidly build a virtual machine with some software inside
 > and nobody talked about them than you.

 > As I stated before, the goal here is to give the opportunity to the
 > people who cannot run Buildroot natively to use it anyway, in a simple
 > to run Vm.

 > Nothing more nothing less.

Understood, and I appreciate it. I think the confusion / disagreement
comes from the fact that the main developers aren't the target audience,
and they don't have a need / desire to use it, but that doesn't mean
others might not.
diff mbox

Patch

diff --git a/docs/manual/getting.txt b/docs/manual/getting.txt
index 3437f93..84e1f54 100644
--- a/docs/manual/getting.txt
+++ b/docs/manual/getting.txt
@@ -10,6 +10,20 @@  November. Release numbers are in the format YYYY.MM, so for example
 
 Release tarballs are available at http://buildroot.org/downloads/[].
 
+An official https://www.vagrantup.com/[Vagrantfile] is distributed within buildroot for your needs.
+If you want to setup an isolated buildroot environment on Linux or
+Mac Os X, paste this line onto your terminal:
+
+--------------------
+curl -O http://git.buildroot.net/buildroot/plain/support/misc/Vagrantfile; vagrant up
+--------------------
+
+If you are on Windows, paste this into your powershell:
+
+--------------------
+(new-object System.Net.WebClient).DownloadFile("http://git.buildroot.net/buildroot/plain/support/misc/Vagrantfile","Vagrantfile"); vagrant up
+--------------------
+
 If you want to follow development, you can use the daily snapshots or
 make a clone of the Git repository. Refer to the
 http://buildroot.org/download[Download page] of the Buildroot website
diff --git a/docs/website/download.html b/docs/website/download.html
index a6c2ac0..00e24bc 100644
--- a/docs/website/download.html
+++ b/docs/website/download.html
@@ -32,6 +32,23 @@  This and earlier releases (and their PGP signatures) can always be downloaded fr
 
 <p>
 
+<p>
+An official <a href="https://www.vagrantup.com/">Vagrantfile</a>
+is distributed within buildroot for your needs.
+If you want to setup an isolated buildroot environment on Linux or
+Mac Os X, paste this line onto your terminal:
+
+<pre>
+curl -O http://git.buildroot.net/buildroot/plain/support/misc/Vagrantfile; vagrant up
+</pre>
+
+If you are on Windows, paste this into your powershell:
+
+<pre>
+(new-object System.Net.WebClient).DownloadFile("http://git.buildroot.net/buildroot/plain/support/misc/Vagrantfile","Vagrantfile"); vagrant up
+</pre>
+</p>
+
 You can also obtain daily snapshots of the latest Buildroot source tree if you
 want to follow development, but cannot or do not wish to use Git.
 
diff --git a/support/misc/Vagrantfile b/support/misc/Vagrantfile
new file mode 100644
index 0000000..93a7cf8
--- /dev/null
+++ b/support/misc/Vagrantfile
@@ -0,0 +1,59 @@ 
+################################################################################
+#
+# Vagrantfile
+#
+################################################################################
+
+### Change here for more memory/cores ###
+VM_MEMORY=1024
+VM_CORES=1
+
+Vagrant.configure('2') do |config|
+	config.vm.box = 'ubuntu/trusty64'
+
+	config.vm.provider :vmware_fusion do |v, override|
+		v.vmx['memsize'] = VM_MEMORY
+		v.vmx['numvcpus'] = VM_CORES
+	end
+
+	config.vm.provider :virtualbox do |v, override|
+		v.memory = VM_MEMORY
+		v.cpus = VM_CORES
+		
+		required_plugins = %w( vagrant-vbguest )
+		required_plugins.each do |plugin|
+		  system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin
+		end
+	end
+
+	config.vm.provision 'shell' do |s|
+		s.inline = 'echo Setting up machine name'
+
+		require 'open-uri'
+		open('http://buildroot.org/download.html') do |f|
+			$buildroot_version = f.read.lines.grep(/The latest stable release/)[0]
+				.split('<b>')[1].split('</b>')[0]
+		end
+
+		config.vm.provider :vmware_fusion do |v, override|
+			v.vmx['displayname'] = "Buildroot #{$buildroot_version}"
+		end
+
+		config.vm.provider :virtualbox do |v, override|
+			v.name = "Buildroot #{$buildroot_version}"
+		end
+	end
+
+	config.vm.provision 'shell', inline:
+		"sudo dpkg --add-architecture i386
+		sudo apt-get -q update
+		sudo apt-get -q -y install build-essential libncurses5-dev \
+			git bzr cvs mercurial subversion libc6:i386
+		sudo apt-get -q -y autoremove
+		sudo apt-get -q -y clean"
+
+	config.vm.provision 'shell', privileged: false, inline:
+		"echo 'Downloading and extracting buildroot #{$buildroot_version}'
+		wget -q -c http://buildroot.org/downloads/buildroot-#{$buildroot_version}.tar.gz
+		tar axf buildroot-#{$buildroot_version}.tar.gz"
+end