renderCFN 0.0.25 → 0.0.26

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,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 9357e875ab358ef2351f9b50eecfd5e683daa7fc73ebeeed72e6952b0890691a
4
- data.tar.gz: 5333532f9a86cfb7379ae36319809cbaf7bdd8cd4c77177da34dbd513f01ba48
2
+ SHA1:
3
+ metadata.gz: 2c2d4bed0f3b0cefb4700e4b8b941440abc224ab
4
+ data.tar.gz: c38c8f7386b52d3426f47b0a52b5280d9b49806b
5
5
  SHA512:
6
- metadata.gz: a51985eb0794c439b5e81b43734dbe1c7ec9f496b1a44d8d725b03f776fd9b3134b51942db656302637a6b9d0f904d92e27ce9dfa4f619c4876285cd99ccb44c
7
- data.tar.gz: 52da4b6e97b9ba532a95dc13538a01b8f9afac29d76862a2aa1022edaad6c1fdd1bdc6a4453b674bc8295589099ef702dfd9d10f528db8dc9e92471dac4a2d67
6
+ metadata.gz: 139334656fa958941739753e09e82a1ec84e1b18af2ea07e602c9411ec314bdfd08055157e51ef1dc034fdef2e066c38ffa36c014271f5b34bdaa587215a6792
7
+ data.tar.gz: 808529c9d61444579d23e2e22d79d965b4726fc7335a1b76c0e85bcc6c2605d4b6466304f2e4197aca7266fad9aabe20bd8dd7176ae22fed6e66890c8b27aa2e
@@ -0,0 +1,89 @@
1
+ require 'renderCFN/awsObject'
2
+
3
+ module RenderCFN
4
+ class LoadBalancer < AwsObject
5
+ def initialize( arguments) #name, lbPort, instancePort, idleTimeout = 60)
6
+ @idleTimeout = arguments[:idleTimeout] or 60
7
+ @name = "#{arguments[:name]}ElasticLoadBalancer"
8
+ @awsObject = {
9
+ @name => {
10
+ 'Type' => 'AWS::ElasticLoadBalancing::LoadBalancer',
11
+ 'Properties' => {
12
+ 'SecurityGroups' => [],
13
+ 'Scheme' => arguments[:scheme] || 'internal',
14
+ 'CrossZone' => true,
15
+ 'ConnectionSettings' => {
16
+ 'IdleTimeout' => @idleTimeout
17
+ },
18
+ 'ConnectionDrainingPolicy' => { 'Enabled' => true, 'Timeout' => 60 },
19
+ 'Subnets' => arguments[:subnetList],
20
+ 'Tags' => [
21
+ { 'Key' => 'application', 'Value' => arguments[:serviceTitle] },
22
+ { 'Key' => 'StackName', 'Value' => @@stackName },
23
+ ],
24
+ 'HealthCheck' => {
25
+ 'Target' => "HTTP:#{arguments[:instancePort]}/status-check",
26
+ 'Interval' => 6,
27
+ 'Timeout' => 5,
28
+ 'UnhealthyThreshold' => 2,
29
+ 'HealthyThreshold' => 2,
30
+ },
31
+ 'Listeners' => [
32
+ {
33
+ 'Protocol' => 'HTTP',
34
+ 'LoadBalancerPort' => 80,
35
+ 'InstancePort' => arguments[:instancePort]
36
+ },
37
+ #{
38
+ # 'Protocol' => 'HTTP',
39
+ # 'LoadBalancerPort' => 9876,
40
+ # 'InstancePort' => 9876
41
+ #}
42
+ ]
43
+ }
44
+ }
45
+ }
46
+ if arguments[:lbPort] != 80
47
+ @awsObject['Properties']['Listeners'].push (
48
+ {
49
+ 'Protocol' => 'HTTP',
50
+ 'LoadBalancerPort' => arguments[:lbport],
51
+ 'InstancePort' => arguments[:instancePort]
52
+ }
53
+ )
54
+ end
55
+
56
+ end
57
+
58
+ def modifyHealthCheck( newHealthCheck)
59
+ @awsObject[@name]['Properties']['HealthCheck']['Target'] = newHealthCheck
60
+ end
61
+
62
+ def addSecurityGroup( securityGroup)
63
+ @awsObject[@name]['Properties']['SecurityGroups'].push( {'Ref' => "#{securityGroup}"} )
64
+ end
65
+
66
+ def addListener( lbPort, instancePort)
67
+ @awsObject[@name]['Properties']['Listeners'].push (
68
+ {
69
+ 'Protocol' => 'HTTP',
70
+ 'LoadBalancerPort' => lbPort,
71
+ 'InstancePort' => instancePort
72
+ }
73
+ )
74
+ end
75
+
76
+ def addSslListener( lbPort, instancePort, certificate)
77
+ @awsObject[@name]['Properties']['Listeners'].push (
78
+ {
79
+ 'Protocol' => 'HTTPS',
80
+ 'LoadBalancerPort' => lbPort,
81
+ 'InstancePort' => instancePort,
82
+ 'SSLCertificateId' => certificate
83
+ }
84
+ )
85
+ end
86
+
87
+ end
88
+
89
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renderCFN
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.25
4
+ version: 0.0.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian J. Schrock
@@ -32,6 +32,7 @@ extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
34
  - lib/renderCFN.rb
35
+ - lib/renderCFN/applicationLoadBalancerV2.rb
35
36
  - lib/renderCFN/autoScalingGroup.rb
36
37
  - lib/renderCFN/awsObject.rb
37
38
  - lib/renderCFN/dnsWizard.rb
@@ -64,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
65
  version: '0'
65
66
  requirements: []
66
67
  rubyforge_project:
67
- rubygems_version: 2.7.6
68
+ rubygems_version: 2.5.2
68
69
  signing_key:
69
70
  specification_version: 4
70
71
  summary: AWS Cloudformation template rendering tool