When a Cloud Assembly blueprint is deployed, the components might need deploy in a particular order. When you set the execution order, the order is based on implicit or explicit dependencies between components.
Deciding on a Dependency Type
As part of your blueprint design process, you must consider the component execution order. To set the order, determine which type of dependency to use.
If one of your blueprint components needs information from another to finish the provisioning process, you create an explicit dependency. This type of dependency controls the build order at deployment time or for scale in or scale out actions. For example, your database server must be deployed before your application server.
If your blueprint has a component property that needs a property value from another component, you create an implicit dependency. This type of dependency is a property binding. A binding controls the build order by not building the component that contains the dependent property until the component on which it is dependent is deployed and the property is available. For example, your BackupServer component needs the operating system image of the DatabaseServer component, so the DatabaseServer must exist before the BackupServer is provisioned.
How Do I Set Dependencies
You can create the explicit dependencies using the design canvas or by adding dependsOn properties in the YAML editor. Implicit dependencies are set only in the YAML editor.
Use one of the following methods to create an explicit dependency.
To create an explicit dependency on the canvas, you begin with the dependent component and connect it to the component it is depending on.
To create an explicit dependency in the YAML editor, you add a
dependsOnproperty to the dependent component that specifies the component it is depending on.
An explicit dependency appears on the canvas as a solid arrow, where the ApplicationServer is not provisioned until DatabaseServer is provisioned. The dependency appears in the YAML as a
Use the following method to create an implicit dependency.
To create an implicit dependency as a property binding, you add a property binding in the dependent component property that specifies the property value needed from the component that it is depending on.
An implicit dependency appears on the canvas as a dashed line arrow, were the backup is not provisioned until the webTier is provisioned and acquired an address from the network.