gaptool-client 0.6.5 → 0.6.6
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 +4 -4
- data/VERSION +1 -1
- data/gaptool-client.gemspec +1 -1
- data/lib/gaptool-client.rb +11 -7
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc3b14a0963cfa01b3adb3f7509bd3aedbf2772c
|
4
|
+
data.tar.gz: 3f7f7c6e05f3e5869e520afc2e82490b9f6e7cc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77915d7bbf67e95bae10f9c1e5da2e18b62cc53c1526c291e339bdee47760e452dd35c550b8def26092e76eada77cee601c51c99395c8d42d01c3a96ece7ae12
|
7
|
+
data.tar.gz: 260d8b199275cd94c664867ae7571d5837f22d6813059d5f7f12d31a0ad2e254f2913198ea001680716a4022d8d7c587a3b7a3a1327bca8369754ed1b3a70819
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.6
|
data/gaptool-client.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.add_runtime_dependency 'clamp', "~> 0.6"
|
32
32
|
s.add_runtime_dependency 'net-ssh', "~> 2.9"
|
33
33
|
s.add_runtime_dependency 'net-scp', "~> 1.2"
|
34
|
-
s.add_runtime_dependency 'gaptool-api', "~> 0.6
|
34
|
+
s.add_runtime_dependency 'gaptool-api', "~> 0.6"
|
35
35
|
s.add_runtime_dependency 'builder', "~> 3"
|
36
36
|
|
37
37
|
s.add_development_dependency 'shoulda', "~> 3"
|
data/lib/gaptool-client.rb
CHANGED
@@ -99,13 +99,12 @@ module Gaptool
|
|
99
99
|
option ["-e", "--environment"], "ENVIRONMENT", "Which environment, e.g. production", :required => true
|
100
100
|
option ["-z", "--zone"], "ZONE", "AWS availability zone to put node in", :default => 'us-west-2c'
|
101
101
|
option ["-t", "--type"], "TYPE", "Type of instance, e.g. m1.large", :required => true
|
102
|
-
option ["-m", "--mirror"], "GIGABYTES", "Gigs for raid mirror, must be set up on each node", :required => false
|
103
102
|
option ["-s", "--security-group"], "SECURITY_GROUP", "Security group name. Defaults to $role-$environment", required: false
|
104
103
|
option ['-a', '--ami'], "AMI_ID", "Use a specific AMI for the instance (i.e. ami-xxxxxxx)", :required => false
|
105
104
|
option ["-C", "--chef-repo"], "GITURL", "git url for the chef repository", :requireds => false
|
106
105
|
option ["-b", "--chef-branch"], "BRANCH", "branch of the chef repository to use", :required => false
|
107
106
|
def execute
|
108
|
-
$api.addnode(zone, type, role, environment,
|
107
|
+
$api.addnode(zone, type, role, environment, nil, security_group, ami, chef_repo, chef_branch)
|
109
108
|
end
|
110
109
|
end
|
111
110
|
|
@@ -210,7 +209,7 @@ module Gaptool
|
|
210
209
|
option ["-e", "--environment"], "ENVIRONMENT", "Which environment, e.g. production", :required => true
|
211
210
|
option ["-i", "--instance"], "INSTANCE", "Instance ID, e.g. i-12345678", :required => false
|
212
211
|
option ["-A", "--attribute"], "ATTRIBUTE", "Pass one or more parameters to the deploy recipe in recipe.attr=value format", :multivalued => true
|
213
|
-
option ["-b", "--chef-branch"], "BRANCH", "branch of the chef repository to use (defaults to
|
212
|
+
option ["-b", "--chef-branch"], "BRANCH", "branch of the chef repository to use (defaults to last branch used during init/chefrun)", :default => nil
|
214
213
|
|
215
214
|
def execute
|
216
215
|
attrs = split_attrs(attribute_list)
|
@@ -231,11 +230,16 @@ module Gaptool
|
|
231
230
|
'zone' => node['zone'],
|
232
231
|
'itype' => node['itype'],
|
233
232
|
'apps' => eval(node['apps']),
|
234
|
-
|
235
|
-
|
233
|
+
}.merge(attrs)
|
234
|
+
git="git fetch --all; git reset --hard origin/`git rev-parse --abbrev-ref HEAD`"
|
235
|
+
|
236
|
+
unless chef_branch.nil?
|
237
|
+
json['chefbranch'] = chef_branch
|
238
|
+
git = "git checkout -f #{chef_branch}; git fetch --all; git reset --hard origin/#{chef_branch}"
|
239
|
+
end
|
236
240
|
commands = [
|
237
|
-
"cd ~admin/ops;
|
238
|
-
"echo '#{json}' > ~admin/solo.json",
|
241
|
+
"cd ~admin/ops; #{git} ",
|
242
|
+
"echo '#{json.to_json}' > ~admin/solo.json",
|
239
243
|
"sudo chef-solo -c ~admin/ops/cookbooks/solo.rb -j ~admin/solo.json"
|
240
244
|
]
|
241
245
|
sshcmd(node, commands)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gaptool-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francesco Laurita
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-09-
|
13
|
+
date: 2014-09-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: json
|
@@ -102,14 +102,14 @@ dependencies:
|
|
102
102
|
requirements:
|
103
103
|
- - "~>"
|
104
104
|
- !ruby/object:Gem::Version
|
105
|
-
version: 0.6
|
105
|
+
version: '0.6'
|
106
106
|
type: :runtime
|
107
107
|
prerelease: false
|
108
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
110
|
- - "~>"
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: 0.6
|
112
|
+
version: '0.6'
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: builder
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|