vagrant-managed-servers 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6a1b76e306ac8fb21d3c2021eefdac95a8dd9b9c
4
- data.tar.gz: aad778f3db1ecfc8bd1a74da50f75bc0045ab844
3
+ metadata.gz: 0dd8ab3ab2afe31792f8f939c953115a7955540b
4
+ data.tar.gz: c3a49bda8abbd479246ab1151cab9ad9231153f0
5
5
  SHA512:
6
- metadata.gz: c44804a7a2ad803407d3b3a96d93d720346c426c666847652b36c5547f7e0a26e4a8b4577dd796c76bee48fefd9357755de2d4e7c346f5fcdd63254eb1d84092
7
- data.tar.gz: fdd8df74d92ea2c4635028a34ccdb03673109375c981025e80f9e80928246d6967ec08fe423323647f7e5b4a4fb6999bb63b0b2e1aed4c7085a7933ef0a02a1f
6
+ metadata.gz: 0593dd7bc867681ff8153be3ed7eb55cc2baa3fa56af012fbce8cd0cd7bf251be8d9c51948f9bcf4fa3fe3a4557faa691a1a5288a75b66dae3f1e3feb1cb754c
7
+ data.tar.gz: 02c134964fcad6596bf126af334757a3e51534a40c617b82b9adefbd4398aa040b56d39473f3274319e98803a0ddf25a4236330edf863aefab00791a50448a48
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
 
2
2
  # Changelog
3
3
 
4
+ ## 0.4.0 (released 2014-11-15)
5
+
6
+ * update licensing information and add license to gemspec
7
+ * add support for windows managed servers via winrm ([#29](https://github.com/tknerr/vagrant-managed-servers/pull/29), thanks @chrisbaldauf!)
8
+
4
9
  ## 0.3.0 (released 2014-08-23)
5
10
 
6
11
  Updates for improving the experience with Vagrant 1.5+ (but still keeping backwards-compatibility with 1.2):
data/LICENSE CHANGED
@@ -1,5 +1,5 @@
1
1
  The MIT License (MIT)
2
- Copyright (c) 2013 Mitchell Hashimoto
2
+ Copyright (c) 2013 Torben Knerr
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5
5
 
data/README.md CHANGED
@@ -39,7 +39,7 @@ Vagrant.configure("2") do |config|
39
39
  end
40
40
  ```
41
41
 
42
- Next run `vagrant up --provider=managed` in order to "link" the vagrant VM with the managed server:
42
+ Next run `vagrant up --provider=managed` in order to "link" the vagrant VM with the managed server:
43
43
  ```
44
44
  $ vagrant up --provider=managed
45
45
  Bringing machine 'default' up with 'managed' provider...
@@ -62,7 +62,7 @@ $ vagrant provision
62
62
  ...
63
63
  $ vagrant ssh
64
64
  ...
65
- ```
65
+ ```
66
66
 
67
67
  If you are done, you can "unlink" vagrant from the managed server by running `vagrant destroy`:
68
68
  ```
@@ -71,11 +71,11 @@ $ vagrant destroy -f
71
71
  ==> default: -- Server: foo.acme.com
72
72
  ```
73
73
 
74
- If you try any of the other VM lifecycle commands like `halt`, `resume`, `reload`, etc... you will get a warning that these commands are not supported with the vagrant-managed-servers provider.
74
+ If you try any of the other VM lifecycle commands like `halt`, `resume`, `reload`, etc... you will get a warning that these commands are not supported with the vagrant-managed-servers provider.
75
75
 
76
76
  ## Box Format
77
77
 
78
- Every provider in Vagrant must introduce a custom box format. This provider introduces a "dummy box" for the `managed` provider which is really nothing more than the required `metadata.json` with the provider name set to "managed".
78
+ Every provider in Vagrant must introduce a custom box format. This provider introduces a "dummy box" for the `managed` provider which is really nothing more than the required `metadata.json` with the provider name set to "managed".
79
79
 
80
80
  For Vagrant 1.5+ you can use the [tknerr/managed-server-dummy](https://vagrantcloud.com/tknerr/managed-server-dummy) vagrantcloud box:
81
81
  ```ruby
@@ -120,7 +120,7 @@ specified, Vagrant will emit a warning and just ignore it.
120
120
 
121
121
  ## Synced Folders
122
122
 
123
- There is minimal support for synced folders. Upon `vagrant provision`,
123
+ There is minimal support for synced folders. Upon `vagrant provision`,
124
124
  the managed servers provider will use
125
125
  `rsync` (if available) to uni-directionally sync the folder to
126
126
  the remote machine over SSH.
@@ -128,6 +128,36 @@ the remote machine over SSH.
128
128
  This is good enough for all built-in Vagrant provisioners (shell,
129
129
  chef, and puppet) to work!
130
130
 
131
+ ## Windows support
132
+ It is possible to use this plugin to control pre-existing windows servers using
133
+ WinRM instead of rsync, with a few prerequisites:
134
+
135
+ * WinRM installed and running on the target machine
136
+ * The account used to connect is a local account and also a local administrator (domain accounts don't work over basic auth)
137
+ * WinRM basic authentication is enabled
138
+ * WinRM unencrypted traffic is enabled
139
+
140
+ For more information, see the WinRM Gem [Troubleshooting Guide](https://github.com/WinRb/WinRM#troubleshooting)
141
+
142
+ Your vagrantfile will look something like this:
143
+ ```ruby
144
+ config.vm.define 'my-windows-server' do |windows|
145
+ windows.vm.communicator = :winrm
146
+ windows.winrm.username = 'vagrant'
147
+ windows.winrm.password = 'vagrant'
148
+ windows.vm.provider :managed do |managed, override|
149
+ managed.server = 'myserver.mydomain.com'
150
+ end
151
+ end
152
+ ```
153
+ Synchronization of files using WinRM is known to be slow, so it is recommended
154
+ that you disable synched folders that aren't critical. For instance, to disable the
155
+ default /vagrant share, you could use the following code:
156
+
157
+ ```ruby
158
+ windows.vm.synced_folder '.', '/vagrant', disabled: true
159
+ ```
160
+
131
161
  ## Development
132
162
 
133
163
  To work on the `vagrant-managed-servers` plugin, clone this repository out, and use
@@ -30,14 +30,23 @@ module VagrantPlugins
30
30
  # Ignore disabled shared folders
31
31
  next if data[:disabled]
32
32
 
33
+ hostpath = File.expand_path(data[:hostpath], env[:root_path])
34
+ guestpath = data[:guestpath]
35
+
36
+ # Windows doesn't support ssh or rsync natively. Use winrm instead
37
+ if (env[:machine].config.vm.communicator == :winrm) then
38
+ env[:ui].info(I18n.t('vagrant_managed_servers.winrm_upload'))
39
+ env[:machine].communicate.tap do |comm|
40
+ comm.upload(hostpath, guestpath)
41
+ end
42
+ return
43
+ end
44
+
33
45
  unless Vagrant::Util::Which.which('rsync')
34
46
  env[:ui].warn(I18n.t('vagrant_managed_servers.rsync_not_found_warning'))
35
47
  break
36
48
  end
37
49
 
38
- hostpath = File.expand_path(data[:hostpath], env[:root_path])
39
- guestpath = data[:guestpath]
40
-
41
50
  # Make sure there is a trailing slash on the host path to
42
51
  # avoid creating an additional directory with rsync
43
52
  hostpath = "#{hostpath}/" if hostpath !~ /\/$/
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module ManagedServers
3
- VERSION = "0.3.0"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
data/locales/en.yml CHANGED
@@ -11,6 +11,8 @@ en:
11
11
  Make sure rsync is installed and the binary can be found in the PATH.
12
12
  rsync_folder: |-
13
13
  Rsyncing folder: %{hostpath} => %{guestpath}
14
+ winrm_upload: |-
15
+ Uploading with WinRM: %{hostpath} => %{guestpath}
14
16
  linking_server: |-
15
17
  Linking vagrant with managed server %{host}
16
18
  unlinking_server: |-
@@ -38,8 +40,3 @@ en:
38
40
  Host path: %{hostpath}
39
41
  Guest path: %{guestpath}
40
42
  Error: %{stderr}
41
-
42
-
43
-
44
-
45
-
@@ -10,6 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.homepage = "https://github.com/tknerr/vagrant-managed-servers"
11
11
  s.summary = "Enables Vagrant to ssh into and provision managed servers."
12
12
  s.description = "Enables Vagrant to ssh into and provision managed servers."
13
+ s.license = "MIT"
13
14
 
14
15
  s.required_rubygems_version = ">= 1.3.6"
15
16
  s.rubyforge_project = "vagrant-managed-servers"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-managed-servers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Torben Knerr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-22 00:00:00.000000000 Z
11
+ date: 2014-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -102,7 +102,8 @@ files:
102
102
  - .gitignore
103
103
  - .travis.yml
104
104
  homepage: https://github.com/tknerr/vagrant-managed-servers
105
- licenses: []
105
+ licenses:
106
+ - MIT
106
107
  metadata: {}
107
108
  post_install_message:
108
109
  rdoc_options: []