veewee 0.3.0.alpha4 → 0.3.0.alpha5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (570) hide show
  1. data/.gitignore +3 -0
  2. data/.rvmrc +3 -2
  3. data/Gemfile +1 -1
  4. data/License +1 -1
  5. data/README.md +30 -174
  6. data/Rakefile +4 -2
  7. data/doc/README-changes.txt +19 -0
  8. data/doc/TODO +60 -0
  9. data/doc/definition.md +58 -0
  10. data/doc/fusion.md +2 -0
  11. data/doc/install.md +16 -0
  12. data/doc/installation.md +24 -0
  13. data/doc/kvm.md +2 -0
  14. data/doc/providers.md +23 -0
  15. data/doc/requirements.md +1 -0
  16. data/doc/running.md +83 -0
  17. data/doc/template.md +102 -0
  18. data/doc/vagrant.md +119 -0
  19. data/doc/vbox.md +2 -0
  20. data/lib/net/vnc/vnc.rb +1 -1
  21. data/lib/python/parallels_sdk_check.py +19 -0
  22. data/lib/python/parallels_send_key.py +73 -0
  23. data/lib/veewee/command.rb +2 -1
  24. data/lib/veewee/command/kvm.rb +55 -15
  25. data/lib/veewee/command/parallels.rb +124 -0
  26. data/lib/veewee/command/vagrant.rb +2 -106
  27. data/lib/veewee/command/vagrant/basebox.rb +82 -0
  28. data/lib/veewee/command/vagrant/build.rb +64 -0
  29. data/lib/veewee/command/vagrant/define.rb +48 -0
  30. data/lib/veewee/command/vagrant/destroy.rb +47 -0
  31. data/lib/veewee/command/vagrant/export.rb +44 -0
  32. data/lib/veewee/command/vagrant/halt.rb +43 -0
  33. data/lib/veewee/command/vagrant/list.rb +38 -0
  34. data/lib/veewee/command/vagrant/ostypes.rb +38 -0
  35. data/lib/veewee/command/vagrant/ssh.rb +39 -0
  36. data/lib/veewee/command/vagrant/templates.rb +39 -0
  37. data/lib/veewee/command/vagrant/undefine.rb +41 -0
  38. data/lib/veewee/command/vagrant/up.rb +44 -0
  39. data/lib/veewee/command/virtualbox.rb +61 -14
  40. data/lib/veewee/command/vmfusion.rb +44 -21
  41. data/lib/veewee/config.rb +0 -27
  42. data/lib/veewee/config/ostypes.yml +179 -43
  43. data/lib/veewee/config/vmfusion-ostypes.txt +1 -0
  44. data/lib/veewee/definition.rb +91 -35
  45. data/lib/veewee/definitions.rb +156 -0
  46. data/lib/veewee/environment.rb +80 -244
  47. data/lib/veewee/error.rb +12 -0
  48. data/lib/veewee/provider/core/box.rb +52 -0
  49. data/lib/veewee/provider/core/box/build.rb +229 -0
  50. data/lib/veewee/provider/core/box/exec.rb +34 -0
  51. data/lib/veewee/provider/core/box/floppy.rb +31 -0
  52. data/lib/veewee/provider/core/box/halt.rb +24 -0
  53. data/lib/veewee/provider/core/box/issh.rb +15 -0
  54. data/lib/veewee/provider/core/box/poweroff.rb +12 -0
  55. data/lib/veewee/provider/core/box/scp.rb +29 -0
  56. data/lib/veewee/provider/core/box/ssh.rb +95 -0
  57. data/lib/veewee/provider/core/box/sudo.rb +21 -0
  58. data/lib/veewee/{builder → provider}/core/box/vnc.rb +4 -4
  59. data/lib/veewee/provider/core/helper/iso.rb +142 -0
  60. data/lib/veewee/provider/core/helper/scancode.rb +114 -0
  61. data/lib/veewee/provider/core/helper/shell.rb +55 -0
  62. data/lib/veewee/provider/core/helper/ssh.rb +162 -0
  63. data/lib/veewee/provider/core/helper/tcp.rb +96 -0
  64. data/lib/veewee/provider/core/helper/web.rb +67 -0
  65. data/lib/veewee/{builder/core/builder.rb → provider/core/provider.rb} +8 -25
  66. data/lib/veewee/{builder/core/builder → provider/core/provider}/transaction.rb +0 -0
  67. data/lib/veewee/{builder/core/builder → provider/core/provider}/tunnel.rb +2 -2
  68. data/lib/veewee/provider/kvm/box.rb +46 -0
  69. data/lib/veewee/provider/kvm/box/build.rb +11 -0
  70. data/lib/veewee/provider/kvm/box/create.rb +76 -0
  71. data/lib/veewee/provider/kvm/box/destroy.rb +33 -0
  72. data/lib/veewee/provider/kvm/box/halt.rb +19 -0
  73. data/lib/veewee/provider/kvm/box/helper/console_type.rb +20 -0
  74. data/lib/veewee/provider/kvm/box/helper/ip.rb +14 -0
  75. data/lib/veewee/provider/kvm/box/helper/ssh_options.rb +19 -0
  76. data/lib/veewee/provider/kvm/box/helper/status.rb +28 -0
  77. data/lib/veewee/provider/kvm/box/poweroff.rb +14 -0
  78. data/lib/veewee/provider/kvm/box/up.rb +14 -0
  79. data/lib/veewee/provider/kvm/box/validate_kvm.rb +47 -0
  80. data/lib/veewee/provider/kvm/provider.rb +70 -0
  81. data/lib/veewee/provider/parallels/box.rb +35 -0
  82. data/lib/veewee/provider/parallels/box/build.rb +13 -0
  83. data/lib/veewee/provider/parallels/box/create.rb +63 -0
  84. data/lib/veewee/provider/parallels/box/destroy.rb +24 -0
  85. data/lib/veewee/provider/parallels/box/halt.rb +14 -0
  86. data/lib/veewee/provider/parallels/box/helper/buildinfo.rb +45 -0
  87. data/lib/veewee/provider/parallels/box/helper/console_type.rb +198 -0
  88. data/lib/veewee/provider/parallels/box/helper/ip.rb +23 -0
  89. data/lib/veewee/provider/parallels/box/helper/ssh_options.rb +20 -0
  90. data/lib/veewee/provider/parallels/box/helper/status.rb +28 -0
  91. data/lib/veewee/provider/parallels/box/poweroff.rb +14 -0
  92. data/lib/veewee/provider/parallels/box/ssh.rb +12 -0
  93. data/lib/veewee/provider/parallels/box/up.rb +15 -0
  94. data/lib/veewee/provider/parallels/box/validate_parallels.rb +47 -0
  95. data/lib/veewee/provider/parallels/notes/parallels-sdk.txt +116 -0
  96. data/lib/veewee/provider/parallels/provider.rb +33 -0
  97. data/lib/veewee/provider/virtualbox/box.rb +46 -0
  98. data/lib/veewee/provider/virtualbox/box/build.rb +20 -0
  99. data/lib/veewee/provider/virtualbox/box/create.rb +58 -0
  100. data/lib/veewee/provider/virtualbox/box/destroy.rb +66 -0
  101. data/lib/veewee/provider/virtualbox/box/export_vagrant.rb +99 -0
  102. data/lib/veewee/provider/virtualbox/box/halt.rb +13 -0
  103. data/lib/veewee/provider/virtualbox/box/helper/buildinfo.rb +25 -0
  104. data/lib/veewee/provider/virtualbox/box/helper/console_type.rb +62 -0
  105. data/lib/veewee/provider/virtualbox/box/helper/create.rb +176 -0
  106. data/lib/veewee/provider/virtualbox/box/helper/forwarding.rb +38 -0
  107. data/lib/veewee/provider/virtualbox/box/helper/guest_additions.rb +17 -0
  108. data/lib/veewee/provider/virtualbox/box/helper/ip.rb +19 -0
  109. data/lib/veewee/provider/virtualbox/box/helper/natinterface.rb +17 -0
  110. data/lib/veewee/provider/virtualbox/box/helper/ssh_options.rb +28 -0
  111. data/lib/veewee/provider/virtualbox/box/helper/status.rb +27 -0
  112. data/lib/veewee/provider/virtualbox/box/helper/version.rb +18 -0
  113. data/lib/veewee/provider/virtualbox/box/poweroff.rb +19 -0
  114. data/lib/veewee/provider/virtualbox/box/ssh.rb +13 -0
  115. data/lib/veewee/provider/virtualbox/box/up.rb +48 -0
  116. data/lib/veewee/provider/virtualbox/box/validate_vagrant.rb +53 -0
  117. data/lib/veewee/provider/virtualbox/provider.rb +19 -0
  118. data/lib/veewee/provider/vmfusion/box.rb +67 -0
  119. data/lib/veewee/provider/vmfusion/box/build.rb +13 -0
  120. data/lib/veewee/{builder/vmfusion/helper → provider/vmfusion/box}/create.rb +15 -24
  121. data/lib/veewee/provider/vmfusion/box/destroy.rb +20 -0
  122. data/lib/veewee/provider/vmfusion/box/export_ova.rb +49 -0
  123. data/lib/veewee/provider/vmfusion/box/halt.rb +13 -0
  124. data/lib/veewee/provider/vmfusion/box/helper/buildinfo.rb +43 -0
  125. data/lib/veewee/provider/vmfusion/box/helper/console_type.rb +18 -0
  126. data/lib/veewee/provider/vmfusion/box/helper/ip.rb +19 -0
  127. data/lib/veewee/provider/vmfusion/box/helper/ssh_options.rb +20 -0
  128. data/lib/veewee/provider/vmfusion/box/helper/status.rb +20 -0
  129. data/lib/veewee/provider/vmfusion/box/helper/vnc.rb +61 -0
  130. data/lib/veewee/provider/vmfusion/box/poweroff.rb +13 -0
  131. data/lib/veewee/provider/vmfusion/box/ssh.rb +12 -0
  132. data/lib/veewee/{builder/vmfusion/helper → provider/vmfusion/box}/template.rb +9 -4
  133. data/lib/veewee/{builder/vmfusion/helper → provider/vmfusion/box}/template.vmx.erb +5 -2
  134. data/lib/veewee/provider/vmfusion/box/up.rb +18 -0
  135. data/lib/veewee/provider/vmfusion/box/validate_vmfusion.rb +47 -0
  136. data/lib/veewee/{builder → provider}/vmfusion/info/export_ovf.info +0 -0
  137. data/lib/veewee/provider/vmfusion/provider.rb +20 -0
  138. data/lib/veewee/providers.rb +31 -0
  139. data/lib/veewee/template.rb +26 -0
  140. data/lib/veewee/templates.rb +71 -0
  141. data/lib/veewee/ui.rb +6 -4
  142. data/lib/veewee/version.rb +1 -1
  143. data/templates/CentOS-4.8-i386/postinstall.sh +1 -1
  144. data/templates/CentOS-5.5-i386-netboot/definition.rb +16 -0
  145. data/templates/CentOS-5.5-i386-netboot/ks.cfg +46 -0
  146. data/templates/CentOS-5.5-i386-netboot/postinstall.sh +60 -0
  147. data/templates/CentOS-5.5-x86_64-netboot/definition.rb +1 -1
  148. data/templates/CentOS-5.5-x86_64-netboot/postinstall.sh +1 -1
  149. data/templates/CentOS-5.6-i386-netboot/definition.rb +1 -1
  150. data/templates/CentOS-5.6-i386-netboot/ks.cfg +2 -2
  151. data/templates/CentOS-5.6-i386-netboot/postinstall.sh +21 -9
  152. data/templates/CentOS-5.6-i386/postinstall.sh +1 -1
  153. data/templates/CentOS-5.6-x86_64-netboot/definition.rb +1 -1
  154. data/templates/CentOS-5.6-x86_64-netboot/ks.cfg +1 -1
  155. data/templates/CentOS-5.6-x86_64-netboot/postinstall.sh +1 -1
  156. data/templates/CentOS-5.7-i386-netboot/postinstall.sh +3 -3
  157. data/templates/CentOS-5.7-x86_64-netboot/postinstall.sh +1 -1
  158. data/templates/CentOS-6.0-i386-netboot/ks.cfg +3 -2
  159. data/templates/CentOS-6.0-i386-netboot/postinstall.sh +1 -1
  160. data/templates/CentOS-6.0-i386/ks.cfg +2 -1
  161. data/templates/CentOS-6.0-i386/postinstall.sh +1 -1
  162. data/templates/CentOS-6.0-x86_64-minimal/definition.rb +2 -2
  163. data/templates/CentOS-6.0-x86_64-minimal/ks.cfg +2 -1
  164. data/templates/CentOS-6.0-x86_64-minimal/postinstall.sh +17 -4
  165. data/templates/CentOS-6.0-x86_64-netboot/ks.cfg +4 -2
  166. data/templates/CentOS-6.0-x86_64-netboot/postinstall.sh +1 -1
  167. data/templates/CentOS-6.0-x86_64/base.sh +12 -0
  168. data/templates/CentOS-6.0-x86_64/chef.sh +2 -0
  169. data/templates/CentOS-6.0-x86_64/cleanup.sh +4 -0
  170. data/templates/CentOS-6.0-x86_64/definition.rb +22 -8
  171. data/templates/CentOS-6.0-x86_64/ks.cfg +2 -1
  172. data/templates/CentOS-6.0-x86_64/postinstall.sh +1 -1
  173. data/templates/CentOS-6.0-x86_64/puppet.sh +11 -0
  174. data/templates/CentOS-6.0-x86_64/ruby.sh +2 -0
  175. data/templates/CentOS-6.0-x86_64/vagrant.sh +9 -0
  176. data/templates/CentOS-6.0-x86_64/virtualbox.sh +8 -0
  177. data/templates/CentOS-6.1-x86_64-minimal/base.sh +13 -0
  178. data/templates/CentOS-6.1-x86_64-minimal/chef.sh +2 -0
  179. data/templates/CentOS-6.1-x86_64-minimal/cleanup.sh +4 -0
  180. data/templates/CentOS-6.1-x86_64-minimal/definition.rb +39 -0
  181. data/templates/CentOS-6.1-x86_64-minimal/ks.cfg +47 -0
  182. data/templates/CentOS-6.1-x86_64-minimal/puppet.sh +11 -0
  183. data/templates/CentOS-6.1-x86_64-minimal/ruby.sh +2 -0
  184. data/templates/CentOS-6.1-x86_64-minimal/vagrant.sh +16 -0
  185. data/templates/CentOS-6.1-x86_64-minimal/virtualbox.sh +8 -0
  186. data/templates/CentOS-6.1-x86_64-netboot/base.sh +13 -0
  187. data/templates/CentOS-6.1-x86_64-netboot/chef.sh +2 -0
  188. data/templates/CentOS-6.1-x86_64-netboot/cleanup.sh +4 -0
  189. data/templates/CentOS-6.1-x86_64-netboot/definition.rb +39 -0
  190. data/templates/CentOS-6.1-x86_64-netboot/ks.cfg +46 -0
  191. data/templates/CentOS-6.1-x86_64-netboot/postinstall.sh +48 -0
  192. data/templates/CentOS-6.1-x86_64-netboot/puppet.sh +11 -0
  193. data/templates/CentOS-6.1-x86_64-netboot/ruby.sh +2 -0
  194. data/templates/CentOS-6.1-x86_64-netboot/vagrant.sh +16 -0
  195. data/templates/CentOS-6.1-x86_64-netboot/virtualbox.sh +8 -0
  196. data/templates/CentOS-6.2-x86_64-minimal/base.sh +14 -0
  197. data/templates/CentOS-6.2-x86_64-minimal/chef.sh +3 -0
  198. data/templates/CentOS-6.2-x86_64-minimal/cleanup.sh +5 -0
  199. data/templates/CentOS-6.2-x86_64-minimal/definition.rb +39 -0
  200. data/templates/CentOS-6.2-x86_64-minimal/ks.cfg +39 -0
  201. data/templates/CentOS-6.2-x86_64-minimal/puppet.sh +12 -0
  202. data/templates/CentOS-6.2-x86_64-minimal/ruby.sh +3 -0
  203. data/templates/CentOS-6.2-x86_64-minimal/vagrant.sh +17 -0
  204. data/templates/CentOS-6.2-x86_64-minimal/virtualbox.sh +8 -0
  205. data/templates/CentOS-6.2-x86_64-netboot/base.sh +13 -0
  206. data/templates/CentOS-6.2-x86_64-netboot/chef.sh +2 -0
  207. data/templates/CentOS-6.2-x86_64-netboot/cleanup.sh +4 -0
  208. data/templates/CentOS-6.2-x86_64-netboot/definition.rb +39 -0
  209. data/templates/CentOS-6.2-x86_64-netboot/ks.cfg +46 -0
  210. data/templates/CentOS-6.2-x86_64-netboot/postinstall.sh +48 -0
  211. data/templates/CentOS-6.2-x86_64-netboot/puppet.sh +11 -0
  212. data/templates/CentOS-6.2-x86_64-netboot/ruby.sh +2 -0
  213. data/templates/CentOS-6.2-x86_64-netboot/vagrant.sh +16 -0
  214. data/templates/CentOS-6.2-x86_64-netboot/virtualbox.sh +8 -0
  215. data/templates/Debian-5.0.8-amd64-netboot/base.sh +9 -0
  216. data/templates/Debian-5.0.8-amd64-netboot/chef.sh +2 -0
  217. data/templates/Debian-5.0.8-amd64-netboot/cleanup.sh +10 -0
  218. data/templates/Debian-5.0.8-amd64-netboot/postinstall.sh +1 -1
  219. data/templates/Debian-5.0.8-amd64-netboot/puppet.sh +2 -0
  220. data/templates/Debian-5.0.8-amd64-netboot/ruby.sh +11 -0
  221. data/templates/Debian-5.0.8-amd64-netboot/vagrant.sh +14 -0
  222. data/templates/Debian-5.0.8-amd64-netboot/virtualbox.sh +15 -0
  223. data/templates/Debian-5.0.8-i386-netboot/base.sh +9 -0
  224. data/templates/Debian-5.0.8-i386-netboot/chef.sh +2 -0
  225. data/templates/Debian-5.0.8-i386-netboot/cleanup.sh +10 -0
  226. data/templates/Debian-5.0.8-i386-netboot/postinstall.sh +1 -1
  227. data/templates/Debian-5.0.8-i386-netboot/puppet.sh +2 -0
  228. data/templates/Debian-5.0.8-i386-netboot/ruby.sh +11 -0
  229. data/templates/Debian-5.0.8-i386-netboot/vagrant.sh +14 -0
  230. data/templates/Debian-5.0.8-i386-netboot/virtualbox.sh +15 -0
  231. data/templates/Debian-6.0.3-amd64-netboot/base.sh +13 -0
  232. data/templates/Debian-6.0.3-amd64-netboot/chef.sh +2 -0
  233. data/templates/Debian-6.0.3-amd64-netboot/cleanup-virtualbox.sh +2 -0
  234. data/templates/Debian-6.0.3-amd64-netboot/cleanup.sh +18 -0
  235. data/templates/{Debian-6.0.2-amd64-netboot → Debian-6.0.3-amd64-netboot}/definition.rb +5 -4
  236. data/templates/Debian-6.0.3-amd64-netboot/postinstall.sh +80 -0
  237. data/templates/{Debian-6.0.2-amd64-netboot → Debian-6.0.3-amd64-netboot}/preseed.cfg +0 -0
  238. data/templates/Debian-6.0.3-amd64-netboot/puppet.sh +2 -0
  239. data/templates/Debian-6.0.3-amd64-netboot/ruby.sh +10 -0
  240. data/templates/Debian-6.0.3-amd64-netboot/vagrant.sh +25 -0
  241. data/templates/Debian-6.0.3-amd64-netboot/virtualbox.sh +15 -0
  242. data/templates/Debian-6.0.3-amd64-netboot/zerodisk.sh +3 -0
  243. data/templates/Debian-6.0.3-i386-netboot/base.sh +13 -0
  244. data/templates/Debian-6.0.3-i386-netboot/chef.sh +2 -0
  245. data/templates/Debian-6.0.3-i386-netboot/cleanup-virtualbox.sh +2 -0
  246. data/templates/Debian-6.0.3-i386-netboot/cleanup.sh +18 -0
  247. data/templates/{Debian-6.0.2-i386-netboot → Debian-6.0.3-i386-netboot}/definition.rb +3 -3
  248. data/templates/{Debian-6.0.2-i386-netboot → Debian-6.0.3-i386-netboot}/postinstall.sh +1 -4
  249. data/templates/{Debian-6.0.2-i386-netboot → Debian-6.0.3-i386-netboot}/preseed.cfg +0 -0
  250. data/templates/Debian-6.0.3-i386-netboot/puppet.sh +2 -0
  251. data/templates/Debian-6.0.3-i386-netboot/ruby.sh +10 -0
  252. data/templates/Debian-6.0.3-i386-netboot/vagrant.sh +25 -0
  253. data/templates/Debian-6.0.3-i386-netboot/virtualbox.sh +15 -0
  254. data/templates/Debian-6.0.3-i386-netboot/zerodisk.sh +3 -0
  255. data/templates/Debian-6.0.4-amd64-netboot/base.sh +13 -0
  256. data/templates/Debian-6.0.4-amd64-netboot/chef.sh +2 -0
  257. data/templates/Debian-6.0.4-amd64-netboot/cleanup-virtualbox.sh +4 -0
  258. data/templates/Debian-6.0.4-amd64-netboot/cleanup.sh +17 -0
  259. data/templates/Debian-6.0.4-amd64-netboot/definition.rb +49 -0
  260. data/templates/Debian-6.0.4-amd64-netboot/preseed.cfg +315 -0
  261. data/templates/Debian-6.0.4-amd64-netboot/puppet.sh +2 -0
  262. data/templates/Debian-6.0.4-amd64-netboot/ruby.sh +10 -0
  263. data/templates/Debian-6.0.4-amd64-netboot/vagrant.sh +21 -0
  264. data/templates/Debian-6.0.4-amd64-netboot/virtualbox.sh +13 -0
  265. data/templates/Debian-6.0.4-amd64-netboot/zerodisk.sh +3 -0
  266. data/templates/Debian-6.0.4-i386-netboot/base.sh +13 -0
  267. data/templates/Debian-6.0.4-i386-netboot/chef.sh +2 -0
  268. data/templates/Debian-6.0.4-i386-netboot/cleanup-virtualbox.sh +4 -0
  269. data/templates/Debian-6.0.4-i386-netboot/cleanup.sh +17 -0
  270. data/templates/Debian-6.0.4-i386-netboot/definition.rb +51 -0
  271. data/templates/Debian-6.0.4-i386-netboot/preseed.cfg +315 -0
  272. data/templates/Debian-6.0.4-i386-netboot/puppet.sh +2 -0
  273. data/templates/Debian-6.0.4-i386-netboot/ruby.sh +10 -0
  274. data/templates/Debian-6.0.4-i386-netboot/vagrant.sh +21 -0
  275. data/templates/Debian-6.0.4-i386-netboot/virtualbox.sh +13 -0
  276. data/templates/Debian-6.0.4-i386-netboot/zerodisk.sh +3 -0
  277. data/templates/Fedora-14-amd64-netboot/postinstall.sh +1 -1
  278. data/templates/Fedora-14-amd64/postinstall.sh +1 -1
  279. data/templates/Fedora-14-i386-netboot/postinstall.sh +1 -1
  280. data/templates/Fedora-14-i386/postinstall.sh +1 -1
  281. data/templates/Fedora-15-x86_64-netboot/definition.rb +29 -0
  282. data/templates/Fedora-15-x86_64-netboot/ks.cfg +64 -0
  283. data/templates/Fedora-15-x86_64-netboot/postinstall.sh +33 -0
  284. data/templates/Fedora-16-i386/definition.rb +17 -0
  285. data/templates/Fedora-16-i386/ks.cfg +72 -0
  286. data/templates/Fedora-16-i386/postinstall.sh +35 -0
  287. data/templates/Fedora-16-x86_64/definition.rb +17 -0
  288. data/templates/Fedora-16-x86_64/ks.cfg +72 -0
  289. data/templates/Fedora-16-x86_64/postinstall.sh +35 -0
  290. data/templates/SLES-11-SP1-DVD-i586-GM/autoinst_de.xml +1127 -0
  291. data/templates/SLES-11-SP1-DVD-i586-GM/autoinst_en.xml +1127 -0
  292. data/templates/SLES-11-SP1-DVD-i586-GM/definition.rb +37 -0
  293. data/templates/SLES-11-SP1-DVD-i586-GM/postinstall.sh +43 -0
  294. data/templates/SLES-11-SP1-DVD-x86_64-GM/autoinst_de.xml +1171 -0
  295. data/templates/SLES-11-SP1-DVD-x86_64-GM/autoinst_en.xml +1171 -0
  296. data/templates/SLES-11-SP1-DVD-x86_64-GM/definition.rb +37 -0
  297. data/templates/SLES-11-SP1-DVD-x86_64-GM/postinstall.sh +43 -0
  298. data/templates/archlinux-i386-netboot/aif.cfg +8 -14
  299. data/templates/archlinux-i386-netboot/definition.rb +4 -7
  300. data/templates/archlinux-i386-netboot/postinstall.sh +5 -17
  301. data/templates/archlinux-i386-netboot/postinstall2.sh +3 -1
  302. data/templates/archlinux-i386/postinstall.sh +1 -1
  303. data/templates/archlinux-x86_64-netboot/aif.cfg +8 -14
  304. data/templates/archlinux-x86_64-netboot/definition.rb +4 -7
  305. data/templates/archlinux-x86_64-netboot/postinstall.sh +1 -16
  306. data/templates/archlinux-x86_64-netboot/postinstall2.sh +3 -1
  307. data/templates/archlinux-x86_64/postinstall.sh +1 -1
  308. data/templates/freebsd-8.2-pcbsd-i386-netboot/definition.rb +5 -3
  309. data/templates/freebsd-8.2-pcbsd-i386-netboot/postinstall.sh +1 -1
  310. data/templates/freebsd-8.2-pcbsd-i386/definition.rb +3 -2
  311. data/templates/freebsd-8.2-pcbsd-i386/postinstall.sh +1 -1
  312. data/templates/funtoo-latest-generic_64-stable/definition.rb +34 -0
  313. data/templates/funtoo-latest-generic_64-stable/postinstall.sh +177 -0
  314. data/templates/funtoo-latest-generic_64-stable/postinstall2.sh +83 -0
  315. data/templates/gentoo-latest-i386-experimental/definition.rb +6 -6
  316. data/templates/gentoo-latest-i386-experimental/postinstall.sh +1 -1
  317. data/templates/gentoo-latest-x86_64-experimental/definition.rb +34 -0
  318. data/templates/gentoo-latest-x86_64-experimental/postinstall.sh +214 -0
  319. data/templates/openSUSE-11.4-DVD-i586/postinstall.sh +6 -1
  320. data/templates/openSUSE-11.4-DVD-x86_64/postinstall.sh +6 -1
  321. data/templates/openSUSE-11.4-NET-i586/postinstall.sh +6 -1
  322. data/templates/openSUSE-11.4-NET-x86_64/postinstall.sh +6 -1
  323. data/templates/openSUSE-12.1-DVD+NET-i586/autoinst_de.xml +1483 -0
  324. data/templates/openSUSE-12.1-DVD+NET-i586/autoinst_en.xml +1483 -0
  325. data/templates/openSUSE-12.1-DVD+NET-i586/definition.rb +44 -0
  326. data/templates/openSUSE-12.1-DVD+NET-i586/postinstall.sh +48 -0
  327. data/templates/openSUSE-12.1-DVD+NET-x86_64/autoinst_de.xml +1727 -0
  328. data/templates/openSUSE-12.1-DVD+NET-x86_64/autoinst_en.xml +1727 -0
  329. data/templates/openSUSE-12.1-DVD+NET-x86_64/definition.rb +44 -0
  330. data/templates/openSUSE-12.1-DVD+NET-x86_64/postinstall.sh +48 -0
  331. data/templates/openbsd50_amd64/README +28 -0
  332. data/templates/openbsd50_amd64/definition.rb +84 -0
  333. data/templates/openbsd50_amd64/postinstall.sh +81 -0
  334. data/templates/openbsd50_i386/README +28 -0
  335. data/templates/openbsd50_i386/definition.rb +84 -0
  336. data/templates/openbsd50_i386/postinstall.sh +80 -0
  337. data/templates/openindiana-148-ai-x86/definition.rb +1 -1
  338. data/templates/openindiana-148-ai-x86/postinstall.sh +1 -1
  339. data/templates/opensuse-11.4-i386-experimental/postinstall.sh +1 -1
  340. data/templates/scientificlinux-6.1-i386-netboot/base.sh +1 -0
  341. data/templates/scientificlinux-6.1-i386-netboot/chef.sh +1 -0
  342. data/templates/scientificlinux-6.1-i386-netboot/cleanup.sh +4 -0
  343. data/templates/scientificlinux-6.1-i386-netboot/definition.rb +35 -0
  344. data/templates/scientificlinux-6.1-i386-netboot/ks.cfg +53 -0
  345. data/templates/scientificlinux-6.1-i386-netboot/postinstall.sh +30 -0
  346. data/templates/scientificlinux-6.1-i386-netboot/puppet.sh +1 -0
  347. data/templates/scientificlinux-6.1-i386-netboot/vagrant.sh +8 -0
  348. data/templates/scientificlinux-6.1-i386-netboot/virtualbox.sh +8 -0
  349. data/templates/scientificlinux-6.1-x86_64-netboot/base.sh +1 -0
  350. data/templates/scientificlinux-6.1-x86_64-netboot/chef.sh +1 -0
  351. data/templates/scientificlinux-6.1-x86_64-netboot/cleanup.sh +4 -0
  352. data/templates/scientificlinux-6.1-x86_64-netboot/definition.rb +35 -0
  353. data/templates/scientificlinux-6.1-x86_64-netboot/ks.cfg +53 -0
  354. data/templates/scientificlinux-6.1-x86_64-netboot/postinstall.sh +30 -0
  355. data/templates/scientificlinux-6.1-x86_64-netboot/puppet.sh +1 -0
  356. data/templates/scientificlinux-6.1-x86_64-netboot/vagrant.sh +8 -0
  357. data/templates/scientificlinux-6.1-x86_64-netboot/virtualbox.sh +8 -0
  358. data/templates/solaris-11-express-i386/definition.rb +1 -1
  359. data/templates/solaris-11-express-i386/postinstall.sh +1 -1
  360. data/templates/ubuntu-10.04.2-amd64-netboot/postinstall.sh +12 -11
  361. data/templates/ubuntu-10.04.2-server-i386-netboot/postinstall.sh +12 -11
  362. data/templates/ubuntu-10.04.3-server-amd64-alt/definition.rb +2 -2
  363. data/templates/ubuntu-10.04.3-server-amd64-alt/postinstall.sh +12 -11
  364. data/templates/ubuntu-10.04.3-server-amd64/vagrant.sh +1 -1
  365. data/templates/ubuntu-10.04.3-server-i386/postinstall.sh +12 -11
  366. data/templates/ubuntu-10.04.4-server-amd64/definition.rb +24 -0
  367. data/templates/ubuntu-10.04.4-server-amd64/postinstall.sh +92 -0
  368. data/templates/ubuntu-10.04.4-server-amd64/preseed.cfg +87 -0
  369. data/templates/ubuntu-10.04.4-server-i386/definition.rb +24 -0
  370. data/templates/ubuntu-10.04.4-server-i386/postinstall.sh +92 -0
  371. data/templates/ubuntu-10.04.4-server-i386/preseed.cfg +87 -0
  372. data/templates/ubuntu-10.10-server-amd64-netboot/postinstall.sh +12 -11
  373. data/templates/ubuntu-10.10-server-amd64/postinstall.sh +12 -11
  374. data/templates/ubuntu-10.10-server-i386-netboot/postinstall.sh +12 -11
  375. data/templates/ubuntu-10.10-server-i386/postinstall.sh +12 -11
  376. data/templates/ubuntu-11.04-server-amd64/ssh-keys.sh +1 -1
  377. data/templates/ubuntu-11.04-server-i386/definition.rb +1 -1
  378. data/templates/ubuntu-11.04-server-i386/postinstall.sh +12 -11
  379. data/templates/ubuntu-11.10-server-amd64-ishaya/definition.rb +24 -0
  380. data/templates/ubuntu-11.10-server-amd64-ishaya/postinstall.sh +91 -0
  381. data/templates/ubuntu-11.10-server-amd64-ishaya/preseed.cfg +87 -0
  382. data/templates/ubuntu-11.10-server-amd64-ruby192/definition.rb +24 -0
  383. data/templates/ubuntu-11.10-server-amd64-ruby192/postinstall.sh +91 -0
  384. data/templates/ubuntu-11.10-server-amd64-ruby192/preseed.cfg +87 -0
  385. data/templates/ubuntu-11.10-server-amd64-rvm/definition.rb +35 -0
  386. data/templates/ubuntu-11.10-server-amd64-rvm/postinstall.sh +85 -0
  387. data/templates/ubuntu-11.10-server-amd64-rvm/preseed.cfg +93 -0
  388. data/templates/ubuntu-11.10-server-amd64/definition.rb +35 -0
  389. data/templates/ubuntu-11.10-server-amd64/postinstall.sh +89 -0
  390. data/templates/ubuntu-11.10-server-amd64/preseed.cfg +87 -0
  391. data/templates/ubuntu-11.10-server-i386/definition.rb +35 -0
  392. data/templates/ubuntu-11.10-server-i386/postinstall.sh +89 -0
  393. data/templates/ubuntu-11.10-server-i386/preseed.cfg +87 -0
  394. data/templates/ubuntu-12.04-server-amd64-packages/definition.rb +37 -0
  395. data/templates/{Debian-6.0.2-amd64-netboot → ubuntu-12.04-server-amd64-packages}/postinstall.sh +33 -32
  396. data/templates/ubuntu-12.04-server-amd64-packages/preseed.cfg +87 -0
  397. data/templates/ubuntu-12.04-server-amd64/definition.rb +37 -0
  398. data/templates/ubuntu-12.04-server-amd64/postinstall.sh +92 -0
  399. data/templates/ubuntu-12.04-server-amd64/preseed.cfg +87 -0
  400. data/templates/ubuntu-8.04.4-server-amd64/definition.rb +1 -0
  401. data/templates/ubuntu-8.04.4-server-amd64/postinstall.sh +19 -17
  402. data/templates/ubuntu-8.04.4-server-amd64/preseed.cfg +0 -1
  403. data/templates/ubuntu-8.04.4-server-i386/definition.rb +1 -1
  404. data/templates/ubuntu-8.04.4-server-i386/postinstall.sh +34 -11
  405. data/templates/windows-2008R1-serverstandard-amd64/Autounattend.xml +146 -0
  406. data/templates/windows-2008R1-serverstandard-amd64/README.md +134 -0
  407. data/templates/windows-2008R1-serverstandard-amd64/cygwin-setup.exe +0 -0
  408. data/templates/windows-2008R1-serverstandard-amd64/definition.rb +114 -0
  409. data/templates/windows-2008R1-serverstandard-amd64/install-cygwin-sshd.bat +41 -0
  410. data/templates/windows-2008R1-serverstandard-amd64/install-guest-additions.bat +5 -0
  411. data/templates/windows-2008R1-serverstandard-amd64/install-winrm.bat +16 -0
  412. data/templates/windows-2008R1-serverstandard-amd64/oracle-cert.cer +0 -0
  413. data/templates/windows-2008R1-serverstandard-amd64/postinstall.sh +75 -0
  414. data/templates/windows-2008R1-serverstandard-amd64/sudo +2 -0
  415. data/templates/windows-2008R1-serverstandard-amd64/winrm.rb +8 -0
  416. data/templates/windows-2008R1-serverweb-amd64/Autounattend.xml +162 -0
  417. data/templates/windows-2008R1-serverweb-amd64/README.md +134 -0
  418. data/templates/windows-2008R1-serverweb-amd64/cygwin-setup.exe +0 -0
  419. data/templates/windows-2008R1-serverweb-amd64/definition.rb +131 -0
  420. data/templates/windows-2008R1-serverweb-amd64/install-cygwin-sshd.bat +40 -0
  421. data/templates/windows-2008R1-serverweb-amd64/install-guest-additions.bat +5 -0
  422. data/templates/windows-2008R1-serverweb-amd64/install-vbox-guest.bat +2 -0
  423. data/templates/windows-2008R1-serverweb-amd64/install-winrm.bat +16 -0
  424. data/templates/windows-2008R1-serverweb-amd64/oracle-cert.cer +0 -0
  425. data/templates/windows-2008R1-serverweb-amd64/postinstall.sh +74 -0
  426. data/templates/windows-2008R1-serverweb-amd64/sudo +2 -0
  427. data/templates/windows-2008R1-serverweb-amd64/winrm.rb +8 -0
  428. data/templates/windows-2008R1-serverweb-i386/Autounattend.xml +142 -0
  429. data/templates/windows-2008R1-serverweb-i386/README.md +136 -0
  430. data/templates/windows-2008R1-serverweb-i386/cygwin-setup.exe +0 -0
  431. data/templates/windows-2008R1-serverweb-i386/definition.rb +132 -0
  432. data/templates/windows-2008R1-serverweb-i386/install-cygwin-sshd.bat +40 -0
  433. data/templates/windows-2008R1-serverweb-i386/install-vbox-guest.bat +2 -0
  434. data/templates/windows-2008R1-serverweb-i386/install-winrm.bat +14 -0
  435. data/templates/windows-2008R1-serverweb-i386/oracle-cert.cer +0 -0
  436. data/templates/windows-2008R1-serverweb-i386/postinstall.sh +74 -0
  437. data/templates/windows-2008R1-serverweb-i386/sudo +2 -0
  438. data/templates/windows-2008R1-serverweb-i386/winrm.rb +8 -0
  439. data/templates/windows-2008R1-serverwebcore-amd64/Autounattend.xml +162 -0
  440. data/templates/windows-2008R1-serverwebcore-amd64/README.md +134 -0
  441. data/templates/windows-2008R1-serverwebcore-amd64/cygwin-setup.exe +0 -0
  442. data/templates/windows-2008R1-serverwebcore-amd64/definition.rb +132 -0
  443. data/templates/windows-2008R1-serverwebcore-amd64/install-cygwin-sshd.bat +41 -0
  444. data/templates/windows-2008R1-serverwebcore-amd64/install-vbox-guest.bat +2 -0
  445. data/templates/windows-2008R1-serverwebcore-amd64/install-winrm.bat +14 -0
  446. data/templates/windows-2008R1-serverwebcore-amd64/oracle-cert.cer +0 -0
  447. data/templates/windows-2008R1-serverwebcore-amd64/postinstall.sh +74 -0
  448. data/templates/windows-2008R1-serverwebcore-amd64/sudo +2 -0
  449. data/templates/windows-2008R1-serverwebcore-amd64/winrm.rb +8 -0
  450. data/templates/windows-2008R2-amd64/cygwin-setup.exe +0 -0
  451. data/templates/windows-2008R2-amd64/install-winrm.bat +2 -0
  452. data/templates/windows-2008R2-amd64/postinstall.sh +1 -1
  453. data/templates/windows-2008R2-serverstandard-amd64/Autounattend.xml +147 -0
  454. data/templates/windows-2008R2-serverstandard-amd64/README.md +142 -0
  455. data/templates/windows-2008R2-serverstandard-amd64/definition.rb +43 -0
  456. data/templates/windows-2008R2-serverstandard-amd64/install-cygwin-sshd.bat +41 -0
  457. data/templates/windows-2008R2-serverstandard-amd64/install-winrm.bat +11 -0
  458. data/templates/windows-2008R2-serverstandard-amd64/oracle-cert.cer +0 -0
  459. data/templates/windows-2008R2-serverstandard-amd64/postinstall.sh +74 -0
  460. data/templates/windows-2008R2-serverweb-amd64/Autounattend.xml +151 -0
  461. data/templates/windows-2008R2-serverweb-amd64/README.md +142 -0
  462. data/templates/windows-2008R2-serverweb-amd64/definition.rb +38 -0
  463. data/templates/windows-2008R2-serverweb-amd64/install-cygwin-sshd.bat +40 -0
  464. data/templates/windows-2008R2-serverweb-amd64/install-vbox-guest.bat +2 -0
  465. data/templates/windows-2008R2-serverweb-amd64/install-winrm.bat +11 -0
  466. data/templates/windows-2008R2-serverweb-amd64/oracle-cert.cer +0 -0
  467. data/templates/windows-2008R2-serverweb-amd64/postinstall.sh +74 -0
  468. data/templates/windows-2008R2-serverwebcore-amd64/Autounattend.xml +145 -0
  469. data/templates/windows-2008R2-serverwebcore-amd64/README.md +142 -0
  470. data/templates/windows-2008R2-serverwebcore-amd64/cygwin-setup.exe +0 -0
  471. data/templates/windows-2008R2-serverwebcore-amd64/definition.rb +46 -0
  472. data/templates/windows-2008R2-serverwebcore-amd64/install-cygwin-sshd.bat +41 -0
  473. data/templates/windows-2008R2-serverwebcore-amd64/install-vbox-guest.bat +2 -0
  474. data/templates/windows-2008R2-serverwebcore-amd64/install-winrm.bat +11 -0
  475. data/templates/windows-2008R2-serverwebcore-amd64/oracle-cert.cer +0 -0
  476. data/templates/windows-2008R2-serverwebcore-amd64/postinstall.sh +74 -0
  477. data/templates/windows-7-enterprise-amd64/Autounattend.xml +155 -0
  478. data/templates/windows-7-enterprise-amd64/README.md +52 -0
  479. data/templates/windows-7-enterprise-amd64/definition.rb +40 -0
  480. data/templates/windows-7-enterprise-amd64/install-cygwin-sshd.bat +40 -0
  481. data/templates/windows-7-enterprise-amd64/install-vbox-guest.bat +2 -0
  482. data/templates/windows-7-enterprise-amd64/install-winrm.bat +14 -0
  483. data/templates/windows-7-enterprise-amd64/oracle-cert.cer +0 -0
  484. data/templates/windows-7-enterprise-amd64/postinstall.sh +74 -0
  485. data/templates/windows-7-enterprise-i386/Autounattend.xml +151 -0
  486. data/templates/windows-7-enterprise-i386/README.md +169 -0
  487. data/templates/windows-7-enterprise-i386/definition.rb +40 -0
  488. data/templates/windows-7-enterprise-i386/install-cygwin-sshd.bat +40 -0
  489. data/templates/windows-7-enterprise-i386/install-winrm.bat +14 -0
  490. data/templates/windows-7-enterprise-i386/oracle-cert.cer +0 -0
  491. data/templates/windows-7-enterprise-i386/postinstall.sh +74 -0
  492. data/templates/windows-7-premium-amd64/Autounattend.xml +152 -0
  493. data/templates/windows-7-premium-amd64/README.md +171 -0
  494. data/templates/windows-7-premium-amd64/definition.rb +38 -0
  495. data/templates/windows-7-premium-amd64/install-chefclient.bat +44 -0
  496. data/templates/windows-7-premium-amd64/install-winrm.bat +11 -0
  497. data/templates/windows-7-premium-amd64/oracle-cert.cer +0 -0
  498. data/templates/windows-7-premium-amd64/postinstall.sh +124 -0
  499. data/templates/windows-7-premium-amd64/winrm.rb +8 -0
  500. data/templates/windows-7-professional-amd64/Autounattend.xml +152 -0
  501. data/templates/windows-7-professional-amd64/README.md +171 -0
  502. data/templates/windows-7-professional-amd64/definition.rb +41 -0
  503. data/templates/windows-7-professional-amd64/install-cygwin-sshd.bat +40 -0
  504. data/templates/windows-7-professional-amd64/install-winrm.bat +14 -0
  505. data/templates/windows-7-professional-amd64/oracle-cert.cer +0 -0
  506. data/templates/windows-7-professional-amd64/postinstall.sh +74 -0
  507. data/templates/windows-7-ultimate-amd64/Autounattend.xml +152 -0
  508. data/templates/windows-7-ultimate-amd64/README.md +89 -0
  509. data/templates/windows-7-ultimate-amd64/definition.rb +41 -0
  510. data/templates/windows-7-ultimate-amd64/install-cygwin-sshd.bat +40 -0
  511. data/templates/windows-7-ultimate-amd64/install-winrm.bat +14 -0
  512. data/templates/windows-7-ultimate-amd64/oracle-cert.cer +0 -0
  513. data/templates/windows-7-ultimate-amd64/postinstall.sh +74 -0
  514. data/templates/windows-7sp1-ultimate-amd64/Autounattend.xml +149 -0
  515. data/templates/windows-7sp1-ultimate-amd64/README.md +89 -0
  516. data/templates/windows-7sp1-ultimate-amd64/definition.rb +42 -0
  517. data/templates/windows-7sp1-ultimate-amd64/install-cygwin-sshd.bat +40 -0
  518. data/templates/windows-7sp1-ultimate-amd64/install-winrm.bat +14 -0
  519. data/templates/windows-7sp1-ultimate-amd64/oracle-cert.cer +0 -0
  520. data/templates/windows-7sp1-ultimate-amd64/postinstall.sh +74 -0
  521. data/templates/windows-8-preview-dev-amd64/Autounattend.xml +140 -0
  522. data/templates/windows-8-preview-dev-amd64/README.md +134 -0
  523. data/templates/windows-8-preview-dev-amd64/cygwin-setup.exe +0 -0
  524. data/templates/windows-8-preview-dev-amd64/definition.rb +114 -0
  525. data/templates/windows-8-preview-dev-amd64/install-cygwin-sshd.bat +38 -0
  526. data/templates/windows-8-preview-dev-amd64/install-winrm.bat +11 -0
  527. data/templates/windows-8-preview-dev-amd64/oracle-cert.cer +0 -0
  528. data/templates/windows-8-preview-dev-amd64/postinstall.sh +122 -0
  529. data/templates/windows-8-preview-dev-amd64/winrm.rb +8 -0
  530. data/test/build_realtest.rb +71 -0
  531. data/test/definition_test.rb +3 -3
  532. data/test/definitions/test_definition/_disabled_postinstall.sh +1 -0
  533. data/test/definitions/test_definition/definition.rb +14 -17
  534. data/test/definitions/test_definition/enabled_postinstall.sh +1 -0
  535. data/test/environment_test.rb +4 -4
  536. data/validation/features/steps/{ssh_steps.rb → ssh_steps.old} +0 -0
  537. data/validation/features/steps/veewee_steps.rb +27 -0
  538. data/validation/veewee.feature +45 -0
  539. data/veewee.gemspec +18 -11
  540. metadata +500 -175
  541. data/Gemfile.lock +0 -98
  542. data/README-LIB.md +0 -2
  543. data/lib/veewee/builder/core/box.rb +0 -32
  544. data/lib/veewee/builder/core/builder/build.rb +0 -250
  545. data/lib/veewee/builder/core/builder/iso.rb +0 -120
  546. data/lib/veewee/builder/kvm/box.rb +0 -130
  547. data/lib/veewee/builder/kvm/builder.rb +0 -38
  548. data/lib/veewee/builder/virtualbox/box.rb +0 -121
  549. data/lib/veewee/builder/virtualbox/builder.rb +0 -48
  550. data/lib/veewee/builder/virtualbox/helper/_snapshots.rb +0 -105
  551. data/lib/veewee/builder/virtualbox/helper/_transaction.rb +0 -135
  552. data/lib/veewee/builder/virtualbox/helper/console_type.rb +0 -62
  553. data/lib/veewee/builder/virtualbox/helper/create.rb +0 -210
  554. data/lib/veewee/builder/virtualbox/helper/destroy.rb +0 -79
  555. data/lib/veewee/builder/virtualbox/helper/export_vagrant.rb +0 -87
  556. data/lib/veewee/builder/virtualbox/helper/validate_vagrant.rb +0 -35
  557. data/lib/veewee/builder/vmfusion/box.rb +0 -137
  558. data/lib/veewee/builder/vmfusion/builder.rb +0 -78
  559. data/lib/veewee/builder/vmfusion/helper/export_ova.rb +0 -26
  560. data/lib/veewee/builder/vmfusion/helper/validate_vmfusion.rb +0 -37
  561. data/lib/veewee/config/builders.rb +0 -36
  562. data/lib/veewee/util/scancode.rb +0 -112
  563. data/lib/veewee/util/shell.rb +0 -42
  564. data/lib/veewee/util/ssh.rb +0 -158
  565. data/lib/veewee/util/tcp.rb +0 -88
  566. data/lib/veewee/util/web.rb +0 -63
  567. data/lib/veewee/vagrant/config.rb +0 -7
  568. data/test/build_test.rb +0 -50
  569. data/test/definitions/test_definition/_test_me.sh +0 -1
  570. data/validation/vagrant.feature +0 -68
@@ -0,0 +1,37 @@
1
+ Veewee::Session.declare({
2
+ :os_type_id => 'OpenSUSE_64',
3
+ :cpu_count => '1',
4
+ :memory_size => '1024',
5
+ :disk_size => '20480',
6
+ :disk_format => 'VDI',
7
+ :hostiocache => 'off',
8
+ :iso_file => "SLES-11-SP1-DVD-x86_64-GM-DVD1.iso",
9
+ :iso_src => "",
10
+ :iso_md5 => "d2e10420f3689faa49a004b60fb396b7",
11
+ :iso_download_timeout => "1000",
12
+ :boot_wait => "10",
13
+ :boot_cmd_sequence => [
14
+ '<Esc><Enter>',
15
+ 'linux netdevice=eth0 netsetup=dhcp install=cd:/',
16
+ ' lang=en_US autoyast=http://%IP%:%PORT%/autoinst_en.xml',
17
+ ### disable prev line and enable next line to install with german settings
18
+ #' lang=de_DE autoyast=http://%IP%:%PORT%/autoinst_de.xml',
19
+ ' textmode=1',
20
+ '<Enter>'
21
+ ],
22
+ :kickstart_port => "7122",
23
+ :kickstart_timeout => "10000",
24
+ :kickstart_file => ["autoinst_en.xml", "autoinst_en.xml"],
25
+ ### disable prev line and enable next line to install with german settings
26
+ #:kickstart_file => ["autoinst_de.xml", "autoinst_de.xml"],
27
+ :ssh_login_timeout => "10000",
28
+ :ssh_user => "vagrant",
29
+ :ssh_password => "vagrant",
30
+ :ssh_key => "",
31
+ :ssh_host_port => "7222",
32
+ :ssh_guest_port => "22",
33
+ :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
34
+ :shutdown_cmd => "shutdown -P now",
35
+ :postinstall_files => ["postinstall.sh"],
36
+ :postinstall_timeout => "10000"
37
+ })
@@ -0,0 +1,43 @@
1
+ #
2
+ # postinstall.sh
3
+ #
4
+
5
+ date > /etc/vagrant_box_build_time
6
+
7
+ # install vagrant key
8
+ echo -e "\ninstall vagrant key ..."
9
+ mkdir -m 0700 /home/vagrant/.ssh
10
+ cd /home/vagrant/.ssh
11
+ wget --no-check-certificate -O authorized_keys https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub
12
+ chmod 0600 /home/vagrant/.ssh/authorized_keys
13
+ chown -R vagrant.users /home/vagrant/.ssh
14
+
15
+ # update sudoers
16
+ echo -e "\nupdate sudoers ..."
17
+ echo -e "\n# added by veewee/postinstall.sh" >> /etc/sudoers
18
+ echo -e "vagrant ALL=(ALL) NOPASSWD: ALL\n" >> /etc/sudoers
19
+
20
+ # speed-up remote logins
21
+ echo -e "\nspeed-up remote logins ..."
22
+ echo -e "\n# added by veewee/postinstall.sh" >> /etc/ssh/sshd_config
23
+ echo -e "UseDNS no\n" >> /etc/ssh/sshd_config
24
+
25
+ # install chef and puppet
26
+ echo -e "\ninstall chef and puppet ..."
27
+ gem install chef --no-ri --no-rdoc
28
+ gem install puppet --no-ri --no-rdoc
29
+
30
+ # install the virtualbox guest additions
31
+ echo -e "\ninstall the virtualbox guest additions ..."
32
+ zypper --non-interactive remove `rpm -qa virtualbox-guest-*` >/dev/null 2>&1
33
+ VBOX_VERSION=$(cat /home/vagrant/.vbox_version)
34
+ cd /tmp
35
+ wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso
36
+ #wget http://192.168.178.10/VBoxGuestAdditions_$VBOX_VERSION.iso
37
+ mount -o loop VBoxGuestAdditions_$VBOX_VERSION.iso /mnt
38
+ sh /mnt/VBoxLinuxAdditions.run
39
+ umount /mnt
40
+ rm -f VBoxGuestAdditions_$VBOX_VERSION.iso
41
+
42
+ echo -e "\nall done.\n"
43
+ exit
@@ -1,11 +1,15 @@
1
1
  # Archlinux AIF config file
2
2
  # created by Dave Simons
3
- # 11/07/2011
3
+ # 21/09/2011
4
4
 
5
5
  # install source
6
6
  SOURCE=net
7
- # use http mirrors only, ftp will time out
8
- SYNC_URL=http://mirrors.kernel.org/archlinux/core/os/i686
7
+ if [ -d /repo/core ]; then
8
+ TARGET_REPOSITORIES=(core 'file:///repo/$repo/$arch')
9
+ else
10
+ MIRROR='http://archlinux.mirror.kangaroot.net/$repo/os/$arch'
11
+ TARGET_REPOSITORIES=(core $var_MIRRORLIST extra $var_MIRRORLIST community $var_MIRRORLIST)
12
+ fi
9
13
 
10
14
  # time/date
11
15
  HARDWARECLOCK=localtime
@@ -13,7 +17,7 @@ TIMEZONE=Europe/Brussels
13
17
 
14
18
  # packages to install
15
19
  TARGET_GROUPS=base
16
- TARGET_PACKAGES='sudo openssh vim ruby kernel26-headers make gcc glibc git perl net-tools'
20
+ TARGET_PACKAGES='sudo openssh vim libyaml ruby linux-headers make gcc glibc git perl net-tools'
17
21
  TARGET_PACKAGES_EXCLUDE='nano emacs wpa_supplicant xfsprogs reiserfsprogs pcmciautils mdadm jfsutils cryptsetup lvm2'
18
22
 
19
23
  # hard drive setup
@@ -22,13 +26,3 @@ PARTITIONS='/dev/sda 100:ext2:+ 512:swap *:ext4'
22
26
  BLOCKDATA='/dev/sda1 raw no_label ext2;yes;/boot;target;no_opts;no_label;no_params
23
27
  /dev/sda2 raw no_label swap;yes;no_mountpoint;target;no_opts;no_label;no_params
24
28
  /dev/sda3 raw no_label ext4;yes;/;target;no_opts;no_label;no_params'
25
-
26
- worker_install_bootloader ()
27
- {
28
- cat << EOF > /mnt/boot/grub/device.map
29
- (hd0) /dev/sda
30
- EOF
31
- grub-install $var_GRUB_DEVICE --root-directory=/mnt || return 1
32
- bootdev=$(mount|grep $var_TARGET_DIR/boot|cut -d' ' -f1)
33
- generate_grub_menulst || return 1
34
- }
@@ -2,18 +2,15 @@ Veewee::Session.declare({
2
2
  :cpu_count => '1', :memory_size=> '256',
3
3
  :disk_size => '10140', :disk_format => 'VDI',:hostiocache => 'off',
4
4
  :os_type_id => 'ArchLinux',
5
- :iso_file => "archlinux-2010.05-netinstall-i686.iso",
6
- :iso_src => "http://archlinux.mirror.kangaroot.net/iso/2010.05/archlinux-2010.05-netinstall-i686.iso",
7
- :iso_md5 => "00df751d287d01821e0123c10056d020",
5
+ :iso_file => "archlinux-2011.08.19-netinstall-i686.iso",
6
+ :iso_src => "http://archlinux.mirror.kangaroot.net/iso/2011.08.19/archlinux-2011.08.19-netinstall-i686.iso",
7
+ :iso_md5 => "c3f7e10d040eac1da0efe68fb2f64d5b",
8
8
  :iso_download_timeout => "1000",
9
9
  :boot_wait => "5", :boot_cmd_sequence => [
10
10
  '<Enter>',
11
11
  '<Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait>',
12
12
  '<Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait>',
13
- '<Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait>',
14
- 'root<Enter>',
15
- 'dhcpcd eth0<Enter><Wait><Wait>',
16
- 'echo "sshd: ALL" > /etc/hosts.allow<Enter>',
13
+ 'dhcpcd eth0<Enter><Wait><Wait><Wait><Wait>',
17
14
  'passwd<Enter>',
18
15
  'vagrant<Enter>',
19
16
  'vagrant<Enter>',
@@ -1,5 +1,8 @@
1
1
  #!/bin/bash
2
2
 
3
+ # var to determine package source
4
+ PKGSRC=net
5
+
3
6
  date > /etc/vagrant_box_build_time
4
7
 
5
8
  # launch automated install
@@ -39,12 +42,6 @@ EOF
39
42
  # create puppet group
40
43
  groupadd puppet
41
44
 
42
- # make sure ssh is allowed
43
- echo "sshd: ALL" > /etc/hosts.allow
44
-
45
- # and everything else isn't
46
- echo "ALL: ALL" > /etc/hosts.deny
47
-
48
45
  # make sure sshd starts
49
46
  sed -i 's:^DAEMONS\(.*\))$:DAEMONS\1 sshd):' /etc/rc.conf
50
47
 
@@ -58,24 +55,15 @@ chown -R vagrant /home/vagrant/.ssh
58
55
  # choose a mirror
59
56
  sed -i 's/^#\(.*leaseweb.*\)/\1/' /etc/pacman.d/mirrorlist
60
57
 
61
- # update pacman
62
- pacman -Syy
63
- pacman -S --noconfirm pacman
64
-
65
- # upgrade pacman db
66
- pacman-db-upgrade
67
- pacman -Syy
68
-
69
58
  # install some packages
70
- pacman -S --noconfirm glibc git
71
59
  gem install --no-ri --no-rdoc chef facter
72
60
  cd /tmp
73
61
  git clone https://github.com/puppetlabs/puppet.git
74
62
  cd puppet
75
- ruby install.rb --bindir=/usr/bin --sbindir=/sbin
63
+ ruby install.rb --bindir=/usr/bin --sbindir=/sbin 2>/dev/null
76
64
 
77
65
  # set up networking
78
- sed -i 's/^\(interface=*\)/\1eth0/' /etc/rc.conf
66
+ [[ $PKGSRC == 'net' ]] && sed -i 's/^\(interface=*\)/\1eth0/' /etc/rc.conf
79
67
 
80
68
  # leave the chroot
81
69
  ENDCHROOT
@@ -22,7 +22,9 @@ y
22
22
  EOF
23
23
 
24
24
  # zero out the fs
25
- dd if=/dev/zero of=/tmp/clean || rm /tmp/clean
25
+ dd if=/dev/zero of=/clean bs=4M|| rm /clean
26
+ dd if=/dev/zero of=/tmp/clean bs=4M|| rm /tmp/clean
27
+ dd if=/dev/zero of=/boot/clean bs=4M|| rm /boot/clean
26
28
 
27
29
  # and the final reboot!
28
30
  #reboot
@@ -52,7 +52,7 @@ sed -i 's:^DAEMONS\(.*\))$:DAEMONS\1 sshd):' /etc/rc.conf
52
52
  # install mitchellh's ssh key
53
53
  mkdir /home/vagrant/.ssh
54
54
  chmod 700 /home/vagrant/.ssh
55
- wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O /home/vagrant/.ssh/authorized_keys
55
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /home/vagrant/.ssh/authorized_keys
56
56
  chmod 600 /home/vagrant/.ssh/authorized_keys
57
57
  chown -R vagrant /home/vagrant/.ssh
58
58
 
@@ -1,11 +1,15 @@
1
1
  # Archlinux AIF config file
2
2
  # created by Dave Simons
3
- # 11/07/2011
3
+ # 21/09/2011
4
4
 
5
5
  # install source
6
6
  SOURCE=net
7
- # use http mirrors only, ftp will time out
8
- SYNC_URL=http://mirrors.kernel.org/archlinux/core/os/x86_64
7
+ if [ -d /repo/core ]; then
8
+ TARGET_REPOSITORIES=(core 'file:///repo/$repo/$arch')
9
+ else
10
+ MIRROR='http://archlinux.mirror.kangaroot.net/$repo/os/$arch'
11
+ TARGET_REPOSITORIES=(core $var_MIRRORLIST extra $var_MIRRORLIST)
12
+ fi
9
13
 
10
14
  # time/date
11
15
  HARDWARECLOCK=localtime
@@ -13,7 +17,7 @@ TIMEZONE=Europe/Brussels
13
17
 
14
18
  # packages to install
15
19
  TARGET_GROUPS=base
16
- TARGET_PACKAGES='sudo openssh vim ruby kernel26-headers make gcc glibc git perl net-tools'
20
+ TARGET_PACKAGES='sudo openssh vim ruby linux-headers make gcc glibc git perl net-tools'
17
21
  TARGET_PACKAGES_EXCLUDE='nano emacs wpa_supplicant xfsprogs reiserfsprogs pcmciautils mdadm jfsutils cryptsetup lvm2'
18
22
 
19
23
  # hard drive setup
@@ -22,13 +26,3 @@ PARTITIONS='/dev/sda 100:ext2:+ 512:swap *:ext4'
22
26
  BLOCKDATA='/dev/sda1 raw no_label ext2;yes;/boot;target;no_opts;no_label;no_params
23
27
  /dev/sda2 raw no_label swap;yes;no_mountpoint;target;no_opts;no_label;no_params
24
28
  /dev/sda3 raw no_label ext4;yes;/;target;no_opts;no_label;no_params'
25
-
26
- worker_install_bootloader ()
27
- {
28
- cat << EOF > /mnt/boot/grub/device.map
29
- (hd0) /dev/sda
30
- EOF
31
- grub-install $var_GRUB_DEVICE --root-directory=/mnt || return 1
32
- bootdev=$(mount|grep $var_TARGET_DIR/boot|cut -d' ' -f1)
33
- generate_grub_menulst || return 1
34
- }
@@ -2,18 +2,15 @@ Veewee::Session.declare({
2
2
  :cpu_count => '1', :memory_size=> '256',
3
3
  :disk_size => '10140', :disk_format => 'VDI',:hostiocache => 'off',
4
4
  :os_type_id => 'ArchLinux_64',
5
- :iso_file => "archlinux-2010.05-netinstall-x86_64.iso",
6
- :iso_src => "http://archlinux.mirror.kangaroot.net/iso/2010.05/archlinux-2010.05-netinstall-x86_64.iso",
7
- :iso_md5 => "577ca8026a9997f7cecb430276d78793",
5
+ :iso_file => "archlinux-2011.08.19-netinstall-x86_64.iso",
6
+ :iso_src => "http://archlinux.mirror.kangaroot.net/iso/2011.08.19/archlinux-2011.08.19-netinstall-x86_64.iso",
7
+ :iso_md5 => "03a328dfd7a2f901995d77bcf645130c",
8
8
  :iso_download_timeout => "1000",
9
9
  :boot_wait => "5", :boot_cmd_sequence => [
10
10
  '<Enter>',
11
11
  '<Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait>',
12
12
  '<Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait>',
13
- '<Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait><Wait>',
14
- 'root<Enter>',
15
- 'dhcpcd eth0<Enter><Wait><Wait>',
16
- 'echo "sshd: ALL" > /etc/hosts.allow<Enter>',
13
+ 'dhcpcd eth0<Enter><Wait><Wait><Wait><Wait>',
17
14
  'passwd<Enter>',
18
15
  'vagrant<Enter>',
19
16
  'vagrant<Enter>',
@@ -42,12 +42,6 @@ EOF
42
42
  # create puppet group
43
43
  groupadd puppet
44
44
 
45
- # make sure ssh is allowed
46
- echo "sshd: ALL" > /etc/hosts.allow
47
-
48
- # and everything else isn't
49
- echo "ALL: ALL" > /etc/hosts.deny
50
-
51
45
  # make sure sshd starts
52
46
  sed -i 's:^DAEMONS\(.*\))$:DAEMONS\1 sshd):' /etc/rc.conf
53
47
 
@@ -61,21 +55,12 @@ chown -R vagrant /home/vagrant/.ssh
61
55
  # choose a mirror
62
56
  sed -i 's/^#\(.*leaseweb.*\)/\1/' /etc/pacman.d/mirrorlist
63
57
 
64
- # update pacman
65
- [[ $PKGSRC == 'cd' ]] && pacman -Syy
66
- [[ $PKGSRC == 'cd' ]] && pacman -S --noconfirm pacman
67
-
68
- # upgrade pacman db
69
- pacman-db-upgrade
70
- pacman -Syy
71
-
72
58
  # install some packages
73
- pacman -S --noconfirm glibc git
74
59
  gem install --no-ri --no-rdoc chef facter
75
60
  cd /tmp
76
61
  git clone https://github.com/puppetlabs/puppet.git
77
62
  cd puppet
78
- ruby install.rb --bindir=/usr/bin --sbindir=/sbin
63
+ ruby install.rb --bindir=/usr/bin --sbindir=/sbin 2>/dev/null
79
64
 
80
65
  # set up networking
81
66
  [[ $PKGSRC == 'net' ]] && sed -i 's/^\(interface=*\)/\1eth0/' /etc/rc.conf
@@ -22,7 +22,9 @@ y
22
22
  EOF
23
23
 
24
24
  # zero out the fs
25
- dd if=/dev/zero of=/tmp/clean || rm /tmp/clean
25
+ dd if=/dev/zero of=/clean bs=4M|| rm /clean
26
+ dd if=/dev/zero of=/tmp/clean bs=4M|| rm /tmp/clean
27
+ dd if=/dev/zero of=/boot/clean bs=4M|| rm /boot/clean
26
28
 
27
29
  # and the final reboot!
28
30
  #reboot
@@ -54,7 +54,7 @@ sed -i 's:^DAEMONS\(.*\))$:DAEMONS\1 sshd):' /etc/rc.conf
54
54
  # install mitchellh's ssh key
55
55
  mkdir /home/vagrant/.ssh
56
56
  chmod 700 /home/vagrant/.ssh
57
- wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O /home/vagrant/.ssh/authorized_keys
57
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /home/vagrant/.ssh/authorized_keys
58
58
  chmod 600 /home/vagrant/.ssh/authorized_keys
59
59
  chown -R vagrant /home/vagrant/.ssh
60
60
 
@@ -1,5 +1,6 @@
1
1
  # Many thanks to @draco2002
2
2
  # http://dracosplace.com/veewee_and_freebsd
3
+ #Based on https://gist.github.com/911058
3
4
 
4
5
  Veewee::Definition.declare( {
5
6
  :cpu_count => '1', :memory_size=> '768',
@@ -13,7 +14,8 @@ Veewee::Definition.declare( {
13
14
  '<KillX>',
14
15
  '<Enter>',
15
16
  'dhclient em0<Enter>',
16
- 'sleep 15;echo "Lets Get the File";fetch "http://%IP%:%PORT%/pcinstall.fbg.cfg";sleep 2;',
17
+ 'echo "waiting for 25 seconds"',
18
+ 'sleep 25;echo "Lets Get the File";fetch "http://%IP%:%PORT%/pcinstall.fbg.cfg";sleep 2;',
17
19
  'echo \'echo sshd_enable=\"YES\" >> $FSMNT/etc/rc.conf\' > /root/activate-ssh.sh ; cat /root/activate-ssh.sh<Enter>',
18
20
  'chmod +x /root/activate-ssh.sh<Enter>',
19
21
  'echo "Hope i got the file";/usr/PCBSD/pc-sysinstall/pc-sysinstall -c /root/pcinstall.fbg.cfg<Enter>',
@@ -25,5 +27,5 @@ Veewee::Definition.declare( {
25
27
  :sudo_cmd => "cat '%f'|su -",
26
28
  :shutdown_cmd => "shutdown -p now",
27
29
  :postinstall_files => [ "postinstall.sh"],:postinstall_timeout => "10000"
28
- }
29
- )
30
+ }
31
+ )
@@ -32,7 +32,7 @@ make install -DBATCH
32
32
  mkdir /home/vagrant/.ssh
33
33
  chmod 700 /home/vagrant/.ssh
34
34
  cd /home/vagrant/.ssh
35
- /usr/local/bin/wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
35
+ /usr/local/bin/wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
36
36
  chown -R vagrant /home/vagrant/.ssh
37
37
 
38
38
  # Cleaning portstree to save space
@@ -9,14 +9,15 @@ Veewee::Definition.declare({
9
9
  :disk_size => '10140', :disk_format => 'VDI', :hostiocache => 'off',
10
10
  :os_type_id => 'FreeBSD',
11
11
  :iso_file => "PCBSD8.2-x86-DVD.iso",
12
- :iso_src => "http://mirror.xenserv.net/PC-BSD/8.2/i386/PCBSD8.2-x86-DVD.iso",
12
+ :iso_src => "http://mirrors.isc.org/pub/pcbsd/8.2/i386/PCBSD8.2-x86-DVD.iso",
13
13
  :iso_md5 => "6433a8abf6073b177750d48398bed341",
14
14
  :iso_download_timeout => "1000",
15
15
  :boot_wait => "70", :boot_cmd_sequence => [
16
16
  '<KillX>',
17
17
  '<Enter>',
18
18
  'dhclient em0<Enter>',
19
- 'sleep 15;echo "Lets Get the File";fetch "http://%IP%:%PORT%/pcinstall.fbg.cfg";sleep 2;',
19
+ 'echo "waiting for 25 seconds"',
20
+ 'sleep 25;echo "Lets Get the File";fetch "http://%IP%:%PORT%/pcinstall.fbg.cfg";sleep 2;',
20
21
  'echo \'echo sshd_enable=\"YES\" >> $FSMNT/etc/rc.conf\' > /root/activate-ssh.sh ; cat /root/activate-ssh.sh<Enter>',
21
22
  'chmod +x /root/activate-ssh.sh<Enter>',
22
23
  'echo "Hope i got the file";/usr/PCBSD/pc-sysinstall/pc-sysinstall -c /root/pcinstall.fbg.cfg<Enter>',
@@ -32,7 +32,7 @@ make install -DBATCH
32
32
  mkdir /home/vagrant/.ssh
33
33
  chmod 700 /home/vagrant/.ssh
34
34
  cd /home/vagrant/.ssh
35
- /usr/local/bin/wget --no-check-certificate 'http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub' -O authorized_keys
35
+ /usr/local/bin/wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys
36
36
  chown -R vagrant /home/vagrant/.ssh
37
37
 
38
38
  # Cleaning portstree to save space
@@ -0,0 +1,34 @@
1
+ Veewee::Session.declare( {
2
+ :cpu_count => '8', :memory_size=> '1536',
3
+ :disk_size => '10140', :disk_format => 'VDI',:hostiocache => 'off',
4
+ :os_type_id => 'Gentoo_64', # Funtoo is a GIT based gentoo derivative
5
+ :iso_file => "install-amd64-minimal-20111208.iso",
6
+ :iso_src => "http://ftp.osuosl.org/pub/gentoo/releases/amd64/autobuilds/20111208/install-amd64-minimal-20111208.iso",
7
+ :iso_md5 => "8c4e10aaaa7cce35503c0d23b4e0a42a",
8
+ :iso_download_timeout => "1000",
9
+ :boot_wait => "4",
10
+ :boot_cmd_sequence => [
11
+ '<Wait>'*4,
12
+ 'gentoo-nofb<Enter>', # boot gentoo no frame buffer mode option
13
+ '<Wait>'*45,
14
+ '<Enter>', # asks about your keyboard, take the default
15
+ '<Wait>'*45,
16
+ '<Enter><Wait>', # just in case we are out of sync
17
+ 'net-setup eth0<Enter>',
18
+ '<Wait><Enter>',
19
+ '2<Enter>', # Set up the NIC card with DHCP
20
+ '1<Enter>',
21
+ '<Wait><Wait>ifconfig -a <Enter>',
22
+ 'passwd<Enter><Wait><Wait>',
23
+ 'vagrant<Enter><Wait>',
24
+ 'vagrant<Enter><Wait>',
25
+ '/etc/init.d/sshd start<Enter><Wait><Wait>'
26
+ ],
27
+ :kickstart_port => "7122", :kickstart_timeout => "10000",:kickstart_file => "",
28
+ :ssh_login_timeout => "10000",:ssh_user => "root", :ssh_password => "vagrant",:ssh_key => "",
29
+ :ssh_host_port => "7222", :ssh_guest_port => "22",
30
+ :sudo_cmd => "cat '%f'|su -",
31
+ :shutdown_cmd => "shutdown -p now",
32
+ :postinstall_files => [ "postinstall.sh", "postinstall2.sh" ], :postinstall_timeout => "15000"
33
+ }
34
+ )
@@ -0,0 +1,177 @@
1
+ #!/bin/bash
2
+
3
+ date > /etc/vagrant_box_build_time
4
+
5
+ #Based on http://www.funtoo.org/wiki/Funtoo_Linux_Installation
6
+
7
+ #Partition the disk
8
+ # Gentoo live CD were using doesn't have gdisk and it looks
9
+ # to be interactive like fdisk. sfdisk is scritable but has issues.
10
+ #
11
+ # If you adjust, best to read this
12
+ # http://www.spinics.net/lists/util-linux-ng/msg03406.html
13
+ #
14
+ # Basically, all partitioning programs are wonky, sfdisk is scriptable, but likes
15
+ # to keeps things too tight skipping post-MBR spacing and "grub-install" fails later.
16
+ # Take the advice of the email and partition your drive with fdisk and dump it with
17
+ #
18
+ # sfdisk -uS -d /dev/sda
19
+ #
20
+ # and plug those values into the script. The --force by sector will get
21
+ # you what fdisk layed out and gets something grub-install can deal with. fun...
22
+ #
23
+ #
24
+ #/boot -> /dev/sda1 200M, left 2Meg of space for grub-install
25
+ #swap -> /dev/sda2 1.5G
26
+ #root -> /dev/sda3 Rest of space and bootable
27
+
28
+ sfdisk --force -uS /dev/sda <<EOF
29
+ 4096,409600,L
30
+ 413696,3072000,S
31
+ 3485696,17281024,L,*
32
+ EOF
33
+
34
+ sleep 2
35
+
36
+ #Format the /boot
37
+ mke2fs -t ext2 /dev/sda1
38
+
39
+ #Main partition /
40
+ mke2fs -t ext4 /dev/sda3
41
+
42
+ #Format the swap and use it
43
+ mkswap /dev/sda2
44
+ swapon /dev/sda2
45
+
46
+ #Mount the new disk
47
+ mkdir /mnt/funtoo
48
+ mount /dev/sda3 /mnt/funtoo
49
+ mkdir /mnt/funtoo/boot
50
+ mount /dev/sda1 /mnt/funtoo/boot
51
+ cd /mnt/funtoo
52
+
53
+ #Note: we retry as sometimes mirrors fail to have the files
54
+ #Download a stage3 archive
55
+ wget --tries=5 http://ftp.osuosl.org/pub/funtoo/funtoo-stable/x86-64bit/generic_64/stage3-current.tar.xz
56
+ tar xpf stage3*
57
+
58
+ #Chroot
59
+ mount --bind /proc ./proc
60
+ mount --bind /dev ./dev
61
+ cp /etc/resolv.conf /mnt/funtoo/etc/
62
+ chroot /mnt/funtoo env-update
63
+
64
+ # git installed from stage3 tarball
65
+ chroot /mnt/funtoo emerge --sync
66
+
67
+ # California dreamin
68
+ cd /mnt/funtoo/etc
69
+ rm -f localtime
70
+ ln -s ../usr/share/zoneinfo/America/Los_Angeles localtime
71
+ cd /mnt/funtoo
72
+
73
+ # get fstab defined
74
+ cat <<FSTABEOF > /mnt/funtoo/etc/fstab
75
+ # The root filesystem should have a pass number of either 0 or 1.
76
+ # All other filesystems should have a pass number of 0 or greater than 1.
77
+ #
78
+ # See the manpage fstab(5) for more information.
79
+ #
80
+ # <fs> <mountpoint> <type> <opts> <dump/pass>
81
+
82
+ /dev/sda1 /boot ext2 noauto,noatime 1 2
83
+ /dev/sda2 none swap sw 0 0
84
+ /dev/sda3 / ext4 noatime 0 1
85
+ #/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
86
+ none /dev/shm tmpfs nodev,nosuid,noexec 0 0
87
+ FSTABEOF
88
+
89
+ # dhcp
90
+ chroot /mnt/funtoo rc-update add dhcpcd default
91
+
92
+ # Get the kernel sources
93
+ echo 'MAKEOPTS="-j9"' >> /mnt/funtoo/etc/make.conf
94
+ #echo 'MAKEOPTS="-j9"' >> /mnt/funtoo/etc/genkernel.conf
95
+ echo "sys-kernel/sysrescue-std-sources binary" >> /mnt/funtoo/etc/portage/package.use
96
+ echo "app-emulation/virtualbox-guest-additions" >> /mnt/funtoo/etc/portage/package.keywords
97
+ echo 'MAKEOPTS="-j9" emerge sysrescue-std-sources' | chroot /mnt/funtoo /bin/bash -
98
+
99
+ # Make the disk bootable
100
+ chroot /mnt/funtoo emerge boot-update
101
+
102
+ cat <<GRUBCONF > ./etc/boot.conf
103
+ boot {
104
+ generate grub
105
+ default "Funtoo Linux genkernel"
106
+ timeout 3
107
+ }
108
+
109
+ "Funtoo Linux" {
110
+ kernel bzImage[-v]
111
+ # params += nomodeset
112
+ }
113
+
114
+ "Funtoo Linux genkernel" {
115
+ kernel kernel[-v]
116
+ initrd initramfs[-v]
117
+ params += real_root=auto
118
+ # params += nomodeset
119
+ }
120
+ GRUBCONF
121
+
122
+ chroot /mnt/funtoo grub-install --no-floppy /dev/sda
123
+ chroot /mnt/funtoo boot-update
124
+
125
+ #Root password, needed since we're a two step installation
126
+ chroot /mnt/funtoo /bin/bash <<ENDCHROOT
127
+ passwd<<EOF
128
+ vagrant
129
+ vagrant
130
+ EOF
131
+ ENDCHROOT
132
+
133
+ #create vagrant user with password set to vagrant
134
+ chroot /mnt/funtoo groupadd -r vagrant
135
+ chroot /mnt/funtoo groupadd rvm
136
+ chroot /mnt/funtoo useradd -m -r vagrant -g vagrant -G wheel,rvm -p '$1$MPmczGP9$1SeNO4bw5YgiEJuo/ZkWq1' -c "Added by vagrant, veewee basebox creation"
137
+ chroot /mnt/funtoo rc-update add sshd default
138
+
139
+ #Allow external ssh
140
+ echo 'sshd:ALL' > /mnt/funtoo/etc/hosts.allow
141
+ echo 'ALL:ALL' > /mnt/funtoo/etc/hosts.deny
142
+
143
+ #Configure Sudo
144
+ chroot /mnt/funtoo emerge -u sudo
145
+ echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /mnt/funtoo/etc/sudoers
146
+
147
+
148
+ #Installing vagrant keys
149
+ chroot /mnt/funtoo emerge -u wget
150
+
151
+ echo "creating vagrant ssh keys"
152
+ VAGRANTID=$(grep vagrant /mnt/funtoo/etc/passwd | cut -d ":" -f 3,4)
153
+ mkdir /mnt/funtoo/home/vagrant/.ssh
154
+ chmod 700 /mnt/funtoo/home/vagrant/.ssh
155
+ wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /mnt/funtoo/home/vagrant/.ssh/authorized_keys
156
+ chmod 600 /mnt/funtoo/home/vagrant/.ssh/authorized_keys
157
+ chown -R ${VAGRANTID} /mnt/funtoo/home/vagrant/.ssh
158
+
159
+ /bin/cp -f /root/.vbox_version /mnt/funtoo/home/vagrant/.vbox_version
160
+ /bin/cp -f /etc/vagrant_box_build_time /mnt/funtoo/etc/vagrant_box_build_time
161
+ chown -R ${VAGRANTID} /mnt/funtoo/home/vagrant/.vbox_version
162
+
163
+ # veewee validate uses password authentication
164
+ sed -i -e 's:PasswordAuthentication no:PasswordAuthentication yes:' /mnt/funtoo/etc/ssh/sshd_config
165
+
166
+ #Get an editor going
167
+ chroot /mnt/funtoo emerge -u vim
168
+ echo "EDITOR=/usr/bin/vim" > /mnt/funtoo/etc/env.d/99editor
169
+ chroot /mnt/funtoo env-update
170
+
171
+
172
+ cd /
173
+ /etc/rc.d/network stop
174
+ umount /mnt/funtoo/{boot,proc,dev}
175
+ umount /mnt/funtoo
176
+
177
+ reboot