syncwrap 2.6.0 → 2.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.rdoc +11 -0
- data/lib/syncwrap/amazon_ec2.rb +3 -0
- data/lib/syncwrap/base.rb +1 -1
- data/lib/syncwrap/cli.rb +12 -1
- data/lib/syncwrap/components/cruby_vm.rb +2 -2
- data/lib/syncwrap/components/hashdot.rb +1 -1
- data/lib/syncwrap/components/postgresql.rb +3 -0
- data/lib/syncwrap/systemd.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fa7854403d0e4cf2392a7e6d8ed77358d99a1b4
|
4
|
+
data.tar.gz: f2f5dbdabe714b9d293259bfe3ec2963ca0b70be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29741c45ef1bf11c0155be47e5c1972543e930f52b37e0610b741b9ab9404fadc712d41a2b96678fec05158d87e5eeadfdb5eff2fd7b9fe235c058a1fb585684
|
7
|
+
data.tar.gz: 7a316ff8dfcbd34119cf37486c615d72d4b35407788ee762a5ca9094ce14cb69c25eae0d056415a80171d0c48ab5003c0ebc3d136611cf247e633dd3c21a9daa
|
data/History.rdoc
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
=== 2.6.1 (2015-12-2)
|
2
|
+
* Default SyncWrap::PostgreSQL to version 9.4 on Debian 8+.
|
3
|
+
* Use PATH to find `systemctl`, like other system tools. Debian 8 still
|
4
|
+
doesn't have merged /usr/bin.
|
5
|
+
* Add -a/--add-role flag to CLI to add role(s) with create or image
|
6
|
+
beyond what is specified by the profile.
|
7
|
+
* Add curl to existing build deps of CRubyVM and Hashdot. This
|
8
|
+
resolves the simplest cases where a minimal base image, in this case
|
9
|
+
not-including curl, would have previously failed. Other cases will
|
10
|
+
be addressed in subsequent releases.
|
11
|
+
|
1
12
|
=== 2.6.0 (2015-11-13)
|
2
13
|
* Add SyncWrap::LVMCache component, with
|
3
14
|
SyncWrap::Distro#unmount_device moved from MDRaid.
|
data/lib/syncwrap/amazon_ec2.rb
CHANGED
@@ -121,6 +121,8 @@ module SyncWrap
|
|
121
121
|
end
|
122
122
|
end
|
123
123
|
|
124
|
+
# Create new hosts and append host definitions to the sync_file.
|
125
|
+
# If a block is given, each new host is yielded before appending.
|
124
126
|
def create_hosts( count, profile, name, sync_file )
|
125
127
|
require_configured!
|
126
128
|
profile = get_profile( profile ) if profile.is_a?( Symbol )
|
@@ -145,6 +147,7 @@ module SyncWrap
|
|
145
147
|
end
|
146
148
|
props = aws_create_instance( hname, profile )
|
147
149
|
host = space.host( props )
|
150
|
+
yield( host ) if block_given?
|
148
151
|
append_host_definitions( [ host ], nil, sync_file )
|
149
152
|
host[ :just_created ] = true
|
150
153
|
# Need to use a host prop for this since context(s) do not
|
data/lib/syncwrap/base.rb
CHANGED
data/lib/syncwrap/cli.rb
CHANGED
@@ -32,6 +32,7 @@ module SyncWrap
|
|
32
32
|
@component_plan = []
|
33
33
|
@roles = []
|
34
34
|
@comp_roles = []
|
35
|
+
@add_roles = []
|
35
36
|
@host_patterns = []
|
36
37
|
@create_plan = []
|
37
38
|
@image_plan = []
|
@@ -180,6 +181,13 @@ TEXT
|
|
180
181
|
@image_plan << profile.to_sym
|
181
182
|
end
|
182
183
|
|
184
|
+
opts.on( "-a", "--add-role ROLE",
|
185
|
+
"When creating a new host or image, add ROLE",
|
186
|
+
"beyond those specified by the profile",
|
187
|
+
"(may use multiple)" ) do |r|
|
188
|
+
@add_roles << r.sub(/^:/,'').to_sym
|
189
|
+
end
|
190
|
+
|
183
191
|
opts.on( "--import-hosts REGIONS",
|
184
192
|
"Import hosts form provider 'region' names, ",
|
185
193
|
"append to sync file and exit." ) do |rs|
|
@@ -243,6 +251,7 @@ TEXT
|
|
243
251
|
p = space.provider
|
244
252
|
@image_plan.each do |profile_key|
|
245
253
|
ami,name = p.create_image_from_profile(profile_key, @sw_file) do |host|
|
254
|
+
host.add( *@add_roles ) unless @add_roles.empty?
|
246
255
|
space.execute( [ host ], [], @options )
|
247
256
|
end
|
248
257
|
exit( 1 ) unless ami
|
@@ -252,7 +261,9 @@ TEXT
|
|
252
261
|
end
|
253
262
|
|
254
263
|
@create_plan.each do |count, profile, name|
|
255
|
-
space.provider.create_hosts( count, profile, name, @sw_file )
|
264
|
+
space.provider.create_hosts( count, profile, name, @sw_file ) do |host|
|
265
|
+
host.add( *@add_roles ) unless @add_roles.empty?
|
266
|
+
end
|
256
267
|
end
|
257
268
|
|
258
269
|
if @ssh_session
|
@@ -139,10 +139,10 @@ module SyncWrap
|
|
139
139
|
|
140
140
|
def install_build_deps
|
141
141
|
if distro.is_a?( RHEL )
|
142
|
-
dist_install( %w[ gcc make autoconf zlib-devel
|
142
|
+
dist_install( %w[ curl gcc make autoconf zlib-devel
|
143
143
|
openssl-devel readline-devel libyaml-devel libffi-devel ] )
|
144
144
|
else
|
145
|
-
dist_install( %w[ gcc make autoconf zlib1g-dev
|
145
|
+
dist_install( %w[ curl gcc make autoconf zlib1g-dev
|
146
146
|
libssl-dev libreadline-dev libyaml-dev libffi-dev ] )
|
147
147
|
end
|
148
148
|
end
|
@@ -41,6 +41,7 @@ module SyncWrap
|
|
41
41
|
# * AmazonLinux 2013.03: 8.4 9.2
|
42
42
|
# * AmazonLinux 2014.09: 8.4 9.2 9.3
|
43
43
|
# * Debian 7: 9.1
|
44
|
+
# * Debian 8: 9.4
|
44
45
|
# * Ubuntu 14: 9.3
|
45
46
|
#
|
46
47
|
# The latest stable and beta packages can also be obtained via the
|
@@ -69,6 +70,8 @@ module SyncWrap
|
|
69
70
|
'9.2' if version_gte?( rhel_version, [7] )
|
70
71
|
when Ubuntu
|
71
72
|
'9.3' if version_gte?( ubuntu_version, [14,4] )
|
73
|
+
when Debian
|
74
|
+
'9.4' if version_gte?( debian_version, [8] )
|
72
75
|
end
|
73
76
|
) ||
|
74
77
|
'9.1' )
|
data/lib/syncwrap/systemd.rb
CHANGED
@@ -21,7 +21,7 @@ module SyncWrap
|
|
21
21
|
|
22
22
|
# Run systemd `systemctl` command with args via sudo as root.
|
23
23
|
def systemctl( *args )
|
24
|
-
sudo "
|
24
|
+
sudo "systemctl #{args.join ' '}"
|
25
25
|
end
|
26
26
|
|
27
27
|
# Expand given shortname to "shortname.service" as used for the
|
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.6.
|
4
|
+
version: 2.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Kellum
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: term-ansicolor
|