covalence 0.0.1 → 0.7.9.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +164 -0
  3. data/README.md +489 -19
  4. data/TODO.md +14 -0
  5. data/lib/covalence.rb +41 -0
  6. data/lib/covalence/core/bootstrap.rb +8 -0
  7. data/lib/covalence/core/cli_wrappers/packer.yml +9 -0
  8. data/lib/covalence/core/cli_wrappers/packer_cli.rb +27 -0
  9. data/lib/covalence/core/cli_wrappers/popen_wrapper.rb +123 -0
  10. data/lib/covalence/core/cli_wrappers/terraform.yml +39 -0
  11. data/lib/covalence/core/cli_wrappers/terraform_cli.rb +119 -0
  12. data/lib/covalence/core/data_stores/hiera.rb +50 -0
  13. data/lib/covalence/core/entities/context.rb +38 -0
  14. data/lib/covalence/core/entities/environment.rb +24 -0
  15. data/lib/covalence/core/entities/input.rb +112 -0
  16. data/lib/covalence/core/entities/stack.rb +74 -0
  17. data/lib/covalence/core/entities/state_store.rb +65 -0
  18. data/lib/covalence/core/repositories/context_repository.rb +30 -0
  19. data/lib/covalence/core/repositories/environment_repository.rb +92 -0
  20. data/lib/covalence/core/repositories/input_repository.rb +56 -0
  21. data/lib/covalence/core/repositories/stack_repository.rb +89 -0
  22. data/lib/covalence/core/repositories/state_store_repository.rb +31 -0
  23. data/lib/covalence/core/services/hiera_syntax_service.rb +19 -0
  24. data/lib/covalence/core/services/packer_stack_tasks.rb +104 -0
  25. data/lib/covalence/core/services/terraform_stack_tasks.rb +212 -0
  26. data/lib/covalence/core/state_stores/atlas.rb +157 -0
  27. data/lib/covalence/core/state_stores/consul.rb +153 -0
  28. data/lib/covalence/core/state_stores/s3.rb +147 -0
  29. data/lib/covalence/environment_tasks.rb +328 -0
  30. data/lib/covalence/helpers/shell_interpolation.rb +28 -0
  31. data/lib/covalence/helpers/spec_dependencies.rb +21 -0
  32. data/lib/covalence/rake/rspec/envs_spec.rb +75 -0
  33. data/lib/covalence/rake/rspec/yaml_spec.rb +14 -0
  34. data/lib/covalence/spec_tasks.rb +59 -0
  35. data/lib/covalence/version.rb +3 -0
  36. metadata +344 -26
  37. data/.gitignore +0 -9
  38. data/Gemfile +0 -4
  39. data/LICENSE.txt +0 -21
  40. data/Rakefile +0 -2
  41. data/bin/console +0 -14
  42. data/bin/setup +0 -8
  43. data/lib/prometheus_unifio.rb +0 -5
  44. data/lib/prometheus_unifio/version.rb +0 -3
  45. data/prometheus_unifio.gemspec +0 -32
@@ -0,0 +1,14 @@
1
+ require_relative '../../../covalence'
2
+ require_relative File.join(Covalence::GEM_ROOT, 'core/services/hiera_syntax_service')
3
+
4
+ module Covalence
5
+ RSpec.describe HieraSyntaxService do
6
+ describe ".check_yaml" do
7
+ let(:files) { Dir.glob("#{Covalence::WORKSPACE}/**/*.y*ml") }
8
+ it 'passes syntax check' do
9
+ errors = described_class.check_yaml(files)
10
+ expect(errors).to be_empty
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,59 @@
1
+ require 'rake'
2
+ require_relative '../covalence'
3
+ require_relative 'helpers/spec_dependencies'
4
+
5
+ # Check gem constraints before continuing
6
+ Covalence::Helpers::SpecDependencies.check_dependencies
7
+ require 'rspec/core/rake_task'
8
+ require 'ci/reporter/rake/rspec'
9
+
10
+ module Covalence
11
+ class SpecTasks
12
+ extend Rake::DSL
13
+
14
+ def self.run
15
+ ci_namespace_rspec_tasks
16
+ spec_namespace_rspec_tasks
17
+ end
18
+
19
+ class << self
20
+ private
21
+
22
+ # :reek:TooManyStatements
23
+ def ci_namespace_rspec_tasks
24
+ desc 'Run CI tests'
25
+ task "ci" => ['ci:setup:rspec', 'spec:envs']
26
+
27
+ desc 'Clean spec/reports'
28
+ task "ci:clean" => ['ci:setup:rspec']
29
+
30
+ desc 'Verify all environments'
31
+ task "ci:envs" => ['ci:setup:rspec', 'spec:envs']
32
+
33
+ desc 'Check syntax of all .yaml files'
34
+ task "ci:check_yaml" => ['ci:setup:rspec', 'spec:check_yaml']
35
+ end
36
+
37
+ # :reek:TooManyStatements
38
+ # :reek:FeatureEnvy
39
+ # :reek:UncommunicativeVariableName
40
+ def spec_namespace_rspec_tasks
41
+ desc "Verify environments"
42
+ RSpec::Core::RakeTask.new("spec:envs") do |t|
43
+ t.pattern = "#{File.join(Covalence::GEM_ROOT, 'rake/rspec/envs_spec.rb')}"
44
+ t.rspec_opts = '--color --format documentation'
45
+ t.verbose = true
46
+ end
47
+
48
+ desc 'Check syntax of all YAML files'
49
+ RSpec::Core::RakeTask.new("spec:check_yaml") do |t|
50
+ t.pattern = "#{File.join(Covalence::GEM_ROOT, 'rake/rspec/yaml_spec.rb')}"
51
+ t.rspec_opts = '--color --format documentation'
52
+ t.verbose = true
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
58
+
59
+ Covalence::SpecTasks.run
@@ -0,0 +1,3 @@
1
+ module Covalence
2
+ VERSION = "0.7.9.rc1"
3
+ end
metadata CHANGED
@@ -1,43 +1,337 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: covalence
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.7.9.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Unif.io
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-23 00:00:00.000000000 Z
11
+ date: 2018-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: deep_merge
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.2.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.2.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: hiera
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 3.4.3
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 3.4.3
41
+ - !ruby/object:Gem::Dependency
42
+ name: json
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 2.1.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 2.1.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: rest-client
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 2.0.0.rc3
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 2.0.0.rc3
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 11.1.2
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 11.1.2
83
+ - !ruby/object:Gem::Dependency
84
+ name: aws-sdk-s3
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1'
97
+ - !ruby/object:Gem::Dependency
98
+ name: virtus
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 1.0.5
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 1.0.5
111
+ - !ruby/object:Gem::Dependency
112
+ name: activesupport
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 5.2.0
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 5.2.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: activemodel
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 5.2.0
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 5.2.0
139
+ - !ruby/object:Gem::Dependency
140
+ name: semantic
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 1.6.1
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 1.6.1
153
+ - !ruby/object:Gem::Dependency
154
+ name: slop
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: 4.6.2
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: 4.6.2
167
+ - !ruby/object:Gem::Dependency
168
+ name: highline
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: 1.7.10
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: 1.7.10
181
+ - !ruby/object:Gem::Dependency
182
+ name: ci_reporter_rspec
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: 1.0.0
188
+ type: :development
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: 1.0.0
195
+ - !ruby/object:Gem::Dependency
196
+ name: rspec
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: '3.5'
202
+ type: :development
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: '3.5'
209
+ - !ruby/object:Gem::Dependency
210
+ name: awesome_print
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
214
+ - !ruby/object:Gem::Version
215
+ version: 1.8.0
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - "~>"
221
+ - !ruby/object:Gem::Version
222
+ version: 1.8.0
13
223
  - !ruby/object:Gem::Dependency
14
224
  name: bundler
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: 1.9.0
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: 1.9.0
237
+ - !ruby/object:Gem::Dependency
238
+ name: dotenv
15
239
  requirement: !ruby/object:Gem::Requirement
16
240
  requirements:
17
241
  - - "~>"
18
242
  - !ruby/object:Gem::Version
19
- version: '1.11'
243
+ version: 2.4.0
20
244
  type: :development
21
245
  prerelease: false
22
246
  version_requirements: !ruby/object:Gem::Requirement
23
247
  requirements:
24
248
  - - "~>"
25
249
  - !ruby/object:Gem::Version
26
- version: '1.11'
250
+ version: 2.4.0
27
251
  - !ruby/object:Gem::Dependency
28
- name: rake
252
+ name: byebug
29
253
  requirement: !ruby/object:Gem::Requirement
30
254
  requirements:
31
255
  - - "~>"
32
256
  - !ruby/object:Gem::Version
33
- version: '10.0'
257
+ version: 10.0.2
34
258
  type: :development
35
259
  prerelease: false
36
260
  version_requirements: !ruby/object:Gem::Requirement
37
261
  requirements:
38
262
  - - "~>"
39
263
  - !ruby/object:Gem::Version
40
- version: '10.0'
264
+ version: 10.0.2
265
+ - !ruby/object:Gem::Dependency
266
+ name: serverspec
267
+ requirement: !ruby/object:Gem::Requirement
268
+ requirements:
269
+ - - "~>"
270
+ - !ruby/object:Gem::Version
271
+ version: 2.41.3
272
+ type: :development
273
+ prerelease: false
274
+ version_requirements: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - "~>"
277
+ - !ruby/object:Gem::Version
278
+ version: 2.41.3
279
+ - !ruby/object:Gem::Dependency
280
+ name: webmock
281
+ requirement: !ruby/object:Gem::Requirement
282
+ requirements:
283
+ - - "~>"
284
+ - !ruby/object:Gem::Version
285
+ version: 3.4.1
286
+ type: :development
287
+ prerelease: false
288
+ version_requirements: !ruby/object:Gem::Requirement
289
+ requirements:
290
+ - - "~>"
291
+ - !ruby/object:Gem::Version
292
+ version: 3.4.1
293
+ - !ruby/object:Gem::Dependency
294
+ name: gemfury
295
+ requirement: !ruby/object:Gem::Requirement
296
+ requirements:
297
+ - - "~>"
298
+ - !ruby/object:Gem::Version
299
+ version: 0.7.0
300
+ type: :development
301
+ prerelease: false
302
+ version_requirements: !ruby/object:Gem::Requirement
303
+ requirements:
304
+ - - "~>"
305
+ - !ruby/object:Gem::Version
306
+ version: 0.7.0
307
+ - !ruby/object:Gem::Dependency
308
+ name: fabrication
309
+ requirement: !ruby/object:Gem::Requirement
310
+ requirements:
311
+ - - "~>"
312
+ - !ruby/object:Gem::Version
313
+ version: 2.20.1
314
+ type: :development
315
+ prerelease: false
316
+ version_requirements: !ruby/object:Gem::Requirement
317
+ requirements:
318
+ - - "~>"
319
+ - !ruby/object:Gem::Version
320
+ version: 2.20.1
321
+ - !ruby/object:Gem::Dependency
322
+ name: simplecov
323
+ requirement: !ruby/object:Gem::Requirement
324
+ requirements:
325
+ - - "~>"
326
+ - !ruby/object:Gem::Version
327
+ version: 0.16.1
328
+ type: :development
329
+ prerelease: false
330
+ version_requirements: !ruby/object:Gem::Requirement
331
+ requirements:
332
+ - - "~>"
333
+ - !ruby/object:Gem::Version
334
+ version: 0.16.1
41
335
  description:
42
336
  email:
43
337
  - support@unif.io
@@ -45,22 +339,45 @@ executables: []
45
339
  extensions: []
46
340
  extra_rdoc_files: []
47
341
  files:
48
- - ".gitignore"
342
+ - CHANGELOG.md
49
343
  - CODE_OF_CONDUCT.md
50
- - Gemfile
51
- - LICENSE.txt
52
344
  - README.md
53
- - Rakefile
54
- - bin/console
55
- - bin/setup
56
- - lib/prometheus_unifio.rb
57
- - lib/prometheus_unifio/version.rb
58
- - prometheus_unifio.gemspec
59
- homepage: http://unif.io
345
+ - TODO.md
346
+ - lib/covalence.rb
347
+ - lib/covalence/core/bootstrap.rb
348
+ - lib/covalence/core/cli_wrappers/packer.yml
349
+ - lib/covalence/core/cli_wrappers/packer_cli.rb
350
+ - lib/covalence/core/cli_wrappers/popen_wrapper.rb
351
+ - lib/covalence/core/cli_wrappers/terraform.yml
352
+ - lib/covalence/core/cli_wrappers/terraform_cli.rb
353
+ - lib/covalence/core/data_stores/hiera.rb
354
+ - lib/covalence/core/entities/context.rb
355
+ - lib/covalence/core/entities/environment.rb
356
+ - lib/covalence/core/entities/input.rb
357
+ - lib/covalence/core/entities/stack.rb
358
+ - lib/covalence/core/entities/state_store.rb
359
+ - lib/covalence/core/repositories/context_repository.rb
360
+ - lib/covalence/core/repositories/environment_repository.rb
361
+ - lib/covalence/core/repositories/input_repository.rb
362
+ - lib/covalence/core/repositories/stack_repository.rb
363
+ - lib/covalence/core/repositories/state_store_repository.rb
364
+ - lib/covalence/core/services/hiera_syntax_service.rb
365
+ - lib/covalence/core/services/packer_stack_tasks.rb
366
+ - lib/covalence/core/services/terraform_stack_tasks.rb
367
+ - lib/covalence/core/state_stores/atlas.rb
368
+ - lib/covalence/core/state_stores/consul.rb
369
+ - lib/covalence/core/state_stores/s3.rb
370
+ - lib/covalence/environment_tasks.rb
371
+ - lib/covalence/helpers/shell_interpolation.rb
372
+ - lib/covalence/helpers/spec_dependencies.rb
373
+ - lib/covalence/rake/rspec/envs_spec.rb
374
+ - lib/covalence/rake/rspec/yaml_spec.rb
375
+ - lib/covalence/spec_tasks.rb
376
+ - lib/covalence/version.rb
377
+ homepage: https://unif.io
60
378
  licenses:
61
- - MIT
62
- metadata:
63
- allowed_push_host: https://rubygems.org
379
+ - MPL-2.0
380
+ metadata: {}
64
381
  post_install_message:
65
382
  rdoc_options: []
66
383
  require_paths:
@@ -69,16 +386,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
386
  requirements:
70
387
  - - ">="
71
388
  - !ruby/object:Gem::Version
72
- version: '0'
389
+ version: 2.0.0
73
390
  required_rubygems_version: !ruby/object:Gem::Requirement
74
391
  requirements:
75
- - - ">="
392
+ - - ">"
76
393
  - !ruby/object:Gem::Version
77
- version: '0'
394
+ version: 1.3.1
78
395
  requirements: []
79
396
  rubyforge_project:
80
- rubygems_version: 2.4.5.1
397
+ rubygems_version: 2.7.6
81
398
  signing_key:
82
399
  specification_version: 4
83
- summary: Ruby orchestration framework for HashiCorp based deployment pipelines.
400
+ summary: A tool for the management and orchestration of data used by HashiCorp infrastructure
401
+ tooling.
84
402
  test_files: []