fhcap-cli 0.4.8 → 0.4.9

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: ddbd3378ec5fc7f63b7f35b5258b280094410dad
4
- data.tar.gz: e2f741990616c6df616b0d3e15943d9c92016ede
3
+ metadata.gz: 1685de7948d976df40d6c15e0870a51f12393fc2
4
+ data.tar.gz: 4a812cdd3b1e2865105e0ee69ffc55e74f82881b
5
5
  SHA512:
6
- metadata.gz: c0c9e75019bf435b9f0bbf2b334a4886515e508d2746cd6623a65c28836bf6fba5a17df56af77ce97033fdbd6eda9d020e43e4c1364d46cc5fbf238ddd5e1037
7
- data.tar.gz: 1a4fa88a8a2a39cb787f8cf3e6d5ea521515beda310cd88382b6a4199f5227a6c892411c1ec61d83b0bb270bf801c457c35e45254de7757c6cd76be09481bece
6
+ metadata.gz: f4ce224936b910162e7fcf0b2bd10f0f0d415a4fd35c523cebabdbfe860ccc74b9fc0d31c19290e088064e59926224be8cd0063df2c0658c5cdfafc6ee95fe0b
7
+ data.tar.gz: 7e0917eceb7b16367d7c71683f949c8bfd6c4e2398a5e8d7608b5e866507b5f12cf10c173442321eb40fc4e837c0e481159462a7bc29687253024309bf7bccc0
data/CHANGELOG.md CHANGED
@@ -1,6 +1,12 @@
1
1
 
2
2
  ## Unreleased
3
3
 
4
+ ## 0.4.9
5
+
6
+ * [RHMAP-9021] - Add support for longer AWS Instance and ELB Ids (Patched with upstream changes made in chef-provisioning-aws gem)
7
+ * Fix knife user import, incorrect attributes were being referenced causing the private key to appear empty.
8
+ * [RHMAP-5646] - Setting min RubyGems version to 2.6.3, fixes an issue when running commands inside the fhcap directory (undefined method `this' for #<Gem::Specification:0x3ff25ccfb780...)
9
+
4
10
  ## 0.4.8
5
11
 
6
12
  * [RHMAP-7637] - Fix Chef::Config constant in global namespace
@@ -16,7 +22,7 @@
16
22
 
17
23
  ## 0.4.6
18
24
 
19
- * [RHMAP-3031] - Add aws-tags (Name, Organisationm, Environment and Role) to all instances
25
+ * [RHMAP-3031] - Add aws-tags (Name, Organisation, Environment and Role) to all instances
20
26
  * [RHMAP-3815] - Add dry-run option to all chef_provisions tasks, sets why-run option on chef run (chef-provisioning)
21
27
  * [RHMAP-4038] - Fix aws templates to set correct required security group protocols/ports for environment.
22
28
 
data/fhcap-cli.gemspec CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.homepage = "https://github.com/fheng/fhcap-cli"
14
14
  spec.license = "MIT"
15
15
  spec.required_ruby_version = '>= 2.0.0'
16
- spec.required_rubygems_version = '>= 2.5.0'
16
+ spec.required_rubygems_version = '>= 2.6.3'
17
17
 
18
18
  spec.files = `git ls-files -z`.split("\x0")
19
19
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
@@ -2,6 +2,8 @@ raise "Missing aws credentials" unless node['provider_credentials']['aws-access-
2
2
 
3
3
  require 'chef/provisioning/aws_driver'
4
4
  require 'extensions/chef/provisioning/aws_driver/driver.rb'
5
+ require 'extensions/chef/resource/aws_instance' # https://github.com/chef/chef-provisioning-aws/blob/master/CHANGELOG.md#v190-2016-04-14
6
+ require 'extensions/chef/resource/aws_ebs_volume' # https://github.com/chef/chef-provisioning-aws/blob/master/CHANGELOG.md#v1110-2016-08-11
5
7
 
6
8
  cluster_config = cluster_config_for(node)
7
9
 
@@ -0,0 +1,8 @@
1
+ require 'chef/provisioning/aws_driver/aws_resource_with_entry'
2
+ require 'chef/resource/aws_instance'
3
+
4
+ class Chef::Resource::AwsEbsVolume < Chef::Provisioning::AWSDriver::AWSResourceWithEntry
5
+ attribute :volume_id, kind_of: String, aws_id_attribute: true, lazy_default: proc {
6
+ name =~ /^vol-(?:[a-f0-9]{8}|[a-f0-9]{17})$/ ? name : nil
7
+ }
8
+ end
@@ -0,0 +1,8 @@
1
+ require 'chef/provisioning/aws_driver/aws_resource_with_entry'
2
+ require 'chef/provisioning/aws_driver/aws_taggable'
3
+
4
+ class Chef::Resource::AwsInstance < Chef::Provisioning::AWSDriver::AWSResourceWithEntry
5
+ attribute :instance_id, kind_of: String, aws_id_attribute: true, lazy_default: proc {
6
+ name =~ /^i-(?:[a-f0-9]{8}|[a-f0-9]{17})$/ ? name : nil
7
+ }
8
+ end
@@ -13,7 +13,6 @@ module Fhcap
13
13
  "millicore" => "millicore/src/main/resources/config/cluster-config.properties",
14
14
  "fh-reaper" => "millicore/src/main/resources/config/reaper.properties",
15
15
  "fh-supercore" => "fh-supercore/config/dev.json",
16
- "fh-docs" => ["fh-docs/config/development.json", "fh-docs/config/config.json"],
17
16
  "fh-doxy" => "fh-doxy/config/dev.json",
18
17
  "fh-messaging" => "fh-messaging/fh-messaging/config/dev.json",
19
18
  "fh-metrics" => "fh-messaging/fh-metrics/config/dev.json",
@@ -74,7 +74,7 @@ module Fhcap
74
74
  :node_name => knife_config[:node_name],
75
75
  :cookbook_path => cookbook_path
76
76
  )
77
- private_key = '-----BEGIN RSA PRIVATE KEY-----
77
+ @private_key = '-----BEGIN RSA PRIVATE KEY-----
78
78
  MIIEpAIBAAKCAQEA0sOY9tHvVtLZ6xmVmH8d8LrRrNcWOXbrvvCrai+T3GtRvRSL
79
79
  hksLrpOpD0L9EHM6NdThNF/eGA9Oq+UKAe6yXR0hwsKuxKXqQ8SEmlhZZ9GiuggD
80
80
  B/zYD3ItB6SGpdkRe7kQqTChQyrIXqbRkJqxoTXLyeJDF0sCyTdp3L8IZCUWodM8
@@ -114,8 +114,8 @@ KcVGsryKN6cjE7yCDasnA7R2rVBV/7NWeJV77bmzT5O//rW4yIfUIg==
114
114
  thor.empty_directory File.join(knife_config_dir, name)
115
115
  thor.empty_directory File.join(knife_config_dir, 'keys')
116
116
 
117
- thor.create_file(File.join(knife_config_dir, name, "#{knife_config[:node_name]}.pem"), private_key, :force => true) if private_key
118
- thor.create_file(File.join(knife_config_dir, name, "#{knife_config[:validation_client_name]}.pem"), private_key, :force => true) if validation_key
117
+ thor.create_file(File.join(knife_config_dir, name, "#{knife_config[:node_name]}.pem"), @private_key, :force => true) if @private_key
118
+ thor.create_file(File.join(knife_config_dir, name, "#{knife_config[:validation_client_name]}.pem"), @validation_key, :force => true) if @validation_key
119
119
 
120
120
  validate_knife_config(knife_config_file) unless name == 'local'
121
121
 
data/lib/fhcap/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fhcap
2
- VERSION = "0.4.8"
2
+ VERSION = "0.4.9"
3
3
  end
@@ -16,7 +16,6 @@ def random_key(name)
16
16
  @keys[name] = SecureRandom.urlsafe_base64(16)
17
17
  end
18
18
  @keys[name]
19
-
20
19
  end
21
20
  -%>
22
21
  {
@@ -61,7 +60,7 @@ end
61
60
  },
62
61
  "feedhenry_galera": {
63
62
  "cluster_enabled": true,
64
- "safe-updates": false,
63
+ "safe-updates": true,
65
64
  "wsrep": {
66
65
  "password": "<%= random_password('galerawsrep') %>"
67
66
  }
@@ -104,7 +103,7 @@ end
104
103
  "fh-metrics": {
105
104
  "conf": {
106
105
  "metrics": {
107
- "metricsAPIKey": "<%=random_key('fh-metrics')%>",
106
+ "metricsAPIKey": "<%=random_key('fh-metrics')%>",
108
107
  "database": {
109
108
  "auth": {
110
109
  "user": "u-messaging",
@@ -117,10 +116,10 @@ end
117
116
  "fh-supercore": {
118
117
  "conf": {
119
118
  "fhsupercore": {
120
- "fhmetrics":{
119
+ "fhmetrics": {
121
120
  "apikey":"<%=random_key('fh-metrics')%>"
122
121
  },
123
- "fhmessaging":{
122
+ "fhmessaging": {
124
123
  "apikey":"<%=random_key('fh-messaging')%>"
125
124
  },
126
125
  "database": {
@@ -134,15 +133,7 @@ end
134
133
  }
135
134
  },
136
135
  "millicore": {
137
- "migrates": {
138
- "enabled": true
139
- },
140
136
  "conf": {
141
- "csrf": {
142
- "checks": {
143
- "enabled": true
144
- }
145
- },
146
137
  "digger": {
147
138
  "polling": {
148
139
  "iphone": true,
@@ -168,22 +159,9 @@ end
168
159
  }
169
160
  }
170
161
  },
171
- "fhaaa": {
172
- "authorisation": {
173
- "enabled": true
174
- }
175
- },
176
- "fhcore": {
177
- "polling_status": {
178
- "enabled": false
179
- }
180
- },
181
162
  "git": {
182
- "enabled": true,
183
163
  "admin-host": "git.<%= config[:domain] %>",
184
- "external-host": "git.<%= config[:domain] %>",
185
- "service": "gitlab-shell",
186
- "enable-branch-selector": true
164
+ "external-host": "git.<%= config[:domain] %>"
187
165
  },
188
166
  "mongodb": {
189
167
  "migrates": {
@@ -209,14 +187,7 @@ end
209
187
  "studio-js-cloudresources-enabled": false,
210
188
  "studio-js-admin-environments-mbaases-ui": true,
211
189
  "studio-protocol": "http",
212
- "millicore.protocol": "http",
213
- "studio": {
214
- "version": {
215
- "option": {
216
- "enabled": false
217
- }
218
- }
219
- }
190
+ "millicore.protocol": "http"
220
191
  }
221
192
  },
222
193
  "mongodb": {
@@ -303,4 +274,4 @@ end
303
274
  "password": "feedhenry101"
304
275
  }
305
276
  }
306
- }
277
+ }
@@ -15,7 +15,6 @@ def random_key(name)
15
15
  @keys[name] = SecureRandom.urlsafe_base64(16)
16
16
  end
17
17
  @keys[name]
18
-
19
18
  end
20
19
  -%>
21
20
  {
@@ -76,22 +75,22 @@ end
76
75
  "username": "df-<%= config[:name] %>",
77
76
  "_password": "<%= random_password('fh-proxy') %>"
78
77
  },
79
- "fhmetrics":{
78
+ "fhmetrics": {
80
79
  "apikey": "<%=random_key('fh-metrics')%>"
81
80
  },
82
- "fhmessaging":{
81
+ "fhmessaging": {
83
82
  "apikey": "<%=random_key('fh-messaging')%>"
84
83
  }
85
84
  }
86
85
  },
87
- "fh-metrics":{
86
+ "fh-metrics": {
88
87
  "conf":{
89
88
  "metrics": {
90
89
  "metricsAPIKey": "<%=random_key('fh-metrics')%>"
91
90
  }
92
91
  }
93
92
  },
94
- "fh-messaging":{
93
+ "fh-messaging": {
95
94
  "conf":{
96
95
  "msgAPIKey": "<%=random_key('fh-messaging')%>"
97
96
  }
@@ -100,10 +99,7 @@ end
100
99
  "conf": {
101
100
  "fhproxy": {
102
101
  "user": "df-<%= config[:name] %>",
103
- "passwd": "<%= random_password('fh-proxy') %>",
104
- "suspendapps": {
105
- "inactive_minutes": 10080
106
- }
102
+ "passwd": "<%= random_password('fh-proxy') %>"
107
103
  }
108
104
  }
109
105
  },
@@ -152,4 +148,4 @@ end
152
148
  }
153
149
  }
154
150
  }
155
- }
151
+ }
@@ -95,10 +95,7 @@ end
95
95
  "conf": {
96
96
  "fhproxy": {
97
97
  "port": 9080,
98
- "user": "df-<%= config[:name] %>",
99
- "suspendapps": {
100
- "inactive_minutes": 10080
101
- }
98
+ "user": "df-<%= config[:name] %>"
102
99
  }
103
100
  }
104
101
  },
@@ -271,7 +271,7 @@
271
271
  "subnet": "1a"
272
272
  },
273
273
  "load_balancers": ["scm", "messaging", "metrics"],
274
- "run_list": ["role[mount_data_volumes]", "role[fh-scm]", "role[fh-messaging]", "role[fh-metrics]", "role[fh-docs]", "role[fh-stats]"],
274
+ "run_list": ["role[mount_data_volumes]", "role[fh-scm]", "role[fh-messaging]", "role[fh-metrics]", "role[fh-stats]"],
275
275
  "source_dest_check": true
276
276
  },
277
277
  "util2": {
@@ -32,6 +32,12 @@
32
32
  "start": 443,
33
33
  "end": 443,
34
34
  "sources": ["0.0.0.0/0"]
35
+ },
36
+ {
37
+ "protocols": ["tcp"],
38
+ "start": 80,
39
+ "end": 80,
40
+ "sources": ["0.0.0.0/0"]
35
41
  }
36
42
  ]
37
43
  },
@@ -32,6 +32,12 @@
32
32
  "start": 443,
33
33
  "end": 443,
34
34
  "sources": ["0.0.0.0/0"]
35
+ },
36
+ {
37
+ "protocols": ["tcp"],
38
+ "start": 80,
39
+ "end": 80,
40
+ "sources": ["0.0.0.0/0"]
35
41
  }
36
42
  ]
37
43
  },
@@ -17,12 +17,6 @@
17
17
  "security_groups": {
18
18
  "<%= config[:environment_name] %>-api-lb": {
19
19
  "authorize_ingress": [
20
- {
21
- "protocols": ["tcp"],
22
- "start": 80,
23
- "end": 80,
24
- "sources": ["0.0.0.0/0"]
25
- },
26
20
  {
27
21
  "protocols": ["tcp"],
28
22
  "start": 443,
@@ -44,12 +38,6 @@
44
38
  "start": -1,
45
39
  "end": -1,
46
40
  "groups": ["<%= config[:environment_name] %>"]
47
- },
48
- {
49
- "protocols": ["tcp"],
50
- "start": 80,
51
- "end": 80,
52
- "groups": ["<%= config[:environment_name] %>-api-lb"]
53
41
  }
54
42
  ]
55
43
  },
@@ -80,12 +68,6 @@
80
68
  "subnets": ["1a", "1b"],
81
69
  "scheme": "internet-facing",
82
70
  "listeners": [
83
- {
84
- "port": 80,
85
- "protocol": "http",
86
- "instance_port": 80,
87
- "instance_protocol": "http"
88
- },
89
71
  {
90
72
  "port": 443,
91
73
  "protocol": "https",
@@ -17,7 +17,7 @@
17
17
  "run_list": ["role[galera_server]", "role[platform_mongo_server]", "role[rabbitmq_server]"]
18
18
  },
19
19
  "util1": {
20
- "run_list": ["role[fh-scm]", "role[fh-messaging]", "role[fh-metrics]", "role[fh-docs]", "role[fh-stats]"]
20
+ "run_list": ["role[fh-scm]", "role[fh-messaging]", "role[fh-metrics]", "role[fh-stats]"]
21
21
  },
22
22
  "util2": {
23
23
  "run_list": ["role[fh-scm]", "role[fh-messaging]", "role[fh-metrics]", "role[fh-stats]"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fhcap-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Nairn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-10 00:00:00.000000000 Z
11
+ date: 2016-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -425,6 +425,8 @@ files:
425
425
  - lib/extensions/chef/provisioning.rb
426
426
  - lib/extensions/chef/provisioning/aws_driver/driver.rb
427
427
  - lib/extensions/chef/provisioning/chef_run_data.rb
428
+ - lib/extensions/chef/resource/aws_ebs_volume.rb
429
+ - lib/extensions/chef/resource/aws_instance.rb
428
430
  - lib/extensions/chef/solr/query/regexpable_query.rb
429
431
  - lib/extensions/cheffish/merged_config.rb
430
432
  - lib/fhcap.rb
@@ -591,7 +593,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
591
593
  requirements:
592
594
  - - '>='
593
595
  - !ruby/object:Gem::Version
594
- version: 2.5.0
596
+ version: 2.6.3
595
597
  requirements: []
596
598
  rubyforge_project:
597
599
  rubygems_version: 2.6.4