User Tools

Site Tools


packages:vagrant

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
packages:vagrant [2013-08-07 23:45]
glen add grow disk sample
packages:vagrant [2016-05-11 12:43] (current)
glen [PLD Base boxes] more compact
Line 4: Line 4:
  
 Quick workflow is such: Quick workflow is such:
-  - you register base box with ''​vagrant box add''​ +  - install [[package>​vagrant]] package: ''​poldek -u vagrant''​ 
-  - you create ''​Vagrantfile''​ with ''​vagrant init BASEBOXNAME''​ +  - add your user to ''​vbox''​ group 
-  - you bring up VM defined in ''​Vagrantfile''​ with ''​vagrant up''​ +  - register base box with ''​vagrant box add''​ 
-  - you log in to VM with ''​vagrant ssh''​+  - create ''​Vagrantfile''​ with ''​vagrant init BASEBOXNAME''​ 
 +  - bring up VM defined in ''​Vagrantfile''​ with ''​vagrant up''​ 
 +  - log in to VM with ''​vagrant ssh''​
  
 The commands are run in dir where is ''​Vagrantfile''​. The commands are run in dir where is ''​Vagrantfile''​.
Line 13: Line 15:
 Base box you need to import only once, you can make new VM's without need to import base box again. Base box you need to import only once, you can make new VM's without need to import base box again.
  
-To start using vagrant you need to install [[package>​vagrant]] package.+===== PLD Base boxes =====
  
-===== PLD Base box ===== +[[people:glen|glen]] ​is providing regularly built [[/​people/​glen/​vm-info|vagrant base boxes]]:
- +
-glen is providing regularly built [[/​people/​glen/​vm-info|vagrant base boxes]]:+
  
 +<note tip>
 ''​box add''​ command is needed only once or if you want to refresh your base box. ''​box add''​ command is needed only once or if you want to refresh your base box.
 +</​note>​
  
-32bit Th longterm kernel: +With Vagrant 1.5+ you can also use [[https://vagrantcloud.com/glen|vagrant ​cloud urls]]:
-<​code>​ +
-$ vagrant box add pld32 ftp://ftp.pld-linux.org/​people/glen/​vm/​pld32.box +
-vagrant ​init pld32 +
-$ vagrant up +
-$ vagrant ssh +
-</​code>​+
  
-64bit Th longterm kernel+  * vagrant box add [[https://​vagrantcloud.com/​glen/​boxes/​pld32|glen/​pld32]] 
-<​code>​ +  ​* ​vagrant box add [[https://vagrantcloud.com/glen/boxes/pld64|glen/pld64]] 
-vagrant box add pld64 ftp://ftp.pld-linux.org/​people/glen/vm/pld64.box +  ​* ​vagrant ​box add [[https://​vagrantcloud.com/​glen/​boxes/​pld32-th2012 | glen/​pld32-th2012 ]] 
-$ vagrant init pld64 +  ​* ​vagrant ​box add [[https://​vagrantcloud.com/​glen/​boxes/​pld32-th2013 | glen/​pld32-th2013 ]]
-vagrant ​up +
-vagrant ​ssh +
-</code>+
  
 the ''​.box''​ is actually [[https://​github.com/​mitchellh/​vagrant/​issues/​1741|importable by plain VirtualBox]] as well if you rename the file as ''​.ova'',​ on [[ftp://​ftp.pld-linux.org/​people/​glen/​vm/​|ftp]] there are symlinks for .ova files made for convenience. the ''​.box''​ is actually [[https://​github.com/​mitchellh/​vagrant/​issues/​1741|importable by plain VirtualBox]] as well if you rename the file as ''​.ova'',​ on [[ftp://​ftp.pld-linux.org/​people/​glen/​vm/​|ftp]] there are symlinks for .ova files made for convenience.
- 
-===== Grow a disk ===== 
- 
-The VM contains 80GiB disk in LVM PV, default LVM allocation is rather minimal to get base packages installed and may be small when you actually copy files there. 
- 
-To increase rootfs by 2GiB: 
-<code bash> 
-poldek -u xfsprogs 
-lvextend --size=+2G /​dev/​sys/​rootfs 
-xfs_growfs / 
-</​code>​ 
  
 ===== What next? ===== ===== What next? =====
  
 After box is up, you probably want to provision it or install packages with ''​poldek''​ directly. ​ After box is up, you probably want to provision it or install packages with ''​poldek''​ directly. ​
 +Also quite common is to [[people/​glen/​vm-info#​grow_a_disk|grow a disk]]
  
 ==== Chef ==== ==== Chef ====
  
 To install ''​chef-solo''​ do ''​poldek -u chef'',​ if you want to run chef server inside that box, have look at [[chef-server]]. To install ''​chef-solo''​ do ''​poldek -u chef'',​ if you want to run chef server inside that box, have look at [[chef-server]].
 +
 +If you are using ''​chef-client'',​ it's recommended to install [[https://​github.com/​cassianoleal/​vagrant-butcher|vagrant-butcher]] plugin to automatically delete node when destroying VM:
 +
 +<​code>​
 +$ vagrant plugin install vagrant-butcher
 +</​code>​
 +
 +If using older Vagrant (< 1.5), you need older butcher plugin:
 +<​code>​
 +$ vagrant plugin install vagrant-butcher --plugin-version=2.0.0
 +</​code>​
 +
 +==== MATE Desktop ====
 +
 +I ([[people:​glen]]) needed to give someone VM image containing desktop application,​ as a result there'​s [[https://​gist.github.com/​glensc/​9948541|PLD Linux with MATE Desktop]] ''​Vagrantfile''​ which you can use to create same image from scratch.
packages/vagrant.1375911900.txt.gz · Last modified: 2013-08-07 23:45 by glen