vagrant-orchestrate 0.6.0 → 0.6.1.patch
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +17 -22
- data/docs/environments.md +8 -0
- data/docs/puppet.md +2 -4
- data/docs/strategy.md +4 -4
- data/lib/vagrant-managed-servers/action.rb +40 -0
- data/lib/vagrant-orchestrate/action/setcredentials.rb +9 -0
- data/lib/vagrant-orchestrate/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23757b8b0878a48a5c9e30518eab353976e14f0d
|
4
|
+
data.tar.gz: 40b510fdba26c874cc9d9c9272320d8c09788a24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f49f2d4c970ecd5c325a7eb48997469d5b9106c68822868d375f9e5bf6aa5c74eea302f7311e0c700811bea8ba221214c8f2c110416fcb5daa8889a095dbc1cb
|
7
|
+
data.tar.gz: 9970f9430d76df081bf1629230dc4d1e8aceea7c0553e790d68002e5026c029b264f289318717980762fe2b1705263f5fc611cf64be0f2e3e51f2daf6b904287
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
0.6.1 (May 18th, 2015)
|
2
|
+
|
3
|
+
- Change the credentials manager to add the `smb_username` and `smb_password` to
|
4
|
+
the synced folders for a machine if the communicator is `winrm`. For Windows,
|
5
|
+
this means only a single credential prompt.
|
6
|
+
|
1
7
|
0.6.0 (May 15th, 2015)
|
2
8
|
|
3
9
|
- Refactor the push command to compose middleware actions rather than performing
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
![](http://i.imgur.com/71yAw5v.gif)
|
7
7
|
|
8
8
|
This is a Vagrant 1.6+ plugin that allows orchestrated deployments
|
9
|
-
to already provisioned (non-elastic) servers on top of the excellent [
|
9
|
+
to already provisioned (non-elastic) servers on top of the excellent [Vagrant Managed Servers](http://github.com/tknerr/vagrant-managed-servers) plugin.
|
10
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**.
|
@@ -14,9 +14,10 @@ Linux, and Mac**.
|
|
14
14
|
## Quick start
|
15
15
|
|
16
16
|
```
|
17
|
-
$ vagrant orchestrate init --
|
18
|
-
--
|
19
|
-
--
|
17
|
+
$ vagrant orchestrate init --servers myserver1.mydomain.com,myserver2.mydomain.com \
|
18
|
+
--ssh-username USERNAME --ssh-private-key-path PATH \
|
19
|
+
--shell --shell-inline "echo Hello"
|
20
|
+
|
20
21
|
$ ls
|
21
22
|
Vagrantfile dummy.box
|
22
23
|
$ vagrant orchestrate push
|
@@ -38,7 +39,7 @@ $ vagrant orchestrate push
|
|
38
39
|
==> managed-myserver2.mydomain.com: -- Server: myserver2.mydomain.com
|
39
40
|
```
|
40
41
|
|
41
|
-
This also works for Windows with the `--winrm --winrm-username USERNAME --wirnm-password PASSWORD` parameters, but
|
42
|
+
This also works for Windows with the `--winrm --winrm-username USERNAME --wirnm-password PASSWORD` parameters, but must be initiated from a Windows host.
|
42
43
|
|
43
44
|
## Usage
|
44
45
|
|
@@ -86,8 +87,8 @@ end
|
|
86
87
|
|
87
88
|
You'll need to edit your Vagrantfile and replace some variables, such as ssh username and
|
88
89
|
private key, and the path to the script to run. Alternatively, you can pass them on the command
|
89
|
-
line with `--ssh-username` and `--ssh-private-key-path`. The first line of the file defines an
|
90
|
-
managed servers that the `push` command will operate on.
|
90
|
+
line with `--ssh-username` and `--ssh-private-key-path`. The first line of the file defines an whitespace delimeted
|
91
|
+
array of managed servers that the `push` command will operate on.
|
91
92
|
|
92
93
|
```ruby
|
93
94
|
managed_servers = %w( myserver1.mydomain.com myserver2.mydomain.com )
|
@@ -96,7 +97,7 @@ managed_servers = %w( myserver1.mydomain.com myserver2.mydomain.com )
|
|
96
97
|
|
97
98
|
This works for Windows managed servers using WinRM as well
|
98
99
|
|
99
|
-
$ vagrant orchestrate init --winrm
|
100
|
+
$ vagrant orchestrate init --winrm --winrm-username USERNAME --winrm-password PASSWORD
|
100
101
|
|
101
102
|
```ruby
|
102
103
|
required_plugins = %w( vagrant-managed-servers vagrant-winrm-s )
|
@@ -104,14 +105,13 @@ This works for Windows managed servers using WinRM as well
|
|
104
105
|
...
|
105
106
|
|
106
107
|
config.vm.communicator = "winrm"
|
107
|
-
config.winrm.username = "
|
108
|
-
config.winrm.password = "
|
109
|
-
config.winrm.transport = :sspinegotiate
|
108
|
+
config.winrm.username = "USERNAME"
|
109
|
+
config.winrm.password = "PASSWORD"
|
110
110
|
```
|
111
111
|
|
112
112
|
#### Plugins
|
113
113
|
|
114
|
-
This also supports a portable way to install plugins, just list them in the required_plugins section
|
114
|
+
This also supports a portable and repeatable way to install plugins, just list them in the required_plugins section
|
115
115
|
|
116
116
|
```ruby
|
117
117
|
required_plugins = %w( vagrant-managed-servers vagrant-hostsupdater )
|
@@ -217,16 +217,11 @@ sc config winrm type= own
|
|
217
217
|
1. Fork it ( https://github.com/Cimpress-MCP/vagrant-orchestrate/fork )
|
218
218
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
219
219
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
220
|
-
4.
|
221
|
-
5.
|
222
|
-
|
223
|
-
|
220
|
+
4. Run locally with `bundle exec vagrant orchestrate [init|push|status]`
|
221
|
+
5. `bundle exec rake build`
|
222
|
+
6. `bundle exec rake acceptance`, which will take a few minutes
|
223
|
+
7. Push to the branch (`git push origin my-new-feature`)
|
224
|
+
8. Create a new Pull Request
|
224
225
|
|
225
226
|
Prerequisites:
|
226
227
|
* Ruby 2.0 or greater
|
227
|
-
|
228
|
-
Flow:
|
229
|
-
1. Develop your feature
|
230
|
-
2. Run locally with `bundle exec vagrant orchestrate [init|push|status]`
|
231
|
-
3. `bundle exec rake build`
|
232
|
-
4. `bundle exec rake acceptance`, which will take a few minutes
|
data/docs/environments.md
CHANGED
@@ -80,3 +80,11 @@ Current machine states:
|
|
80
80
|
|
81
81
|
local not created (virtualbox)
|
82
82
|
```
|
83
|
+
|
84
|
+
## Init
|
85
|
+
|
86
|
+
Vagrant Orchestrate will template the Vagrantfile and servers.json using `vagrant orchestrate init --environments dev,test,prod`. You will need to specify the servers that exist in each environment in the servers.json file and also create each of the appropriate branches.
|
87
|
+
|
88
|
+
## Merge conflicts
|
89
|
+
|
90
|
+
Early in the development process, we experimented with a different servers.json file per branch, meaning that the servers.json in the dev branch would only list servers that existed in dev. This created many merge conflicts and this friction quickly led to frustration. In the end, we asserted that the servers.json file should be the same across environments in order to remove the merge conflicts from the equation. This means there is a higher cost to adding a new server because it needs to be added to all environment branches, but in my experience, servers change less often than code.
|
data/docs/puppet.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Puppet
|
2
2
|
|
3
|
-
Experimental
|
3
|
+
Experimental puppet templating support is available with the `--puppet` flag and associated options
|
4
4
|
|
5
5
|
```ruby
|
6
6
|
required_plugins = %w( vagrant-managed-servers vagrant-librarian-puppet )
|
@@ -18,9 +18,7 @@ The following files and folders will be placed in the puppet directory
|
|
18
18
|
|
19
19
|
```
|
20
20
|
Puppetfile
|
21
|
-
|
22
|
-
dummy.box
|
23
|
-
hiera/
|
21
|
+
hieradata/
|
24
22
|
common.yaml
|
25
23
|
hiera.yaml
|
26
24
|
manifests/
|
data/docs/strategy.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# Deployment Strategies
|
2
2
|
|
3
|
-
Vagrant Orchestrate supports several deployment strategies
|
4
|
-
half and half. Here we'll cover how to use the various strategies as well as describing
|
3
|
+
Vagrant Orchestrate supports several deployment strategies that allow you to orchestrate the behavior pushes to remote servers. Here we'll cover how to use the various strategies as well as describing
|
5
4
|
situations when each might be useful.
|
6
5
|
|
7
6
|
## Strategies
|
@@ -36,6 +35,8 @@ provision [trigger](https://github.com/emyl/vagrant-triggers) to run a smoke tes
|
|
36
35
|
|
37
36
|
config.orchestrate.strategy = :canary
|
38
37
|
|
38
|
+
The prompt can be surpressed with the `--force` (`-f`) flag.
|
39
|
+
|
39
40
|
### Half and Half
|
40
41
|
Deploys to half of the cluster in parallel, then the other half, with
|
41
42
|
a pause in between. This won't manage any of your load balancing or networking
|
@@ -76,9 +77,8 @@ Alternatively, you can specify the deployment strategy in your Vagrantfile
|
|
76
77
|
|
77
78
|
Command line parameters take precedence over configuration values set in the Vagrantfile.
|
78
79
|
|
79
|
-
|
80
80
|
## Suppressing Prompts
|
81
|
-
In order to automate the deployment process,
|
81
|
+
In order to automate the deployment process, you'll need to suppress
|
82
82
|
prompts. You can achieve that in two ways:
|
83
83
|
|
84
84
|
From the command line, add the `--force` or `-f` parameters
|
@@ -26,6 +26,46 @@ module VagrantPlugins
|
|
26
26
|
b.use DownloadStatus
|
27
27
|
end
|
28
28
|
end
|
29
|
+
|
30
|
+
# !!!!!!!!!!!!!!!!!!!!!! "TEMPORARY" PATCH !!!!!!!!!!!!!!!!!!!!!!!
|
31
|
+
# I'm adding the SMB support here, while I wait on feedback for
|
32
|
+
# https://github.com/tknerr/vagrant-managed-servers/pull/47
|
33
|
+
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
34
|
+
# This action is called when `vagrant provision` is called.
|
35
|
+
# rubocop:disable MethodLength
|
36
|
+
def self.action_provision
|
37
|
+
Vagrant::Action::Builder.new.tap do |b|
|
38
|
+
b.use ConfigValidate
|
39
|
+
b.use WarnNetworks
|
40
|
+
b.use Call, IsLinked do |env, b2|
|
41
|
+
unless env[:result]
|
42
|
+
b2.use MessageNotLinked
|
43
|
+
next
|
44
|
+
end
|
45
|
+
|
46
|
+
# rubocop:disable Lint/ShadowingOuterLocalVariable
|
47
|
+
b2.use Call, IsReachable do |env, b3|
|
48
|
+
unless env[:result]
|
49
|
+
b3.use MessageNotReachable
|
50
|
+
next
|
51
|
+
end
|
52
|
+
|
53
|
+
b3.use Provision
|
54
|
+
if env[:machine].config.vm.communicator == :winrm
|
55
|
+
# Use the builtin vagrant folder sync for Windows target servers.
|
56
|
+
# This gives us SMB folder sharing, which is much faster than the
|
57
|
+
# WinRM uploader for any non-trivial number of files.
|
58
|
+
b3.use Vagrant::Action::Builtin::SyncedFolders
|
59
|
+
else
|
60
|
+
# Vagrant managed servers custom implementation
|
61
|
+
b3.use SyncFolders
|
62
|
+
end
|
63
|
+
end
|
64
|
+
# rubocop:enable Lint/ShadowingOuterLocalVariable
|
65
|
+
end
|
66
|
+
end
|
67
|
+
# rubocop:enable MethodLength
|
68
|
+
end
|
29
69
|
end
|
30
70
|
end
|
31
71
|
end
|
@@ -38,6 +38,15 @@ module VagrantPlugins
|
|
38
38
|
config.username = username
|
39
39
|
config.password = password
|
40
40
|
end
|
41
|
+
|
42
|
+
# If we're using WinRM, then we'll want to use SMB folder sync, which
|
43
|
+
# requires creds.
|
44
|
+
return unless machine.config.vm.communicator == :winrm
|
45
|
+
machine.config.vm.synced_folders.each do |_id, data|
|
46
|
+
puts data[:type]
|
47
|
+
data[:smb_username] = username
|
48
|
+
data[:smb_password] = password
|
49
|
+
end
|
41
50
|
end
|
42
51
|
|
43
52
|
def prompt_username(ui)
|
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.6.
|
4
|
+
version: 0.6.1.patch
|
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-05-
|
11
|
+
date: 2015-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -141,9 +141,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
141
141
|
version: '0'
|
142
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
|
-
- - '
|
144
|
+
- - '>'
|
145
145
|
- !ruby/object:Gem::Version
|
146
|
-
version:
|
146
|
+
version: 1.3.1
|
147
147
|
requirements: []
|
148
148
|
rubyforge_project:
|
149
149
|
rubygems_version: 2.0.14
|