When a Cloud Assembly blueprint is deployed, one component might need to follow another.

What are Dependencies

When designing blueprints, understand how components are interrelated. Add dependencies so that deployment executes in the correct order.

  • Explicit Dependency

    A blueprint component needs information from another before it can finish the provisioning process. 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.

  • Implicit Dependency

    A blueprint component property needs a property value from another component. 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 dependsOn property 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 dependsOn property.

Example of an Explicit Blueprint Dependency

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.

Example of an Explicit Blueprint Dependency