Merge "Moved elastic apps to OS::Neutron::LoadBalancer"

This commit is contained in:
Jenkins 2013-12-04 09:27:28 +00:00 committed by Gerrit Code Review
commit b15e79f351
6 changed files with 64 additions and 42 deletions

View File

@ -3,7 +3,7 @@
"Parameters": { "Parameters": {
"KeyName": { "KeyName": {
"Description": "Key Pair name for Load Balancer", "Description": "Key Pair",
"Type": "String", "Type": "String",
"Default": "$keyName" "Default": "$keyName"
} }

View File

@ -1,22 +1,39 @@
{ {
"Resources" : { "Resources": {
"$lbName" : { "${lbName}-HealthMonitor": {
"Type" : "AWS::ElasticLoadBalancing::LoadBalancer", "Type": "OS::Neutron::HealthMonitor",
"Properties" : { "Properties": {
"AvailabilityZones" : { "Fn::GetAZs" : "" }, "type": "HTTP",
"Instances" : [{"Ref": "$instanceName"}], "delay": 3,
"Listeners" : [ { "max_retries": 3,
"LoadBalancerPort" : "$lbPort", "timeout": 10,
"InstancePort" : "80", "http_method": "GET",
"Protocol" : "HTTP" "expected_codes": "200",
}] "url_path": "/"
}
},
"${lbName}-Pool": {
"Type": "OS::Neutron::Pool",
"Properties": {
"protocol": "HTTP",
"subnet_id": {"Ref": "subnet"},
"lb_method": "ROUND_ROBIN",
"name": "${lbName}-Pool",
"vip": {
"name": "${lbName}-Pool-VIP",
"address": "$lbIp",
"protocol_port": "$lbPort"
},
"monitors": [{"Ref": "${lbName}-HealthMonitor"}]
}
},
"${lbName}-LoadBalancer": {
"Type": "OS::Neutron::LoadBalancer",
"Properties": {
"pool_id": {"Ref": "${lbName}-Pool"},
"protocol_port": "$lbPort",
"members": [{"Ref": "$instanceName"}]
} }
}
},
"Outputs": {
"LoadBalancerIP": {
"Value": { "Fn::GetAtt": [ "$lbName", "DNSName" ] },
"Description": ""
} }
} }
} }

View File

@ -1,13 +1,7 @@
{ {
"AWSTemplateFormatVersion": "2010-09-09", "AWSTemplateFormatVersion": "2010-09-09",
"Parameters": { "Parameters": {},
"KeyName": {
"Description": "Key Pair name for Load Balancer",
"Type": "String",
"Default": "murano-lb-key"
}
},
"Resources": { "Resources": {
"$instanceName": { "$instanceName": {

View File

@ -10,13 +10,13 @@ forms:
hidden: true hidden: true
attributeNames: false attributeNames: false
description: >- description: >-
The ASP.NET application will be installed on a number of IIS Web The ASP.NET application will be installed on a number of IIS Web
Servers, and load balancing will be configured. Servers, and load balancing will be configured.
- name: name - name: name
type: string type: string
label: Service Name label: Service Name
description: >- description: >-
Enter a desired name for a service. Just A-Z, a-z, 0-9, dash and Enter a desired name for a service. Just A-Z, a-z, 0-9, dash and
underline are allowed. underline are allowed.
minLength: 2 minLength: 2
maxLength: 64 maxLength: 64
@ -44,7 +44,7 @@ forms:
label: Domain label: Domain
required: false required: false
description: >- description: >-
Service can be joined to the Active Directory domain. If you want to Service can be joined to the Active Directory domain. If you want to
create an AD domain create the AD Service first. create an AD domain create the AD Service first.
helpText: Optional field for a domain to which service can be joined helpText: Optional field for a domain to which service can be joined
- name: repository - name: repository
@ -66,6 +66,11 @@ forms:
maxValue: 100 maxValue: 100
initial: 2 initial: 2
helpText: Enter an integer value between 2 and 100 helpText: Enter an integer value between 2 and 100
- name: loadBalancerIp
type: clusterip
label: Load Balancer VIP
description: Specify IP number where Load Balancer will be running
helpText: Enter an free IP address from the subnet where instances will be created
- name: loadBalancerPort - name: loadBalancerPort
type: integer type: integer
label: Load Balancer port label: Load Balancer port
@ -79,8 +84,8 @@ forms:
label: Hostname template label: Hostname template
description: >- description: >-
For your convenience all instance hostnames can be named For your convenience all instance hostnames can be named
in the same way. Enter a name and use # character for incrementation. in the same way. Enter a name and use # character for incrementation.
For example, host# turns into host1, host2, etc. Please follow Windows For example, host# turns into host1, host2, etc. Please follow Windows
hostname restrictions. hostname restrictions.
required: false required: false
regexpValidator: '^(([a-zA-Z0-9#][a-zA-Z0-9-#]*[a-zA-Z0-9#])\.)*([A-Za-z0-9#]|[A-Za-z0-9#][A-Za-z0-9-#]*[A-Za-z0-9#])$' regexpValidator: '^(([a-zA-Z0-9#][a-zA-Z0-9-#]*[a-zA-Z0-9#])\.)*([A-Za-z0-9#]|[A-Za-z0-9#][A-Za-z0-9-#]*[A-Za-z0-9#])$'
@ -106,7 +111,7 @@ forms:
type: flavor type: flavor
label: Instance flavor label: Instance flavor
description: >- description: >-
Select registered in Openstack flavor. Consider that service performance Select registered in Openstack flavor. Consider that service performance
depends on this parameter. depends on this parameter.
required: false required: false
- name: osImage - name: osImage
@ -114,7 +119,7 @@ forms:
imageType: windows imageType: windows
label: Instance image label: Instance image
description: >- description: >-
Select valid image for a service. Image should already be prepared and Select valid image for a service. Image should already be prepared and
registered in glance. registered in glance.
- name: availabilityZone - name: availabilityZone
type: azone type: azone

View File

@ -14,7 +14,7 @@ forms:
type: string type: string
label: Service Name label: Service Name
description: >- description: >-
Enter a desired name for a service. Just A-Z, a-z, 0-9, dash and Enter a desired name for a service. Just A-Z, a-z, 0-9, dash and
underline are allowed. underline are allowed.
minLength: 2 minLength: 2
maxLength: 64 maxLength: 64
@ -34,15 +34,15 @@ forms:
descriptionTitle: Passwords descriptionTitle: Passwords
description: >- description: >-
Windows requires strong password for service administration. Windows requires strong password for service administration.
Your password should have at least one letter in each Your password should have at least one letter in each
register, a number and a special character. Password length should be register, a number and a special character. Password length should be
a minimum of 7 characters. a minimum of 7 characters.
- name: domain - name: domain
type: domain type: domain
label: Domain label: Domain
required: false required: false
description: >- description: >-
Service can be joined to the Active Directory domain. If you want to Service can be joined to the Active Directory domain. If you want to
create an AD domain create the AD Service first. create an AD domain create the AD Service first.
helpText: Optional field for a domain to which service can be joined helpText: Optional field for a domain to which service can be joined
- name: dcInstances - name: dcInstances
@ -54,6 +54,11 @@ forms:
label: Instance Count label: Instance Count
description: Several instances with IIS Service can be created at one time. description: Several instances with IIS Service can be created at one time.
helpText: Enter an integer value between 2 and 100 helpText: Enter an integer value between 2 and 100
- name: loadBalancerIp
type: clusterip
label: Load Balancer VIP
description: Specify IP number where Load Balancer will be running
helpText: Enter an free IP address from the subnet where instances will be created
- name: loadBalancerPort - name: loadBalancerPort
type: integer type: integer
label: Load Balancer port label: Load Balancer port
@ -67,8 +72,8 @@ forms:
label: Hostname template label: Hostname template
description: >- description: >-
For your convenience all instance hostnames can be named For your convenience all instance hostnames can be named
in the same way. Enter a name and use # character for incrementation. in the same way. Enter a name and use # character for incrementation.
For example, host# turns into host1, host2, etc. Please follow Windows For example, host# turns into host1, host2, etc. Please follow Windows
hostname restrictions. hostname restrictions.
required: false required: false
regexpValidator: '^(([a-zA-Z0-9#][a-zA-Z0-9-#]*[a-zA-Z0-9#])\.)*([A-Za-z0-9#]|[A-Za-z0-9#][A-Za-z0-9-#]*[A-Za-z0-9#])$' regexpValidator: '^(([a-zA-Z0-9#][a-zA-Z0-9-#]*[a-zA-Z0-9#])\.)*([A-Za-z0-9#]|[A-Za-z0-9#][A-Za-z0-9-#]*[A-Za-z0-9#])$'
@ -94,7 +99,7 @@ forms:
type: flavor type: flavor
label: Instance flavor label: Instance flavor
description: >- description: >-
Select registered in Openstack flavor. Consider that service performance Select registered in Openstack flavor. Consider that service performance
depends on this parameter. depends on this parameter.
required: false required: false
- name: osImage - name: osImage
@ -102,7 +107,7 @@ forms:
imageType: windows imageType: windows
label: Instance image label: Instance image
description: >- description: >-
Select valid image for a service. Image should already be prepared and Select valid image for a service. Image should already be prepared and
registered in glance. registered in glance.
- name: availabilityZone - name: availabilityZone
type: azone type: azone

View File

@ -53,13 +53,14 @@
<parameter name="mappings"> <parameter name="mappings">
<map> <map>
<mapping name="instanceName"><select path="state.hostname"/></mapping> <mapping name="instanceName"><select path="state.hostname"/></mapping>
<mapping name="lbIp"><select path="::loadBalancerIp"/></mapping>
<mapping name="lbPort"><select path="::loadBalancerPort"/></mapping> <mapping name="lbPort"><select path="::loadBalancerPort"/></mapping>
<mapping name="lbName"><select path="::name"/></mapping> <mapping name="lbName"><select path="::name"/></mapping>
</map> </map>
</parameter> </parameter>
<success> <success>
<set path="temp.registeredWithLB"><true/></set> <set path="temp.registeredWithLB"><true/></set>
<set path="::uri">http://<select source="outputs" path="LoadBalancerIP"/>:<select path="::loadBalancerPort"/></set> <set path="::uri">http://<select path="::loadBalancerIp"/>:<select path="::loadBalancerPort"/></set>
</success> </success>
<failure> <failure>
<report entity="unit" level="error"> <report entity="unit" level="error">