syncwrap 2.8.1 → 2.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 22a464519cfbd5ea6bc08d068564183bb5ae8ffb
4
- data.tar.gz: 3abda4ace0b737c72a7da35fbf37edbfda6748ac
3
+ metadata.gz: 91f6e24710b16135cac3fc92a2350595329679ab
4
+ data.tar.gz: b91395ed4ba0c475fc5e931109e5cba9dd8cced8
5
5
  SHA512:
6
- metadata.gz: 2af276c549619ca49dd33d8b95b002fc5c1641136269f722dcb009d193cc2f98350982ff1075fbc2df7132a774d6d230005daede23bdad6e8e9aa52a3b3808ff
7
- data.tar.gz: 957bdc9171f4987a1267664ee75282ef81bc5e5d076ce22a17e541c779d953488d6ade54fb3c3551c54e1343cb1fc17c0eb0a46be7cf40abc5c445fcb0b7c0a3
6
+ metadata.gz: cef850f458be5b3c4a9238119fd78834883a36d44de41c0b75b0c7d7c9f95b90a7bd3357c3fc4322039e56f01572c052e817b921ed50a656d19002ae838841b2
7
+ data.tar.gz: 1da2ff5d17e30654a494d5f9d3e7b5126b2a5562fc869583b57cb57c8c6501c036685698cb8968a0043391edc84232f0cfd339509b53be3d16d24f12da5b3baf
data/History.rdoc CHANGED
@@ -1,3 +1,10 @@
1
+ === 2.8.2 (2016-11-1)
2
+ * Add new SyncWrap::ChangeGuard component to preserve change key state
3
+ in remote guard files, across any transient component failures.
4
+ * Upgrade SyncWrap::JRubyVM default version to 1.7.25 (+ hash for 1.7.26)
5
+ * Additional, comment-only updates to postgresql.conf as of version
6
+ 9.6.1. Changes remain backward compatible with 9.1+.
7
+
1
8
  === 2.8.1 (2016-7-20)
2
9
  * Add support for passing options to SyncWrap::SystemD#systemctl which
3
10
  are passed though to sudo. Since systemctl returns non-zero for a
data/Manifest.txt CHANGED
@@ -43,6 +43,7 @@ lib/syncwrap/components/bundle.rb
43
43
  lib/syncwrap/components/bundled_iyyov_daemon.rb
44
44
  lib/syncwrap/components/bundler_gem.rb
45
45
  lib/syncwrap/components/centos.rb
46
+ lib/syncwrap/components/change_guard.rb
46
47
  lib/syncwrap/components/commercial_jdk.rb
47
48
  lib/syncwrap/components/cruby_vm.rb
48
49
  lib/syncwrap/components/debian.rb
data/README.rdoc CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  * http://github.com/dekellum/syncwrap
4
4
  * http://rdoc.gravitext.com/syncwrap/
5
- * {<img src="https://travis-ci.org/dekellum/syncwrap.png" />}[https://travis-ci.org/dekellum/syncwrap]
5
+ * {<img src="https://travis-ci.org/dekellum/syncwrap.svg?branch=dev" />}[https://travis-ci.org/dekellum/syncwrap]
6
6
 
7
7
  == Description
8
8
 
@@ -114,6 +114,8 @@ Components implementing \#install:
114
114
 
115
115
  * SyncWrap::SourceTree, SyncWrap::Bundle
116
116
 
117
+ * SyncWrap::ChangeGuard
118
+
117
119
  * SyncWrap::Puma
118
120
 
119
121
  * SyncWrap::Iyyov - job scheduler and process monitor with
data/lib/syncwrap/base.rb CHANGED
@@ -15,7 +15,7 @@
15
15
  #++
16
16
 
17
17
  module SyncWrap
18
- VERSION='2.8.1'
18
+ VERSION='2.8.2'
19
19
 
20
20
  GEM_ROOT = File.dirname(File.dirname(File.dirname(__FILE__))) # :nodoc:
21
21
  end
@@ -0,0 +1,94 @@
1
+ #--
2
+ # Copyright (c) 2016 David Kellum
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
5
+ # may not use this file except in compliance with the License. You
6
+ # may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
+ # implied. See the License for the specific language governing
14
+ # permissions and limitations under the License.
15
+ #++
16
+ require 'syncwrap/component'
17
+ require 'syncwrap/change_key_listener'
18
+
19
+ module SyncWrap
20
+
21
+ # Maintains a remote guard file to preserve change_key state across
22
+ # any transient failures which might occur in subsequent components
23
+ # up until a paired ChangeUnGuard.
24
+ #
25
+ # Components which rely on change key state (via ChangeKeyListener
26
+ # mixin or otherwise) may loose state due to transient failure and
27
+ # thus remain out-of-sync on subsequent runs. This is particularly
28
+ # common during concurrent development of such components.
29
+ #
30
+ # Typical usage using SourceTree as the change producer and Bundle
31
+ # as one of possibly several consumers:
32
+ #
33
+ # role( :my_role,
34
+ # SourceTree.new( change_key: :src_key ),
35
+ # *ChangeGuard.new( change_key: :src_key ).wrap(
36
+ # Bundle.new( change_key: :src_key ),
37
+ # # ...
38
+ # ) )
39
+ #
40
+ # Host component dependencies: RunUser, SourceTree?
41
+ class ChangeGuard < SyncWrap::Component
42
+ include SyncWrap::ChangeKeyListener
43
+
44
+ # Convenience method for constructed an array of
45
+ # [ ChangeGuard, *nested_components, ChangeUnGuard ].
46
+ def wrap( *nested_components )
47
+ [ self, *nested_components, ChangeUnGuard.new ]
48
+ end
49
+
50
+ # Remote path and file name to use as the guard file
51
+ # (Default: SourceTree#remote_source_path + '.changed')
52
+ attr_writer :change_guard_file
53
+
54
+ def change_guard_file
55
+ @change_guard_file || "#{remote_source_path}.changed"
56
+ end
57
+
58
+ def initialize( opts = {} )
59
+ @change_guard_file = nil
60
+ super
61
+ end
62
+
63
+ def install
64
+ if change_key_changes?
65
+ rudo <<-SH
66
+ touch #{change_guard_file}
67
+ SH
68
+ else
69
+ code,_ = capture( <<-SH, user: run_user, accept: [0,92] )
70
+ if [ -f "#{change_guard_file}" ]; then
71
+ exit 92
72
+ fi
73
+ SH
74
+ if code == 92
75
+ Array( change_key ).each do |key|
76
+ state[ key ] ||= []
77
+ state[ key ] << [ '*found', change_guard_file ]
78
+ end
79
+ end
80
+ end
81
+ end
82
+ end
83
+
84
+ # Removes ChangeGuard#change_guard_file, once all dependent
85
+ # components have successfully executed.
86
+ class ChangeUnGuard < SyncWrap::Component
87
+ def install
88
+ rudo <<-SH
89
+ rm -f #{change_guard_file}
90
+ SH
91
+ end
92
+ end
93
+
94
+ end
@@ -47,7 +47,7 @@ module SyncWrap
47
47
  include HashSupport
48
48
 
49
49
  # Default #ruby_version to install
50
- DEFAULT_VERSION = '2.1.10'
50
+ DEFAULT_VERSION = '2.2.5'
51
51
 
52
52
  # A set of known (sha256) cryptographic hashes, keyed by version
53
53
  # string, for the source ruby-(version).tar.gz package.
@@ -32,7 +32,7 @@ module SyncWrap
32
32
  include HashSupport
33
33
 
34
34
  # Default #jruby_version to install
35
- DEFAULT_VERSION = '1.7.24'
35
+ DEFAULT_VERSION = '1.7.25'
36
36
 
37
37
  # A set of known cryptographic hashes, keyed by version
38
38
  # string. Note, we prefer sha256 but sha1 is what is currently
@@ -40,7 +40,8 @@ module SyncWrap
40
40
  KNOWN_HASHES = { '1.7.22' => '6b9e310a04ad8173d0d6dbe299da04c0ef85fc15',
41
41
  '1.7.23' => '2b5e796feeed2bcfab02f8bf2ff3d77ca318e310',
42
42
  '1.7.24' => '0c321d2192768dfec419bee6b44c7190f4db32e1',
43
- '1.7.25' => 'cd15aef419f97cff274491e53fcfb8b88ec36785' }
43
+ '1.7.25' => 'cd15aef419f97cff274491e53fcfb8b88ec36785',
44
+ '1.7.26' => 'cca25a1ffb8b75a8d4a4d4667e7f6b20341c2b74' }
44
45
 
45
46
  # JRuby version to install (default: DEFAULT_VERSION)
46
47
  attr_accessor :jruby_version
data/lib/syncwrap.rb CHANGED
@@ -393,6 +393,8 @@ module SyncWrap
393
393
  autoload :BundlerGem, 'syncwrap/components/bundler_gem'
394
394
  autoload :Arch, 'syncwrap/components/arch'
395
395
  autoload :CentOS, 'syncwrap/components/centos'
396
+ autoload :ChangeGuard, 'syncwrap/components/change_guard'
397
+ autoload :ChangeUnGuard, 'syncwrap/components/change_guard'
396
398
  autoload :CommercialJDK, 'syncwrap/components/commercial_jdk'
397
399
  autoload :CRubyVM, 'syncwrap/components/cruby_vm'
398
400
  autoload :Debian, 'syncwrap/components/debian'
@@ -80,8 +80,6 @@ listen_addresses = '*'
80
80
  # (change requires restart)
81
81
  #port = 5432 # (change requires restart)
82
82
  max_connections = 100 # (change requires restart)
83
- # Note: Increasing max_connections costs ~400 bytes of shared memory per
84
- # connection slot, plus lock space (see max_locks_per_transaction).
85
83
  #superuser_reserved_connections = 3 # (change requires restart)
86
84
  #unix_socket_directory = '/var/run/postgresql' # < 9.3
87
85
  #unix_socket_directories = '/var/run/postgresql, /tmp'
@@ -138,10 +136,8 @@ shared_buffers = <%= shared_buffers %> # min 128kB
138
136
  #temp_buffers = 8MB # min 800kB
139
137
  #max_prepared_transactions = 0 # zero disables the feature
140
138
  # (change requires restart)
141
- # Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory
142
- # per transaction slot, plus lock space (see max_locks_per_transaction).
143
- # It is not advisable to set max_prepared_transactions nonzero unless you
144
- # actively intend to use prepared transactions.
139
+ # Caution: it is not advisable to set max_prepared_transactions nonzero unless
140
+ # you actively intend to use prepared transactions.
145
141
  work_mem = <%= work_mem %> # min 64kB
146
142
  maintenance_work_mem = <%= maintenance_work_mem %> # min 1MB
147
143
  #replacement_sort_tuples = 150000 # limits use of replacement selection sort (9.6+)
@@ -157,7 +153,7 @@ max_stack_depth = <%= max_stack_depth %> # min 100kB
157
153
 
158
154
  # - Disk -
159
155
 
160
- #temp_file_limit = -1 # limits per-session temp file space
156
+ #temp_file_limit = -1 # limits per-process temp file space
161
157
  # in kB, or -1 for no limit
162
158
 
163
159
  # - Kernel Resource Usage -
@@ -180,18 +176,17 @@ max_stack_depth = <%= max_stack_depth %> # min 100kB
180
176
  #bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round
181
177
  #bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round
182
178
  #bgwriter_flush_after = 0 # 0 disables,
183
- # default is 512kb on linux, 0 otherwise (9.6+)
179
+ # default is 512kB on linux, 0 otherwise (9.6+)
184
180
 
185
181
  # - Asynchronous Behavior -
186
182
 
187
183
  effective_io_concurrency = <%= effective_io_concurrency %>
188
184
  # 1-1000; 0 disables prefetching
189
185
  #max_worker_processes = 8 # (change requires restart, 9.4+)
190
- #max_parallel_workers_per_gather = 2 # taken from max_worker_processes (9.6+)
186
+ #max_parallel_workers_per_gather = 0 # taken from max_worker_processes (9.6+)
191
187
  #old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate (9.6+)
192
188
  # (change requires restart)
193
- #backend_flush_after = 0 # 0 disables,
194
- # default is 128kb on linux, 0 otherwise (9.6+)
189
+ #backend_flush_after = 0 # 0 disables, default is 0
195
190
 
196
191
  #------------------------------------------------------------------------------
197
192
  # WRITE AHEAD LOG
@@ -235,10 +230,10 @@ max_wal_size = <%= max_wal_size %> # (9.5+)
235
230
  <% else %>
236
231
  checkpoint_segments = <%= checkpoint_segments %> # in logfile segments, min 1, 16MB each
237
232
  <% end %>
238
- #checkpoint_timeout = 5min # range 30s-1h
233
+ #checkpoint_timeout = 5min # range 30s-1d
239
234
  #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0
240
235
  #checkpoint_flush_after = 0 # 0 disables,
241
- # default is 256kb on linux, 0 otherwise
236
+ # default is 256kB on linux, 0 otherwise
242
237
  #checkpoint_warning = 30s # 0 disables
243
238
 
244
239
  # - Archiving -
@@ -609,9 +604,6 @@ default_text_search_config = 'pg_catalog.english'
609
604
  #deadlock_timeout = 1s
610
605
  #max_locks_per_transaction = 64 # min 10
611
606
  # (change requires restart)
612
- # Note: Each lock table slot uses ~270 bytes of shared memory, and there are
613
- # max_locks_per_transaction * (max_connections + max_prepared_transactions)
614
- # lock table slots.
615
607
  #max_pred_locks_per_transaction = 64 # min 10
616
608
  # (change requires restart)
617
609
 
@@ -55,6 +55,14 @@ module SyncWrap
55
55
  [ AmazonLinux, RunUser, CRubyVM, BundlerGem,
56
56
  SourceTree, { source_dir: 'lib', require_clean: false },
57
57
  Bundle ],
58
+ [ AmazonLinux, RunUser, CRubyVM, BundlerGem,
59
+ SourceTree, { source_dir: 'lib', require_clean: false },
60
+ ChangeGuard, { change_key: :source_tree } ],
61
+ [ AmazonLinux, RunUser, CRubyVM, BundlerGem,
62
+ SourceTree, { source_dir: 'lib', require_clean: false },
63
+ ChangeGuard, { change_key: :source_tree },
64
+ Bundle,
65
+ ChangeUnGuard ],
58
66
  [ Ubuntu, RunUser, JRubyVM, BundlerGem, Iyyov,
59
67
  SourceTree, { source_dir: 'lib', require_clean: false },
60
68
  Bundle, BundledIyyovDaemon ],
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: syncwrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.1
4
+ version: 2.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Kellum
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-20 00:00:00.000000000 Z
11
+ date: 2016-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: term-ansicolor
@@ -178,6 +178,7 @@ files:
178
178
  - lib/syncwrap/components/bundled_iyyov_daemon.rb
179
179
  - lib/syncwrap/components/bundler_gem.rb
180
180
  - lib/syncwrap/components/centos.rb
181
+ - lib/syncwrap/components/change_guard.rb
181
182
  - lib/syncwrap/components/commercial_jdk.rb
182
183
  - lib/syncwrap/components/cruby_vm.rb
183
184
  - lib/syncwrap/components/debian.rb
@@ -283,7 +284,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
283
284
  version: '0'
284
285
  requirements: []
285
286
  rubyforge_project:
286
- rubygems_version: 2.4.5.1
287
+ rubygems_version: 2.6.6
287
288
  signing_key:
288
289
  specification_version: 4
289
290
  summary: A rather direct provisioning and deployment system in ruby, bash over ssh,