vagrant-orchestrate 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 997cea86aee854008a850c48c1593a03d1d543fd
4
- data.tar.gz: b3779aab0db5c26a0e9490aa21ac9015f0f0b6d4
3
+ metadata.gz: f8bd501392dfda5915b4bbc00a06d46a27dd08c9
4
+ data.tar.gz: 0280f99653f43635042074898fd54ddbf428231c
5
5
  SHA512:
6
- metadata.gz: 5ad720a6e0e8f172b4f01507764537eb52f4fdec5f7d72308a799870809d65bedd69b831ec2d7b3813735549c517e4af910a15f8fd9a6bc616706fa8c2293e0a
7
- data.tar.gz: 005dd4b6c151cd3c09b9cc688f59f9137b2d0c7832ddd54d5afc5f8b48bd4556a06801e9e96189c683cb3d496ad42ff1e5aea03d50c3098150af7ce9cc27bbc4
6
+ metadata.gz: e411ded7b83942b15f621d0c9ac97ef170b0a0748fafc294e591268a7eb8ce8bd76ccde29b79593223103440d5f8334c5567730091c2381b0ba65b1c44ff8201
7
+ data.tar.gz: 6dd06ba49cd7ce2b4ae961edc2f9cf267f51c9fb4f5ba31d219daab4dd99af92b0527e712c75619d7eebb3cf099e80edecb5b8ca149a6d4ed33551aa16a954f7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ 0.5.2 (May 8th, 2015)
2
+
3
+ - Add the `--no-provision` option to the `orchestrate push` command. Useful for
4
+ first timers to gain confidence in using the tool or to be able to just reboot servers.
5
+ - Move the `winrm.transport = :sspinegotiate` declaration from the config level
6
+ to within the managed server section, allowing local Windows VMs to work again.
7
+ - Change the default for --puppet-librarian-puppet to false, as it was impacting
8
+ many Windows users.
9
+
1
10
  0.5.1 (April 27th, 2015)
2
11
 
3
12
  - Also short circuit a push operation with an error message if there are untracked files.
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  This is a Vagrant 1.6+ plugin that allows orchestrated deployments
9
9
  to already provisioned (non-elastic) servers on top of the excellent [vagrant-managed-servers](http://github.com/tknerr/vagrant-managed-servers) plugin.
10
- It features a powerful templating `init` command, support for multiple environments, several deployment strategies
10
+ It features a powerful templating `init` command, support for multiple environments, several deployment strategies
11
11
  and is designed from the ground up to be cross-platform, with first class support for **Windows,
12
12
  Linux, and Mac**.
13
13
 
@@ -192,10 +192,23 @@ managed-3 Status unavailable.
192
192
  managed-4 2015-04-19 00:43:07 UTC e983dddd8041c5db77494266328f1d266430f57d cbaldauf
193
193
  ```
194
194
 
195
- ## Tips for Windows hosts
195
+ ## Windows
196
+
197
+ ### Host
196
198
 
197
199
  * Need rsync? Install [OpenSSH](http://www.mls-software.com/opensshd.html) and then run this [script](https://github.com/joefitzgerald/packer-windows/blob/master/scripts/rsync.bat) to install rsync. Vagrant managed servers currently only works with cygwin based rsync implementations.
198
- * If you're using winrm-s as your communicator, you'll need to configure it first on the target machine! Check out [the plugin readme](https://github.com/Cimpress-MCP/vagrant-winrm-s/blob/master/README.md#setting-up-your-server) for instructions on how to set this up.
200
+
201
+ ### Managed Guest
202
+ You'll need to bootstrap the target machine. The following script should get you there.
203
+
204
+ ```
205
+ winrm quickconfig
206
+ winrm set winrm/config/service/auth @{Negotiate="true"}
207
+ winrm set winrm/config/service @{AllowUnencrypted="false"}
208
+ sc config winrm start= auto
209
+ sc config winrm type= own
210
+ ```
211
+ * Check out [the winrm-s readme](https://github.com/Cimpress-MCP/vagrant-winrm-s/blob/master/README.md#setting-up-your-server) for more information
199
212
 
200
213
  ## Contributing
201
214
 
data/Rakefile CHANGED
@@ -17,7 +17,8 @@ task :acceptance do
17
17
  # To ensure the ntp sync happens even if the servers are already up
18
18
  system("vagrant provision /local/")
19
19
  ENV["VAGRANT_ORCHESTRATE_NO_GUARD_CLEAN"] = "true"
20
- system("bundle exec vagrant-spec test --components=orchestrate/push orchestrate/prompt orchestrate/status")
20
+ system("bundle exec vagrant-spec test \
21
+ --components=orchestrate/push orchestrate/prompt orchestrate/status orchestrate/provision")
21
22
  puts "Destroying target servers"
22
23
  system("vagrant destroy -f /local/")
23
24
  end
data/Vagrantfile CHANGED
@@ -2,6 +2,7 @@ managed_servers = %w( 192.168.10.80 192.168.10.81 192.168.10.82 192.168.10.83)
2
2
 
3
3
  Vagrant.configure(2) do |config|
4
4
  config.orchestrate.filter_managed_commands = true
5
+ config.vm.provision :shell, inline: "echo hello"
5
6
 
6
7
  # These boxes are defined locally to enable acceptance testing. Spinning up
7
8
  # real boxes in the vagrant-spec environment was expensive because it ignored
@@ -0,0 +1,24 @@
1
+ require "vagrant-spec"
2
+
3
+ describe "vagrant orchestrate provision", component: "orchestrate/provision" do
4
+ include_context "acceptance"
5
+
6
+ # This unique string gets echo'd as part of the provisioning process, so we
7
+ # can check the output for this string. See ../support-skeletons/provision/Vagrantfile
8
+ # for more info.
9
+ PROVISION_STRING = "6etrabEmU8ru8hapheph"
10
+
11
+ before do
12
+ environment.skeleton("provision")
13
+ end
14
+
15
+ it "Runs the shell provisioner" do
16
+ result = execute("vagrant", "orchestrate", "push", "managed-1")
17
+ expect(result.stdout).to include(PROVISION_STRING)
18
+ end
19
+
20
+ it "Doesn't run with --no-provision" do
21
+ result = execute("vagrant", "orchestrate", "push", "managed-1", "--no-provision")
22
+ expect(result.stdout).not_to include(PROVISION_STRING)
23
+ end
24
+ end
@@ -7,7 +7,6 @@ Vagrant.configure(2) do |config|
7
7
  managed.vm.provision "shell", inline: "date > /tmp/sync_time; sleep 3"
8
8
  managed.vm.box = "managed-server-dummy"
9
9
  managed.vm.box_url = "./dummy.box"
10
- # TODO: Why in the world do I need this? I thought it was the default!
11
10
  managed.ssh.password = "vagrant"
12
11
  managed.vm.provider :managed do |provider|
13
12
  provider.server = server
@@ -0,0 +1,18 @@
1
+ managed_servers = %w( 192.168.10.80 192.168.10.81 192.168.10.82 192.168.10.83 )
2
+
3
+ Vagrant.configure(2) do |config|
4
+ # Print a unique string that we can check the output for
5
+ config.vm.provision :shell, inline: "echo 6etrabEmU8ru8hapheph"
6
+
7
+ managed_servers.each_with_index do |server, index|
8
+ config.vm.define "managed-#{index + 1}" do |managed|
9
+ managed.vm.provision "shell", inline: "echo 'hello world'"
10
+ managed.vm.box = "managed-server-dummy"
11
+ managed.vm.box_url = "./dummy.box"
12
+ managed.ssh.password = "vagrant"
13
+ managed.vm.provider :managed do |provider|
14
+ provider.server = server
15
+ end
16
+ end
17
+ end
18
+ end
@@ -23,7 +23,7 @@ module VagrantPlugins
23
23
  options[:servers] = []
24
24
  options[:environments] = []
25
25
  options[:plugins] = DEFAULT_PLUGINS
26
- options[:puppet_librarian_puppet] = true
26
+ options[:puppet_librarian_puppet] = false
27
27
  options[:puppet_hiera] = true
28
28
 
29
29
  opts = OptionParser.new do |o|
@@ -27,11 +27,16 @@ module VagrantPlugins
27
27
  def execute
28
28
  options = {}
29
29
  options[:force] = @env.vagrantfile.config.orchestrate.force_push
30
+ options[:provision] = true
30
31
 
31
32
  opts = OptionParser.new do |o|
32
33
  o.banner = "Usage: vagrant orchestrate push"
33
34
  o.separator ""
34
35
 
36
+ o.on("--[no-]provision", "Enable or disable provisioning. Default is true") do |p|
37
+ options[:provision] = p
38
+ end
39
+
35
40
  o.on("--reboot", "Reboot a managed server after the provisioning step") do
36
41
  options[:reboot] = true
37
42
  end
@@ -111,7 +116,7 @@ module VagrantPlugins
111
116
  ENV["VAGRANT_ORCHESTRATE_COMMAND"] = "PUSH"
112
117
  begin
113
118
  batchify(machines, :up, options)
114
- batchify(machines, :provision, options)
119
+ batchify(machines, :provision, options) if options[:provision]
115
120
  upload_status_all(machines)
116
121
  batchify(machines, :reload, options) if options[:reboot]
117
122
  ensure
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Orchestrate
3
- VERSION = "0.5.1"
3
+ VERSION = "0.5.2"
4
4
  end
5
5
  end
@@ -169,7 +169,16 @@ describe VagrantPlugins::Orchestrate::Command::Init do
169
169
  expect(iso_env.vagrantfile.config.vm.communicator).to eq(:winrm)
170
170
  expect(iso_env.vagrantfile.config.winrm.username).to eq(described_class::DEFAULT_WINRM_USERNAME)
171
171
  expect(iso_env.vagrantfile.config.winrm.password).to eq(described_class::DEFAULT_WINRM_PASSWORD)
172
- expect(iso_env.vagrantfile.config.winrm.transport).to eq(:sspinegotiate)
172
+ expect(iso_env.vagrantfile.config.winrm.transport).to eq(:plaintext)
173
+ end
174
+ end
175
+
176
+ describe "sspinegotiate" do
177
+ let(:argv) { ["--winrm", "--servers", "server1"] }
178
+ it "creates a vagrantfile with the winrm communicator" do
179
+ subject.execute
180
+ config = iso_env.vagrantfile.machine_config(:server1, :managed, nil)[:config]
181
+ expect(config.winrm.transport).to eq(:sspinegotiate)
173
182
  end
174
183
  end
175
184
 
@@ -272,6 +281,8 @@ describe VagrantPlugins::Orchestrate::Command::Init do
272
281
  subject.execute
273
282
  vagrantfile = File.readlines(File.join(iso_env.cwd, "Vagrantfile")).join
274
283
  expect(vagrantfile).to include("managed_servers = %w( server1 server2 )")
284
+ expect(iso_env.vagrantfile.machine_config(:server1, :managed, nil)).to_not be_nil
285
+ expect(iso_env.vagrantfile.machine_config(:server2, :managed, nil)).to_not be_nil
275
286
  end
276
287
  end
277
288
  end
@@ -56,7 +56,6 @@ Vagrant.configure("2") do |config|
56
56
  config.vm.communicator = "<%= communicator %>"
57
57
  config.winrm.username = "<%= winrm_username %>"
58
58
  config.winrm.password = "<%= winrm_password %>"
59
- config.winrm.transport = :sspinegotiate
60
59
  <% end -%>
61
60
 
62
61
  config.vm.define "local", primary: true do |local|
@@ -70,6 +69,9 @@ Vagrant.configure("2") do |config|
70
69
  box.vm.provider :managed do |provider|
71
70
  provider.server = instance
72
71
  end
72
+ <% if communicator == "winrm" =%>
73
+ box.winrm.transport = :sspinegotiate
74
+ <% end -%>
73
75
  end
74
76
  end
75
77
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-orchestrate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Baldauf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-28 00:00:00.000000000 Z
11
+ date: 2015-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -84,12 +84,15 @@ files:
84
84
  - Rakefile
85
85
  - Vagrantfile
86
86
  - acceptance/command/prompt_spec.rb
87
+ - acceptance/command/provision_spec.rb
87
88
  - acceptance/command/push_spec.rb
88
89
  - acceptance/command/status_spec.rb
89
90
  - acceptance/support-skeletons/basic/Vagrantfile
90
91
  - acceptance/support-skeletons/basic/dummy.box
91
92
  - acceptance/support-skeletons/prompt/Vagrantfile
92
93
  - acceptance/support-skeletons/prompt/dummy.box
94
+ - acceptance/support-skeletons/provision/Vagrantfile
95
+ - acceptance/support-skeletons/provision/dummy.box
93
96
  - docs/environments.md
94
97
  - docs/puppet.md
95
98
  - docs/strategy.md