Difference between revisions of "Vagrant Setup Notes"

From wiki.gpii
Jump to: navigation, search
(Create Fedora 16 vagrant box: link title)
(Removed outdated content)
 
Line 1: Line 1:
[http://www.vagrantup.com/ Vagrant] is open-source software for creating and configuring portable development environments.  
+
[http://www.vagrantup.com/ Vagrant] is open-source software for creating and configuring portable development environments. Vagrantfiles can be found in several GPII repositories. For more information about installing and using it please refer to the [https://github.com/GPII/qi-development-environments/ Quality Infrastructure Development Environments repository].  
 
 
== Installing vagrant ==
 
 
 
<code>
 
sudo gem install vagrant
 
</code>
 
 
 
Note: [http://downloads.vagrantup.com/ Installation packages] (e.g. for Windows) are also available.
 
 
 
== Create Fedora 16 vagrant box ==
 
 
 
Create Fedora 16 vagrant box using veewee:
 
 
 
We use peewee to install (see [http://www.ducea.com/2011/08/15/building-vagrant-boxes-with-veewee/ Building Vagrant Boxes With Veewee])
 
 
 
<nowiki>sudo gem install veewee</nowiki>
 
 
 
Got an error for installation of documentation for builder-3.0.0:
 
 
 
<nowiki>ERROR:  While generating documentation for builder-3.0.0
 
... MESSAGE:  Unhandled special: Special: type=17, text="<!-- HI -->"
 
... RDOC args: --ri --op /opt/local/lib/ruby/gems/1.8/doc/builder-3.0.0/ri --title Builder -- Easy XML Building --main README.rdoc --line-numbers lib CHANGES Rakefile README README.rdoc TAGS doc/releases/builder-1.2.4.rdoc doc/releases/builder-2.0.0.rdoc doc/releases/builder-2.1.1.rdoc --title builder-3.0.0 Documentation --quiet</nowiki>
 
 
 
Couldn't find a fix for it, but it seems to be working anyway.
 
 
 
Check install:
 
 
 
<nowiki>vagrant basebox templates</nowiki>
 
 
 
You should get a list of base boxes, including:
 
 
 
<nowiki>(…)
 
vagrant basebox define '<boxname>' 'Fedora-16-i386'
 
(…)</nowiki>
 
 
 
 
 
Make a place for the box:
 
 
 
<nowiki>mkdir vagrant-veewee
 
cd vagrant-veewee</nowiki>
 
 
 
If you don't see that on there, make sure you got the latest veewee
 
 
 
Get a base box ready for tweaking:
 
 
 
<nowiki>vagrant basebox define 'fedora-16' 'Fedora-16-i386'</nowiki>
 
 
 
Files in definitions/fedora-16 can be tweaked, I left them untouched.
 
 
 
<nowiki>vagrant basebox build 'fedora-16'</nowiki>
 
 
 
Validate:
 
 
 
<nowiki>vagrant basebox validate 'fedora-16'</nowiki>
 
 
 
Export and add to vagrant:
 
 
 
<nowiki>vagrant basebox export 'fedora-16'
 
vagrant box add 'fedora-16' 'fedora-16.box'</nowiki>
 
 
 
==Setup project==
 
 
 
Initialialize a project (set up some required file for us to edit)
 
 
 
<nowiki>mkdir vagrant_project
 
cd vagrant_project
 
vagrant init</nowiki>
 
 
 
Edit the Vagrant file, so that the properties are as marked below
 
 
 
<nowiki>config.vm.box = "fedora-16"
 
  config.vm.boot_mode = :gui</nowiki>
 
 
 
Test what we got so far:
 
 
 
<nowiki>vagrant up</nowiki>
 
 
 
yay, it's working!
 
 
 
<nowiki>vagrant destroy</nowiki>
 
 
 
==Shared Folder==
 
edit Vagrant
 
 
 
 
 
<nowiki>config.vm.provision :puppet do |puppet|
 
    puppet.manifests_path = "manifests"
 
    puppet.manifest_file = "fedora-16.pp"
 
end</nowiki>
 
 
 
 
 
 
[[Category:Linux]]
 
[[Category:Linux]]

Latest revision as of 18:01, 1 April 2016

Vagrant is open-source software for creating and configuring portable development environments. Vagrantfiles can be found in several GPII repositories. For more information about installing and using it please refer to the Quality Infrastructure Development Environments repository.