Skip to content

Commit

Permalink
vagrant: add Vagrantfile for the Tutorials repo
Browse files Browse the repository at this point in the history
This new `Vagrantfile` loads the `Vagrantfile` that is located in the `RIOT`
directory, but furthermore adds the `Tutorials` directory as a synced
folder to the virtual machine.
  • Loading branch information
Cenk Gündoğan committed Sep 21, 2016
1 parent 7c87f85 commit f86eb59
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@ bin
.swp
*~
*.pdf
.vagrant
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -20,7 +20,7 @@ For links go to [https://github.com/RIOT-OS/Tutorials](https://github.com/RIOT-O
git submodule update --init --recursive
```
* Change to the `RIOT` directory: `cd Tutorials/RIOT/`
* Run `vagrant up tutorials` and `vagrant ssh tutorials` afterwards. See the [Vagrant RIOT Setup](https://github.com/RIOT-OS/RIOT/blob/master/dist/tools/vagrant/README.md) for a more general explanation.
* Run `vagrant up` and `vagrant ssh` afterwards. See the [Vagrant RIOT Setup](https://github.com/RIOT-OS/RIOT/blob/master/dist/tools/vagrant/README.md) for a more general explanation.

**Recommended Setup** (Without Using a VM)

Expand Down
2 changes: 1 addition & 1 deletion RIOT
20 changes: 20 additions & 0 deletions Vagrantfile
@@ -0,0 +1,20 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

require 'fileutils'

riot_vagrantfile = File.expand_path('RIOT/Vagrantfile')
RIOTBASE ||= "RIOT/"

if File.exists?(riot_vagrantfile)
load riot_vagrantfile
else
abort "No Vagrantfile found in the RIOT directory. ABORTING!"
end

Vagrant.configure(2) do |config|
config.vm.provider "virtualbox" do |vb|
vb.name = "RIOT VM - Tutorials"
end
config.vm.synced_folder ".", "/home/vagrant/Tutorials"
end

0 comments on commit f86eb59

Please sign in to comment.