prima-twig 0.58.503 → 0.58.504

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/twig-build +31 -26
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0f75bc5df49227b590ce40ac0db2271b9e2573c1cc775dbdb1c42d21c894b78
4
- data.tar.gz: 5066d9482b87f990ae4fd036b466b2191bf8b7ec0d8f70f1aef863882996000f
3
+ metadata.gz: c510cbec917cde539231660954dd9ef4d429ba301e4836303942b8c3e99cf073
4
+ data.tar.gz: 0ad6c24cea1fd4fedc50ea40316ff2b2009ec9b9836c498b2ded62080f90be40
5
5
  SHA512:
6
- metadata.gz: 1b70c6a1bcfebdb8c43f72d8a891f9c02de62c460cf5f04565437d4730b1f8a213c4a60ad059b7901ea415f09ece15d598b44aabbe8ffd29cc38b371f1d87a08
7
- data.tar.gz: 898f8d9aa0e51c00c6005f7e92ff23e8b5e6a6a77e16460e6830a8e452f3d6e54d145cdd27df84971a6561fcfa547fca6e0933415e27944610f72b8662786349
6
+ metadata.gz: c258c851fb76c9bd9f85f4168d01f4c046187226143ce2181631665376196014ae7026b8d06b20db80aeaa20ca27593983793ff77e4ca4e8755f9d67fcba2550
7
+ data.tar.gz: 10b5cd28d9f6e6b9dfe93a03aef03c9be41c2abe4723d927ad535078d3a6f8ebcbe3db2f72fa2d7b358bc1f40d856866f428d9a41fb5fc4c9e5ae1ddd9deb775
data/bin/twig-build CHANGED
@@ -235,8 +235,8 @@ class Build
235
235
  create_alb_stack(stack_name_alb, "http", deploy_id) unless stack_exists?(stack_name_alb)
236
236
  create_alb_stack(stack_name_alb_ws, "websocket", deploy_id) unless stack_exists?(stack_name_alb_ws)
237
237
 
238
- asg_stack_name = "ecs-asg-allinone-qa-#{deploy_id}"
239
- create_asg_stack(asg_stack_name, @tags) unless stack_exists?(asg_stack_name)
238
+ @asg_stack_name = "ecs-asg-allinone-qa-#{deploy_id}"
239
+ create_asg_stack(@asg_stack_name, @tags) unless stack_exists?(@asg_stack_name)
240
240
 
241
241
  stack_name_db = "ecs-task-db-qa-#{deploy_id}"
242
242
  stack_body = IO.read('cloudformation/stacks/task/db.yml')
@@ -256,11 +256,11 @@ class Build
256
256
 
257
257
  wait_for_stack_ready(stack_name_db) unless stack_ready?(stack_name_db) # dovrebbe essere istantaneo
258
258
  db_task = ''
259
- db_task = import_dbs(ec2_ip_address(asg_stack_name)) unless stack_exists?("ecs-route53-qa-#{deploy_id}") # import asincrono dei dati
259
+ db_task = import_dbs(get_ec2_ip_address) unless stack_exists?("ecs-route53-qa-#{deploy_id}") # import asincrono dei dati
260
260
 
261
261
  wait_for_db_import(db_task) unless stack_exists?("ecs-route53-qa-#{deploy_id}") # dovrebbe essere istantaneo
262
262
 
263
- import_redis_crash(ec2_ip_address(asg_stack_name)) if !stack_exists?("ecs-task-web-qa-#{deploy_id}")
263
+ import_redis_crash(get_ec2_ip_address) if !stack_exists?("ecs-task-web-qa-#{deploy_id}")
264
264
 
265
265
  wait_for_stack_ready(stack_name_alb) unless stack_ready?(stack_name_alb)
266
266
  wait_for_stack_ready(stack_name_alb_ws) unless stack_ready?(stack_name_alb_ws)
@@ -278,51 +278,51 @@ class Build
278
278
  },
279
279
  {
280
280
  parameter_key: "UraniaIp",
281
- parameter_value: ec2_ip_address(asg_stack_name)
281
+ parameter_value: get_ec2_ip_address
282
282
  },
283
283
  {
284
284
  parameter_key: "BburagoIp",
285
- parameter_value: ec2_ip_address(asg_stack_name)
285
+ parameter_value: get_ec2_ip_address
286
286
  },
287
287
  {
288
288
  parameter_key: "Hal9000Ip",
289
- parameter_value: ec2_ip_address(asg_stack_name)
289
+ parameter_value: get_ec2_ip_address
290
290
  },
291
291
  {
292
292
  parameter_key: "FidatyIp",
293
- parameter_value: ec2_ip_address(asg_stack_name)
293
+ parameter_value: get_ec2_ip_address
294
294
  },
295
295
  {
296
296
  parameter_key: "PeanoIp",
297
- parameter_value: ec2_ip_address(asg_stack_name)
297
+ parameter_value: get_ec2_ip_address
298
298
  },
299
299
  {
300
300
  parameter_key: "ErmesIp",
301
- parameter_value: ec2_ip_address(asg_stack_name)
301
+ parameter_value: get_ec2_ip_address
302
302
  },
303
303
  {
304
304
  parameter_key: "ActiviaIp",
305
- parameter_value: ec2_ip_address(asg_stack_name)
305
+ parameter_value: get_ec2_ip_address
306
306
  },
307
307
  {
308
308
  parameter_key: "SkynetIp",
309
- parameter_value: ec2_ip_address(asg_stack_name)
309
+ parameter_value: get_ec2_ip_address
310
310
  },
311
311
  {
312
312
  parameter_key: "RogerIp",
313
- parameter_value: ec2_ip_address(asg_stack_name)
313
+ parameter_value: get_ec2_ip_address
314
314
  },
315
315
  {
316
316
  parameter_key: "LeftoriumIp",
317
- parameter_value: ec2_ip_address(asg_stack_name)
317
+ parameter_value: get_ec2_ip_address
318
318
  },
319
319
  {
320
320
  parameter_key: "RacheleIp",
321
- parameter_value: ec2_ip_address(asg_stack_name)
321
+ parameter_value: get_ec2_ip_address
322
322
  },
323
323
  {
324
324
  parameter_key: "RedisIp",
325
- parameter_value: ec2_ip_address(asg_stack_name)
325
+ parameter_value: get_ec2_ip_address
326
326
  },
327
327
  {
328
328
  parameter_key: "AssangeElbHostname",
@@ -1413,10 +1413,10 @@ class Build
1413
1413
  > Crash url: https://#{crash_hostname}
1414
1414
  > Starsky url: https://#{starsky_hostname}
1415
1415
  > Hutch url: https://#{hutch_hostname}
1416
- > RabbitMQ url: http://#{ec2_ip_address(asg_stack_name)}:15672
1417
- > Supervisor url: http://#{ec2_ip_address(asg_stack_name)}:9001
1418
- > Elasticsearch url: http://#{ec2_ip_address(asg_stack_name)}:9200
1419
- > SSH connection: ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no githubUsername@#{ec2_ip_address(asg_stack_name)}\n"
1416
+ > RabbitMQ url: http://#{get_ec2_ip_address}:15672
1417
+ > Supervisor url: http://#{get_ec2_ip_address}:9001
1418
+ > Elasticsearch url: http://#{get_ec2_ip_address}:9200
1419
+ > SSH connection: ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no githubUsername@#{get_ec2_ip_address}\n"
1420
1420
  output projects_text.cyan
1421
1421
  output "Deploy effettuato, everything is awesome!\n".green
1422
1422
 
@@ -1478,12 +1478,17 @@ class Build
1478
1478
  host
1479
1479
  end
1480
1480
 
1481
- def ec2_ip_address(asg_stack_name)
1482
- resp = describe_stack_resource(asg_stack_name, 'ECSAutoScalingGroup')
1483
- resp = describe_auto_scaling_groups([resp.stack_resource_detail.physical_resource_id], 1)
1484
- instance_id = resp.auto_scaling_groups[0].instances[0].instance_id
1485
- resp = describe_instances([instance_id])
1486
- resp.reservations[0].instances[0].private_ip_address
1481
+ def get_ec2_ip_address()
1482
+ if @ec2_ip_address
1483
+ @ec2_ip_address
1484
+ else
1485
+ resp = describe_stack_resource(@asg_stack_name, 'ECSAutoScalingGroup')
1486
+ resp = describe_auto_scaling_groups([resp.stack_resource_detail.physical_resource_id], 1)
1487
+ instance_id = resp.auto_scaling_groups[0].instances[0].instance_id
1488
+ resp = describe_instances([instance_id])
1489
+ @ec2_ip_address = resp.reservations[0].instances[0].private_ip_address
1490
+ @ec2_ip_address
1491
+ end
1487
1492
  end
1488
1493
 
1489
1494
  def get_alb_host(stack_name)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prima-twig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.58.503
4
+ version: 0.58.504
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Giachino