conan_deploy 0.0.8 → 0.0.9

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmVlYmE0YzJmYjFhZjUyNWIxNDM0MWM5MWJhMzgzMWZiNGUzNDQzZg==
4
+ YzA2ZWQ3N2MwYzc3YTE1N2NlNzczNzhjYzE1MjUwYjFlMjNjZGRhNA==
5
5
  data.tar.gz: !binary |-
6
- ZmFmNWIzNDA0NDM5NTQ3NDE3OWM1ZmQ3MWZkOWQzZjA5Yzk5MDg3Mg==
6
+ Mjg1OWQxODM4ZTdiN2IxMjgyNDljMWFjY2QzYmMwZDM5MGMxMzIxMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NGU2OWU4OWI0MDIxOGUwZTdhY2U3YzE1MGUyZTNjM2EyZjAwMWNiNjc5ODY3
10
- ZGFiYzA2MjAwZTE5YTFlYTIxODFhMmU3YjA3MGVjNzE1ZmY3NWUwNTkwYzY2
11
- ZGNlYTlhZmYzM2Y5MTdmMGRiMTRmNGU0YTc3ZmM1NWViY2RhMTA=
9
+ NWFhYmFmZDdlOTdjNmJlNDlhMzdlODk4NTA0MjYyNTMxOTc1ZTdlYzQzZDIy
10
+ NGFhN2VlMjQwZTJhODEwMjI3ZDJkYmQxMjkxZGJhMWZhYjM5MTQyMGQ3NTZh
11
+ NjExM2ZlNWZlNjEyZTM3ODk5ODQxMDI0NjI5MzNmN2JkN2EzZWI=
12
12
  data.tar.gz: !binary |-
13
- NjBiMDBkZWYwMDc1NDJlMTI1YTI0ZTM1Y2UzNmE0YjliN2UzOThjNWVlMGE2
14
- MTQ4YjcxYTNlNzRlY2RhNTliZDgxMjgwNWY2ZjZhODQ0YTcyZWI1YTcyOWI2
15
- YjA3OTUxMzk4NzgwNDQ5ZWFiOWE5MmFjODY1MzExNGYwNzA0ZGM=
13
+ ZTM3Y2IwMzVhNGRhNWJiOGRlZTkxYWQ1MmZjMTc4MDJmMDI2Yzk0Nzg1ZTBm
14
+ MGUyNDI0NGNlNGEwNzU5YTNhMjY2ZWJmY2JhMDYwZWIzNzNhMzE5YTQxZGNh
15
+ NmFkYjMxMzI3ZDUxZTc3NmUzY2Q2YWZhZDgyZWM5YTJkMzQ4MjY=
@@ -70,7 +70,7 @@ module ApiHelper
70
70
  return default_headers
71
71
  end
72
72
 
73
- def self.healthcheck(url, timeout)
73
+ def self.smoke_test(url, timeout)
74
74
  RestClientExt.get(
75
75
  url,
76
76
  defaultHeaders(
data/lib/conan/deploy.rb CHANGED
@@ -36,11 +36,11 @@ module Conan
36
36
  manifest.provision
37
37
  manifest.bg_configure
38
38
  manifest.bg_deploy
39
- if(manifest.is_inactive_node_healthy?)
39
+ if(manifest.is_inactive_node_operational?)
40
40
  manifest.bg_switch
41
41
  manifest.bg_clean
42
42
  else
43
- raise RuntimeError.new "Blue node is not healthy. Skipping switch and cleaning to facilitate troubleshooting."
43
+ raise RuntimeError.new "Blue node is not operational. Skipping switch and cleaning to facilitate troubleshooting."
44
44
  end
45
45
 
46
46
  else
@@ -119,10 +119,10 @@ class Manifest
119
119
  @current_pipeline.bg_deploy(@current_environment, paas, force)
120
120
  end
121
121
 
122
- def is_inactive_node_healthy?
122
+ def is_inactive_node_operational?
123
123
  validateThatEnvironmentIsSelected
124
- puts "Blue/green health check #{@current_environment.id} for #{@current_pipeline.id} pipeline"
125
- @current_pipeline.is_inactive_node_healthy?(@current_environment, paas)
124
+ puts "Blue/green smoke test #{@current_environment.id} for #{@current_pipeline.id} pipeline"
125
+ @current_pipeline.is_inactive_node_operational?(@current_environment, paas)
126
126
  end
127
127
 
128
128
  def bg_switch
@@ -236,12 +236,12 @@ class Pipeline
236
236
  }
237
237
  end
238
238
 
239
- def is_inactive_node_healthy?(environment, paas)
239
+ def is_inactive_node_operational?(environment, paas)
240
240
  eachAppDeployment(environment) { |app, deploy|
241
- response = ApiHelper.healthcheck(deploy.inactive_healthcheck_url(app), 60)
241
+ response = ApiHelper.smoke_test(deploy.inactive_smoke_test_url(app), 60)
242
242
 
243
243
  if(response.code != 200)
244
- puts "Healthcheck failed for inactive (Blue) node. Here is the entire response: #{response.inspect}"
244
+ puts "Smoke test failed for inactive (Blue) node. Here is the entire response: #{response.inspect}"
245
245
  return false
246
246
  else
247
247
  return true
@@ -450,7 +450,7 @@ class Deployment < HasOptions
450
450
 
451
451
  @@paas_domain = 'mtnsatcloud.com'
452
452
 
453
- attr_accessor :environment, :org, :ship, :shipcloud, :app_ids, :facility_id, :additional_mappings
453
+ attr_accessor :environment, :org, :ship, :shipcloud, :app_ids, :facility_id, :additional_mappings, :custom_smoke_test_path
454
454
 
455
455
  def initialize(environment, org, ship)
456
456
  # inherit options from the environment
@@ -465,6 +465,7 @@ class Deployment < HasOptions
465
465
  @facility_id = nil
466
466
  @enabled = true
467
467
  @randomid = SecureRandom.hex(3)
468
+ @custom_smoke_test_path = nil
468
469
  end
469
470
 
470
471
  def apps(*app_ids)
@@ -517,12 +518,12 @@ class Deployment < HasOptions
517
518
  "http://#{dns_name(app)}/status/manifest"
518
519
  end
519
520
 
520
- def active_healthcheck_url(app)
521
- "http://#{dns_name(app)}/status/healthcheck"
521
+ def active_smoke_test_url(app)
522
+ "http://#{dns_name(app)}/#{@custom_smoke_test_path || 'status/healthcheck'}"
522
523
  end
523
524
 
524
- def inactive_healthcheck_url(app)
525
- "http://inactive.#{dns_name(app)}/status/healthcheck"
525
+ def inactive_smoke_test_url(app)
526
+ "http://inactive.#{dns_name(app)}/#{@custom_smoke_test_path || 'status/healthcheck'}"
526
527
  end
527
528
 
528
529
  def paas_target
@@ -531,6 +532,10 @@ class Deployment < HasOptions
531
532
 
532
533
  def to_s
533
534
  "#{org}-#{ship}"
534
- end
535
+ end
536
+
537
+ def smoke_test_path(path=nil)
538
+ @custom_smoke_test_path = path
539
+ end
535
540
  end
536
541
 
data/lib/conan/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Conan
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conan_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Reardon
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-15 00:00:00.000000000 Z
12
+ date: 2014-05-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: daphne_util