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.
- checksums.yaml +4 -4
- data/.byebug_history +242 -19
- data/CHANGELOG.md +9 -0
- data/README.md +30 -8
- data/Vagrantfile.rej +83 -0
- data/_patches-20160112/0 +388 -0
- data/_patches-20160112/1 +82 -0
- data/_patches-20160112/2 +239 -0
- data/_patches-20160112/COMPLETED-ABOVE-THIS-LINE +4 -0
- data/_patches-20160112/COMPLETED-BELOW-THIS-LINE +4 -0
- data/_patches-20160112/CR-ABOVE-THIS-LINE +4 -0
- data/_patches-20160112/CR-BELOW-THIS-LINE +4 -0
- data/_patches-20160112/WIP-ABOVE-THIS-LINE +4 -0
- data/_patches-20160112/WIP-BELOW-THIS-LINE +4 -0
- data/_patches-20160112/acceptance-test-runner +29 -0
- data/_patches-20160112/ansible-1 +92 -0
- data/_patches-20160112/cache-api-client-in-up +40 -0
- data/_patches-20160112/dead-code-in-actions +44 -0
- data/_patches-20160112/debug-changes +42 -0
- data/_patches-20160112/demo-rails-app +1276 -0
- data/_patches-20160112/eng-10166-halt-spec +40 -0
- data/_patches-20160112/eng-10256 +527 -0
- data/_patches-20160112/eng-10256-2 +162 -0
- data/_patches-20160112/eng-10256-ubuntu-testing +88 -0
- data/_patches-20160112/eng-10269-test-stuff +87 -0
- data/_patches-20160112/eng-10269-wtf +119 -0
- data/_patches-20160112/eng-10369 +143 -0
- data/_patches-20160112/eng-10369-tmp +60 -0
- data/_patches-20160112/eng-10919 +56 -0
- data/_patches-20160112/eng-11177-fix-actions-requires +44 -0
- data/_patches-20160112/eng-11442 +4 -0
- data/_patches-20160112/eng-11616 +403 -0
- data/_patches-20160112/eng-11616-2 +67 -0
- data/_patches-20160112/eng-11616-actual +184 -0
- data/_patches-20160112/eng-11625a +4 -0
- data/_patches-20160112/eng-11711 +85 -0
- data/_patches-20160112/eng-12232-command-spec +236 -0
- data/_patches-20160112/eng-12235 +83 -0
- data/_patches-20160112/eng-12235-override-refactor +140 -0
- data/_patches-20160112/eng-12240 +103 -0
- data/_patches-20160112/eng-12249 +40 -0
- data/_patches-20160112/eng-12301 +50 -0
- data/_patches-20160112/eng-12843 +95 -0
- data/_patches-20160112/env-source +112 -0
- data/_patches-20160112/frickin-vagrant-spec +163 -0
- data/_patches-20160112/gem-pre-version +14 -0
- data/_patches-20160112/gems-old +9 -0
- data/_patches-20160112/googles-specs +713 -0
- data/_patches-20160112/local-configs-ignore +61 -0
- data/_patches-20160112/misc +79 -0
- data/_patches-20160112/network-unreachable +31 -0
- data/_patches-20160112/new-boxfile +288 -0
- data/_patches-20160112/parallelization-maybe +198 -0
- data/_patches-20160112/read-state +23 -0
- data/_patches-20160112/refactor-to-use-public_address-cap +25 -0
- data/_patches-20160112/series +60 -0
- data/_patches-20160112/status +12 -0
- data/_patches-20160112/test-move-env-data +231 -0
- data/_patches-20160112/test-vagrantfile-vm1 +167 -0
- data/_patches-20160112/the_version_in_0.1.13.pre1 +598 -0
- data/_patches-20160112/vagrant-spec-mock-api +137 -0
- data/_patches-20160112/vagrant-vmware-plugin +233 -0
- data/_patches-20160112/vagrantfile +403 -0
- data/_patches-20160112/vagrantfile-for-acceptance-tests +29 -0
- data/_patches-20160112/vagrantfile-for-nick +95 -0
- data/_patches-20160112/vagrantfiles-to-forget-what-they-are-for +134 -0
- data/_patches-20160112/vm-vanished +42 -0
- data/_patches-20160112a/01 +148 -0
- data/_patches-20160112a/2 +239 -0
- data/_patches-20160112a/COMPLETED-ABOVE-THIS-LINE +4 -0
- data/_patches-20160112a/COMPLETED-BELOW-THIS-LINE +4 -0
- data/_patches-20160112a/CR-ABOVE-THIS-LINE +4 -0
- data/_patches-20160112a/CR-BELOW-THIS-LINE +4 -0
- data/_patches-20160112a/WIP-ABOVE-THIS-LINE +4 -0
- data/_patches-20160112a/WIP-BELOW-THIS-LINE +4 -0
- data/_patches-20160112a/acceptance-test-runner +29 -0
- data/_patches-20160112a/ansible-1 +92 -0
- data/_patches-20160112a/cache-api-client-in-up +40 -0
- data/_patches-20160112a/dead-code-in-actions +44 -0
- data/_patches-20160112a/debug-changes +42 -0
- data/_patches-20160112a/demo-rails-app +1276 -0
- data/_patches-20160112a/eng-10166-halt-spec +40 -0
- data/_patches-20160112a/eng-10256-ubuntu-testing +88 -0
- data/_patches-20160112a/eng-10269-test-stuff +87 -0
- data/_patches-20160112a/eng-10269-wtf +119 -0
- data/_patches-20160112a/eng-10369 +143 -0
- data/_patches-20160112a/eng-10369-tmp +60 -0
- data/_patches-20160112a/eng-10919 +56 -0
- data/_patches-20160112a/eng-11177-fix-actions-requires +44 -0
- data/_patches-20160112a/eng-11442 +4 -0
- data/_patches-20160112a/eng-11616 +403 -0
- data/_patches-20160112a/eng-11616-2 +67 -0
- data/_patches-20160112a/eng-11616-actual +184 -0
- data/_patches-20160112a/eng-11625a +4 -0
- data/_patches-20160112a/eng-11711 +85 -0
- data/_patches-20160112a/eng-12232-command-spec +236 -0
- data/_patches-20160112a/eng-12235 +83 -0
- data/_patches-20160112a/eng-12235-override-refactor +140 -0
- data/_patches-20160112a/eng-12240 +103 -0
- data/_patches-20160112a/eng-12249 +40 -0
- data/_patches-20160112a/eng-12301 +50 -0
- data/_patches-20160112a/eng-12843 +95 -0
- data/_patches-20160112a/env-source +112 -0
- data/_patches-20160112a/frickin-vagrant-spec +163 -0
- data/_patches-20160112a/gem-pre-version +14 -0
- data/_patches-20160112a/gems-old +9 -0
- data/_patches-20160112a/googles-specs +713 -0
- data/_patches-20160112a/local-configs-ignore +61 -0
- data/_patches-20160112a/misc +79 -0
- data/_patches-20160112a/network-unreachable +31 -0
- data/_patches-20160112a/new-boxfile +288 -0
- data/_patches-20160112a/parallelization-maybe +198 -0
- data/_patches-20160112a/read-state +23 -0
- data/_patches-20160112a/refactor-to-use-public_address-cap +25 -0
- data/_patches-20160112a/series +58 -0
- data/_patches-20160112a/status +14 -0
- data/_patches-20160112a/test-move-env-data +231 -0
- data/_patches-20160112a/test-vagrantfile-vm1 +167 -0
- data/_patches-20160112a/the_version_in_0.1.13.pre1 +612 -0
- data/_patches-20160112a/then-copy-the-newer-files +632 -0
- data/_patches-20160112a/vagrant-spec-mock-api +137 -0
- data/_patches-20160112a/vagrant-vmware-plugin +233 -0
- data/_patches-20160112a/vagrantfile +403 -0
- data/_patches-20160112a/vagrantfile-for-acceptance-tests +29 -0
- data/_patches-20160112a/vagrantfile-for-nick +95 -0
- data/_patches-20160112a/vagrantfiles-to-forget-what-they-are-for +134 -0
- data/_patches-20160112a/vm-vanished +42 -0
- data/_patches-20160113/COMPLETED-ABOVE-THIS-LINE +4 -0
- data/_patches-20160113/COMPLETED-BELOW-THIS-LINE +4 -0
- data/_patches-20160113/CR-ABOVE-THIS-LINE +4 -0
- data/_patches-20160113/CR-BELOW-THIS-LINE +4 -0
- data/_patches-20160113/WIP-ABOVE-THIS-LINE +4 -0
- data/_patches-20160113/WIP-BELOW-THIS-LINE +4 -0
- data/_patches-20160113/acceptance-test-runner +29 -0
- data/_patches-20160113/ansible-1 +92 -0
- data/_patches-20160113/cache-api-client-in-up +40 -0
- data/_patches-20160113/dead-code-in-actions +44 -0
- data/_patches-20160113/debug-changes +55 -0
- data/_patches-20160113/demo-rails-app +1276 -0
- data/_patches-20160113/eng-10166-halt-spec +40 -0
- data/_patches-20160113/eng-10256 +543 -0
- data/_patches-20160113/eng-10256-ubuntu-testing +88 -0
- data/_patches-20160113/eng-10269-test-stuff +87 -0
- data/_patches-20160113/eng-10269-wtf +119 -0
- data/_patches-20160113/eng-10369 +143 -0
- data/_patches-20160113/eng-10369-tmp +60 -0
- data/_patches-20160113/eng-10919 +56 -0
- data/_patches-20160113/eng-11177-fix-actions-requires +44 -0
- data/_patches-20160113/eng-11442 +4 -0
- data/_patches-20160113/eng-11616 +403 -0
- data/_patches-20160113/eng-11616-2 +67 -0
- data/_patches-20160113/eng-11616-actual +184 -0
- data/_patches-20160113/eng-11625a +4 -0
- data/_patches-20160113/eng-11711 +85 -0
- data/_patches-20160113/eng-12232-command-spec +236 -0
- data/_patches-20160113/eng-12235 +83 -0
- data/_patches-20160113/eng-12235-override-refactor +140 -0
- data/_patches-20160113/eng-12240 +103 -0
- data/_patches-20160113/eng-12249 +40 -0
- data/_patches-20160113/eng-12301 +50 -0
- data/_patches-20160113/eng-12720 +47 -0
- data/_patches-20160113/eng-12843 +95 -0
- data/_patches-20160113/env-source +112 -0
- data/_patches-20160113/frickin-vagrant-spec +163 -0
- data/_patches-20160113/gem-pre-version +14 -0
- data/_patches-20160113/gems-old +9 -0
- data/_patches-20160113/googles-specs +713 -0
- data/_patches-20160113/local-configs-ignore +61 -0
- data/_patches-20160113/misc +79 -0
- data/_patches-20160113/network-unreachable +31 -0
- data/_patches-20160113/new-boxfile +288 -0
- data/_patches-20160113/parallelization-maybe +198 -0
- data/_patches-20160113/read-state +23 -0
- data/_patches-20160113/refactor-to-use-public_address-cap +25 -0
- data/_patches-20160113/series +56 -0
- data/_patches-20160113/status +14 -0
- data/_patches-20160113/test-move-env-data +231 -0
- data/_patches-20160113/test-vagrantfile-vm1 +167 -0
- data/_patches-20160113/vagrant-spec-mock-api +137 -0
- data/_patches-20160113/vagrant-vmware-plugin +233 -0
- data/_patches-20160113/vagrantfile +403 -0
- data/_patches-20160113/vagrantfile-for-acceptance-tests +29 -0
- data/_patches-20160113/vagrantfile-for-nick +95 -0
- data/_patches-20160113/vagrantfiles-to-forget-what-they-are-for +134 -0
- data/_patches-20160113/vm-vanished +42 -0
- data/_patches-20160118/COMPLETED-ABOVE-THIS-LINE +4 -0
- data/_patches-20160118/COMPLETED-BELOW-THIS-LINE +4 -0
- data/_patches-20160118/CR-ABOVE-THIS-LINE +4 -0
- data/_patches-20160118/CR-BELOW-THIS-LINE +4 -0
- data/_patches-20160118/WIP-ABOVE-THIS-LINE +4 -0
- data/_patches-20160118/WIP-BELOW-THIS-LINE +4 -0
- data/_patches-20160118/acceptance-test-runner +29 -0
- data/_patches-20160118/ansible-1 +92 -0
- data/_patches-20160118/cache-api-client-in-up +40 -0
- data/_patches-20160118/dead-code-in-actions +44 -0
- data/_patches-20160118/debug-changes +55 -0
- data/_patches-20160118/demo-rails-app +1276 -0
- data/_patches-20160118/eng-10166-halt-spec +40 -0
- data/_patches-20160118/eng-10256 +554 -0
- data/_patches-20160118/eng-10256-cr +314 -0
- data/_patches-20160118/eng-10256-ubuntu-testing +88 -0
- data/_patches-20160118/eng-10269-test-stuff +87 -0
- data/_patches-20160118/eng-10269-wtf +119 -0
- data/_patches-20160118/eng-10369 +143 -0
- data/_patches-20160118/eng-10369-tmp +60 -0
- data/_patches-20160118/eng-10919 +56 -0
- data/_patches-20160118/eng-11177-fix-actions-requires +44 -0
- data/_patches-20160118/eng-11442 +4 -0
- data/_patches-20160118/eng-11616 +403 -0
- data/_patches-20160118/eng-11616-2 +67 -0
- data/_patches-20160118/eng-11616-actual +184 -0
- data/_patches-20160118/eng-11625a +4 -0
- data/_patches-20160118/eng-11711 +85 -0
- data/_patches-20160118/eng-12232-command-spec +236 -0
- data/_patches-20160118/eng-12235 +83 -0
- data/_patches-20160118/eng-12235-override-refactor +140 -0
- data/_patches-20160118/eng-12240 +103 -0
- data/_patches-20160118/eng-12249 +40 -0
- data/_patches-20160118/eng-12301 +50 -0
- data/_patches-20160118/eng-12720 +74 -0
- data/_patches-20160118/eng-12843 +95 -0
- data/_patches-20160118/eng-13040 +291 -0
- data/_patches-20160118/env-source +112 -0
- data/_patches-20160118/frickin-vagrant-spec +163 -0
- data/_patches-20160118/gem-pre-version +14 -0
- data/_patches-20160118/gems-old +9 -0
- data/_patches-20160118/googles-specs +713 -0
- data/_patches-20160118/local-configs-ignore +61 -0
- data/_patches-20160118/misc +79 -0
- data/_patches-20160118/network-unreachable +31 -0
- data/_patches-20160118/new-boxfile +288 -0
- data/_patches-20160118/parallelization-maybe +198 -0
- data/_patches-20160118/port-forwarding-processes +87 -0
- data/_patches-20160118/read-state +23 -0
- data/_patches-20160118/refactor-to-use-public_address-cap +25 -0
- data/_patches-20160118/series +59 -0
- data/_patches-20160118/status +13 -0
- data/_patches-20160118/test-move-env-data +231 -0
- data/_patches-20160118/test-vagrantfile-vm1 +167 -0
- data/_patches-20160118/vagrant-spec-mock-api +137 -0
- data/_patches-20160118/vagrant-vmware-plugin +233 -0
- data/_patches-20160118/vagrantfile +403 -0
- data/_patches-20160118/vagrantfile-for-acceptance-tests +29 -0
- data/_patches-20160118/vagrantfile-for-nick +95 -0
- data/_patches-20160118/vagrantfiles-to-forget-what-they-are-for +134 -0
- data/_patches-20160118/vm-vanished +42 -0
- data/_patches-20160118a/COMPLETED-ABOVE-THIS-LINE +4 -0
- data/_patches-20160118a/COMPLETED-BELOW-THIS-LINE +4 -0
- data/_patches-20160118a/CR-ABOVE-THIS-LINE +4 -0
- data/_patches-20160118a/CR-BELOW-THIS-LINE +4 -0
- data/_patches-20160118a/WIP-ABOVE-THIS-LINE +4 -0
- data/_patches-20160118a/WIP-BELOW-THIS-LINE +4 -0
- data/_patches-20160118a/acceptance-test-runner +29 -0
- data/_patches-20160118a/ansible-1 +92 -0
- data/_patches-20160118a/bar +189 -0
- data/_patches-20160118a/cache-api-client-in-up +40 -0
- data/_patches-20160118a/dead-code-in-actions +44 -0
- data/_patches-20160118a/debug-changes +55 -0
- data/_patches-20160118a/demo-rails-app +1276 -0
- data/_patches-20160118a/eng-10166-halt-spec +40 -0
- data/_patches-20160118a/eng-10256 +554 -0
- data/_patches-20160118a/eng-10256-cr +314 -0
- data/_patches-20160118a/eng-10256-ubuntu-testing +88 -0
- data/_patches-20160118a/eng-10269-test-stuff +87 -0
- data/_patches-20160118a/eng-10269-wtf +119 -0
- data/_patches-20160118a/eng-10369 +143 -0
- data/_patches-20160118a/eng-10369-tmp +60 -0
- data/_patches-20160118a/eng-10919 +56 -0
- data/_patches-20160118a/eng-11177-fix-actions-requires +44 -0
- data/_patches-20160118a/eng-11442 +4 -0
- data/_patches-20160118a/eng-11616 +403 -0
- data/_patches-20160118a/eng-11616-2 +67 -0
- data/_patches-20160118a/eng-11616-actual +184 -0
- data/_patches-20160118a/eng-11625a +4 -0
- data/_patches-20160118a/eng-11711 +85 -0
- data/_patches-20160118a/eng-12232-command-spec +236 -0
- data/_patches-20160118a/eng-12235 +83 -0
- data/_patches-20160118a/eng-12235-override-refactor +140 -0
- data/_patches-20160118a/eng-12240 +103 -0
- data/_patches-20160118a/eng-12249 +40 -0
- data/_patches-20160118a/eng-12301 +50 -0
- data/_patches-20160118a/eng-12720 +74 -0
- data/_patches-20160118a/eng-12843 +95 -0
- data/_patches-20160118a/eng-13040 +291 -0
- data/_patches-20160118a/env-source +112 -0
- data/_patches-20160118a/foo +169 -0
- data/_patches-20160118a/frickin-vagrant-spec +163 -0
- data/_patches-20160118a/gem-pre-version +14 -0
- data/_patches-20160118a/gems-old +9 -0
- data/_patches-20160118a/googles-specs +713 -0
- data/_patches-20160118a/guestport-madness +59 -0
- data/_patches-20160118a/local-configs-ignore +61 -0
- data/_patches-20160118a/misc +79 -0
- data/_patches-20160118a/network-unreachable +31 -0
- data/_patches-20160118a/new-boxfile +288 -0
- data/_patches-20160118a/parallelization-maybe +198 -0
- data/_patches-20160118a/port-forwarding-processes +87 -0
- data/_patches-20160118a/read-state +23 -0
- data/_patches-20160118a/refactor-to-use-public_address-cap +25 -0
- data/_patches-20160118a/series +62 -0
- data/_patches-20160118a/status +14 -0
- data/_patches-20160118a/test-move-env-data +231 -0
- data/_patches-20160118a/test-vagrantfile-vm1 +167 -0
- data/_patches-20160118a/vagrant-spec-mock-api +137 -0
- data/_patches-20160118a/vagrant-vmware-plugin +233 -0
- data/_patches-20160118a/vagrantfile +403 -0
- data/_patches-20160118a/vagrantfile-for-acceptance-tests +29 -0
- data/_patches-20160118a/vagrantfile-for-nick +95 -0
- data/_patches-20160118a/vagrantfiles-to-forget-what-they-are-for +134 -0
- data/_patches-20160118a/vm-vanished +42 -0
- data/lib/vagrant-skytap/action/clear_forwarded_ports.rb +19 -0
- data/lib/vagrant-skytap/action/forward_ports.rb +42 -0
- data/lib/vagrant-skytap/action/prepare_forwarded_port_collision_params.rb +37 -0
- data/lib/vagrant-skytap/action.rb +18 -0
- data/lib/vagrant-skytap/api/environment.rb +19 -4
- data/lib/vagrant-skytap/api/vm.rb +10 -6
- data/lib/vagrant-skytap/command/up.rb +7 -1
- data/lib/vagrant-skytap/errors.rb +4 -0
- data/lib/vagrant-skytap/hosts/bsd/cap/ssh_tunnel.rb +15 -0
- data/lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb +183 -0
- data/lib/vagrant-skytap/hosts/linux/cap/ssh_tunnel.rb +15 -0
- data/lib/vagrant-skytap/hosts/windows/cap/ssh_tunnel.rb +27 -0
- data/lib/vagrant-skytap/model/forwarded_port.rb +78 -0
- data/lib/vagrant-skytap/plugin.rb +15 -0
- data/lib/vagrant-skytap/util/compile_forwarded_ports.rb +35 -0
- data/lib/vagrant-skytap/version.rb +1 -1
- data/locales/en.yml +3 -0
- data/spec/unit/environment_spec.rb +14 -2
- data/spec/unit/forwarded_port_spec.rb +45 -0
- data/spec/unit/hosts/common/cap/ssh_tunnel_spec.rb +180 -0
- data/spec/unit/prepare_collision_params_spec.rb +57 -0
- data/spec/unit/support/forwarded_ports/machines/vm1/skytap/id +1 -0
- data/spec/unit/support/forwarded_ports/machines/vm1/skytap/private_key +4 -0
- data/spec/unit/support/forwarded_ports/machines/vm1/skytap/tcp9000_tcp_9000_80.pid +1 -0
- data/spec/unit/support/forwarded_ports/machines/vm1/skytap/tcp9001_tcp_9001_81.pid +1 -0
- data/spec/unit/support/forwarded_ports/machines/vm1/virtualbox/id +1 -0
- data/spec/unit/support/forwarded_ports/machines/vm2/skytap/id +1 -0
- data/spec/unit/support/forwarded_ports/machines/vm2/skytap/tcp8080_tcp_8080_80.pid +1 -0
- data/spec/unit/support/forwarded_ports/machines/vm3/virtualbox/id +1 -0
- data/spec/unit/support/forwarded_ports/machines/vm4/skytap/id +1 -0
- data/spec/unit/support/forwarded_ports/machines/vm4/skytap/tcp8888_tcp_8888_80.pid +1 -0
- metadata +330 -2
@@ -0,0 +1,169 @@
|
|
1
|
+
# HG changeset patch
|
2
|
+
# Parent 82e4386bb899141c5b7712207b63e01b1a765c6e
|
3
|
+
[mq]: foo
|
4
|
+
|
5
|
+
diff -r 82e4386bb899 lib/vagrant-skytap/action/clear_forwarded_ports.rb
|
6
|
+
--- a/lib/vagrant-skytap/action/clear_forwarded_ports.rb Mon Jan 18 14:01:22 2016 -0800
|
7
|
+
+++ b/lib/vagrant-skytap/action/clear_forwarded_ports.rb Mon Jan 18 16:16:04 2016 -0800
|
8
|
+
@@ -8,7 +8,7 @@
|
9
|
+
|
10
|
+
def call(env)
|
11
|
+
env[:ui].info I18n.t("vagrant.actions.vm.clear_forward_ports.deleting")
|
12
|
+
- env[:host].capability(:clear_forwarded_ports, env)
|
13
|
+
+ env[:host].capability(:clear_forwarded_ports, env[:machine])
|
14
|
+
|
15
|
+
@app.call(env)
|
16
|
+
end
|
17
|
+
diff -r 82e4386bb899 lib/vagrant-skytap/action/forward_ports.rb
|
18
|
+
--- a/lib/vagrant-skytap/action/forward_ports.rb Mon Jan 18 14:01:22 2016 -0800
|
19
|
+
+++ b/lib/vagrant-skytap/action/forward_ports.rb Mon Jan 18 16:16:04 2016 -0800
|
20
|
+
@@ -10,16 +10,11 @@
|
21
|
+
@app = app
|
22
|
+
end
|
23
|
+
|
24
|
+
- #--------------------------------------------------------------
|
25
|
+
- # Execution
|
26
|
+
- #--------------------------------------------------------------
|
27
|
+
def call(env)
|
28
|
+
@env = env
|
29
|
+
|
30
|
+
- # Get the ports we're forwarding
|
31
|
+
env[:forwarded_ports] ||= compile_forwarded_ports(env[:machine].config)
|
32
|
+
|
33
|
+
- # Warn if we're port forwarding to any privileged ports...
|
34
|
+
env[:forwarded_ports].each do |fp|
|
35
|
+
if fp.privileged_host_port?
|
36
|
+
env[:ui].warn I18n.t("vagrant.actions.vm.forward_ports.privileged_ports")
|
37
|
+
diff -r 82e4386bb899 lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb
|
38
|
+
--- a/lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb Mon Jan 18 14:01:22 2016 -0800
|
39
|
+
+++ b/lib/vagrant-skytap/hosts/common/cap/ssh_tunnel.rb Mon Jan 18 16:16:04 2016 -0800
|
40
|
+
@@ -1,6 +1,3 @@
|
41
|
+
-# unused libs?
|
42
|
+
-require "pathname"
|
43
|
+
-require "tmpdir"
|
44
|
+
require "vagrant/util/subprocess"
|
45
|
+
require "vagrant/util/safe_chdir"
|
46
|
+
require "vagrant-skytap/models/forwarded_port"
|
47
|
+
@@ -16,75 +13,70 @@
|
48
|
+
raise NotImplementedError
|
49
|
+
end
|
50
|
+
|
51
|
+
- def start_ssh_tunnel(env, fp, env_hash)
|
52
|
+
- logger = create_logger
|
53
|
+
- machine = env_hash[:machine]
|
54
|
+
- pidfile = pidfile_name(fp)
|
55
|
+
- pid = read_pid(machine.data_dir.join(pidfile))
|
56
|
+
+ # Create an ssh tunnel for the given [ForwardedPort]
|
57
|
+
+ # on the current machine using autossh. (If autossh
|
58
|
+
+ # is not available on the host, an appropriate error
|
59
|
+
+ # message will be shown, asking the user to install
|
60
|
+
+ # it.)
|
61
|
+
+ #
|
62
|
+
+ # @return [Vagrant::Util::Subprocess::Result]
|
63
|
+
+ def start_ssh_tunnel(env, fp, machine, env_hash)
|
64
|
+
+ args = ssh_args(fp, machine, env_hash[:machine_ssh_info])
|
65
|
+
+ args << {env: autossh_environment_variables(fp, machine)}
|
66
|
+
+ # TODO: ensure that we overwrite any stale pidfile
|
67
|
+
+ Vagrant::Util::Subprocess.execute("autossh", "-f", *args)
|
68
|
+
+ end
|
69
|
+
|
70
|
+
- if pid && autossh_pid?(pid)
|
71
|
+
- logger.info("An autossh process already exists with pid #{pid}.")
|
72
|
+
- else
|
73
|
+
- args = ssh_args(fp, env_hash)
|
74
|
+
- vars = autossh_environment_variables(pidfile, env_hash)
|
75
|
+
- args << {env: vars}
|
76
|
+
- Vagrant::Util::Subprocess.execute("autossh", "-f", *args)
|
77
|
+
+ # Kill the ssh tunnel for the given [ForwardedPort]
|
78
|
+
+ # by terminating the associated autossh process
|
79
|
+
+ #
|
80
|
+
+ # @return [Vagrant::Util::Subprocess::Result]
|
81
|
+
+ def kill_ssh_tunnel(env, fp, machine)
|
82
|
+
+ if pid = read_pid(machine.data_dir.join(fp.pidfile_name))
|
83
|
+
+ Vagrant::Util::Subprocess.execute("kill", pid.to_s)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
- def clear_forwarded_ports(env, env_hash)
|
88
|
+
- get_pidfiles_for_machine(env_hash[:machine]).each do |pidfile|
|
89
|
+
- kill_ssh_tunnel(env, pidfile, env_hash)
|
90
|
+
+ # Convenience method which kills all autossh
|
91
|
+
+ # processes for the given machine
|
92
|
+
+ #
|
93
|
+
+ # @return [Array] of [ForwardedPort] objects
|
94
|
+
+ def clear_forwarded_ports(env, machine)
|
95
|
+
+ get_fp_for_machine(machine).each do |fp|
|
96
|
+
+ kill_ssh_tunnel(env, fp, machine)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
- def kill_ssh_tunnel(env, pidfile, env_hash)
|
101
|
+
- logger = create_logger
|
102
|
+
- machine = env_hash[:machine]
|
103
|
+
- pid = read_pid(machine.data_dir.join(pidfile))
|
104
|
+
- if pid && autossh_pid?(pid)
|
105
|
+
- Vagrant::Util::Subprocess.execute("kill", pid.to_s)
|
106
|
+
- else
|
107
|
+
- logger.info("Cleaning up stale autossh pidfile #{pidfile}.")
|
108
|
+
- Vagrant::Util::Subprocess.execute("rm", pidfile)
|
109
|
+
- end
|
110
|
+
- end
|
111
|
+
-
|
112
|
+
-
|
113
|
+
- def pidfile_name(fp)
|
114
|
+
- "#{fp.protocol}#{fp.host_port}.pid"
|
115
|
+
- end
|
116
|
+
-
|
117
|
+
+ # Reads the pid from the given pidfile_path (full
|
118
|
+
+ # path, not relative to the machine data_dir)
|
119
|
+
+ #
|
120
|
+
+ # @return [Integer], or nil if not found.
|
121
|
+
def read_pid(pidfile_path)
|
122
|
+
File.read(pidfile_path).presence.try(:to_i) if File.exist?(pidfile_path)
|
123
|
+
end
|
124
|
+
|
125
|
+
- def get_pidfiles_for_machine(machine)
|
126
|
+
+ # Reads all the pidfiles from the machine's data_dir
|
127
|
+
+ # TODO make this return [ForwardedPort] objects
|
128
|
+
+ #
|
129
|
+
+ # @return [Array] of [ForwardedPort] objects
|
130
|
+
+ def get_fp_for_machine(machine)
|
131
|
+
pidfiles = []
|
132
|
+
Vagrant::Util::SafeChdir.safe_chdir(machine.data_dir) do
|
133
|
+
pidfiles = Dir.glob("*.pid")
|
134
|
+
end
|
135
|
+
- pidfiles
|
136
|
+
+ pidfiles.collect do |pidfile|
|
137
|
+
+ pidfile =~ /(\w+)(\d+)\.pid/
|
138
|
+
+ protocol, hostport, guestport = $1, $2, nil
|
139
|
+
+ ForwardedPort.new("#{protocol}#{hostport}", hostport, guestport, protocol: protocol)
|
140
|
+
+ end
|
141
|
+
end
|
142
|
+
|
143
|
+
- # Checks that the pid is actually an autossh process (and not
|
144
|
+
- # something else using a recycled pid).
|
145
|
+
- def autossh_pid?(pid)
|
146
|
+
- # get_comm_for_pid(pid) == 'autossh'
|
147
|
+
- true
|
148
|
+
- end
|
149
|
+
-
|
150
|
+
- # Get the command, minus any arguments, for the given
|
151
|
+
- # pid. This probably needs to be overridden per host cap
|
152
|
+
- def get_comm_for_pid(pid)
|
153
|
+
- result = Vagrant::Util::Subprocess.execute("ps", "-p", pid.to_s, "-o", "comm")
|
154
|
+
- result.stdout.split("\n").last
|
155
|
+
- end
|
156
|
+
-
|
157
|
+
- # these args seem to work on MacOS and Ubuntu ...
|
158
|
+
- # untested on other implementations
|
159
|
+
- def ssh_args(fp, env_hash)
|
160
|
+
- machine = env_hash[:machine]
|
161
|
+
+ # Gets the args to be passed to ssh for the given
|
162
|
+
+ # [ForwardedPort] on the given machine.
|
163
|
+
+ #
|
164
|
+
+ # @return [Array] of [String]
|
165
|
+
+ def ssh_args(fp, machine, ssh_info)
|
166
|
+
+ # TODO read ssh_info without having to pass it in
|
167
|
+
ssh_info = env_hash[:machine_ssh_info]
|
168
|
+
ssh_options = {
|
169
|
+
"ServerAliveInterval" => 10,
|
@@ -0,0 +1,163 @@
|
|
1
|
+
# HG changeset patch
|
2
|
+
# Parent 02c7d9d9d39e1ec55dfd0636c2b043b1837782d2
|
3
|
+
imported patch frickin-vagrant-spec
|
4
|
+
|
5
|
+
diff --git a/boxes/acceptance/README.md b/boxes/acceptance/README.md
|
6
|
+
new file mode 100644
|
7
|
+
--- /dev/null
|
8
|
+
+++ b/boxes/acceptance/README.md
|
9
|
+
@@ -0,0 +1,13 @@
|
10
|
+
+# Vagrant Skytap Example Box
|
11
|
+
+
|
12
|
+
+Vagrant providers each require a custom provider-specific box format.
|
13
|
+
+This folder shows the example contents of a box for the `skytap` provider.
|
14
|
+
+To turn this into a box:
|
15
|
+
+
|
16
|
+
+```
|
17
|
+
+$ tar cvzf skytap.box ./metadata.json ./Vagrantfile
|
18
|
+
+```
|
19
|
+
+
|
20
|
+
+This box works by using Vagrant's built-in Vagrantfile merging to setup
|
21
|
+
+defaults for Skytap. These defaults can easily be overwritten by higher-level
|
22
|
+
+Vagrantfiles (such as project root Vagrantfiles).
|
23
|
+
diff --git a/boxes/acceptance/Vagrantfile b/boxes/acceptance/Vagrantfile
|
24
|
+
new file mode 100644
|
25
|
+
--- /dev/null
|
26
|
+
+++ b/boxes/acceptance/Vagrantfile
|
27
|
+
@@ -0,0 +1,8 @@
|
28
|
+
+# -*- mode: ruby -*-
|
29
|
+
+# vi: set ft=ruby :
|
30
|
+
+
|
31
|
+
+Vagrant.configure(2) do |config|
|
32
|
+
+ config.vm.provider :skytap do |skytap|
|
33
|
+
+ skytap.vm_url = "https://cloud.skytap.com/vms/3157858"
|
34
|
+
+ end
|
35
|
+
+end
|
36
|
+
diff --git a/boxes/acceptance/empty.box b/boxes/acceptance/empty.box
|
37
|
+
new file mode 100644
|
38
|
+
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..64bf34aa4fd03ff9c06c88f1dd7c6a992a0005c8
|
39
|
+
GIT binary patch
|
40
|
+
literal 166
|
41
|
+
zc$|~(=3pq7bPQu)etX`L>yUv!>%(=`T@#qEc=ihJ@m-*~BEx$Ym(snv83$Vv%3WLj
|
42
|
+
z-`>MH^XTlXQm&Kcc0XSklsr%3RC=@~^!y#G?_MjHe^1#PxU6jJm1A8Js>hx!4A|r`
|
43
|
+
zoB#2InlqtJUCA?Up3cs-{%jw+=-yBDyrri~<aeLm#~Jv3id^6IC)Kg{PRCDYW<Ult
|
44
|
+
PUm51x&704l!N33jadS%=
|
45
|
+
|
46
|
+
diff --git a/boxes/acceptance/metadata.json b/boxes/acceptance/metadata.json
|
47
|
+
new file mode 100644
|
48
|
+
--- /dev/null
|
49
|
+
+++ b/boxes/acceptance/metadata.json
|
50
|
+
@@ -0,0 +1,3 @@
|
51
|
+
+{
|
52
|
+
+ "provider": "skytap"
|
53
|
+
+}
|
54
|
+
diff --git a/spec/acceptance/provider/up_spec.rb b/spec/acceptance/provider/up_spec.rb
|
55
|
+
--- a/spec/acceptance/provider/up_spec.rb
|
56
|
+
+++ b/spec/acceptance/provider/up_spec.rb
|
57
|
+
@@ -16,25 +16,46 @@
|
58
|
+
assert_execute('vagrant', 'destroy', '--force')
|
59
|
+
end
|
60
|
+
|
61
|
+
- it 'should bring up the machine and halt it' do
|
62
|
+
- status("Test: machine can be brought up, parallel by default")
|
63
|
+
- up_result = execute("vagrant", "up")
|
64
|
+
+ it 'should bring up the machine' do
|
65
|
+
+ status("Test: machine can be brought up")
|
66
|
+
+ up_result = execute("vagrant", "up", "vm1")
|
67
|
+
expect(up_result).to exit_with(0)
|
68
|
+
|
69
|
+
status("Test: machine is running after up")
|
70
|
+
- echo_result = execute("vagrant", "ssh", "-c", "echo foo")
|
71
|
+
+ echo_result = execute("vagrant", "ssh", "vm1", "-c", "echo foo")
|
72
|
+
expect(echo_result).to exit_with(0)
|
73
|
+
expect(echo_result.stdout).to match(/foo\n$/)
|
74
|
+
end
|
75
|
+
-
|
76
|
+
- it 'should bring up the machine and halt it' do
|
77
|
+
- status("Test: machine can be brought up no parallel")
|
78
|
+
- up_result = execute("vagrant", "up", "--no-parallel")
|
79
|
+
- expect(up_result).to exit_with(0)
|
80
|
+
-
|
81
|
+
- status("Test: machine is running after up")
|
82
|
+
- echo_result = execute("vagrant", "ssh", "-c", "echo foo")
|
83
|
+
- expect(echo_result).to exit_with(0)
|
84
|
+
- expect(echo_result.stdout).to match(/foo\n$/)
|
85
|
+
- end
|
86
|
+
+#
|
87
|
+
+# it 'should bring up 2 machines in parallel' do
|
88
|
+
+# status("Test: 2 machines can be brought up, parallel by default")
|
89
|
+
+# up_result = execute("vagrant", "up")
|
90
|
+
+# expect(up_result).to exit_with(0)
|
91
|
+
+#
|
92
|
+
+# status("Test: machine vm1 is running after up")
|
93
|
+
+# echo_result = execute("vagrant", "ssh", "vm1", "-c", "echo foo")
|
94
|
+
+# expect(echo_result).to exit_with(0)
|
95
|
+
+# expect(echo_result.stdout).to match(/foo\n$/)
|
96
|
+
+#
|
97
|
+
+# status("Test: machine vm2 is running after up")
|
98
|
+
+# echo_result = execute("vagrant", "ssh", "vm2", "-c", "echo foo")
|
99
|
+
+# expect(echo_result).to exit_with(0)
|
100
|
+
+# expect(echo_result.stdout).to match(/foo\n$/)
|
101
|
+
+# end
|
102
|
+
+#
|
103
|
+
+# it 'should bring up 2 machines in no-parallel mode' do
|
104
|
+
+# status("Test: 2 machines can be brought up, no-parallel")
|
105
|
+
+# up_result = execute("vagrant", "up", "--no-parallel")
|
106
|
+
+# expect(up_result).to exit_with(0)
|
107
|
+
+#
|
108
|
+
+# status("Test: machine vm1 is running after up")
|
109
|
+
+# echo_result = execute("vagrant", "ssh", "vm1", "-c", "echo foo")
|
110
|
+
+# expect(echo_result).to exit_with(0)
|
111
|
+
+# expect(echo_result.stdout).to match(/foo\n$/)
|
112
|
+
+#
|
113
|
+
+# status("Test: machine vm2 is running after up")
|
114
|
+
+# echo_result = execute("vagrant", "ssh", "vm2", "-c", "echo foo")
|
115
|
+
+# expect(echo_result).to exit_with(0)
|
116
|
+
+# expect(echo_result.stdout).to match(/foo\n$/)
|
117
|
+
+# end
|
118
|
+
end
|
119
|
+
diff --git a/spec/acceptance/skeletons/generic/Vagrantfile b/spec/acceptance/skeletons/generic/Vagrantfile
|
120
|
+
--- a/spec/acceptance/skeletons/generic/Vagrantfile
|
121
|
+
+++ b/spec/acceptance/skeletons/generic/Vagrantfile
|
122
|
+
@@ -1,3 +1,7 @@
|
123
|
+
+BASE_BOX_URL = "https://cloud.skytap.com/vms/6869434"
|
124
|
+
+BASE_BOX_USERNAME = "skytap"
|
125
|
+
+BASE_BOX_PASSWORD = "ChangeMe!"
|
126
|
+
+
|
127
|
+
Vagrant.configure("2") do |config|
|
128
|
+
config.vm.box = "skytap/empty"
|
129
|
+
|
130
|
+
@@ -6,13 +10,16 @@
|
131
|
+
skytap.username = "etrue"
|
132
|
+
skytap.api_token = "fcb2620b72efddbc8239e25db9d812f510c7e166"
|
133
|
+
skytap.vpn_url = "https://cloud.skytap.com/vpns/vpn-711360"
|
134
|
+
+ skytap.vm_url = BASE_BOX_URL
|
135
|
+
end
|
136
|
+
|
137
|
+
- config.vm.define "vm1" do |ubuntu|
|
138
|
+
- ubuntu.vm.provider :skytap do |box|
|
139
|
+
- box.vm_url = "https://cloud.skytap.com/vms/6869434" # golden!
|
140
|
+
- end
|
141
|
+
- ubuntu.ssh.username = "skytap"
|
142
|
+
- ubuntu.ssh.password = "ChangeMe!"
|
143
|
+
+ config.vm.define "vm1" do |vm|
|
144
|
+
+ vm.ssh.username = BASE_BOX_USERNAME
|
145
|
+
+ vm.ssh.password = BASE_BOX_PASSWORD
|
146
|
+
+ end
|
147
|
+
+
|
148
|
+
+ config.vm.define "vm" do |vm|
|
149
|
+
+ vm.ssh.username = "skytap"
|
150
|
+
+ vm.ssh.password = "ChangeMe!"
|
151
|
+
end
|
152
|
+
end
|
153
|
+
diff --git a/vagrant-spec.config.rb b/vagrant-spec.config.rb
|
154
|
+
--- a/vagrant-spec.config.rb
|
155
|
+
+++ b/vagrant-spec.config.rb
|
156
|
+
@@ -5,6 +5,6 @@
|
157
|
+
c.skeleton_paths << File.expand_path("../spec/acceptance/skeletons", __FILE__)
|
158
|
+
|
159
|
+
c.provider "skytap",
|
160
|
+
- box: File.expand_path("../skytap-dummy.box", __FILE__),
|
161
|
+
+ box: File.expand_path("../boxes/empty.box", __FILE__),
|
162
|
+
contexts: ["provider-context/skytap"]
|
163
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# HG changeset patch
|
2
|
+
# Parent f88c782b6f8e9de2c1f55ca0df98756ba64b928a
|
3
|
+
current pre-version
|
4
|
+
|
5
|
+
diff -r f88c782b6f8e lib/vagrant-skytap/version.rb
|
6
|
+
--- a/lib/vagrant-skytap/version.rb Mon Dec 28 10:53:44 2015 -0800
|
7
|
+
+++ b/lib/vagrant-skytap/version.rb Mon Dec 28 10:54:12 2015 -0800
|
8
|
+
@@ -1,5 +1,5 @@
|
9
|
+
module VagrantPlugins
|
10
|
+
module Skytap
|
11
|
+
- VERSION = "0.1.12"
|
12
|
+
+ VERSION = "0.1.13.pre1"
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# HG changeset patch
|
2
|
+
# Parent 14d9041ca24e43e3ae413a68bc6de659fa9b79ba
|
3
|
+
imported patch gems-old
|
4
|
+
|
5
|
+
diff -r 14d9041ca24e gems/README
|
6
|
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
7
|
+
+++ b/gems/README Mon Nov 09 14:00:30 2015 -0800
|
8
|
+
@@ -0,0 +1,1 @@
|
9
|
+
+There are some old gems missing. Hope that's okay
|