Merge "Two-phase Instance deployment support"
This commit is contained in:
commit
a1757cab29
@ -103,7 +103,7 @@ Methods:
|
|||||||
Body:
|
Body:
|
||||||
$.sharedIps: $ips
|
$.sharedIps: $ips
|
||||||
|
|
||||||
deploy:
|
beginDeploy:
|
||||||
Body:
|
Body:
|
||||||
- $.validateBootSource()
|
- $.validateBootSource()
|
||||||
- $securityGroupName: coalesce(
|
- $securityGroupName: coalesce(
|
||||||
@ -162,6 +162,9 @@ Methods:
|
|||||||
# Any additional template preparation
|
# Any additional template preparation
|
||||||
- $.instanceTemplate: $.prepareStackTemplate($.instanceTemplate)
|
- $.instanceTemplate: $.prepareStackTemplate($.instanceTemplate)
|
||||||
- $.environment.stack.updateTemplate($.instanceTemplate)
|
- $.environment.stack.updateTemplate($.instanceTemplate)
|
||||||
|
|
||||||
|
endDeploy:
|
||||||
|
Body:
|
||||||
- $.environment.stack.push()
|
- $.environment.stack.push()
|
||||||
- $outputs: $.environment.stack.output()
|
- $outputs: $.environment.stack.output()
|
||||||
- $.ipAddresses: $outputs.get(format('{0}-assigned-ips', $this.name)).values().flatten().distinct()
|
- $.ipAddresses: $outputs.get(format('{0}-assigned-ips', $this.name)).values().flatten().distinct()
|
||||||
@ -173,6 +176,11 @@ Methods:
|
|||||||
Then: $.setAttr(fipAssigned, true)
|
Then: $.setAttr(fipAssigned, true)
|
||||||
- $.environment.instanceNotifier.trackCloudInstance($this)
|
- $.environment.instanceNotifier.trackCloudInstance($this)
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
Body:
|
||||||
|
- $this.beginDeploy()
|
||||||
|
- $this.endDeploy()
|
||||||
|
|
||||||
detectPrimaryNetwork:
|
detectPrimaryNetwork:
|
||||||
Body:
|
Body:
|
||||||
- $._primaryNetwork: null
|
- $._primaryNetwork: null
|
||||||
@ -283,7 +291,7 @@ Methods:
|
|||||||
device_type: $blockDevice.deviceType
|
device_type: $blockDevice.deviceType
|
||||||
boot_index: $blockDevice.bootIndex
|
boot_index: $blockDevice.bootIndex
|
||||||
|
|
||||||
releaseResources:
|
beginReleaseResources:
|
||||||
Body:
|
Body:
|
||||||
- $template: $.environment.stack.current()
|
- $template: $.environment.stack.current()
|
||||||
- If: bool($template.resources) and bool($template.outputs)
|
- If: bool($template.resources) and bool($template.outputs)
|
||||||
@ -301,6 +309,12 @@ Methods:
|
|||||||
- $template.outputs: $template.outputs.deleteAll($outputsToDelete)
|
- $template.outputs: $template.outputs.deleteAll($outputsToDelete)
|
||||||
|
|
||||||
- $.environment.stack.setTemplate($template)
|
- $.environment.stack.setTemplate($template)
|
||||||
|
|
||||||
|
endReleaseResources:
|
||||||
|
Body:
|
||||||
|
- $template: $.environment.stack.current()
|
||||||
|
- If: bool($template.resources) and bool($template.outputs)
|
||||||
|
Then:
|
||||||
- $.environment.stack.push()
|
- $.environment.stack.push()
|
||||||
- $.setAttr(instanceResources, [])
|
- $.setAttr(instanceResources, [])
|
||||||
- $.setAttr(instanceOutputs, [])
|
- $.setAttr(instanceOutputs, [])
|
||||||
@ -309,6 +323,11 @@ Methods:
|
|||||||
- $.ipAddresses: []
|
- $.ipAddresses: []
|
||||||
- $.floatingIpAddress: null
|
- $.floatingIpAddress: null
|
||||||
|
|
||||||
|
releaseResources:
|
||||||
|
Body:
|
||||||
|
- $this.beginReleaseResources()
|
||||||
|
- $this.endReleaseResources()
|
||||||
|
|
||||||
validateBootSource:
|
validateBootSource:
|
||||||
Body:
|
Body:
|
||||||
- If: $.image = null and len($.blockDevices) = 0
|
- If: $.image = null and len($.blockDevices) = 0
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- >
|
||||||
|
Instance.deploy() can now be split into two phases: beginDeploy() and
|
||||||
|
endDeploy(). This allows the application developer to provision multiple
|
||||||
|
instances at once without the need to push the stack for each instance.
|
Loading…
Reference in New Issue
Block a user