You use a provision task to provision machines. You can register a vRealize Automation 6.x or 7.x instance with vRealize Code Stream to provision infrastructure in a specific environment.

About this task

vRealize Code Stream can also start multiple vRealize Automation instances. You can create machines from a single machine blueprint for a provision task. The task output is an array of machines.

Prerequisites

  • Verify that the vRealize Automation server endpoint is registered. See the Installation and Configuration guide.

  • Verify that you completed the following tasks in vRealize Automation 6.2.x or 7.x to add an endpoint in vRealize Code Stream.

    • Choosing an Endpoint Scenario see IaaS Configuration for Virtual Platforms.

    • Create a Fabric Group see IaaS Configuration for Virtual Platforms.

    • Create a Business Group see IaaS Configuration for Virtual Platforms.

    • Create a Reservation see IaaS Configuration for Virtual Platforms.

    • Create a Reservation Policy see IaaS Configuration for Physical Machines.

    • Create a Network Profile see IaaS Integration for Multi-Machine Services.

    • Create a Blueprint see IaaS Configuration for Virtual Platforms.

    • Publish a Blueprint see IaaS Configuration for Virtual Platforms.

  • Verify that the vRealize Automation catalog item is assigned to a service.

    The service must be added to the entitlement for the Business group proxy user.

Procedure

  1. Click the Code Stream tab.
  2. On the Pipelines tab, select an existing pipeline and click Edit to configure it.
  3. Click the Stages > button.
  4. Click Add Task.
  5. Select vRealize Automation 6 from the Provider drop-down menu.
  6. Select the vRealize Automation server endpoint you registered.
  7. Enter a name for the provision task and click OK.
  8. Select the new task in the stage.
  9. Confirm to save the pipeline.
  10. Select an Execute Task for the release pipeline.

    Option

    Description

    Always

    Runs the release pipeline task without conditions.

    On Condition(s)

    Runs the release pipeline task only if the defined condition is evaluated as true. If the condition is false, the task is skipped.

    A boolean expression using the following operands and operators is supported.

    • Pipeline variables such as, ${pipeline.variableName}. Curly brackets are reserved for specifying pipeline variables.

    • Task output variables such as, ${Stage1.task1.machines[0].value.hostIp[0]}

    • Default pipeline binding variables such as, ${releasePipelineName}

    • Case insensitive Boolean values such as, true, false, 'true', 'false'

    • Integer or decimal values without quotes

    • String values used with single or double quotes such as, "test", 'test'

    • String and Numeric types of values such as, == Equals and != Not Equals

    • Relational operators such as, > , >=, <, and <=

    • Boolean logic such as, && and ||

    • Arithmetic operators such as, +, -, *, and /

    • Nested expressions using round brackets

    • Strings with literal value ABCD is evaluated as false and the task is skipped.

    Unary operators are not supported.

    A sample condition, ${Stage1.task1.output} == “Passed” || ${pipeline.variableName} == 39

  11. (Optional) : Select the Continue Pipeline execution even if this task fails option.

    This option allows the release pipeline to bypass the failed task and continue with the execution process.

  12. Select the endpoint from the Endpoint drop-down menu.
  13. Select the published vRealize Automation blueprint from the Blueprint drop-down menu.
  14. Enter the machine properties.

    Option

    Description

    Number of Machines

    Enter the number of machines to be provisioned and the configuration details. This property allows variable binding.

    Lease (Days) and other machine details

    Enter the Lease (Days), Number of CPUs, Memory, Storage values, and Description.

    Note:

    An existing machine blueprint configuration can overwrite the values specified here.

    Owner

    Select Logged In User to allow the user currently logged in to run the release pipeline.

    Select Enter Owner or Bind to allow a different user to log in, configure the machine, and provision it when the release pipeline is run. You must enter the login credential information of that user.

  15. (Optional) : Select to share the machine output information with other tasks during the release pipeline execution.

    This output contains details of the machines successfully provisioned by this task. You can use this variable in succeeding tasks to retrieve the machine details.

  16. Click Save.

Task Output Format for a vRealize Automation Task

The following task output format is an example for a provisioning task.

[
    {
        "name": "vcac-prov01",
        "value": {
            "memory": 1024,
            "machineId": "f9ee3f71-c5d0-4138-9520-24e15e376d13",
            "hostIp": ["10.72.12.56"],
            "cpu": 1,
            "endLease": 1410478627000,
            "storageSize": 4,
            "startLease": 1410392227000,
            "blueprintId":" f9ee3f71-c5d0-4138-3476-24e15e376f36",
            "provider":"iaas-service"
        },
        "type": "MACHINE"
    }
]