vagrant-skytap 0.1.11 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (342) hide show
  1. checksums.yaml +4 -4
  2. data/.byebug_history +242 -19
  3. data/CHANGELOG.md +9 -0
  4. data/README.md +30 -8
  5. data/Vagrantfile.rej +83 -0
  6. data/_patches-20160112/0 +388 -0
  7. data/_patches-20160112/1 +82 -0
  8. data/_patches-20160112/2 +239 -0
  9. data/_patches-20160112/COMPLETED-ABOVE-THIS-LINE +4 -0
  10. data/_patches-20160112/COMPLETED-BELOW-THIS-LINE +4 -0
  11. data/_patches-20160112/CR-ABOVE-THIS-LINE +4 -0
  12. data/_patches-20160112/CR-BELOW-THIS-LINE +4 -0
  13. data/_patches-20160112/WIP-ABOVE-THIS-LINE +4 -0
  14. data/_patches-20160112/WIP-BELOW-THIS-LINE +4 -0
  15. data/_patches-20160112/acceptance-test-runner +29 -0
  16. data/_patches-20160112/ansible-1 +92 -0
  17. data/_patches-20160112/cache-api-client-in-up +40 -0
  18. data/_patches-20160112/dead-code-in-actions +44 -0
  19. data/_patches-20160112/debug-changes +42 -0
  20. data/_patches-20160112/demo-rails-app +1276 -0
  21. data/_patches-20160112/eng-10166-halt-spec +40 -0
  22. data/_patches-20160112/eng-10256 +527 -0
  23. data/_patches-20160112/eng-10256-2 +162 -0
  24. data/_patches-20160112/eng-10256-ubuntu-testing +88 -0
  25. data/_patches-20160112/eng-10269-test-stuff +87 -0
  26. data/_patches-20160112/eng-10269-wtf +119 -0
  27. data/_patches-20160112/eng-10369 +143 -0
  28. data/_patches-20160112/eng-10369-tmp +60 -0
  29. data/_patches-20160112/eng-10919 +56 -0
  30. data/_patches-20160112/eng-11177-fix-actions-requires +44 -0
  31. data/_patches-20160112/eng-11442 +4 -0
  32. data/_patches-20160112/eng-11616 +403 -0
  33. data/_patches-20160112/eng-11616-2 +67 -0
  34. data/_patches-20160112/eng-11616-actual +184 -0
  35. data/_patches-20160112/eng-11625a +4 -0
  36. data/_patches-20160112/eng-11711 +85 -0
  37. data/_patches-20160112/eng-12232-command-spec +236 -0
  38. data/_patches-20160112/eng-12235 +83 -0
  39. data/_patches-20160112/eng-12235-override-refactor +140 -0
  40. data/_patches-20160112/eng-12240 +103 -0
  41. data/_patches-20160112/eng-12249 +40 -0
  42. data/_patches-20160112/eng-12301 +50 -0
  43. data/_patches-20160112/eng-12843 +95 -0
  44. data/_patches-20160112/env-source +112 -0
  45. data/_patches-20160112/frickin-vagrant-spec +163 -0
  46. data/_patches-20160112/gem-pre-version +14 -0
  47. data/_patches-20160112/gems-old +9 -0
  48. data/_patches-20160112/googles-specs +713 -0
  49. data/_patches-20160112/local-configs-ignore +61 -0
  50. data/_patches-20160112/misc +79 -0
  51. data/_patches-20160112/network-unreachable +31 -0
  52. data/_patches-20160112/new-boxfile +288 -0
  53. data/_patches-20160112/parallelization-maybe +198 -0
  54. data/_patches-20160112/read-state +23 -0
  55. data/_patches-20160112/refactor-to-use-public_address-cap +25 -0
  56. data/_patches-20160112/series +60 -0
  57. data/_patches-20160112/status +12 -0
  58. data/_patches-20160112/test-move-env-data +231 -0
  59. data/_patches-20160112/test-vagrantfile-vm1 +167 -0
  60. data/_patches-20160112/the_version_in_0.1.13.pre1 +598 -0
  61. data/_patches-20160112/vagrant-spec-mock-api +137 -0
  62. data/_patches-20160112/vagrant-vmware-plugin +233 -0
  63. data/_patches-20160112/vagrantfile +403 -0
  64. data/_patches-20160112/vagrantfile-for-acceptance-tests +29 -0
  65. data/_patches-20160112/vagrantfile-for-nick +95 -0
  66. data/_patches-20160112/vagrantfiles-to-forget-what-they-are-for +134 -0
  67. data/_patches-20160112/vm-vanished +42 -0
  68. data/_patches-20160112a/01 +148 -0
  69. data/_patches-20160112a/2 +239 -0
  70. data/_patches-20160112a/COMPLETED-ABOVE-THIS-LINE +4 -0
  71. data/_patches-20160112a/COMPLETED-BELOW-THIS-LINE +4 -0
  72. data/_patches-20160112a/CR-ABOVE-THIS-LINE +4 -0
  73. data/_patches-20160112a/CR-BELOW-THIS-LINE +4 -0
  74. data/_patches-20160112a/WIP-ABOVE-THIS-LINE +4 -0
  75. data/_patches-20160112a/WIP-BELOW-THIS-LINE +4 -0
  76. data/_patches-20160112a/acceptance-test-runner +29 -0
  77. data/_patches-20160112a/ansible-1 +92 -0
  78. data/_patches-20160112a/cache-api-client-in-up +40 -0
  79. data/_patches-20160112a/dead-code-in-actions +44 -0
  80. data/_patches-20160112a/debug-changes +42 -0
  81. data/_patches-20160112a/demo-rails-app +1276 -0
  82. data/_patches-20160112a/eng-10166-halt-spec +40 -0
  83. data/_patches-20160112a/eng-10256-ubuntu-testing +88 -0
  84. data/_patches-20160112a/eng-10269-test-stuff +87 -0
  85. data/_patches-20160112a/eng-10269-wtf +119 -0
  86. data/_patches-20160112a/eng-10369 +143 -0
  87. data/_patches-20160112a/eng-10369-tmp +60 -0
  88. data/_patches-20160112a/eng-10919 +56 -0
  89. data/_patches-20160112a/eng-11177-fix-actions-requires +44 -0
  90. data/_patches-20160112a/eng-11442 +4 -0
  91. data/_patches-20160112a/eng-11616 +403 -0
  92. data/_patches-20160112a/eng-11616-2 +67 -0
  93. data/_patches-20160112a/eng-11616-actual +184 -0
  94. data/_patches-20160112a/eng-11625a +4 -0
  95. data/_patches-20160112a/eng-11711 +85 -0
  96. data/_patches-20160112a/eng-12232-command-spec +236 -0
  97. data/_patches-20160112a/eng-12235 +83 -0
  98. data/_patches-20160112a/eng-12235-override-refactor +140 -0
  99. data/_patches-20160112a/eng-12240 +103 -0
  100. data/_patches-20160112a/eng-12249 +40 -0
  101. data/_patches-20160112a/eng-12301 +50 -0
  102. data/_patches-20160112a/eng-12843 +95 -0
  103. data/_patches-20160112a/env-source +112 -0
  104. data/_patches-20160112a/frickin-vagrant-spec +163 -0
  105. data/_patches-20160112a/gem-pre-version +14 -0
  106. data/_patches-20160112a/gems-old +9 -0
  107. data/_patches-20160112a/googles-specs +713 -0
  108. data/_patches-20160112a/local-configs-ignore +61 -0
  109. data/_patches-20160112a/misc +79 -0
  110. data/_patches-20160112a/network-unreachable +31 -0
  111. data/_patches-20160112a/new-boxfile +288 -0
  112. data/_patches-20160112a/parallelization-maybe +198 -0
  113. data/_patches-20160112a/read-state +23 -0
  114. data/_patches-20160112a/refactor-to-use-public_address-cap +25 -0
  115. data/_patches-20160112a/series +58 -0
  116. data/_patches-20160112a/status +14 -0
  117. data/_patches-20160112a/test-move-env-data +231 -0
  118. data/_patches-20160112a/test-vagrantfile-vm1 +167 -0
  119. data/_patches-20160112a/the_version_in_0.1.13.pre1 +612 -0
  120. data/_patches-20160112a/then-copy-the-newer-files +632 -0
  121. data/_patches-20160112a/vagrant-spec-mock-api +137 -0
  122. data/_patches-20160112a/vagrant-vmware-plugin +233 -0
  123. data/_patches-20160112a/vagrantfile +403 -0
  124. data/_patches-20160112a/vagrantfile-for-acceptance-tests +29 -0
  125. data/_patches-20160112a/vagrantfile-for-nick +95 -0
  126. data/_patches-20160112a/vagrantfiles-to-forget-what-they-are-for +134 -0
  127. data/_patches-20160112a/vm-vanished +42 -0
  128. data/_patches-20160113/COMPLETED-ABOVE-THIS-LINE +4 -0
  129. data/_patches-20160113/COMPLETED-BELOW-THIS-LINE +4 -0
  130. data/_patches-20160113/CR-ABOVE-THIS-LINE +4 -0
  131. data/_patches-20160113/CR-BELOW-THIS-LINE +4 -0
  132. data/_patches-20160113/WIP-ABOVE-THIS-LINE +4 -0
  133. data/_patches-20160113/WIP-BELOW-THIS-LINE +4 -0
  134. data/_patches-20160113/acceptance-test-runner +29 -0
  135. data/_patches-20160113/ansible-1 +92 -0
  136. data/_patches-20160113/cache-api-client-in-up +40 -0
  137. data/_patches-20160113/dead-code-in-actions +44 -0
  138. data/_patches-20160113/debug-changes +55 -0
  139. data/_patches-20160113/demo-rails-app +1276 -0
  140. data/_patches-20160113/eng-10166-halt-spec +40 -0
  141. data/_patches-20160113/eng-10256 +543 -0
  142. data/_patches-20160113/eng-10256-ubuntu-testing +88 -0
  143. data/_patches-20160113/eng-10269-test-stuff +87 -0
  144. data/_patches-20160113/eng-10269-wtf +119 -0
  145. data/_patches-20160113/eng-10369 +143 -0
  146. data/_patches-20160113/eng-10369-tmp +60 -0
  147. data/_patches-20160113/eng-10919 +56 -0
  148. data/_patches-20160113/eng-11177-fix-actions-requires +44 -0
  149. data/_patches-20160113/eng-11442 +4 -0
  150. data/_patches-20160113/eng-11616 +403 -0
  151. data/_patches-20160113/eng-11616-2 +67 -0
  152. data/_patches-20160113/eng-11616-actual +184 -0
  153. data/_patches-20160113/eng-11625a +4 -0
  154. data/_patches-20160113/eng-11711 +85 -0
  155. data/_patches-20160113/eng-12232-command-spec +236 -0
  156. data/_patches-20160113/eng-12235 +83 -0
  157. data/_patches-20160113/eng-12235-override-refactor +140 -0
  158. data/_patches-20160113/eng-12240 +103 -0
  159. data/_patches-20160113/eng-12249 +40 -0
  160. data/_patches-20160113/eng-12301 +50 -0
  161. data/_patches-20160113/eng-12720 +47 -0
  162. data/_patches-20160113/eng-12843 +95 -0
  163. data/_patches-20160113/env-source +112 -0
  164. data/_patches-20160113/frickin-vagrant-spec +163 -0
  165. data/_patches-20160113/gem-pre-version +14 -0
  166. data/_patches-20160113/gems-old +9 -0
  167. data/_patches-20160113/googles-specs +713 -0
  168. data/_patches-20160113/local-configs-ignore +61 -0
  169. data/_patches-20160113/misc +79 -0
  170. data/_patches-20160113/network-unreachable +31 -0
  171. data/_patches-20160113/new-boxfile +288 -0
  172. data/_patches-20160113/parallelization-maybe +198 -0
  173. data/_patches-20160113/read-state +23 -0
  174. data/_patches-20160113/refactor-to-use-public_address-cap +25 -0
  175. data/_patches-20160113/series +56 -0
  176. data/_patches-20160113/status +14 -0
  177. data/_patches-20160113/test-move-env-data +231 -0
  178. data/_patches-20160113/test-vagrantfile-vm1 +167 -0
  179. data/_patches-20160113/vagrant-spec-mock-api +137 -0
  180. data/_patches-20160113/vagrant-vmware-plugin +233 -0
  181. data/_patches-20160113/vagrantfile +403 -0
  182. data/_patches-20160113/vagrantfile-for-acceptance-tests +29 -0
  183. data/_patches-20160113/vagrantfile-for-nick +95 -0
  184. data/_patches-20160113/vagrantfiles-to-forget-what-they-are-for +134 -0
  185. data/_patches-20160113/vm-vanished +42 -0
  186. data/_patches-20160118/COMPLETED-ABOVE-THIS-LINE +4 -0
  187. data/_patches-20160118/COMPLETED-BELOW-THIS-LINE +4 -0
  188. data/_patches-20160118/CR-ABOVE-THIS-LINE +4 -0
  189. data/_patches-20160118/CR-BELOW-THIS-LINE +4 -0
  190. data/_patches-20160118/WIP-ABOVE-THIS-LINE +4 -0
  191. data/_patches-20160118/WIP-BELOW-THIS-LINE +4 -0
  192. data/_patches-20160118/acceptance-test-runner +29 -0
  193. data/_patches-20160118/ansible-1 +92 -0
  194. data/_patches-20160118/cache-api-client-in-up +40 -0
  195. data/_patches-20160118/dead-code-in-actions +44 -0
  196. data/_patches-20160118/debug-changes +55 -0
  197. data/_patches-20160118/demo-rails-app +1276 -0
  198. data/_patches-20160118/eng-10166-halt-spec +40 -0
  199. data/_patches-20160118/eng-10256 +554 -0
  200. data/_patches-20160118/eng-10256-cr +314 -0
  201. data/_patches-20160118/eng-10256-ubuntu-testing +88 -0
  202. data/_patches-20160118/eng-10269-test-stuff +87 -0
  203. data/_patches-20160118/eng-10269-wtf +119 -0
  204. data/_patches-20160118/eng-10369 +143 -0
  205. data/_patches-20160118/eng-10369-tmp +60 -0
  206. data/_patches-20160118/eng-10919 +56 -0
  207. data/_patches-20160118/eng-11177-fix-actions-requires +44 -0
  208. data/_patches-20160118/eng-11442 +4 -0
  209. data/_patches-20160118/eng-11616 +403 -0
  210. data/_patches-20160118/eng-11616-2 +67 -0
  211. data/_patches-20160118/eng-11616-actual +184 -0
  212. data/_patches-20160118/eng-11625a +4 -0
  213. data/_patches-20160118/eng-11711 +85 -0
  214. data/_patches-20160118/eng-12232-command-spec +236 -0
  215. data/_patches-20160118/eng-12235 +83 -0
  216. data/_patches-20160118/eng-12235-override-refactor +140 -0
  217. data/_patches-20160118/eng-12240 +103 -0
  218. data/_patches-20160118/eng-12249 +40 -0
  219. data/_patches-20160118/eng-12301 +50 -0
  220. data/_patches-20160118/eng-12720 +74 -0
  221. data/_patches-20160118/eng-12843 +95 -0
  222. data/_patches-20160118/eng-13040 +291 -0
  223. data/_patches-20160118/env-source +112 -0
  224. data/_patches-20160118/frickin-vagrant-spec +163 -0
  225. data/_patches-20160118/gem-pre-version +14 -0
  226. data/_patches-20160118/gems-old +9 -0
  227. data/_patches-20160118/googles-specs +713 -0
  228. data/_patches-20160118/local-configs-ignore +61 -0
  229. data/_patches-20160118/misc +79 -0
  230. data/_patches-20160118/network-unreachable +31 -0
  231. data/_patches-20160118/new-boxfile +288 -0
  232. data/_patches-20160118/parallelization-maybe +198 -0
  233. data/_patches-20160118/port-forwarding-processes +87 -0
  234. data/_patches-20160118/read-state +23 -0
  235. data/_patches-20160118/refactor-to-use-public_address-cap +25 -0
  236. data/_patches-20160118/series +59 -0
  237. data/_patches-20160118/status +13 -0
  238. data/_patches-20160118/test-move-env-data +231 -0
  239. data/_patches-20160118/test-vagrantfile-vm1 +167 -0
  240. data/_patches-20160118/vagrant-spec-mock-api +137 -0
  241. data/_patches-20160118/vagrant-vmware-plugin +233 -0
  242. data/_patches-20160118/vagrantfile +403 -0
  243. data/_patches-20160118/vagrantfile-for-acceptance-tests +29 -0
  244. data/_patches-20160118/vagrantfile-for-nick +95 -0
  245. data/_patches-20160118/vagrantfiles-to-forget-what-they-are-for +134 -0
  246. data/_patches-20160118/vm-vanished +42 -0
  247. data/_patches-20160118a/COMPLETED-ABOVE-THIS-LINE +4 -0
  248. data/_patches-20160118a/COMPLETED-BELOW-THIS-LINE +4 -0
  249. data/_patches-20160118a/CR-ABOVE-THIS-LINE +4 -0
  250. data/_patches-20160118a/CR-BELOW-THIS-LINE +4 -0
  251. data/_patches-20160118a/WIP-ABOVE-THIS-LINE +4 -0
  252. data/_patches-20160118a/WIP-BELOW-THIS-LINE +4 -0
  253. data/_patches-20160118a/acceptance-test-runner +29 -0
  254. data/_patches-20160118a/ansible-1 +92 -0
  255. data/_patches-20160118a/bar +189 -0
  256. data/_patches-20160118a/cache-api-client-in-up +40 -0
  257. data/_patches-20160118a/dead-code-in-actions +44 -0
  258. data/_patches-20160118a/debug-changes +55 -0
  259. data/_patches-20160118a/demo-rails-app +1276 -0
  260. data/_patches-20160118a/eng-10166-halt-spec +40 -0
  261. data/_patches-20160118a/eng-10256 +554 -0
  262. data/_patches-20160118a/eng-10256-cr +314 -0
  263. data/_patches-20160118a/eng-10256-ubuntu-testing +88 -0
  264. data/_patches-20160118a/eng-10269-test-stuff +87 -0
  265. data/_patches-20160118a/eng-10269-wtf +119 -0
  266. data/_patches-20160118a/eng-10369 +143 -0
  267. data/_patches-20160118a/eng-10369-tmp +60 -0
  268. data/_patches-20160118a/eng-10919 +56 -0
  269. data/_patches-20160118a/eng-11177-fix-actions-requires +44 -0
  270. data/_patches-20160118a/eng-11442 +4 -0
  271. data/_patches-20160118a/eng-11616 +403 -0
  272. data/_patches-20160118a/eng-11616-2 +67 -0
  273. data/_patches-20160118a/eng-11616-actual +184 -0
  274. data/_patches-20160118a/eng-11625a +4 -0
  275. data/_patches-20160118a/eng-11711 +85 -0
  276. data/_patches-20160118a/eng-12232-command-spec +236 -0
  277. data/_patches-20160118a/eng-12235 +83 -0
  278. data/_patches-20160118a/eng-12235-override-refactor +140 -0
  279. data/_patches-20160118a/eng-12240 +103 -0
  280. data/_patches-20160118a/eng-12249 +40 -0
  281. data/_patches-20160118a/eng-12301 +50 -0
  282. data/_patches-20160118a/eng-12720 +74 -0
  283. data/_patches-20160118a/eng-12843 +95 -0
  284. data/_patches-20160118a/eng-13040 +291 -0
  285. data/_patches-20160118a/env-source +112 -0
  286. data/_patches-20160118a/foo +169 -0
  287. data/_patches-20160118a/frickin-vagrant-spec +163 -0
  288. data/_patches-20160118a/gem-pre-version +14 -0
  289. data/_patches-20160118a/gems-old +9 -0
  290. data/_patches-20160118a/googles-specs +713 -0
  291. data/_patches-20160118a/guestport-madness +59 -0
  292. data/_patches-20160118a/local-configs-ignore +61 -0
  293. data/_patches-20160118a/misc +79 -0
  294. data/_patches-20160118a/network-unreachable +31 -0
  295. data/_patches-20160118a/new-boxfile +288 -0
  296. data/_patches-20160118a/parallelization-maybe +198 -0
  297. data/_patches-20160118a/port-forwarding-processes +87 -0
  298. data/_patches-20160118a/read-state +23 -0
  299. data/_patches-20160118a/refactor-to-use-public_address-cap +25 -0
  300. data/_patches-20160118a/series +62 -0
  301. data/_patches-20160118a/status +14 -0
  302. data/_patches-20160118a/test-move-env-data +231 -0
  303. data/_patches-20160118a/test-vagrantfile-vm1 +167 -0
  304. data/_patches-20160118a/vagrant-spec-mock-api +137 -0
  305. data/_patches-20160118a/vagrant-vmware-plugin +233 -0
  306. data/_patches-20160118a/vagrantfile +403 -0
  307. data/_patches-20160118a/vagrantfile-for-acceptance-tests +29 -0
  308. data/_patches-20160118a/vagrantfile-for-nick +95 -0
  309. data/_patches-20160118a/vagrantfiles-to-forget-what-they-are-for +134 -0
  310. data/_patches-20160118a/vm-vanished +42 -0
  311. data/lib/vagrant-skytap/action/clear_forwarded_ports.rb +19 -0
  312. data/lib/vagrant-skytap/action/forward_ports.rb +42 -0
  313. data/lib/vagrant-skytap/action/prepare_forwarded_port_collision_params.rb +37 -0
  314. data/lib/vagrant-skytap/action.rb +18 -0
  315. data/lib/vagrant-skytap/api/environment.rb +19 -4
  316. data/lib/vagrant-skytap/api/vm.rb +10 -6
  317. data/lib/vagrant-skytap/command/up.rb +7 -1
  318. data/lib/vagrant-skytap/errors.rb +4 -0
  319. data/lib/vagrant-skytap/hosts/bsd/cap/ssh_tunnel.rb +15 -0
  320. data/lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb +183 -0
  321. data/lib/vagrant-skytap/hosts/linux/cap/ssh_tunnel.rb +15 -0
  322. data/lib/vagrant-skytap/hosts/windows/cap/ssh_tunnel.rb +27 -0
  323. data/lib/vagrant-skytap/model/forwarded_port.rb +78 -0
  324. data/lib/vagrant-skytap/plugin.rb +15 -0
  325. data/lib/vagrant-skytap/util/compile_forwarded_ports.rb +35 -0
  326. data/lib/vagrant-skytap/version.rb +1 -1
  327. data/locales/en.yml +3 -0
  328. data/spec/unit/environment_spec.rb +14 -2
  329. data/spec/unit/forwarded_port_spec.rb +45 -0
  330. data/spec/unit/hosts/common/cap/ssh_tunnel_spec.rb +180 -0
  331. data/spec/unit/prepare_collision_params_spec.rb +57 -0
  332. data/spec/unit/support/forwarded_ports/machines/vm1/skytap/id +1 -0
  333. data/spec/unit/support/forwarded_ports/machines/vm1/skytap/private_key +4 -0
  334. data/spec/unit/support/forwarded_ports/machines/vm1/skytap/tcp9000_tcp_9000_80.pid +1 -0
  335. data/spec/unit/support/forwarded_ports/machines/vm1/skytap/tcp9001_tcp_9001_81.pid +1 -0
  336. data/spec/unit/support/forwarded_ports/machines/vm1/virtualbox/id +1 -0
  337. data/spec/unit/support/forwarded_ports/machines/vm2/skytap/id +1 -0
  338. data/spec/unit/support/forwarded_ports/machines/vm2/skytap/tcp8080_tcp_8080_80.pid +1 -0
  339. data/spec/unit/support/forwarded_ports/machines/vm3/virtualbox/id +1 -0
  340. data/spec/unit/support/forwarded_ports/machines/vm4/skytap/id +1 -0
  341. data/spec/unit/support/forwarded_ports/machines/vm4/skytap/tcp8888_tcp_8888_80.pid +1 -0
  342. metadata +330 -2
@@ -0,0 +1,42 @@
1
+ # HG changeset patch
2
+ # Parent 1b8860f8b5129c2ab846c4464378c7a582ac0a90
3
+ raise error on vm reload if it's gone?
4
+
5
+ diff -r 1b8860f8b512 lib/vagrant-skytap/api/vm.rb
6
+ --- a/lib/vagrant-skytap/api/vm.rb Mon Nov 09 20:51:32 2015 -0800
7
+ +++ b/lib/vagrant-skytap/api/vm.rb Mon Nov 09 20:52:02 2015 -0800
8
+ @@ -35,6 +35,7 @@
9
+ end
10
+
11
+ def refresh_from_environment
12
+ + raise VmVanished, name: machine.name unless vm = environment.get_vm_by_id(id)
13
+ refresh(vm.attrs)
14
+ end
15
+
16
+ diff -r 1b8860f8b512 lib/vagrant-skytap/errors.rb
17
+ --- a/lib/vagrant-skytap/errors.rb Mon Nov 09 20:51:32 2015 -0800
18
+ +++ b/lib/vagrant-skytap/errors.rb Mon Nov 09 20:52:02 2015 -0800
19
+ @@ -27,6 +27,10 @@
20
+ error_key(:does_not_exist)
21
+ end
22
+
23
+ + class VmVanished < VagrantSkytapError
24
+ + error_key(:vm_vanished)
25
+ + end
26
+ +
27
+ class BadVmUrl < VagrantSkytapError
28
+ error_key(:bad_vm_url)
29
+ end
30
+ diff -r 1b8860f8b512 locales/en.yml
31
+ --- a/locales/en.yml Mon Nov 09 20:51:32 2015 -0800
32
+ +++ b/locales/en.yml Mon Nov 09 20:52:02 2015 -0800
33
+ @@ -76,6 +76,9 @@
34
+ does_not_exist: |-
35
+ %{object_name} was not found.
36
+
37
+ + vm_vanished: |-
38
+ + The VM '%{name}' no longer exists on Skytap.
39
+ +
40
+ operation_failed: |-
41
+ The operation failed: %{err}
42
+
@@ -0,0 +1,148 @@
1
+ # HG changeset patch
2
+ # Parent b151a1a45bee7b2b6d57e9259001f2f7a8ec52a8
3
+ # Parent fcbbf2b6298088fecf8f0c9150e92e5624c8dbe7
4
+ just the common host cap -- is it going the wrong way?
5
+
6
+ diff -r fcbbf2b62980 lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb
7
+ --- a/lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb Tue Jan 12 22:40:01 2016 -0800
8
+ +++ b/lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb Tue Jan 12 22:43:54 2016 -0800
9
+ @@ -12,35 +12,32 @@
10
+ module HostCommon
11
+ module Cap
12
+ class SSHTunnel
13
+ - def self.create_logger
14
+ - Log4r::Logger.new("vagrant::hosts::common")
15
+ - end
16
+ + def self.start_ssh_tunnel(env, fp, env_hash)
17
+ + logger = Log4r::Logger.new("vagrant::hosts::bsd")
18
+ + port = {
19
+ + adapter: fp.adapter,
20
+ + guestip: fp.guest_ip,
21
+ + guestport: fp.guest_port,
22
+ + hostip: fp.host_ip,
23
+ + hostport: fp.host_port,
24
+ + name: fp.id,
25
+ + protocol: fp.protocol
26
+ + }
27
+
28
+ - # called per port by ForwardPorts
29
+ - def self.start_ssh_tunnel(env, fp, env_hash)
30
+ - logger = create_logger
31
+ - machine = env_hash[:machine]
32
+ - pid = read_pid(File.join(machine.data_dir, pidfile_name(fp)))
33
+ + pidfile = pidfile_name(port, env_hash)
34
+ + pid = read_pid(pidfile)
35
+ if pid && autossh_pid?(pid)
36
+ logger.info("An autossh process already exists with pid #{pid}.")
37
+ else
38
+ - args = autossh_args(fp, pidfile, env_hash)
39
+ + args = autossh_args(port, pidfile, env_hash)
40
+ Vagrant::Util::Subprocess.execute("autossh", *args)
41
+ end
42
+ end
43
+
44
+ - # called for machine by ClearForwardedPorts
45
+ - def self.kill_forwarded_ports(env, env_hash)
46
+ - get_pidfiles_for_machine(env_hash[:machine]).each do |pidfile|
47
+ - kill_ssh_tunnel(env, pidfile, env_hash)
48
+ - end
49
+ - end
50
+ -
51
+ - # exposed but not called currently from any action
52
+ def self.kill_ssh_tunnel(env, pidfile, env_hash)
53
+ - logger = create_logger
54
+ - machine = env_hash[:machine]
55
+ - pid = read_pid(File.join(machine.data_dir, pidfile))
56
+ + logger = Log4r::Logger.new("vagrant::hosts::bsd")
57
+ + pidfile = File.join(env_hash[:machine].data_dir, pidfile)
58
+ + pid = read_pid(pidfile)
59
+ if pid && autossh_pid?(pid)
60
+ Vagrant::Util::Subprocess.execute("kill", pid.to_s)
61
+ else
62
+ @@ -49,26 +46,17 @@
63
+ end
64
+ end
65
+
66
+ - ####################################
67
+ + private
68
+
69
+ - def self.pidfile_name(fp)
70
+ - "#{fp[:host_ip]}.pid"
71
+ + def self.pidfile_name(port, env_hash)
72
+ + tunnel_name = [port[:hostip], port[:name]].compact.join('_')
73
+ + File.join(env_hash[:machine].data_dir, "#{tunnel_name}.pid")
74
+ end
75
+
76
+ - def self.read_pid(pidfile_path)
77
+ - File.read(pidfile_path).presence.try(:to_i) if File.exist?(pidfile_path)
78
+ + def self.read_pid(pidfile)
79
+ + File.read(pidfile).presence.try(:to_i) if File.exist?(pidfile)
80
+ end
81
+
82
+ - def self.get_pidfiles_for_machine(machine)
83
+ - pidfiles = []
84
+ - Vagrant::Util::SafeChdir.safe_chdir(machine.data_dir) do
85
+ - pidfiles = Dir.glob("*.pid")
86
+ - end
87
+ - pidfiles
88
+ - end
89
+ -
90
+ - ####################################
91
+ -
92
+ # Checks that the pid is actually an autossh process (and not
93
+ # something else using a recycled pid).
94
+ def self.autossh_pid?(pid)
95
+ @@ -77,16 +65,23 @@
96
+ end
97
+
98
+ # Get the command, minus any arguments, for the given
99
+ - # pid. This probably needs to be overridden per host cap
100
+ + # pid. I don't expect this to be compatible cross-platform yet...
101
+ + # This could be complicated cross-platform, and Sys::ProcTable
102
+ + # could likewise be complicated cross-platform ...
103
+ def self.get_comm_for_pid(pid)
104
+ result = Vagrant::Util::Subprocess.execute("ps", "-p", pid.to_s, "-o", "comm")
105
+ result.stdout.split("\n").last
106
+ end
107
+
108
+ - ####################################
109
+ + def self.read_forwarded_ports(env, env_hash, machine = nil)
110
+ + logger = create_logger
111
+ + machine ||= env_hash[:machine]
112
+ + get_pidfiles_for_machine(machine).collect do |pidfile|
113
+ + read_pid(File.join(machine.data_dir, pidfile))
114
+ + end
115
+ + end
116
+
117
+ - def self.autossh_args(fp, pidfile, env_hash)
118
+ - machine = env_hash[:machine]
119
+ + def self.autossh_args(port, pidfile, env_hash)
120
+ ssh_info = env_hash[:machine_ssh_info]
121
+ ssh_options = {
122
+ "ServerAliveInterval" => 10,
123
+ @@ -96,16 +91,22 @@
124
+ environment_variables = {
125
+ env: {
126
+ "AUTOSSH_PIDFILE" => pidfile,
127
+ - "AUTOSSH_PORT" => 0, # turn off monitoring
128
+ + "AUTOSSH_PORT" => 0, # turns off monitoring
129
+ + #"AUTOSSH_LOGFILE" => "./autossh.log",
130
+ }
131
+ }
132
+ + forward_string = [
133
+ + port[:hostport],
134
+ + "localhost",
135
+ + port[:guestport]
136
+ + ].join(':')
137
+
138
+ autossh_args = []
139
+ autossh_args << "-q"
140
+ autossh_args << "-N"
141
+ autossh_args << "-f"
142
+ - autossh_args << "-i" << machine.data_dir.join("private_key").to_s
143
+ - autossh_args << "-L" << "#{fp[:host_port]}:localhost:#{fp[:guest_port]}"
144
+ + autossh_args << "-i" << env_hash[:machine].data_dir.join("private_key").to_s
145
+ + autossh_args << "-L" << forward_string
146
+ ssh_options.each do |k, v|
147
+ autossh_args << "-o" << "#{k}=#{v}"
148
+ end
@@ -0,0 +1,239 @@
1
+ # HG changeset patch
2
+ # Parent 74d169c04caec5d9ccb8355c531b767d9225cf95
3
+ diff -r 74d169c04cae -r 5e40023c756c Vagrantfile
4
+ --- a/Vagrantfile Tue Jan 12 14:38:22 2016 -0800
5
+ +++ b/Vagrantfile Tue Jan 12 18:07:03 2016 -0800
6
+ @@ -120,12 +120,12 @@
7
+ box.ssh.password = vms[vm1_key][:password]
8
+ box.vm.communicator = vms[vm1_key][:communicator]
9
+ #box.vm.synced_folder "vm1", "/synced", type: :nfs, mount_options: ['actimeo=1']
10
+ - box.vm.synced_folder ".", "/vagrant-skytap", type: :nfs, mount_options: ['actimeo=1']
11
+ + #box.vm.synced_folder ".", "/vagrant-skytap", type: :nfs, mount_options: ['actimeo=1']
12
+ #box.vm.provision "shell", path: "provisioning/trivial.sh"
13
+ box.vm.provision "shell", path: "provisioning/apache.sh"
14
+ box.vm.provision "shell", path: "provisioning/vagrant.sh"
15
+
16
+ - #box.vm.network :forwarded_port, guest: 80, host: 9000
17
+ + box.vm.network :forwarded_port, guest: 80, host: 9000
18
+ #box.vm.network :forwarded_port, guest: 21, host: 9001
19
+ end
20
+
21
+ diff -r 74d169c04cae -r 5e40023c756c lib/vagrant-skytap/action/clear_forwarded_ports.rb
22
+ --- a/lib/vagrant-skytap/action/clear_forwarded_ports.rb Tue Jan 12 14:38:22 2016 -0800
23
+ +++ b/lib/vagrant-skytap/action/clear_forwarded_ports.rb Tue Jan 12 18:07:03 2016 -0800
24
+ @@ -8,12 +8,11 @@
25
+ class ClearForwardedPorts
26
+ def initialize(app, env)
27
+ @app = app
28
+ - @env = env
29
+ end
30
+
31
+ def call(env)
32
+ env[:ui].info I18n.t("vagrant.actions.vm.clear_forward_ports.deleting")
33
+ - pidfiles = @env[:host].capability(:kill_forwarded_ports, @env)
34
+ + env[:host].capability(:kill_forwarded_ports, env)
35
+
36
+ @app.call(env)
37
+ end
38
+ diff -r 74d169c04cae -r 5e40023c756c lib/vagrant-skytap/action/prepare_forwarded_port_collision_params.rb
39
+ --- a/lib/vagrant-skytap/action/prepare_forwarded_port_collision_params.rb Tue Jan 12 14:38:22 2016 -0800
40
+ +++ b/lib/vagrant-skytap/action/prepare_forwarded_port_collision_params.rb Tue Jan 12 18:07:03 2016 -0800
41
+ @@ -1,3 +1,4 @@
42
+ +require 'byebug'
43
+ module VagrantPlugins
44
+ module Skytap
45
+ module Action
46
+ @@ -9,22 +10,23 @@
47
+ def call(env)
48
+ # Get the forwarded ports used by other virtual machines and
49
+ # consider those in use as well.
50
+ - env[:port_collision_extra_in_use] = @env[:host].capability(:read_used_ports, @env)
51
+ + env[:port_collision_extra_in_use] = env[:host].capability(:read_used_ports, env)
52
+
53
+ # Build the remap for any existing collision detections
54
+ remap = {}
55
+ env[:port_collision_remap] = remap
56
+ - env[:host].capability(:read_forwarded_ports, env).each do |_nic, name, hostport, _guestport|
57
+ + env[:host].capability(:read_forwarded_ports, env).each do |name, hostport|
58
+ env[:machine].config.vm.networks.each do |type, options|
59
+ next if type != :forwarded_port
60
+
61
+ # If the ID matches the name of the forwarded port, then remap.
62
+ if options[:id] == name
63
+ - remap[options[:host]] = hostport
64
+ + remap[options[:host]] = hostport # what happens with 'ssh' ?????
65
+ break
66
+ end
67
+ end
68
+ end
69
+ +# debugger
70
+
71
+ @app.call(env)
72
+ end
73
+ @@ -32,3 +34,6 @@
74
+ end
75
+ end
76
+ end
77
+ +
78
+ +#[_nic,ssh, 2222,22]
79
+ +#[_nic,tcp3001,3001,3001]
80
+ diff -r 74d169c04cae -r 5e40023c756c lib/vagrant-skytap/hosts/bsd/cap/ssh_tunnel.rb
81
+ --- a/lib/vagrant-skytap/hosts/bsd/cap/ssh_tunnel.rb Tue Jan 12 14:38:22 2016 -0800
82
+ +++ b/lib/vagrant-skytap/hosts/bsd/cap/ssh_tunnel.rb Tue Jan 12 18:07:03 2016 -0800
83
+ @@ -4,7 +4,7 @@
84
+ module Skytap
85
+ module HostBSD
86
+ module Cap
87
+ - class SSHTunnel < VagrantPlugins::Skytap::Common::Cap::SSHTunnel
88
+ + class SSHTunnel < VagrantPlugins::Skytap::HostCommon::Cap::SSHTunnel
89
+ def self.create_logger
90
+ Log4r::Logger.new("vagrant::hosts::bsd")
91
+ end
92
+ diff -r 74d169c04cae -r 5e40023c756c lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb
93
+ --- a/lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb Tue Jan 12 14:38:22 2016 -0800
94
+ +++ b/lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb Tue Jan 12 18:07:03 2016 -0800
95
+ @@ -19,18 +19,25 @@
96
+ # called per port by ForwardPorts
97
+ def self.start_ssh_tunnel(env, fp, env_hash)
98
+ logger = create_logger
99
+ - machine = env_hash[:machine]
100
+ - pid = read_pid(File.join(machine.data_dir, pidfile_name(fp)))
101
+ - if pid && autossh_pid?(pid)
102
+ - logger.info("An autossh process already exists with pid #{pid}.")
103
+ - else
104
+ - args = autossh_args(fp, pidfile, env_hash)
105
+ - Vagrant::Util::Subprocess.execute("autossh", *args)
106
+ + pidfile = File.join(env_hash[:machine].data_dir, pidfile_name(fp))
107
+ + if pid = read_pid(pidfile)
108
+ + debugger
109
+ + if autossh_pid?(pid)
110
+ + logger.info("An autossh process already exists with pid #{pid}.")
111
+ + return
112
+ + else
113
+ + logger.info("Cleaning up stale autossh pidfile #{pidfile}.")
114
+ + Vagrant::Util::Subprocess.execute("rm", pidfile)
115
+ + end
116
+ end
117
+ + debugger
118
+ + args = autossh_args(fp, env_hash)
119
+ + Vagrant::Util::Subprocess.execute("autossh", *args)
120
+ end
121
+
122
+ # called for machine by ClearForwardedPorts
123
+ def self.kill_forwarded_ports(env, env_hash)
124
+ +# debugger
125
+ get_pidfiles_for_machine(env_hash[:machine]).each do |pidfile|
126
+ kill_ssh_tunnel(env, pidfile, env_hash)
127
+ end
128
+ @@ -40,33 +47,48 @@
129
+ def self.kill_ssh_tunnel(env, pidfile, env_hash)
130
+ logger = create_logger
131
+ machine = env_hash[:machine]
132
+ - pid = read_pid(File.join(machine.data_dir, pidfile))
133
+ - if pid && autossh_pid?(pid)
134
+ - Vagrant::Util::Subprocess.execute("kill", pid.to_s)
135
+ + pidfile = File.join(machine.data_dir, pidfile)
136
+ + if pid = read_pid(pidfile)
137
+ + debugger
138
+ + if autossh_pid?(pid)
139
+ + myenv = {env: {"AUTOSSH_PIDFILE" => pidfile}}
140
+ + Vagrant::Util::Subprocess.execute("kill", pid.to_s, myenv)
141
+ + else
142
+ + logger.info("Cleaning up stale autossh pidfile #{pidfile}.")
143
+ + Vagrant::Util::Subprocess.execute("rm", pidfile)
144
+ + end
145
+ else
146
+ - logger.info("Cleaning up stale autossh pidfile #{pidfile}.")
147
+ - Vagrant::Util::Subprocess.execute("rm", pidfile)
148
+ + debugger
149
+ + logger.info("Pidfile #{pidfile} not found.")
150
+ end
151
+ end
152
+
153
+ ####################################
154
+
155
+ - def self.read_forwarded_ports(env, env_hash, machine = nil)
156
+ - logger = create_logger
157
+ - machine ||= env_hash[:machine]
158
+ + # forwarded ports used by ALL OTHER machines
159
+ + def self.read_used_ports(env, env_hash)
160
+ + # pretend for the moment that we don't care
161
+ + []
162
+ + end
163
+ +
164
+ + # forwarded ports used by THIS machine
165
+ + def self.read_forwarded_ports(env, env_hash)
166
+ + machine = env_hash[:machine]
167
+ get_pidfiles_for_machine(machine).collect do |pidfile|
168
+ - read_pid(File.join(machine.data_dir, pidfile))
169
+ + pidfile =~ /(.*)(\d+)/
170
+ + [pidfile,$2]
171
+ end
172
+ end
173
+
174
+ ####################################
175
+
176
+ def self.pidfile_name(fp)
177
+ - "#{fp[:host_ip]}.pid"
178
+ + # there's one that's just named ssh, what do we do about it?
179
+ + "#{fp.protocol}#{fp.host_port}.pid"
180
+ end
181
+
182
+ - def self.read_pid(pidfile_path)
183
+ - File.read(pidfile_path).presence.try(:to_i) if File.exist?(pidfile_path)
184
+ + def self.read_pid(pidfile)
185
+ + File.read(pidfile).presence.try(:to_i) if File.exist?(pidfile)
186
+ end
187
+
188
+ def self.get_pidfiles_for_machine(machine)
189
+ @@ -95,7 +117,7 @@
190
+
191
+ ####################################
192
+
193
+ - def self.autossh_args(fp, pidfile, env_hash)
194
+ + def self.autossh_args(fp, env_hash)
195
+ machine = env_hash[:machine]
196
+ ssh_info = env_hash[:machine_ssh_info]
197
+ ssh_options = {
198
+ @@ -105,7 +127,7 @@
199
+ }
200
+ environment_variables = {
201
+ env: {
202
+ - "AUTOSSH_PIDFILE" => pidfile,
203
+ + "AUTOSSH_PIDFILE" => File.join(machine.data_dir, pidfile_name(fp)),
204
+ "AUTOSSH_PORT" => 0, # turn off monitoring
205
+ }
206
+ }
207
+ @@ -115,7 +137,7 @@
208
+ autossh_args << "-N"
209
+ autossh_args << "-f"
210
+ autossh_args << "-i" << machine.data_dir.join("private_key").to_s
211
+ - autossh_args << "-L" << "#{fp[:host_port]}:localhost:#{fp[:guest_port]}"
212
+ + autossh_args << "-L" << "#{fp.host_port}:localhost:#{fp.guest_port}"
213
+ ssh_options.each do |k, v|
214
+ autossh_args << "-o" << "#{k}=#{v}"
215
+ end
216
+ diff -r 74d169c04cae -r 5e40023c756c lib/vagrant-skytap/hosts/linux/cap/ssh_tunnel.rb
217
+ --- a/lib/vagrant-skytap/hosts/linux/cap/ssh_tunnel.rb Tue Jan 12 14:38:22 2016 -0800
218
+ +++ b/lib/vagrant-skytap/hosts/linux/cap/ssh_tunnel.rb Tue Jan 12 18:07:03 2016 -0800
219
+ @@ -4,7 +4,7 @@
220
+ module Skytap
221
+ module HostLinux
222
+ module Cap
223
+ - class SSHTunnel < VagrantPlugins::Skytap::Common::Cap::SSHTunnel
224
+ + class SSHTunnel < VagrantPlugins::Skytap::HostCommon::Cap::SSHTunnel
225
+ def self.create_logger
226
+ Log4r::Logger.new("vagrant::hosts::linux")
227
+ end
228
+ diff -r 74d169c04cae -r 5e40023c756c lib/vagrant-skytap/hosts/windows/cap/ssh_tunnel.rb
229
+ --- a/lib/vagrant-skytap/hosts/windows/cap/ssh_tunnel.rb Tue Jan 12 14:38:22 2016 -0800
230
+ +++ b/lib/vagrant-skytap/hosts/windows/cap/ssh_tunnel.rb Tue Jan 12 18:07:03 2016 -0800
231
+ @@ -4,7 +4,7 @@
232
+ module Skytap
233
+ module HostWindows
234
+ module Cap
235
+ - class SSHTunnel < VagrantPlugins::Skytap::Common::Cap::SSHTunnel
236
+ + class SSHTunnel < VagrantPlugins::Skytap::HostCommon::Cap::SSHTunnel
237
+ def self.create_logger
238
+ Log4r::Logger.new("vagrant::hosts::windows")
239
+ end
@@ -0,0 +1,4 @@
1
+ # HG changeset patch
2
+ # Parent 21dbd7fc56837b7c7949396f0f1058790d265a5b
3
+ (basically) finished work above this line not yet sent for CR --------------------------------------
4
+
@@ -0,0 +1,4 @@
1
+ # HG changeset patch
2
+ # Parent e1ec4738b4fbbd2ef83c29f221c19cf3798cf8f0
3
+ (basically) finished work below this line not yet sent for CR --------------------------------------
4
+
@@ -0,0 +1,4 @@
1
+ # HG changeset patch
2
+ # Parent 05bfba1f21950dc1331bb355bb60789499208a63
3
+ Out for CR above this line ------------------------------------
4
+
@@ -0,0 +1,4 @@
1
+ # HG changeset patch
2
+ # Parent faddc6f9d7ed6653fe7d86ab0943f901860b2872
3
+ out for CR below this line ------------------------------------------
4
+
@@ -0,0 +1,4 @@
1
+ # HG changeset patch
2
+ # Parent d9c2f15e01d69f7f9ed90c5a8504a635536409b7
3
+ Work in progress above this line --------------------------------------------
4
+
@@ -0,0 +1,4 @@
1
+ # HG changeset patch
2
+ # Parent 1350d8d01c04611ef082a637cf69eb289b88559a
3
+ Work in progress below this line ---------------------------------------------------------------
4
+
@@ -0,0 +1,29 @@
1
+ # HG changeset patch
2
+ # Parent e03c705cadffcf6ca578330597f15624260a9d46
3
+ script to run acceptance tests
4
+
5
+ diff --git a/acceptance.sh b/acceptance.sh
6
+ new file mode 100755
7
+ --- /dev/null
8
+ +++ b/acceptance.sh
9
+ @@ -0,0 +1,20 @@
10
+ +#!/bin/bash
11
+ +
12
+ +VAGRANT_LOG=info \
13
+ +VAGRANT_SKYTAP_USERNAME=etrue \
14
+ +VAGRANT_SKYTAP_API_TOKEN=fcb2620b72efddbc8239e25db9d812f510c7e166 \
15
+ + rake acceptance:run \
16
+ + COMPONENTS=provider/skytap/up
17
+ +
18
+ +#VAGRANT_SKYTAP_USERNAME=vagrant_provider_admin \
19
+ +#VAGRANT_SKYTAP_API_TOKEN=7c5718531a32eb90e92c804ce1f73da98be22cdf \
20
+ +#VAGRANT_SKYTAP_BASE_URL=https://test.skytap.com/ \
21
+ +
22
+ +
23
+ +
24
+ +#vagrant-spec test --config=vagrant-spec.config.rb --components="$COMPONENTS"
25
+ +
26
+ +
27
+ +# How do I get log output??
28
+ +# This needs to run in vagrant-spec, not just rake. Boxes have
29
+ +# to install.
@@ -0,0 +1,92 @@
1
+ # HG changeset patch
2
+ # Parent 0bb10bac847b6ff55e16bc18e9e9e98b49f58444
3
+ try to get sbrady's ansible provisioning (codename: "chuck") to work
4
+
5
+ diff --git a/Vagrantfile.chuck b/Vagrantfile.chuck
6
+ new file mode 100644
7
+ --- /dev/null
8
+ +++ b/Vagrantfile.chuck
9
+ @@ -0,0 +1,55 @@
10
+ +# -*- mode: ruby -*-
11
+ +# vi: set ft=ruby :
12
+ +
13
+ +VM_CPU = 4 # Cores
14
+ +VM_RAM = 4096 # GB
15
+ +GENERIC_UBUNTU = 'https://cloud.skytap.com/vms/6869434'
16
+ +
17
+ +Vagrant.configure("2") do |config|
18
+ +
19
+ + config.vm.provider :skytap do |skytap, override|
20
+ + skytap.username = "etrue"
21
+ + skytap.api_token = "fcb2620b72efddbc8239e25db9d812f510c7e166"
22
+ + end
23
+ +
24
+ + config.vm.define :dev do |dev|
25
+ + # VMWare and VirtualBox
26
+ + # https://vagrantcloud.com/hashicorp/boxes/precise64
27
+ + # TODO how to specify different box files for skytap provider
28
+ + #dev.vm.box = "hashicorp/precise64"
29
+ + #dev.vm.box_url = "hashicorp/precise64"
30
+ +
31
+ +
32
+ + # dev.vm.network :private_network, ip: "10.10.10.5"
33
+ + dev.vm.network :private_network, ip: "10.1.130.252"
34
+ + dev.vm.network :forwarded_port, guest: 3001, host: 3001
35
+ + dev.vm.network :forwarded_port, guest: 1080, host: 1080
36
+ +
37
+ + dev.vm.synced_folder "~/src", "/var/www/skytap", :nfs => true, :mount_options => ['actimeo=1']
38
+ +
39
+ + dev.vm.provider :vmware_fusion do |box|
40
+ + box.vmx["memsize"] = VM_RAM
41
+ + box.vmx["numvcpus"] = VM_CPU
42
+ + end
43
+ +
44
+ + dev.vm.provider :virtualbox do |box|
45
+ + box.customize ["modifyvm", :id, "--memory", VM_RAM]
46
+ + box.customize ["modifyvm", :id, "--cpus", VM_CPU]
47
+ + box.customize ["modifyvm", :id, "--ioapic", "on"]
48
+ + end
49
+ +
50
+ + dev.vm.provider :skytap do |box|
51
+ + dev.vm.box = "skytap-dummy"
52
+ + box.vm_url = GENERIC_UBUNTU
53
+ + box.cpus = VM_CPU
54
+ + box.ram = VM_RAM
55
+ + box.guestos = "ubuntu"
56
+ + end
57
+ +
58
+ + dev.vm.provision :ansible do |ansible|
59
+ + ansible.playbook = "ansible/playbooks/webservers.yml"
60
+ + # with the skytap provider, let it generate the inventory (.vagrant/provisioners/..)
61
+ + #ansible.inventory_path = "ansible/environments/dev"
62
+ + end
63
+ + end
64
+ +end
65
+ diff --git a/ansible b/ansible
66
+ new file mode 120000
67
+ --- /dev/null
68
+ +++ b/ansible
69
+ @@ -0,0 +1,1 @@
70
+ +../chuck/ansible
71
+
72
+ diff --git a/ansible.cfg b/ansible.cfg
73
+ new file mode 120000
74
+ --- /dev/null
75
+ +++ b/ansible.cfg
76
+ @@ -0,0 +1,1 @@
77
+ +../chuck/ansible.cfg
78
+
79
+ diff --git a/rake b/rake
80
+ new file mode 120000
81
+ --- /dev/null
82
+ +++ b/rake
83
+ @@ -0,0 +1,1 @@
84
+ +../chuck/rake
85
+
86
+ diff --git a/rakefile.rb b/rakefile.rb
87
+ new file mode 120000
88
+ --- /dev/null
89
+ +++ b/rakefile.rb
90
+ @@ -0,0 +1,1 @@
91
+ +../chuck/rakefile.rb
92
+
@@ -0,0 +1,40 @@
1
+ # HG changeset patch
2
+ # Parent 1397b5a1cf5158f68afa12477b1de4101b8da248
3
+ [mq]: cache-api-client-in-up
4
+
5
+ diff -r 1397b5a1cf51 lib/vagrant-skytap/action/initialize_api_client.rb
6
+ --- a/lib/vagrant-skytap/action/initialize_api_client.rb Mon Dec 07 19:47:09 2015 -0800
7
+ +++ b/lib/vagrant-skytap/action/initialize_api_client.rb Wed Dec 09 16:03:46 2015 -0800
8
+ @@ -13,11 +13,15 @@
9
+ end
10
+
11
+ def call(env)
12
+ - @logger.info("Connecting to Skytap...")
13
+ + unless env[:api_client]
14
+ + @logger.info("Connecting to Skytap...")
15
+
16
+ - client = API::Client.new(env[:machine].provider_config)
17
+ - if client.get('/configurations').code == '200'
18
+ - env[:api_client] = client
19
+ + client = API::Client.new(env[:machine].provider_config)
20
+ + if client.get('/configurations').code == '200'
21
+ + env[:api_client] = client
22
+ + end
23
+ + else
24
+ + @logger.info("Using cached API client")
25
+ end
26
+
27
+ @app.call(env)
28
+ diff -r 1397b5a1cf51 lib/vagrant-skytap/command/up.rb
29
+ --- a/lib/vagrant-skytap/command/up.rb Mon Dec 07 19:47:09 2015 -0800
30
+ +++ b/lib/vagrant-skytap/command/up.rb Wed Dec 09 16:03:46 2015 -0800
31
+ @@ -76,7 +76,8 @@
32
+ provider: machine.provider_name))
33
+
34
+ machines << machine
35
+ - machine.action(:create, options)
36
+ + result = machine.action(:create, options)
37
+ + options[:api_client] ||= result[:api_client]
38
+ machine.action(:update_hardware, options)
39
+ end
40
+
@@ -0,0 +1,44 @@
1
+ # HG changeset patch
2
+ # Parent 376d225699f6e5edced626762b20690f8a86e566
3
+ remove dead code in actions.rb
4
+
5
+ diff -r 376d225699f6 -r 57b84d076d7f lib/vagrant-skytap/action.rb
6
+ --- a/lib/vagrant-skytap/action.rb Tue Oct 20 13:31:40 2015 -0700
7
+ +++ b/lib/vagrant-skytap/action.rb Tue Oct 20 13:31:55 2015 -0700
8
+ @@ -86,17 +86,11 @@
9
+ b.use FetchEnvironment
10
+ b.use Call, EnvironmentExists do |env, b2|
11
+ if env[:result]
12
+ - b2.use Call, RunEnvironment do |env2, b3|
13
+ - if env2[:result]
14
+ - b3.use PrepareNFSSettings
15
+ - b3.use PrepareNFSValidIds
16
+ - b3.use Provision
17
+ - b3.use SyncedFolders
18
+ - else
19
+ - #TODO:NLA IMPLEMENT ME
20
+ - # b2.use RunFailed
21
+ - end
22
+ - end
23
+ + b2.use RunEnvironment
24
+ + b2.use PrepareNFSSettings
25
+ + b2.use PrepareNFSValidIds
26
+ + b2.use Provision
27
+ + b2.use SyncedFolders
28
+ else
29
+ b2.use DeleteEnvironment
30
+ b2.use MessageNotCreated
31
+ @@ -217,12 +211,7 @@
32
+ end
33
+ end
34
+ b.use action_prepare_boot
35
+ - b.use Call, RunVm do |env, b1|
36
+ - unless env[:result]
37
+ - #TODO:NLA IMPLEMENT ME
38
+ - # b2.use RunFailed
39
+ - end
40
+ - end
41
+ + b.use RunVm
42
+ end
43
+ end
44
+