dopi 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +20 -0
- data/.rspec +2 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +322 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +102 -0
- data/LICENSE.txt +177 -0
- data/README.md +309 -0
- data/Rakefile +44 -0
- data/Vagrantfile +64 -0
- data/bin/dopi +4 -0
- data/doc/getting_started.md +247 -0
- data/doc/getting_started_examples/001_hello_world.yaml +17 -0
- data/doc/getting_started_examples/002_connecting_over_ssh.yaml +35 -0
- data/doc/plugins/custom.md +88 -0
- data/doc/plugins/mco/rpc.md +82 -0
- data/doc/plugins/ssh/custom.md +141 -0
- data/doc/plugins/ssh/file_contains.md +37 -0
- data/doc/plugins/ssh/file_deploy.md +52 -0
- data/doc/plugins/ssh/file_exists.md +31 -0
- data/doc/plugins/ssh/file_replace.md +37 -0
- data/doc/plugins/ssh/puppet_agent_run.md +50 -0
- data/doc/plugins/ssh/reboot.md +22 -0
- data/doc/plugins/ssh/wait_for_login.md +53 -0
- data/doc/plugins/winrm/cmd.md +161 -0
- data/doc/plugins/winrm/file_contains.md +39 -0
- data/doc/plugins/winrm/file_exists.md +31 -0
- data/doc/plugins/winrm/powershell.md +27 -0
- data/doc/plugins/winrm/puppet_agent_run.md +49 -0
- data/doc/plugins/winrm/reboot.md +17 -0
- data/doc/plugins/winrm/wait_for_login.md +55 -0
- data/dopi.gemspec +42 -0
- data/lib/dopi/cli/command_add.rb +35 -0
- data/lib/dopi/cli/command_list.rb +19 -0
- data/lib/dopi/cli/command_remove.rb +31 -0
- data/lib/dopi/cli/command_reset.rb +27 -0
- data/lib/dopi/cli/command_run.rb +68 -0
- data/lib/dopi/cli/command_show.rb +109 -0
- data/lib/dopi/cli/command_update.rb +37 -0
- data/lib/dopi/cli/command_validate.rb +27 -0
- data/lib/dopi/cli/global_options.rb +55 -0
- data/lib/dopi/cli/log.rb +33 -0
- data/lib/dopi/cli.rb +57 -0
- data/lib/dopi/command/custom.rb +52 -0
- data/lib/dopi/command/dummy.rb +27 -0
- data/lib/dopi/command/mco/rpc.rb +158 -0
- data/lib/dopi/command/ssh/custom.rb +48 -0
- data/lib/dopi/command/ssh/file_contains.rb +70 -0
- data/lib/dopi/command/ssh/file_deploy.rb +71 -0
- data/lib/dopi/command/ssh/file_exists.rb +54 -0
- data/lib/dopi/command/ssh/file_replace.rb +96 -0
- data/lib/dopi/command/ssh/puppet_agent_run.rb +63 -0
- data/lib/dopi/command/ssh/reboot.rb +50 -0
- data/lib/dopi/command/ssh/wait_for_login.rb +68 -0
- data/lib/dopi/command/winrm/cmd.rb +44 -0
- data/lib/dopi/command/winrm/file_contains.rb +66 -0
- data/lib/dopi/command/winrm/file_exists.rb +51 -0
- data/lib/dopi/command/winrm/powershell.rb +16 -0
- data/lib/dopi/command/winrm/puppet_agent_run.rb +61 -0
- data/lib/dopi/command/winrm/reboot.rb +33 -0
- data/lib/dopi/command/winrm/wait_for_login.rb +49 -0
- data/lib/dopi/command.rb +239 -0
- data/lib/dopi/command_parser/arguments.rb +38 -0
- data/lib/dopi/command_parser/credentials.rb +59 -0
- data/lib/dopi/command_parser/env.rb +37 -0
- data/lib/dopi/command_parser/exec.rb +27 -0
- data/lib/dopi/command_parser/exit_code.rb +73 -0
- data/lib/dopi/command_parser/output.rb +126 -0
- data/lib/dopi/command_set.rb +66 -0
- data/lib/dopi/connector/local.rb +77 -0
- data/lib/dopi/connector/ssh.rb +170 -0
- data/lib/dopi/connector/winrm.rb +167 -0
- data/lib/dopi/error.rb +43 -0
- data/lib/dopi/log.rb +18 -0
- data/lib/dopi/node.rb +70 -0
- data/lib/dopi/plan.rb +99 -0
- data/lib/dopi/pluginmanager.rb +62 -0
- data/lib/dopi/state.rb +226 -0
- data/lib/dopi/state_store.rb +155 -0
- data/lib/dopi/step.rb +227 -0
- data/lib/dopi/step_set.rb +70 -0
- data/lib/dopi/version.rb +3 -0
- data/lib/dopi.rb +165 -0
- data/spec/command_helper.rb +11 -0
- data/spec/fixtures/mco_client.cfg +26 -0
- data/spec/fixtures/plans/fail_on_timeout.yaml +20 -0
- data/spec/fixtures/plans/hello_world.yaml +34 -0
- data/spec/fixtures/plans/non_existing_node.yaml +26 -0
- data/spec/fixtures/plans/test_role_variable.yaml +29 -0
- data/spec/fixtures/puppet/Puppetfile +8 -0
- data/spec/fixtures/puppet/Puppetfile.lock +57 -0
- data/spec/fixtures/puppet/hiera.yaml +6 -0
- data/spec/fixtures/puppet/manifests/site.pp +52 -0
- data/spec/fixtures/test_configuration.yaml +54 -0
- data/spec/fixtures/test_credentials.yaml +11 -0
- data/spec/fixtures/test_deloyed_file.txt +5 -0
- data/spec/fixtures/test_infrastructure.yaml +12 -0
- data/spec/fixtures/test_nodes.yaml +45 -0
- data/spec/fixtures/testenv_plan.yaml +159 -0
- data/spec/integration/dopi/addrun_spec.rb +31 -0
- data/spec/integration/dopi/cli/command_run_spec.rb +38 -0
- data/spec/integration/dopi/cli/global_options_spec.rb +128 -0
- data/spec/integration/dopi/command_spec.rb +66 -0
- data/spec/integration/dopi/fail_check_plans/file_exists_fails.yaml +38 -0
- data/spec/integration/dopi/fail_check_plans/output_parser.yaml +39 -0
- data/spec/integration/dopi/fail_check_plans/powershell_fail.yaml +25 -0
- data/spec/integration/dopi/fail_check_plans/timeout.yaml +29 -0
- data/spec/integration/dopi/fail_check_plans/verify_commands.yaml +33 -0
- data/spec/integration/dopi/failplan.rb +27 -0
- data/spec/integration/dopi/plan.rb +27 -0
- data/spec/integration/dopi/plans/dummy.yaml +29 -0
- data/spec/integration/dopi/plans/max_per_role.yaml +55 -0
- data/spec/integration/dopi/plans/no_timeout.yaml +29 -0
- data/spec/integration/dopi/plans/node_and_role_patterns.yaml +58 -0
- data/spec/integration/dopi/plans/node_by_config.yaml +116 -0
- data/spec/integration/dopi/plans/plugin_defaults.yaml +86 -0
- data/spec/integration/dopi/plans/plugins/mco/rpc.yaml +33 -0
- data/spec/integration/dopi/plans/plugins/ssh/custom.yaml +97 -0
- data/spec/integration/dopi/plans/plugins/ssh/file_contains.yaml +51 -0
- data/spec/integration/dopi/plans/plugins/ssh/file_deploy.yaml +82 -0
- data/spec/integration/dopi/plans/plugins/ssh/file_exists.yaml +69 -0
- data/spec/integration/dopi/plans/plugins/ssh/file_replace.yaml +55 -0
- data/spec/integration/dopi/plans/plugins/ssh/puppet_agent_run.yaml +45 -0
- data/spec/integration/dopi/plans/plugins/ssh/reboot.yaml +43 -0
- data/spec/integration/dopi/plans/plugins/ssh/wait_for_login.yaml +45 -0
- data/spec/integration/dopi/plans/plugins/winrm/cmd.yaml +39 -0
- data/spec/integration/dopi/plans/plugins/winrm/file_contains.yaml +51 -0
- data/spec/integration/dopi/plans/plugins/winrm/file_exists.yaml +69 -0
- data/spec/integration/dopi/plans/plugins/winrm/reboot.yaml +31 -0
- data/spec/integration/dopi/plans/resolve_roles_on_validate.yaml +23 -0
- data/spec/integration/dopi/plans/ssh_parallel.yaml +37 -0
- data/spec/integration/dopi/plans/verify_commands.yaml +49 -0
- data/spec/spec_helper.rb +104 -0
- data/spec/unit/dopi/command/custom_spec.rb +58 -0
- data/spec/unit/dopi/command/mco/rpc_spec.rb +157 -0
- data/spec/unit/dopi/command/ssh/custom_spec.rb +30 -0
- data/spec/unit/dopi/command/ssh/file_deploy_spec.rb +42 -0
- data/spec/unit/dopi/command/ssh/file_replace_spec.rb +35 -0
- data/spec/unit/dopi/command_parser/credentials_spec.rb +53 -0
- data/spec/unit/dopi/command_parser/exit_code_spec.rb +63 -0
- data/spec/unit/dopi/command_parser/output_spec.rb +129 -0
- data/spec/unit/dopi/command_spec.rb +14 -0
- data/spec/unit/dopi/connector/winrm_spec.rb +111 -0
- data/spec/unit/dopi/node_spec.rb +24 -0
- data/spec/unit/dopi/plan_spec.rb +31 -0
- data/spec/unit/dopi/state_spec.rb +109 -0
- data/spec/unit/dopi/step_spec.rb +13 -0
- metadata +448 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a250c86a6a53a6e1d95ad9d7cc1c1a63e32732df
|
4
|
+
data.tar.gz: 3032c907c32e61940080942da31597fa2bc193c8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 582a10a26ae4ccf6f342ea2c09a1e7fcbc0f4d191651f65c33660b73cf32fdfa71183a82916e8ddeedf848505ffb17f5d032cde86c6c21e4535c79191b7e9b36
|
7
|
+
data.tar.gz: 26f061bea1eb6c87f1f04a65939218bf09353253b7e098f24d3fec55d708a642200067fa175194f806f594318b1f6049ef0b75eec6ac9ba4665f99ec07a7cbc3
|
data/.gitignore
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
.yardoc
|
6
|
+
InstalledFiles
|
7
|
+
_yardoc
|
8
|
+
coverage
|
9
|
+
lib/bundler/man
|
10
|
+
pkg
|
11
|
+
rdoc
|
12
|
+
spec/reports
|
13
|
+
test/tmp
|
14
|
+
test/version_tmp
|
15
|
+
tmp
|
16
|
+
.vagrant
|
17
|
+
vendor/
|
18
|
+
vagrant/puppet/.librarian/
|
19
|
+
vagrant/puppet/.tmp/
|
20
|
+
vagrant/puppet/modules/
|
data/.rspec
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-1.9.3-p551
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,322 @@
|
|
1
|
+
# Change Log
|
2
|
+
All notable changes to DOPi will be documented in this file.
|
3
|
+
|
4
|
+
## [0.17.0] - 2017-03-28
|
5
|
+
### Added
|
6
|
+
- The log format of the trace output now uses the formatter from dopv which is now in dop_common
|
7
|
+
|
8
|
+
## Other
|
9
|
+
- Some more code was moved to dop_common because it is of use for all dop parts
|
10
|
+
|
11
|
+
## [0.16.0] - 2017-02-22
|
12
|
+
|
13
|
+
IMPORTANT: the config file which used to be under /etc/dop/dopi.conf is now under /etc/dop/dop.conf
|
14
|
+
because it will now be used by all dop projects and not just by dopi. Make sure you adjust your
|
15
|
+
installation when updating to > 0.16.
|
16
|
+
|
17
|
+
### Added
|
18
|
+
- it is now possible to include other files in the plan. by using include: path/to/file.yaml
|
19
|
+
- Use the node info from Dopv to get floating IPs or dynamic IPs for some providers.
|
20
|
+
|
21
|
+
### Changes
|
22
|
+
- A lot of functionality was moved to dop_common to make use of it in all the dop projects
|
23
|
+
|
24
|
+
## [0.15.2] - 2017-01-11
|
25
|
+
### Fixed
|
26
|
+
- Fix the slow start when using passwords from external tools
|
27
|
+
|
28
|
+
## [0.15.1] - 2016-12-14
|
29
|
+
### Fixed
|
30
|
+
- Fix the workflow and automatically update the plan before a run
|
31
|
+
|
32
|
+
### Added
|
33
|
+
- Update flag for the add command to make sure we can always add a plan even if it exists
|
34
|
+
|
35
|
+
## [0.15.0] - 2016-12-07
|
36
|
+
### Fixed
|
37
|
+
- Dopi will now return the correct exit code again if the run failed
|
38
|
+
|
39
|
+
### Added
|
40
|
+
- The reboot command of the ssh/reboot plugin can now be adjusted with 'reboot_cmd'
|
41
|
+
|
42
|
+
### Changed
|
43
|
+
- The node filter functionality was moved to dop_common
|
44
|
+
- The remove command will now keep dopv and remove dopi state per default. There are two new options to change the behaviour
|
45
|
+
|
46
|
+
## [0.14.3] - 2016-11-28
|
47
|
+
|
48
|
+
### Fixed
|
49
|
+
- Bump version of dop_common to get fixes for various bugs:
|
50
|
+
- Add zero padding to the version string for the plan store
|
51
|
+
- Removed a misleading error message when a plan was updated and the state was still new
|
52
|
+
- Add lower version boundry for hashdiff to make sure the fixed version is used
|
53
|
+
|
54
|
+
## [0.14.2] - 2016-11-23
|
55
|
+
|
56
|
+
### Fixed
|
57
|
+
- Assign a proper pty to stdin of processes to prevent the tcgetattr errors of some platforms
|
58
|
+
|
59
|
+
## [0.14.1] - 2016-11-16
|
60
|
+
|
61
|
+
### Fixed
|
62
|
+
- The local command executer now clears the environment before executing a command. The only variables set are HOME and PATH with some sane defaults.
|
63
|
+
- Fixes to the content loader from an executable from dop_common
|
64
|
+
|
65
|
+
## [0.14.0] - 2016-11-09
|
66
|
+
|
67
|
+
WARNING: This version introduces a new plan store which is incompatible with the old plan store. If you used the plan store of DOPi you will have to re-add all your plans with the new version. There is no automatic migration.
|
68
|
+
|
69
|
+
WARNING: The state update feature is in a very early version and there may be corner cases where it does not work as expected. Please always make sure to check the state after an update to verify if the update did what you expected. If you encounter such a case please file a bug report. A workaround is to update the plan with the "--clear" switch which will reset the state, which resembles the old behavior.
|
70
|
+
|
71
|
+
### Changed
|
72
|
+
- Complete re-implementation of the plan store
|
73
|
+
- Implementation of a proper plan cache to speed up hiera lookups
|
74
|
+
- The state of a plan will now be updated if a plan is updated
|
75
|
+
- Complete re-implementation of the state store, which now has a write lock, transactions and atomic updates.
|
76
|
+
- The update command has a new syntax and the new options clear and ignore to influence how the state should be updated in the case of an error
|
77
|
+
- remove will now just remove the plan but the state will be preserved
|
78
|
+
- The show command will now collapse steps per default and only show partial or running steps as expanded. There is a new switch "detailed" to show the full tree
|
79
|
+
- The show command has a new curses UI for the follow function which will update automatically with inotify if the state changes
|
80
|
+
- Complete rewrite of the DOPi library API
|
81
|
+
|
82
|
+
## Added
|
83
|
+
- It is now possible to set a title for a command to get a more meaningful output in the show command
|
84
|
+
|
85
|
+
## [0.13.1] - 2016-08-10
|
86
|
+
|
87
|
+
### Fixed
|
88
|
+
- Dopi sometimes still tried to access /var/lib/dop when running as a user
|
89
|
+
- Dopi failed on ruby 2.2 when running a plan from the plan cache
|
90
|
+
- Plugin timeout did not terminate the processes correctly
|
91
|
+
|
92
|
+
## [0.13.0] - 2016-06-22
|
93
|
+
|
94
|
+
### Added
|
95
|
+
- New operation_timeout setting for the winrm connector for long running commands
|
96
|
+
- The very essential winrm/reboot plugin
|
97
|
+
- The winrm/puppet_agent plugin
|
98
|
+
|
99
|
+
### Fixed
|
100
|
+
- A run will now stop in the middle of a command sets if an stop command was sent
|
101
|
+
- winrm/file_exists and winrm/file_contains should now work with paths with spaces
|
102
|
+
- stderr was not returned correctly for parsing in the winrm connector
|
103
|
+
|
104
|
+
### Changed
|
105
|
+
- Migration of the winrm plugins to the new modularized format
|
106
|
+
- Update winrm gem to the newest version
|
107
|
+
|
108
|
+
## [0.12.0] - 2016-06-13
|
109
|
+
|
110
|
+
This release has some pretty significant changes to the SSH connector. It will now encode
|
111
|
+
the command into a base64 string which will then be decoded on the server side. This should
|
112
|
+
prevent a lot of the headache around escaping and allow for multiline scripts.
|
113
|
+
|
114
|
+
Stuff like this should now be possible:
|
115
|
+
|
116
|
+
- name: 'Execute muliline script'
|
117
|
+
nodes: 'all'
|
118
|
+
command:
|
119
|
+
plugin: 'ssh/custom'
|
120
|
+
exec: |
|
121
|
+
export FOO="a multiline script"
|
122
|
+
echo "this is ${FOO}"
|
123
|
+
echo "we don't care about escaping anymore" > /tmp/sometext
|
124
|
+
cat /tmp/sometext
|
125
|
+
|
126
|
+
You can still get the old behaviour if you set "base64: false" in an ssh plugins. However I
|
127
|
+
recommend you migrate your scripts instead, which should also make the script look cleaner.
|
128
|
+
|
129
|
+
There are also some other smaller changes to the ssh connector which are listed below.
|
130
|
+
|
131
|
+
### Changed
|
132
|
+
- ssh now uses base64 to enable multiline commands and to fix the issues with escaping
|
133
|
+
- the ssh_check_host_key cli option has gone away. This is now a plugin setting and can
|
134
|
+
now be set with the set_plugin_defaults or per plugin instance, which is much more flexible.
|
135
|
+
|
136
|
+
### Added
|
137
|
+
- ssh/reboot plugin
|
138
|
+
|
139
|
+
## [0.11.1] - 2016-06-09
|
140
|
+
- upgrade of dop_common
|
141
|
+
|
142
|
+
## [0.11.0] - 2016-05-25
|
143
|
+
### Added
|
144
|
+
- Make it possible to limit the running nodes per role with the max_per_role setting
|
145
|
+
This can be set per plan and be overwritten by step
|
146
|
+
|
147
|
+
### Removed
|
148
|
+
- plan subhash for max_in_flight is no longer supported and was removed
|
149
|
+
- Setting the ssh password via ssh_root_pass is no longer supported and was removed
|
150
|
+
|
151
|
+
## [0.10.1] - 2016-04-27
|
152
|
+
### Fixed
|
153
|
+
- Workaround which hopefully solves the hiera race condition
|
154
|
+
- Always display stack trace if a bug was detected
|
155
|
+
|
156
|
+
## [0.10.0] - 2016-04-18
|
157
|
+
### Added
|
158
|
+
- plugin ssh/file_deploy to deploy files to a node
|
159
|
+
- it is now possible to specify the port for the ssh plugin
|
160
|
+
- Make it possible to specify more than one command in a step
|
161
|
+
|
162
|
+
### Fixed
|
163
|
+
- the show command does no longer crash if a plan is running
|
164
|
+
|
165
|
+
## [0.9.1] - 2016-02-15
|
166
|
+
### Fixed
|
167
|
+
- Private key authentication for ssh should now work again.
|
168
|
+
|
169
|
+
## [0.9.0] - 2016-01-27
|
170
|
+
### Added
|
171
|
+
- Dopi will now support the loading of secrets like passwords from external sources like files
|
172
|
+
and the output of executables. See the dop_common documentation for more information.
|
173
|
+
|
174
|
+
### Changed
|
175
|
+
- Dopi will now detect a lot more typos in the node selection via nodes, roles or config
|
176
|
+
in the steps or on the cli when running a plan.
|
177
|
+
- Dopi will now only print warnings instead of trowing an error if a node or role does not
|
178
|
+
exist or a pattern does not match anything in a step or on the cli.
|
179
|
+
- Dopi will now use different default directories and config locations if run by a user so the
|
180
|
+
program can actually write to all the necessary files and directories per default.
|
181
|
+
|
182
|
+
### Fixed
|
183
|
+
- Dopi will no longer crash but print an error if the credentials list of a plugin is empty.
|
184
|
+
- Dopi will no longer crash but print an error if the hiera.yaml is not present.
|
185
|
+
|
186
|
+
## [0.8.2] - 2015-11-07
|
187
|
+
### Fixed
|
188
|
+
- Make sure log directory actually exists before creating the log file
|
189
|
+
|
190
|
+
## [0.8.1] - 2015-11-23
|
191
|
+
### Fixed
|
192
|
+
- Make sure ssh really ignores the hosts keys if specified in the options
|
193
|
+
|
194
|
+
## [0.8.0] - 2015-11-17
|
195
|
+
### Added
|
196
|
+
- winrm/file_exists verify command plugin
|
197
|
+
- winrm/file_contains verify command plugin
|
198
|
+
|
199
|
+
### Changed
|
200
|
+
- The puppet_agent_run plugin timeout is now 30min per default
|
201
|
+
- Some debug message improvements
|
202
|
+
|
203
|
+
### Fixed
|
204
|
+
- return code should not be 0 if a dopi run fails
|
205
|
+
|
206
|
+
## [0.7.0] - 2015-11-09
|
207
|
+
### Added
|
208
|
+
- Dopi now filters all the secrets from the credentials out of the logs
|
209
|
+
- Dopi will now log to a file structure (default is /var/log/dop/dopi)
|
210
|
+
- SIGINT and SIGTERM will now try to shutdown the run gracefully. Only the second signal will send a
|
211
|
+
SIGTERM to the running processes. The third signal will send a SIGKILL.
|
212
|
+
|
213
|
+
### Fixed
|
214
|
+
- A bug where the state reset took extremely long
|
215
|
+
|
216
|
+
## [0.6.2] - 2015-10-15
|
217
|
+
### Fixed
|
218
|
+
- Another bug where DOPi crashed because of a missing puppet gem
|
219
|
+
|
220
|
+
## [0.6.1] - 2015-10-14
|
221
|
+
### Fixed
|
222
|
+
- A bug where DOPi crashed because of a missing puppet gem
|
223
|
+
|
224
|
+
## [0.6.0] - 2015-10-12
|
225
|
+
### Added
|
226
|
+
- Add version control to DOPi plan dumps and the possibility to update a plan
|
227
|
+
- Add the options to include and/or exclude nodes from a run.
|
228
|
+
- Noop mode when using 'dopi run' or 'dopi oneshot'
|
229
|
+
- Dopi now supports multiple step sets.
|
230
|
+
|
231
|
+
### Fixed
|
232
|
+
- Display a proper error mesage if 'dopi run' is executed with a wrong plan name
|
233
|
+
- Improve overall DOPi performance by fixing an issue with threads
|
234
|
+
|
235
|
+
## [0.5.0] - 2015-09-16
|
236
|
+
### Added
|
237
|
+
- Dopi will now test the connection and if not successful automatically try to connect with the configured IPs of the node
|
238
|
+
- New winrm/wait_for_login command plugin
|
239
|
+
- The reset command in the executable now supports the '--force' switch to reset from any state
|
240
|
+
- Verify commands can now be rerun after the command execution with the 'verify_after_run' flag in a plugin.
|
241
|
+
- New plugin to execute powershell commands on windows over winrm 'winrm/powershell'.
|
242
|
+
|
243
|
+
### Changed
|
244
|
+
- Plan names can now use dashes
|
245
|
+
- Verify commands are now always executed, even if they where successful in the past
|
246
|
+
|
247
|
+
## [0.4.2] - 2015-09-09
|
248
|
+
### Fixed
|
249
|
+
- Prevent the ssh/wait_for_login from crashing
|
250
|
+
|
251
|
+
## [0.4.1] - 2015-09-07
|
252
|
+
### Fixed
|
253
|
+
- Fixed a bug with the winrm/cmd output stream
|
254
|
+
- Fixed a bug where dopi crashed because of an uninitialized class variable
|
255
|
+
|
256
|
+
## [0.4.0] - 2015-08-31
|
257
|
+
### Added
|
258
|
+
- Possibility to set/change/delete/overwrite plugin defaults in steps
|
259
|
+
- New credentials hash to manage login secrets for the plugins
|
260
|
+
- Basic WinRM plugin to execute commands
|
261
|
+
|
262
|
+
### Changed
|
263
|
+
- SSH plugin now supports the credentals hash for login
|
264
|
+
- ssh_root_pass will still work, but will display a deprecation warning
|
265
|
+
|
266
|
+
## [0.3.1] - 2015-08-17
|
267
|
+
### Fixed
|
268
|
+
- Fixed a bug in the ssh/customs plugin where the environment was not set correctly on the node
|
269
|
+
- Fixed a bug where parallel execution of commands over ssh caused errors
|
270
|
+
- Show correct errors if the parsing of a hiera yaml file fails
|
271
|
+
|
272
|
+
## [0.3.0] - 2015-07-15
|
273
|
+
### Added
|
274
|
+
- It is now possible to specify nodes and roles as Regex pattern instead of just names.
|
275
|
+
- It is now possible to filter nodes with exclude_nodes and exclude_roles in a step.
|
276
|
+
- It is now possible to add or exclude nodes based on configuration values (hiera) with nodes_by_config and exclude_nodes_by_config.
|
277
|
+
- The show command now supports a '--follow' flag which will create a display of the state of the plan which gets refreshed
|
278
|
+
|
279
|
+
### Changed
|
280
|
+
- max_in_flight and ssh_root_pass are now global keys and no longer under 'plan'. The old location will still work, but DOPi will show a deprecation warning.
|
281
|
+
- max_in_flight now supports the values 0 and -1. More info about this is in the Documentation of the DOP plan format.
|
282
|
+
- Make it possible to set max_in_flight and canary_host globaly and per step.
|
283
|
+
|
284
|
+
### Fixed
|
285
|
+
- Plan validation will now detect nodes which do not exist in steps and roles without nodes.
|
286
|
+
- Fixed a bug where the role could not be resolved if the plan is not already in the plan cache.
|
287
|
+
|
288
|
+
## [0.2.0] - 2015-07-01
|
289
|
+
### Added
|
290
|
+
- It is now possible to specify a name for a plan
|
291
|
+
- 'dopi show' now shows the correct state of a running plan
|
292
|
+
|
293
|
+
### Changed
|
294
|
+
- Colorized CLI output based on log message severity.
|
295
|
+
- A lot of CLI output improvements
|
296
|
+
|
297
|
+
### Fixed
|
298
|
+
- A bug where the state was not printed if a command failed on runonce mode
|
299
|
+
|
300
|
+
## [0.1.11] - 2015-06-17
|
301
|
+
### Added
|
302
|
+
- MCollective RPC command plugin
|
303
|
+
- File replace command plugin (replace a string in a file)
|
304
|
+
|
305
|
+
### Fixed
|
306
|
+
- Missing plugin documentation added
|
307
|
+
|
308
|
+
## [0.1.10] - 2015-06-10
|
309
|
+
### Added
|
310
|
+
- The custom plugin now automatically sets the environment variable DOP_NODE_FQDN
|
311
|
+
|
312
|
+
### Changed
|
313
|
+
- The standard log level for the dopi CLI is now INFO rather than WARNING
|
314
|
+
|
315
|
+
### Fixed
|
316
|
+
- Loggers from dop_common and hiera are now integrated into dopi logger and obey the log level
|
317
|
+
- The custom command plugin no longer adds an additional new line after each output log entry
|
318
|
+
- A bug where Hiera was not correctly initialized in certain situations was fixed
|
319
|
+
- The puppet agent plugin should now expect error code 2 (changes) as default
|
320
|
+
- Trace should now also show a stacktrace for unexpected validation Errors
|
321
|
+
- The initconfig command will now avoid duplicate entries
|
322
|
+
- Boolean false values from the config file correctly overwrite the default now
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
dopi (0.17.0)
|
5
|
+
curses (~> 1)
|
6
|
+
dop_common (~> 0.13, >= 0.13.0)
|
7
|
+
gli (~> 2)
|
8
|
+
logger-colors (~> 1)
|
9
|
+
mcollective-client (~> 2)
|
10
|
+
parallel (~> 1)
|
11
|
+
winrm (~> 1)
|
12
|
+
|
13
|
+
GEM
|
14
|
+
remote: https://rubygems.org/
|
15
|
+
specs:
|
16
|
+
builder (3.2.3)
|
17
|
+
curses (1.2.1)
|
18
|
+
diff-lcs (1.3)
|
19
|
+
docile (1.1.5)
|
20
|
+
dop_common (0.13.0)
|
21
|
+
hashdiff (~> 0.3, >= 0.3.1)
|
22
|
+
hiera (~> 3)
|
23
|
+
lockfile (~> 2)
|
24
|
+
rb-inotify (~> 0.9)
|
25
|
+
ffi (1.9.18)
|
26
|
+
gli (2.16.0)
|
27
|
+
gssapi (1.2.0)
|
28
|
+
ffi (>= 1.0.1)
|
29
|
+
gyoku (1.3.1)
|
30
|
+
builder (>= 2.1.2)
|
31
|
+
hashdiff (0.3.2)
|
32
|
+
hiera (3.3.1)
|
33
|
+
httpclient (2.8.3)
|
34
|
+
json (2.0.3)
|
35
|
+
little-plugger (1.1.4)
|
36
|
+
lockfile (2.1.3)
|
37
|
+
logger-colors (1.0.0)
|
38
|
+
logging (2.2.0)
|
39
|
+
little-plugger (~> 1.1)
|
40
|
+
multi_json (~> 1.10)
|
41
|
+
mcollective-client (2.10.2)
|
42
|
+
json
|
43
|
+
stomp
|
44
|
+
systemu
|
45
|
+
mixlib-shellout (2.2.7)
|
46
|
+
multi_json (1.12.1)
|
47
|
+
nori (2.6.0)
|
48
|
+
parallel (1.11.1)
|
49
|
+
rake (12.0.0)
|
50
|
+
rb-inotify (0.9.8)
|
51
|
+
ffi (>= 0.5.0)
|
52
|
+
rspec (3.5.0)
|
53
|
+
rspec-core (~> 3.5.0)
|
54
|
+
rspec-expectations (~> 3.5.0)
|
55
|
+
rspec-mocks (~> 3.5.0)
|
56
|
+
rspec-command (1.0.1)
|
57
|
+
mixlib-shellout (~> 2.0)
|
58
|
+
rspec (~> 3.2)
|
59
|
+
rspec-its (~> 1.2)
|
60
|
+
rspec-core (3.5.4)
|
61
|
+
rspec-support (~> 3.5.0)
|
62
|
+
rspec-expectations (3.5.0)
|
63
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
64
|
+
rspec-support (~> 3.5.0)
|
65
|
+
rspec-its (1.2.0)
|
66
|
+
rspec-core (>= 3.0.0)
|
67
|
+
rspec-expectations (>= 3.0.0)
|
68
|
+
rspec-mocks (3.5.0)
|
69
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
70
|
+
rspec-support (~> 3.5.0)
|
71
|
+
rspec-support (3.5.0)
|
72
|
+
rubyntlm (0.6.1)
|
73
|
+
simplecov (0.14.1)
|
74
|
+
docile (~> 1.1.0)
|
75
|
+
json (>= 1.8, < 3)
|
76
|
+
simplecov-html (~> 0.10.0)
|
77
|
+
simplecov-html (0.10.0)
|
78
|
+
stomp (1.4.3)
|
79
|
+
systemu (2.6.5)
|
80
|
+
winrm (1.8.1)
|
81
|
+
builder (>= 2.1.2)
|
82
|
+
gssapi (~> 1.2)
|
83
|
+
gyoku (~> 1.0)
|
84
|
+
httpclient (~> 2.2, >= 2.2.0.2)
|
85
|
+
logging (>= 1.6.1, < 3.0)
|
86
|
+
nori (~> 2.0)
|
87
|
+
rubyntlm (~> 0.6.0)
|
88
|
+
|
89
|
+
PLATFORMS
|
90
|
+
ruby
|
91
|
+
|
92
|
+
DEPENDENCIES
|
93
|
+
bundler (~> 1.3)
|
94
|
+
dopi!
|
95
|
+
rake
|
96
|
+
rspec
|
97
|
+
rspec-command
|
98
|
+
rspec-mocks
|
99
|
+
simplecov
|
100
|
+
|
101
|
+
BUNDLED WITH
|
102
|
+
1.14.3
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,177 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|