ciinabox-ecs 0.2.12 → 0.2.13.alpha.1538542617

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
  SHA256:
3
- metadata.gz: fe70452e6f6c88a2959bc8ed35c984e7dadb23d4a81e22337fb8aba0c53826ca
4
- data.tar.gz: 8805d841724069343288be075dfdc51e80cb603b5f6aaac8b8fe51cba69d7d7c
3
+ metadata.gz: c913e29e866ac507c35aa72a50aa6fb043c9a18b4c215b1f19e4ca1863c87a8a
4
+ data.tar.gz: dee337a7ed39ed77cc8081a2ec00a4ccd40c6655b05d217759a06ca77a4481d3
5
5
  SHA512:
6
- metadata.gz: 8070f683a00f084631810e6e9ad5dc9e08eae5c492103af4d3641b309c1e2332ca87afe459b6b23827304ceee093da3e4fca8d49e6d09fd7e1939515dd2c6409
7
- data.tar.gz: 7803a977e06398e749be91ffaacf25ba699f307bbdef34de726cd2aa045f817d08a1f7b0e6ed431caeb28ea339d1b9500ec8e07ccec2f34d2d50b22ab835e8fa
6
+ metadata.gz: 41946a66160819d83d5c92274f4c608a6accc82ecd01b0a855c18afedb053211be35c705a5c699a94aeade89db2d2200899ef345095c7829f60b5e98ff6d9553
7
+ data.tar.gz: 685c2ce60fd34201ef1059595e38b02216bd39f28429ebb753d69940b9165c38d0b948f74c03cd16c8953faee5727927eeab1b759e4d0a17d2ac11471788f04d
data/README.md CHANGED
@@ -51,6 +51,7 @@ up |Turn on your ciinabox environment
51
51
  update |Updates the ciinabox environment
52
52
  update_cert_to_acm |Replace previously auto-generated IAM certificate with auto-validated ACM certificate (if one exists)
53
53
  upload_server_cert |Uploads SSL server certs for ciinabox
54
+ watch |Monitors status of the active ciinabox until failed or successful
54
55
 
55
56
  ```
56
57
 
data/Rakefile CHANGED
@@ -231,6 +231,33 @@ namespace :ciinabox do
231
231
  end
232
232
  end
233
233
 
234
+ desc('Watches the status of the active ciinabox')
235
+ task :watch do
236
+ last_status = ""
237
+ while true
238
+ check_active_ciinabox(config)
239
+ status, result = aws_execute(config, ['cloudformation', 'describe-stacks', "--stack-name #{stack_name}", '--query "Stacks[0].StackStatus"', '--out text'])
240
+ if status != 0
241
+ puts "fail to get status for #{config['ciinabox_name']}...has it been created?"
242
+ exit 1
243
+ end
244
+ output = result.chop!
245
+ next if last_status == output
246
+ if output == 'CREATE_COMPLETE' || output == 'UPDATE_COMPLETE'
247
+ puts Time.now.strftime("%Y/%m/%d %H:%M") + " #{config['ciinabox_name']} ciinabox is alive!!!!"
248
+ display_ecs_ip_address config
249
+ exit 0
250
+ elsif output == 'ROLLBACK_COMPLETE'
251
+ puts Time.now.strftime("%Y/%m/%d %H:%M") + " #{config['ciinabox_name']} ciinabox has failed and rolled back"
252
+ exit 1
253
+ else
254
+ puts Time.now.strftime("%Y/%m/%d %H:%M") + " #{config['ciinabox_name']} ciinabox is in state: #{output}"
255
+ end
256
+ last_status = output
257
+ sleep(4)
258
+ end
259
+ end
260
+
234
261
  desc('Create self-signed SSL certs for use with ciinabox')
235
262
  task :create_server_cert do
236
263
  check_active_ciinabox(config)
@@ -277,6 +304,9 @@ namespace :ciinabox do
277
304
  check_active_ciinabox(config)
278
305
  ciinabox_name = config['ciinabox_name']
279
306
  keypair_dir = "#{ciinaboxes_dir}/#{ciinabox_name}/ssl"
307
+ unless config['include_bastion_stack']
308
+ puts "include_bastion_stack is set to false; it's recommend that this is set to true if you wish to ssh to the host."
309
+ end
280
310
  if File.exists?("#{keypair_dir}/ciinabox.pem")
281
311
  puts "keypair for ciinabox #{ciinabox_name} already exists...please delete if you wish to re-create it"
282
312
  exit 1
@@ -378,6 +408,10 @@ namespace :ciinabox do
378
408
 
379
409
  desc('SSH into your ciinabox environment')
380
410
  task :ssh do
411
+ unless config['include_bastion_stack']
412
+ puts "include_bastion_stack is set to false; you can't ssh into nothing."
413
+ exit 1
414
+ end
381
415
  keypair = "#{ciinaboxes_dir}/#{ciinabox_name}/ssl/ciinabox.pem"
382
416
  `ssh-add #{ciinaboxes_dir}/#{ciinabox_name}/ssl/ciinabox.pem`
383
417
  puts "# execute the following:"
@@ -20,7 +20,7 @@ CloudFormation {
20
20
  Parameter('SecurityGroupNatGateway') { Type 'String' }
21
21
 
22
22
  # Lambda function ARN for CR that creates and validates ACM
23
- Parameter('CRAcmCertArn') { Type 'String' }
23
+ Parameter('CRAcmCertArn') { Type 'String' } if acm_auto_issue_validate
24
24
 
25
25
  Resource("ECSRole") {
26
26
  Type 'AWS::IAM::Role'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ciinabox-ecs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.12
4
+ version: 0.2.13.alpha.1538542617
5
5
  platform: ruby
6
6
  authors:
7
7
  - Base2Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-10 00:00:00.000000000 Z
11
+ date: 2018-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -163,9 +163,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
163
163
  version: '0'
164
164
  required_rubygems_version: !ruby/object:Gem::Requirement
165
165
  requirements:
166
- - - ">="
166
+ - - ">"
167
167
  - !ruby/object:Gem::Version
168
- version: '0'
168
+ version: 1.3.1
169
169
  requirements: []
170
170
  rubyforge_project:
171
171
  rubygems_version: 2.7.7