Added support for adv networking
Change-Id: I162cf501a4c23ddce9bb3fc9677cbff6d56b713f
This commit is contained in:
parent
3b7a711fb9
commit
d20bbb5012
@ -16,10 +16,17 @@ ui:
|
||||
|
||||
workflows:
|
||||
- AD.xml
|
||||
- Networking.xml
|
||||
- Common.xml
|
||||
|
||||
heat:
|
||||
- Windows.template
|
||||
- InstancePort.template
|
||||
- InstancePortWSubnet.template
|
||||
- Network.template
|
||||
- Param.template
|
||||
- RouterInterface.template
|
||||
- Subnet.template
|
||||
|
||||
agent:
|
||||
- SetPassword.template
|
||||
|
@ -3,7 +3,7 @@ Version: 1.0.0
|
||||
Name: Deploy Apache
|
||||
|
||||
Parameters:
|
||||
enablePHP: $enablePHP
|
||||
enablePHP: $deployApachePHP
|
||||
|
||||
Body: |
|
||||
return apacheDeploy('{0}'.format(args.enablePHP)).stdout
|
||||
@ -14,8 +14,8 @@ Scripts:
|
||||
Version: 1.0.0
|
||||
EntryPoint: Linux/runApacheDeploy.sh
|
||||
Files:
|
||||
- Linux/installer.sh
|
||||
- Linux/common.sh
|
||||
- <Linux/installer.sh>
|
||||
- <Linux/common.sh>
|
||||
Options:
|
||||
captureStdout: true
|
||||
captureStderr: true
|
||||
captureStderr: false
|
@ -15,10 +15,17 @@ ui:
|
||||
|
||||
workflows:
|
||||
- Apache.xml
|
||||
- Networking.xml
|
||||
|
||||
heat:
|
||||
- Linux.template
|
||||
- ApacheSecurity.template
|
||||
- InstancePort.template
|
||||
- InstancePortWSubnet.template
|
||||
- Network.template
|
||||
- Param.template
|
||||
- RouterInterface.template
|
||||
- Subnet.template
|
||||
|
||||
agent:
|
||||
- DeployApache.template
|
||||
|
@ -16,9 +16,16 @@ ui:
|
||||
workflows:
|
||||
- WebApps.xml
|
||||
- Common.xml
|
||||
- Networking.xml
|
||||
|
||||
heat:
|
||||
- Windows.template
|
||||
- InstancePort.template
|
||||
- InstancePortWSubnet.template
|
||||
- Network.template
|
||||
- Param.template
|
||||
- RouterInterface.template
|
||||
- Subnet.template
|
||||
- LoadBalancer.template
|
||||
|
||||
agent:
|
||||
|
@ -16,9 +16,17 @@ ui:
|
||||
workflows:
|
||||
- WebApps.xml
|
||||
- Common.xml
|
||||
- Networking.xml
|
||||
|
||||
heat:
|
||||
- Windows.template
|
||||
- InstancePort.template
|
||||
- InstancePortWSubnet.template
|
||||
- Network.template
|
||||
- Param.template
|
||||
- RouterInterface.template
|
||||
- Subnet.template
|
||||
|
||||
|
||||
agent:
|
||||
- SetPassword.template
|
||||
|
@ -15,9 +15,18 @@ ui:
|
||||
|
||||
workflows:
|
||||
- Demo.xml
|
||||
- Common.xml
|
||||
- Networking.xml
|
||||
|
||||
heat:
|
||||
- Demo.template
|
||||
- InstancePort.template
|
||||
- InstancePortWSubnet.template
|
||||
- Network.template
|
||||
- Param.template
|
||||
- RouterInterface.template
|
||||
- Subnet.template
|
||||
|
||||
|
||||
agent:
|
||||
- Demo.template
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"Resources": {
|
||||
"$instancePort": {
|
||||
"$portName": {
|
||||
"Properties": {
|
||||
"security_groups" : [ {"Ref" : "ApacheSecurityGroup"} ]
|
||||
}
|
||||
|
@ -1,26 +1,53 @@
|
||||
{
|
||||
"AWSTemplateFormatVersion" : "2010-09-09",
|
||||
"AWSTemplateFormatVersion": "2010-09-09",
|
||||
|
||||
"Parameters" : {
|
||||
"KeyName" : {
|
||||
"Description" : "Key Pair name for Load Balancer",
|
||||
"Type" : "String",
|
||||
"Default" : "murano-lb-key"
|
||||
"Parameters": {
|
||||
"KeyName": {
|
||||
"Description": "Key Pair name for Load Balancer",
|
||||
"Type": "String",
|
||||
"Default": "murano-lb-key"
|
||||
}
|
||||
},
|
||||
|
||||
"Resources": {
|
||||
"$instanceName": {
|
||||
"Type": "AWS::EC2::Instance",
|
||||
"Properties": {
|
||||
"InstanceType": "$instanceType",
|
||||
"ImageId": "$imageName",
|
||||
"AvailabilityZone": "$availabilityZone",
|
||||
"UserData": "$userData"
|
||||
}
|
||||
},
|
||||
"MuranoDefaultSecurityGroup": {
|
||||
"Type": "AWS::EC2::SecurityGroup",
|
||||
"Properties": {
|
||||
"SecurityGroupIngress": [
|
||||
{
|
||||
"ToPort": "3389",
|
||||
"IpProtocol": "tcp",
|
||||
"FromPort": "3389",
|
||||
"CidrIp": "0.0.0.0/0"
|
||||
},
|
||||
{
|
||||
"ToPort": "22",
|
||||
"IpProtocol": "tcp",
|
||||
"FromPort": "22",
|
||||
"CidrIp": "0.0.0.0/0"
|
||||
},
|
||||
{
|
||||
"ToPort": "-1",
|
||||
"IpProtocol": "icmp",
|
||||
"FromPort": "-1",
|
||||
"CidrIp": "0.0.0.0/0"
|
||||
}
|
||||
],
|
||||
"GroupDescription": "Default security group for Murano Environments"
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
"Outputs": {
|
||||
}
|
||||
},
|
||||
|
||||
"Resources" : {
|
||||
"$instanceName": {
|
||||
"Type" : "AWS::EC2::Instance",
|
||||
"Properties": {
|
||||
"InstanceType" : "$instanceType",
|
||||
"ImageId" :"$imageName",
|
||||
"AvailabilityZone" : "$availabilityZone",
|
||||
"UserData": "$userData"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"Outputs" : {
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,29 @@
|
||||
{
|
||||
"Resources": {
|
||||
"$instanceName": {
|
||||
"Properties": {
|
||||
"NetworkInterfaces": [
|
||||
{
|
||||
"Ref": "$instancePort"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"$instancePort": {
|
||||
"Type": "OS::Neutron::Port",
|
||||
"Properties": {
|
||||
"security_groups": [
|
||||
{
|
||||
"Ref": "MuranoDefaultSecurityGroup"
|
||||
}
|
||||
],
|
||||
"network_id": {
|
||||
"Ref": "$network"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"Outputs": {
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
{
|
||||
"Resources": {
|
||||
"$instanceName": {
|
||||
"Properties": {
|
||||
"NetworkInterfaces": [
|
||||
{
|
||||
"Ref": "$instancePort"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"$instancePort": {
|
||||
"Type": "OS::Neutron::Port",
|
||||
"Properties": {
|
||||
"security_groups": [
|
||||
{
|
||||
"Ref": "MuranoDefaultSecurityGroup"
|
||||
}
|
||||
],
|
||||
"network_id": {
|
||||
"Ref": "$network"
|
||||
},
|
||||
"fixed_ips": [
|
||||
{
|
||||
"subnet_id": {
|
||||
"Ref": "$subnet"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"Outputs": {
|
||||
}
|
||||
}
|
@ -13,28 +13,10 @@
|
||||
"$instanceName": {
|
||||
"Type": "AWS::EC2::Instance",
|
||||
"Properties": {
|
||||
"BootFromVolume": true,
|
||||
"InstanceType": "$instanceType",
|
||||
"ImageId": "$imageName",
|
||||
"AvailabilityZone": "$availabilityZone",
|
||||
"UserData": "$userData",
|
||||
"NetworkInterfaces": [ { "Ref": "$port-{instanceName}" } ]
|
||||
}
|
||||
},
|
||||
"$instancePort": {
|
||||
"Type": "OS::Neutron::Port",
|
||||
"Properties": {
|
||||
"network_id": {
|
||||
"Ref": "network"
|
||||
},
|
||||
"security_groups" : [ { "Ref" : "MuranoDefaultSecurityGroup"}],
|
||||
"fixed_ips": [
|
||||
{
|
||||
"subnet_id": {
|
||||
"Ref": "subnet"
|
||||
}
|
||||
}
|
||||
]
|
||||
"UserData": "$userData"
|
||||
}
|
||||
},
|
||||
"MuranoDefaultSecurityGroup": {
|
||||
@ -74,52 +56,6 @@
|
||||
],
|
||||
"GroupDescription": "Default security group for Linux Murano Environments"
|
||||
}
|
||||
},
|
||||
"network": {
|
||||
"Type": "OS::Neutron::Net",
|
||||
"Properties": {
|
||||
"name": "$network-{environmentId}"
|
||||
}
|
||||
},
|
||||
"subnet": {
|
||||
"Type": "OS::Neutron::Subnet",
|
||||
"Properties": {
|
||||
"network_id": {
|
||||
"Ref": "network"
|
||||
},
|
||||
"ip_version": 4,
|
||||
"cidr": "10.0.0.0/24",
|
||||
"dns_nameservers": ["8.8.8.8"],
|
||||
"allocation_pools": [
|
||||
{
|
||||
"start": "10.0.0.20",
|
||||
"end": "10.0.0.250"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"router": {
|
||||
"Type": "OS::Neutron::Router"
|
||||
},
|
||||
"router_interface": {
|
||||
"Type": "OS::Neutron::RouterInterface",
|
||||
"Properties": {
|
||||
"router_id": {
|
||||
"Ref": "router"
|
||||
},
|
||||
"subnet_id": {
|
||||
"Ref": "subnet"
|
||||
}
|
||||
}
|
||||
},
|
||||
"router_gateway": {
|
||||
"Type": "OS::Neutron::RouterGateway",
|
||||
"Properties": {
|
||||
"router_id": {
|
||||
"Ref": "router"
|
||||
},
|
||||
"network_id": "$externalNetworkId"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
14
muranorepository/Services/heat_templates/Network.template
Normal file
14
muranorepository/Services/heat_templates/Network.template
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"AWSTemplateFormatVersion": "2010-09-09",
|
||||
|
||||
"Resources": {
|
||||
"network": {
|
||||
"Type": "OS::Neutron::Net",
|
||||
"Properties": {
|
||||
"name": "$networkName"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Outputs": {
|
||||
}
|
||||
}
|
8
muranorepository/Services/heat_templates/Param.template
Normal file
8
muranorepository/Services/heat_templates/Param.template
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"Parameters" : {
|
||||
"$paramName" : {
|
||||
"Type" : "String",
|
||||
"Default" : "$paramValue"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
{
|
||||
"AWSTemplateFormatVersion": "2010-09-09",
|
||||
|
||||
"Resources": {
|
||||
"$interfaceName": {
|
||||
"Type": "OS::Neutron::RouterInterface",
|
||||
"Properties": {
|
||||
"router_id": "$routerId",
|
||||
"subnet_id": {
|
||||
"Ref": "$subnet"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"Outputs": {
|
||||
}
|
||||
}
|
20
muranorepository/Services/heat_templates/Subnet.template
Normal file
20
muranorepository/Services/heat_templates/Subnet.template
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"AWSTemplateFormatVersion": "2010-09-09",
|
||||
|
||||
"Resources": {
|
||||
"$subnetName": {
|
||||
"Type": "OS::Neutron::Subnet",
|
||||
"Properties": {
|
||||
"network_id": {
|
||||
"Ref": "$networkRef"
|
||||
},
|
||||
"ip_version": 4,
|
||||
"dns_nameservers": ["8.8.8.8"],
|
||||
"cidr": "$cidr"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"Outputs": {
|
||||
}
|
||||
}
|
@ -16,32 +16,7 @@
|
||||
"InstanceType": "$instanceType",
|
||||
"ImageId": "$imageName",
|
||||
"AvailabilityZone": "$availabilityZone",
|
||||
"UserData": "$userData",
|
||||
"NetworkInterfaces": [
|
||||
{
|
||||
"Ref": "$instancePort"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"$instancePort": {
|
||||
"Type": "OS::Neutron::Port",
|
||||
"Properties": {
|
||||
"security_groups": [
|
||||
{
|
||||
"Ref": "MuranoDefaultSecurityGroup"
|
||||
}
|
||||
],
|
||||
"network_id": {
|
||||
"Ref": "network"
|
||||
},
|
||||
"fixed_ips": [
|
||||
{
|
||||
"subnet_id": {
|
||||
"Ref": "subnet"
|
||||
}
|
||||
}
|
||||
]
|
||||
"UserData": "$userData"
|
||||
}
|
||||
},
|
||||
"MuranoDefaultSecurityGroup": {
|
||||
@ -69,42 +44,6 @@
|
||||
],
|
||||
"GroupDescription": "Default security group for Murano Environments"
|
||||
}
|
||||
},
|
||||
"network": {
|
||||
"Type": "OS::Neutron::Net",
|
||||
"Properties": {
|
||||
"name": "$networkName"
|
||||
}
|
||||
},
|
||||
"subnet": {
|
||||
"Type": "OS::Neutron::Subnet",
|
||||
"Properties": {
|
||||
"network_id": {
|
||||
"Ref": "network"
|
||||
},
|
||||
"ip_version": 4,
|
||||
"cidr": "10.0.0.0/24",
|
||||
"allocation_pools": [
|
||||
{
|
||||
"start": "10.0.0.20",
|
||||
"end": "10.0.0.250"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"router": {
|
||||
"Type": "OS::Neutron::Router"
|
||||
},
|
||||
"router_interface": {
|
||||
"Type": "OS::Neutron::RouterInterface",
|
||||
"Properties": {
|
||||
"router_id": {
|
||||
"Ref": "router"
|
||||
},
|
||||
"subnet_id": {
|
||||
"Ref": "subnet"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -15,10 +15,18 @@ ui:
|
||||
workflows:
|
||||
- WebApps.xml
|
||||
- Common.xml
|
||||
- Networking.xml
|
||||
|
||||
heat:
|
||||
- Windows.template
|
||||
- LoadBalancer.template
|
||||
- InstancePort.template
|
||||
- InstancePortWSubnet.template
|
||||
- Network.template
|
||||
- Param.template
|
||||
- RouterInterface.template
|
||||
- Subnet.template
|
||||
|
||||
|
||||
agent:
|
||||
- SetPassword.template
|
||||
|
@ -16,9 +16,16 @@ ui:
|
||||
workflows:
|
||||
- WebApps.xml
|
||||
- Common.xml
|
||||
- Networking.xml
|
||||
|
||||
heat:
|
||||
- Windows.template
|
||||
- InstancePort.template
|
||||
- InstancePortWSubnet.template
|
||||
- Network.template
|
||||
- Param.template
|
||||
- RouterInterface.template
|
||||
- Subnet.template
|
||||
|
||||
agent:
|
||||
- SetPassword.template
|
||||
|
@ -16,10 +16,18 @@ ui:
|
||||
workflows:
|
||||
- MsSqlCluster.xml
|
||||
- Common.xml
|
||||
- Networking.xml
|
||||
|
||||
heat:
|
||||
- Windows.template
|
||||
- SQLCluster.template
|
||||
- InstancePort.template
|
||||
- InstancePortWSubnet.template
|
||||
- Network.template
|
||||
- Param.template
|
||||
- RouterInterface.template
|
||||
- Subnet.template
|
||||
|
||||
|
||||
agent:
|
||||
- SetPassword.template
|
||||
|
@ -16,10 +16,18 @@ ui:
|
||||
workflows:
|
||||
- MsSqlServer.xml
|
||||
- Common.xml
|
||||
- Networking.xml
|
||||
|
||||
heat:
|
||||
- Windows.template
|
||||
- SQL-security.template
|
||||
- InstancePort.template
|
||||
- InstancePortWSubnet.template
|
||||
- Network.template
|
||||
- Param.template
|
||||
- RouterInterface.template
|
||||
- Subnet.template
|
||||
|
||||
|
||||
agent:
|
||||
- SetPassword.template
|
||||
|
@ -15,9 +15,16 @@ ui:
|
||||
|
||||
workflows:
|
||||
- LinuxTelnet.xml
|
||||
- Networking.xml
|
||||
|
||||
heat:
|
||||
- Linux.template
|
||||
- InstancePort.template
|
||||
- InstancePortWSubnet.template
|
||||
- Network.template
|
||||
- Param.template
|
||||
- RouterInterface.template
|
||||
- Subnet.template
|
||||
|
||||
agent:
|
||||
- DeployTelnet.template
|
||||
|
@ -1,9 +1,9 @@
|
||||
name: Apache Service
|
||||
name: Linux Apache
|
||||
type: linuxApacheService
|
||||
|
||||
description: >-
|
||||
<strong> Linux Apache Service </strong>
|
||||
Demonstrates a simple linux agent, which installs Apache Server
|
||||
Demonstrates a linux agent, which installs Apache web server.
|
||||
|
||||
unitTemplates:
|
||||
- {}
|
||||
@ -11,38 +11,29 @@ unitTemplates:
|
||||
forms:
|
||||
- serviceConfiguration:
|
||||
fields:
|
||||
- name: title
|
||||
type: string
|
||||
required: false
|
||||
hidden: true
|
||||
attributeNames: false
|
||||
description: Apach service installs Apache HTTP Server
|
||||
- name: name
|
||||
type: string
|
||||
label: Service Name
|
||||
description: >-
|
||||
Enter a desired name for a service. Just A-Z, a-z, 0-9, dash and
|
||||
underline are allowed.
|
||||
minLength: 2
|
||||
maxLength: 64
|
||||
regexpValidator: '^[-\w]+$'
|
||||
errorMessages:
|
||||
invalid: Just letters, numbers, underscores and hyphens are allowed.
|
||||
helpText: Just letters, numbers, underscores and hyphens are allowed.
|
||||
- name: dcInstances
|
||||
type: instance
|
||||
hidden: true
|
||||
attributeNames: units
|
||||
initial: 1
|
||||
- name: deployApache
|
||||
To identify your service in logs please specify a service name
|
||||
- name: deployApachePHP
|
||||
label: PHP module
|
||||
type: boolean
|
||||
label: Deploy Apache
|
||||
description: >-
|
||||
Indicates if the target machine has to get Apache deployed
|
||||
initial: true
|
||||
Add php support into Apache web server.
|
||||
initial: false
|
||||
required: false
|
||||
widgetMedia:
|
||||
css: {all: [muranodashboard/css/checkbox.css]}
|
||||
- name: dcInstances
|
||||
type: instance
|
||||
minValue: 1
|
||||
maxValue: 10
|
||||
attributeNames: [units, instanceCount]
|
||||
initial: 1
|
||||
label: Instance Count
|
||||
description: Several instances with Apache web Service can be created at one time.
|
||||
helpText: Enter an integer value between 1 and 10
|
||||
- name: unitNamingPattern
|
||||
type: string
|
||||
label: Hostname
|
||||
@ -56,10 +47,6 @@ forms:
|
||||
widgetMedia:
|
||||
js: [muranodashboard/js/support_placeholder.js]
|
||||
css: {all: [muranodashboard/css/support_placeholder.css]}
|
||||
validators:
|
||||
# if unitNamingPattern is given and dcInstances > 1, then '#' should occur in unitNamingPattern
|
||||
- expr: {YAQL: $.serviceConfiguration.dcInstances < 2 or not $.serviceConfiguration.unitNamingPattern.bool() or '#' in $.serviceConfiguration.unitNamingPattern}
|
||||
message: Incrementation symbol "#" is required in the Hostname template
|
||||
- instanceConfiguration:
|
||||
fields:
|
||||
- name: title
|
||||
@ -87,4 +74,4 @@ forms:
|
||||
type: azone
|
||||
label: Availability zone
|
||||
description: Select availability zone where service would be installed.
|
||||
required: false
|
||||
required: false
|
@ -7,7 +7,7 @@
|
||||
<mute/>
|
||||
</rule>
|
||||
|
||||
<rule match="$.services[?(@.type == 'activeDirectory' and @.osImage.name)].units[?(@.state.hostname and not @.temp.instanceName)]"
|
||||
<rule match="$[?(@.networking.state.ready_for_cf)].services[?(@.type == 'activeDirectory' and @.osImage.name)].units[?(@.state.hostname and not @.temp.instanceName)]"
|
||||
desc="Units of AD services which have got hostname and image assigned, but instances not deployed yet">
|
||||
<report entity="unit">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<workflow>
|
||||
<!-- Provisioning rules -->
|
||||
<rule match="$.services[?(@.type == 'linuxApacheService')].units[?(@.state.hostname and not @.temp.instanceName)]"
|
||||
<rule match="$[?(@.networking.state.ready_for_cf)].services[?(@.type == 'linuxApacheService')].units[?(@.state.hostname and not @.temp.instanceName)]"
|
||||
desc="Units of Linux Telnet service having hostname and image names assigned but without instances">
|
||||
<report entity="unit">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
@ -16,12 +16,6 @@
|
||||
<mapping name="instanceName">
|
||||
<select path="state.hostname"/>
|
||||
</mapping>
|
||||
<mapping name="instancePort">
|
||||
port-<select path="state.hostname"/>
|
||||
</mapping>
|
||||
<mapping name="networkName">
|
||||
network-<select path="/id"/>
|
||||
</mapping>
|
||||
<mapping name="userData">
|
||||
<prepare-user-data template="Linux" initFile="linux_init.sh">
|
||||
<parameter name="hostname">
|
||||
@ -83,9 +77,7 @@
|
||||
<update-cf-stack template="ApacheSecurity" error="exception">
|
||||
<parameter name="mappings">
|
||||
<map>
|
||||
<mapping name="instanceName">
|
||||
<select path="state.hostname"/>
|
||||
</mapping>
|
||||
<mapping name="portName">port-<select path="state.hostname"/></mapping>
|
||||
</map>
|
||||
</parameter>
|
||||
<success>
|
||||
|
@ -1,9 +1,5 @@
|
||||
<workflow>
|
||||
<rule match="$.services[?(@.type == 'demoService')].units[*]"
|
||||
desc='Service for demo purpose'>
|
||||
</rule>
|
||||
|
||||
<rule match="$.services[?(@.type == 'demoService')].units[?(@.state.hostname and not @.temp.instanceName)]"
|
||||
<rule match="$[?(@.networking.state.ready_for_cf)].services[?(@.type == 'demoService')].units[?(@.state.hostname and not @.temp.instanceName)]"
|
||||
desc="Units of demo service having hostname and image names assigned but without instances">
|
||||
<report entity="unit">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
@ -33,12 +29,12 @@
|
||||
</report>
|
||||
</success>
|
||||
<failure>
|
||||
<report entity="unit" level="error">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
<parameter name="text">Unable to deploy instance <select path="state.hostname"/> (<select path="name"/>) due to <select source="exception" path="message" default="unknown Heat error"/> </parameter>
|
||||
</report>
|
||||
<stop/>
|
||||
</failure>
|
||||
<report entity="unit" level="error">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
<parameter name="text">Unable to deploy instance <select path="state.hostname"/> (<select path="name"/>) due to <format-error error="exception"/> </parameter>
|
||||
</report>
|
||||
<stop/>
|
||||
</failure>
|
||||
</update-cf-stack>
|
||||
</rule>
|
||||
|
||||
@ -66,7 +62,7 @@
|
||||
<failure>
|
||||
<report entity="unit" level="error">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
<parameter name="text">Unable to install demo service on <select path="state.hostname"/> (<select path="name"/>) due to <select source="exception" path="0.messages.0" default="unknown Agent error"/> </parameter>
|
||||
<parameter name="text">Unable to install demo service on <select path="state.hostname"/> (<select path="name"/>) due to <format-error error="exception"/></parameter>
|
||||
</report>
|
||||
<stop/>
|
||||
</failure>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<workflow>
|
||||
|
||||
<rule match="$.services[?(@.type == 'linuxTelnetService')].units[?(@.state.hostname and not @.temp.instanceName)]"
|
||||
<rule match="$[?(@.networking.state.ready_for_cf)].services[?(@.type == 'linuxTelnetService')].units[?(@.state.hostname and not @.temp.instanceName)]"
|
||||
desc="Units of Linux Telnet service having hostname and image names assigned but without instances">
|
||||
<report entity="unit">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
@ -10,8 +10,6 @@
|
||||
<parameter name="mappings">
|
||||
<map>
|
||||
<mapping name="instanceName"><select path="state.hostname"/></mapping>
|
||||
<mapping name="instancePort">port-<select path="state.hostname"/></mapping>
|
||||
<mapping name="networkName">network-<select path="/id"/></mapping>
|
||||
<mapping name="userData">
|
||||
<prepare-user-data template="Linux" initFile="linux_init.sh">
|
||||
<parameter name="hostname"><select path="state.hostname"/></parameter>
|
||||
|
@ -8,7 +8,7 @@
|
||||
<mute/>
|
||||
</rule>
|
||||
|
||||
<rule match="$.services[?(@.type == 'msSqlClusterServer' and @.osImage.name)].units[?(@.state.hostname and not @.temp.instanceName)]"
|
||||
<rule match="$[?(@.networking.state.ready_for_cf)].services[?(@.type == 'msSqlClusterServer' and @.osImage.name)].units[?(@.state.hostname and not @.temp.instanceName)]"
|
||||
desc="Units of SQL Server Cluster services having hostname and image names assigned but without instances">
|
||||
<report entity="unit">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
@ -68,7 +68,7 @@
|
||||
<failure>
|
||||
<report entity="unit" level="error">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
<parameter name="text">Unable to assign address pair and open SQL ports on instance <select path="state.hostname"/> (<select path="name"/>) due to <select source="exception" path="message" default="unknown Heat error"/> </parameter>
|
||||
<parameter name="text">Unable to assign address pair and open SQL ports on instance <select path="state.hostname"/> (<select path="name"/>) due to <format-error error="exception"/></parameter>
|
||||
</report>
|
||||
<stop/>
|
||||
</failure>
|
||||
|
@ -7,7 +7,7 @@
|
||||
<mute/>
|
||||
</rule>
|
||||
|
||||
<rule match="$.services[?(@.type == 'msSqlServer' and @.osImage.name)].units[?(@.state.hostname and not @.temp.instanceName)]"
|
||||
<rule match="$[?(@.networking.state.ready_for_cf)].services[?(@.type == 'msSqlServer' and @.osImage.name)].units[?(@.state.hostname and not @.temp.instanceName)]"
|
||||
desc="Units of SQL Server services having hostname and image names assigned but without instances">
|
||||
<report entity="unit">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
@ -66,7 +66,7 @@
|
||||
<failure>
|
||||
<report entity="unit" level="error">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
<parameter name="text">Unable to open SQL ports on instance <select path="state.hostname"/> (<select path="name"/>) due to <select source="exception" path="message" default="unknown Heat error"/> </parameter>
|
||||
<parameter name="text">Unable to open SQL ports on instance <select path="state.hostname"/> (<select path="name"/>) due to <format-error error="exception"/></parameter>
|
||||
</report>
|
||||
<stop/>
|
||||
</failure>
|
||||
|
241
muranorepository/Services/workflows/Networking.xml
Normal file
241
muranorepository/Services/workflows/Networking.xml
Normal file
@ -0,0 +1,241 @@
|
||||
<workflow>
|
||||
<rule match="$[?(not @.deleted)]" desc="Need to configure networking for non-deleted environments">
|
||||
<unmute/>
|
||||
|
||||
<rule match="$[?(not @.networking.topology)]"
|
||||
desc="Network topology unknown">
|
||||
<set path="networking.topology"><get-net-topology/></set>
|
||||
</rule>
|
||||
|
||||
<rule match="$[?(@.networking.topology == 'routed' and not @.networking.routerId)]"
|
||||
desc="Router-based topology, need to detect router">
|
||||
<get-default-router-id result="result">
|
||||
<success>
|
||||
<set path="networking.routerId"><select source="result" path="routerId"/></set>
|
||||
<set path="networking.state.ready_for_cidrs"><true/></set>
|
||||
<set path="networking.createNetwork"><true/></set>
|
||||
</success>
|
||||
</get-default-router-id>
|
||||
</rule>
|
||||
|
||||
<rule match="$[?(@.networking.topology == 'flat' and not @.networking.networks)]"
|
||||
desc="Flat-network topology, need to detect external network">
|
||||
<get-default-network-id result="result">
|
||||
<success>
|
||||
<set path="networking.networks">
|
||||
<list>
|
||||
<map>
|
||||
<mapping name="id"><uuid/></mapping>
|
||||
<mapping name="networkId"><select source="result" path="networkId"/></mapping>
|
||||
<mapping name="createSubnet"><false/></mapping>
|
||||
</map>
|
||||
</list>
|
||||
</set>
|
||||
<set path="networking.createNetwork"><true/></set>
|
||||
<set path="networking.state.ready_for_cidrs"><true/></set>
|
||||
</success>
|
||||
</get-default-network-id>
|
||||
</rule>
|
||||
|
||||
|
||||
<rule match="$[?(@.networking.topology == 'manual' and not @.networking.state.ready_for_cidrs)]"
|
||||
desc="No topology queries required, ready to query cidrs">
|
||||
<set path="networking.state.ready_for_cidrs"><true/></set>
|
||||
</rule>
|
||||
|
||||
|
||||
<rule match="$[?(@.networking.createNetwork and not @.networking.cidr and @.networking.state.ready_for_cidrs)]"
|
||||
desc="Need to find cidr for network-to-be-generated">
|
||||
<get-cidr result="cidr">
|
||||
<parameter name="routerId"><select path="/networking.routerId"/></parameter>
|
||||
<success>
|
||||
<set path="networking.cidr"><select source="cidr" path="cidr"/></set>
|
||||
</success>
|
||||
</get-cidr>
|
||||
</rule>
|
||||
|
||||
<rule match="$[?(@.networking.state.ready_for_cidrs)].networking.networks[?(@.createSubnet and not @.cidr)]"
|
||||
desc="Need to find cidr for network-to-join">
|
||||
<get-cidr result="cidr">
|
||||
<parameter name="routerId"><select path="/networking.routerId"/></parameter>
|
||||
<success>
|
||||
<set path="cidr"><select source="cidr" path="cidr"/></set>
|
||||
</success>
|
||||
</get-cidr>
|
||||
</rule>
|
||||
|
||||
<rule match="$[?(@.networking.state.ready_for_cidrs)]">
|
||||
<rule match="$[?(@.networking.createNetwork and not @.networking.cidr)]"
|
||||
desc="No more cidr config required for new networks">
|
||||
<empty>
|
||||
<set path="networking.state.new_net_cidr_done"><true/></set>
|
||||
<mute/>
|
||||
</empty>
|
||||
</rule>
|
||||
</rule>
|
||||
|
||||
<rule match="$[?(@.networking.state.ready_for_cidrs)]">
|
||||
<rule match="$.networking.networks[?(@.createSubnet and not @.cidr)]"
|
||||
desc="No more cidr config required for joined networks">
|
||||
<empty>
|
||||
<set path="networking.state.join_net_cidr_done"><true/></set>
|
||||
<mute/>
|
||||
</empty>
|
||||
</rule>
|
||||
</rule>
|
||||
|
||||
<rule match="$[?(@.networking.state.new_net_cidr_done and @.networking.state.join_net_cidr_done)]">
|
||||
<set path="networking.state.ready_for_cf"><true/></set>
|
||||
<mute/>
|
||||
</rule>
|
||||
|
||||
|
||||
<rule match="$[?(@.networking.createNetwork and not @.temp.networkCreated and @.networking.state.ready_for_cf)]"
|
||||
desc="Requested to Create a Network">
|
||||
<update-cf-stack template="Network">
|
||||
<parameter name="mappings">
|
||||
<map>
|
||||
<mapping name="networkName">network-<select path="/id"/></mapping>
|
||||
</map>
|
||||
</parameter>
|
||||
<success>
|
||||
<set path="temp.networkCreated"><true/></set>
|
||||
</success>
|
||||
</update-cf-stack>
|
||||
<update-cf-stack template="Subnet">
|
||||
<parameter name="mappings">
|
||||
<map>
|
||||
<mapping name="subnetName">subnet</mapping>
|
||||
<mapping name="networkRef">network</mapping>
|
||||
<mapping name="cidr"><select path="/networking.cidr"/> </mapping>
|
||||
</map>
|
||||
</parameter>
|
||||
<success>
|
||||
<set path="temp.networkCreated"><true/></set>
|
||||
</success>
|
||||
</update-cf-stack>
|
||||
</rule>
|
||||
|
||||
|
||||
<rule match="$[?(@.networking.state.ready_for_cf)].networking.networks[?(not @.temp.networkJoined)]"
|
||||
desc="External Network for joining exists">
|
||||
<update-cf-stack template="Param">
|
||||
<parameter name="mappings">
|
||||
<map>
|
||||
<mapping name="paramName">network-<select path="id"/></mapping>
|
||||
<mapping name="paramValue"><select path="networkId"/></mapping>
|
||||
</map>
|
||||
</parameter>
|
||||
<success>
|
||||
<set path="temp.networkJoined"><true/></set>
|
||||
</success>
|
||||
</update-cf-stack>
|
||||
</rule>
|
||||
|
||||
|
||||
|
||||
<rule match="$[?(@.networking.state.ready_for_cf)].networking.networks[?(@.createSubnet and not @.temp.subnetCreated)]"
|
||||
desc="Need to create a subnet in the joined network">
|
||||
<update-cf-stack template="Subnet">
|
||||
<parameter name="mappings">
|
||||
<map>
|
||||
<mapping name="subnetName">subnet-<select path="id"/></mapping>
|
||||
<mapping name="networkRef">network-<select path="id"/></mapping>
|
||||
<mapping name="cidr"><select path="cidr"/></mapping>
|
||||
</map>
|
||||
</parameter>
|
||||
<success>
|
||||
<set path="temp.subnetCreated"><true/></set>
|
||||
</success>
|
||||
</update-cf-stack>
|
||||
</rule>
|
||||
|
||||
|
||||
<rule match="$[?(not @.temp.subnetRouterId and @.networking.routerId and @.networking.createNetwork and @.networking.state.ready_for_cf)]"
|
||||
desc="Need to connect subnet of new network to router">
|
||||
<update-cf-stack template="RouterInterface" result="outputs" error="exception">
|
||||
<parameter name="mappings">
|
||||
<map>
|
||||
<mapping name="routerId"><select path="/networking.routerId"/></mapping>
|
||||
<mapping name="interfaceName"><select path="id"/></mapping>
|
||||
<mapping name="subnet">subnet</mapping>
|
||||
</map>
|
||||
</parameter>
|
||||
<success>
|
||||
<set path="temp.subnetRouterId"><select path="/networking.routerId"/> </set>
|
||||
<mute/>
|
||||
</success>
|
||||
</update-cf-stack>
|
||||
</rule>
|
||||
|
||||
<rule match="$[?(@.networking.routerId and @.networking.state.ready_for_cf)].networking.networks[?(@.createSubnet and not @.temp.subnetRouterId)]"
|
||||
desc="Need to connect newly-created subnet of a new network to a router">
|
||||
<update-cf-stack template="RouterInterface">
|
||||
<parameter name="mappings">
|
||||
<map>
|
||||
<mapping name="routerId"><select path="/networking.routerId"/></mapping>
|
||||
<mapping name="interfaceName">new</mapping>
|
||||
<mapping name="subnet">subnet-<select path="id"/></mapping>
|
||||
</map>
|
||||
</parameter>
|
||||
<success>
|
||||
<set path="temp.subnetRouterId"><select path="/networking.routerId"/> </set>
|
||||
<mute/>
|
||||
</success>
|
||||
</update-cf-stack>
|
||||
</rule>
|
||||
|
||||
<rule match="$[?(@.networking.createNetwork and @.networking.state.ready_for_cf)]">
|
||||
<rule match="$.services[*].units[?(@.state.hostname and not @.temp.instanceName)]"
|
||||
desc="Units to be created requiring ports in new network">
|
||||
<update-cf-stack template="InstancePortWSubnet">
|
||||
<parameter name="mappings">
|
||||
<map>
|
||||
<mapping name="instanceName"><select path="state.hostname"/></mapping>
|
||||
<mapping name="instancePort">port-<select path="state.hostname"/></mapping>
|
||||
<mapping name="network">network</mapping>
|
||||
<mapping name="subnet">subnet</mapping>
|
||||
</map>
|
||||
</parameter>
|
||||
</update-cf-stack>
|
||||
</rule>
|
||||
</rule>
|
||||
|
||||
<rule match="$[?(@.networking.state.ready_for_cf)].networking.networks[?(@.createSubnet)]">
|
||||
<set path="#network">
|
||||
<select/>
|
||||
</set>
|
||||
<rule desc="Units to be created requiring ports in joined network with subnet">
|
||||
<parameter name="match">/$.services[*].units[?(@.state.hostname and not @.temp.instanceName)]</parameter>
|
||||
<update-cf-stack template="InstancePortWSubnet">
|
||||
<parameter name="mappings">
|
||||
<map>
|
||||
<mapping name="instanceName"><select path="state.hostname"/></mapping>
|
||||
<mapping name="instancePort">network-port-<select path="state.hostname"/></mapping>
|
||||
<mapping name="network">network-<select source="network" path="id"/> </mapping>
|
||||
<mapping name="subnet">network-<select source="network" path="id"/></mapping>
|
||||
</map>
|
||||
</parameter>
|
||||
</update-cf-stack>
|
||||
</rule>
|
||||
</rule>
|
||||
|
||||
<rule match="$[?(@.networking.state.ready_for_cf)].networking.networks[?(not @.createSubnet)]">
|
||||
<set path="#network">
|
||||
<select/>
|
||||
</set>
|
||||
<rule desc="Units to be created requiring ports in joined network without subnet">
|
||||
<parameter name="match">/$.services[*].units[?(@.state.hostname and not @.temp.instanceName)]</parameter>
|
||||
<update-cf-stack template="InstancePort">
|
||||
<parameter name="mappings">
|
||||
<map>
|
||||
<mapping name="instanceName"><select path="state.hostname"/></mapping>
|
||||
<mapping name="instancePort">join-<select source="network" path="id"/>-port-<select path="state.hostname"/></mapping>
|
||||
<mapping name="network">network-<select source="network" path="id"/> </mapping>
|
||||
</map>
|
||||
</parameter>
|
||||
</update-cf-stack>
|
||||
</rule>
|
||||
</rule>
|
||||
</rule>
|
||||
</workflow>
|
@ -7,7 +7,7 @@
|
||||
<mute/>
|
||||
</rule>
|
||||
|
||||
<rule match="$.services[?(@.type in ('webServer', 'aspNetApp', 'webServerFarm', 'aspNetAppFarm') and @.osImage.name)].units[?(@.state.hostname and not @.temp.instanceName)]"
|
||||
<rule match="$[?(@.networking.state.ready_for_cf)].services[?(@.type in ('webServer', 'aspNetApp', 'webServerFarm', 'aspNetAppFarm') and @.osImage.name)].units[?(@.state.hostname and not @.temp.instanceName)]"
|
||||
desc="Units of web services having hostname and image names assigned but without instances">
|
||||
<report entity="unit">
|
||||
<parameter name="id"><select path="id"/></parameter>
|
||||
@ -18,7 +18,6 @@
|
||||
<map>
|
||||
<mapping name="instanceName"><select path="state.hostname"/></mapping>
|
||||
<mapping name="instancePort">port-<select path="state.hostname"/></mapping>
|
||||
<mapping name="networkName">network-<select path="/id"/></mapping>
|
||||
<mapping name="userData">
|
||||
<prepare-user-data>
|
||||
<parameter name="hostname"><select path="state.hostname"/></parameter>
|
||||
@ -48,7 +47,7 @@
|
||||
</update-cf-stack>
|
||||
</rule>
|
||||
|
||||
<rule match="$.services[?(@.type in ('webServerFarm', 'aspNetAppFarm'))].units[?(@.state.hostname and not @.temp.registeredWithLB)]"
|
||||
<rule match="$[?(@.networking.state.ready_for_cf)].services[?(@.type in ('webServerFarm', 'aspNetAppFarm'))].units[?(@.state.hostname and not @.temp.registeredWithLB)]"
|
||||
desc="Units of web-farms services which have a hostname assigned but are not registered with LB">
|
||||
<update-cf-stack template="LoadBalancer" result="outputs" error="exception">
|
||||
<parameter name="mappings">
|
||||
|
Loading…
x
Reference in New Issue
Block a user