opzworks 0.12.5 → 0.12.6

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: 003d9821f85b0ffdb6c5966e4460b0c3306da1eb
4
- data.tar.gz: b34db8b47959c76f0ae2f75c96baefd9a3c02f32
3
+ metadata.gz: 8f978b2b5bbdeaf105c5ced5f34baa49b5b06964
4
+ data.tar.gz: 74b811d8bf781ad43111ed3f19da65fd769a432e
5
5
  SHA512:
6
- metadata.gz: 469280ca906bb174e609e97f3cf0f230740ea697124ae1cd7337df4ccfb5730886acfd467daf43ea56301e5fa8b13aeaaf0844a56558c6703fdd7f89fddecd0b
7
- data.tar.gz: d4c3b36fa39e18665d789e9c49c46597b947edf82174f33ac3a1524b8d8d3f37ab698032131b08b670702a17ca40ea53ee153115b849acae54f59fb4adf4364b
6
+ metadata.gz: a351a593d1db06e7941b38a94d79cc0f260761bf41943eba864b985f4b1554123134377e6e80cdf2e064538d637fb62343f2332aa7d8ca970d7644ae55e4f830
7
+ data.tar.gz: 676c50919362cbff6043e38e343bbe588626de4d9f37ba93ec5091c16a2c84cd9001d275d1f8fa543185387dc81d27419cd1b9a2845a217037955b1beb38e127
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  changelog
2
2
  =========
3
3
 
4
+ 0.12.6
5
+ ------
6
+ * validate stack json before commit
7
+
4
8
  0.12.4
5
9
  ------
6
10
  * large lint for rubocop 2.3 syntax
data/README.md CHANGED
@@ -3,14 +3,15 @@
3
3
  Command line interface for managing AWS OpsWorks chef cookbooks and stack json, as well
4
4
  as other OpsWorks centric tasks such as generating ssh configs for OpsWorks instances.
5
5
 
6
- ## Wiki
7
-
8
- #### See the [wiki](https://github.com/mapzen/opzworks/wiki) for more detailed information on getting started, walkthroughs, etc.
9
-
10
6
  ## Build Status
11
7
 
12
8
  [![Circle CI](https://circleci.com/gh/mapzen/opzworks.svg?style=svg)](https://circleci.com/gh/mapzen/opzworks)
13
9
 
10
+
11
+ ## Wiki
12
+
13
+ **See the [wiki](https://github.com/mapzen/opzworks/wiki) for more detailed information on getting started, walkthroughs, etc.**
14
+
14
15
  ## Third party requirements:
15
16
 
16
17
  Ruby 2.3+, and...
@@ -18,7 +19,7 @@ Ruby 2.3+, and...
18
19
  * git
19
20
  * [ChefDK](https://downloads.chef.io/chef-dk/)
20
21
 
21
- #### Again, please see the [wiki](https://github.com/mapzen/opzworks/wiki) for details!
22
+ **Again, please see the [wiki](https://github.com/mapzen/opzworks/wiki) for details!**
22
23
 
23
24
  ## Installation
24
25
 
@@ -45,14 +46,43 @@ systems via private IP and assumes port 9200 is open and available.
45
46
 
46
47
  This is a very rough implementation!
47
48
 
49
+ Usage: `opzworks elastic [stack1] [stack2] ... [options]`
50
+
51
+ Options:
52
+ * `-s, --start` Start Elastic
53
+ * `-t, --stop` Stop Elastic
54
+ * `-b, --bounce` Bounce (stop/start) Elastic
55
+ * `-r, --rolling` Perform a rolling restart of Elastic
56
+ * `-o, --old-service-name` Use 'elasticsearch' as the service name, otherwise use the layer shortname
57
+ * `-h, --help` Show this message
58
+
48
59
  #### json
49
60
 
50
61
  Update stack custom JSON.
51
62
 
63
+ Usage: `opzworks json [stack1] [stack2] ... [options]`
64
+
65
+ Options:
66
+ * `-q, --quiet` Update the stack json without confirmation
67
+ * `-o, --context=<i>` Change the number lines of diff context to show (default: 5)
68
+ * `-c, --clone` Just clone the management repo then exit
69
+ * `-h, --help` Show this message
70
+
71
+
52
72
  #### berks
53
73
 
54
74
  Build the berkshelf for a stack, or only upload the Berksfile to allow remote berkshelf management on the host, upload the tarball to S3, trigger `update_custom_cookbooks` on the stack.
55
75
 
76
+ Usage: `opzworks berks [stack1] [stack2] ... [options]`
77
+
78
+ Options:
79
+ * `--ucc, --no-ucc` Trigger update_custom_cookbooks on stack after uploading a new cookbook
80
+ tarball. (Default: true)
81
+ * `-u, --update` Run berks update before packaging the Berkshelf.
82
+ * `-c, --cookbooks=<s+>` Run berks update only for the specified cookbooks (requires -u)
83
+ * `-l, --clone` Only clone the management repo, then exit.
84
+ * `-h, --help` Show this message
85
+
56
86
  ## Contributing
57
87
 
58
88
  1. Fork it
data/lib/opzworks/cli.rb CHANGED
@@ -16,7 +16,7 @@ module OpzWorks
16
16
  Commands
17
17
  ssh #{OpzWorks::Commands::SSH.banner}
18
18
  cmd #{OpzWorks::Commands::CMD.banner}
19
- json #{OpzWorks::Commands::JSON.banner}
19
+ json #{OpzWorks::Commands::STACKJSON.banner}
20
20
  berks #{OpzWorks::Commands::BERKS.banner}
21
21
  elastic #{OpzWorks::Commands::ELASTIC.banner}
22
22
 
@@ -33,7 +33,7 @@ module OpzWorks
33
33
  when 'ssh'
34
34
  OpzWorks::Commands::SSH.run
35
35
  when 'json'
36
- OpzWorks::Commands::JSON.run
36
+ OpzWorks::Commands::STACKJSON.run
37
37
  when 'berks'
38
38
  OpzWorks::Commands::BERKS.run
39
39
  when 'elastic'
@@ -12,7 +12,7 @@ require_relative 'include/manage_berks_repos'
12
12
 
13
13
  module OpzWorks
14
14
  class Commands
15
- class JSON
15
+ class STACKJSON
16
16
  def self.banner
17
17
  'Update stack json'
18
18
  end
@@ -20,7 +20,7 @@ module OpzWorks
20
20
  def self.run
21
21
  options = Trollop.options do
22
22
  banner <<-EOS.unindent
23
- #{JSON.banner}
23
+ #{STACKJSON.banner}
24
24
 
25
25
  opzworks json stack1 stack2 ...
26
26
 
@@ -62,6 +62,16 @@ module OpzWorks
62
62
  next if options[:clone] == true
63
63
 
64
64
  json = File.read("#{@target_path}/stack.json")
65
+ print "\nValidating json before continuing... ".foreground(:blue)
66
+ begin
67
+ JSON.load(json)
68
+ print 'PASSED!'.foreground(:green)
69
+ rescue JSON::ParserError => e
70
+ print 'FAILED!'.foreground(:red)
71
+ puts "\n" + e.to_s.lines.first
72
+ abort
73
+ end
74
+
65
75
  diff = Diffy::Diff.new(@stack_json + "\n", json, context: options[:context])
66
76
  diff_str = diff.to_s(:color).chomp
67
77
 
data/lib/opzworks/meta.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpzWorks
4
- VERSION = '0.12.5'
4
+ VERSION = '0.12.6'
5
5
  AUTHORS = ['Grant Heffernan', 'Mapzen'].freeze
6
6
  EMAIL = ['grant@mapzen.com'].freeze
7
7
  DESCRIPTION = 'OpzWorks Utilities'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opzworks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.5
4
+ version: 0.12.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grant Heffernan
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-05-23 00:00:00.000000000 Z
12
+ date: 2016-09-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aws-sdk