Version and Release a Blueprint to a vRealize Automation Service Broker Catalog
After creating a blueprint, you version and release your blueprint using a POST request. The request body includes the ID of an existing blueprint and the number of the version to release.
By versioning and releasing the
blueprint, you mark a blueprint version as ready to be consumed by vRealize Automation Service
Broker. To show the released
blueprint in vRealize Automation Service
Broker,
you must have a catalog source.
Prerequisites
- Verify that all general prerequisites have been satisfied. See Prerequisites for Working with Blueprints.
- Verify that you have the blueprint ID for the blueprint you want to version and release. See Create and Update a Blueprint.
- Verify that you know the version of the blueprint that you want to create and release to the catalog.
Procedure
Example: Version and Release a Blueprint
Release version 5 of your blueprint with ID 1f170637-81a3-4257-b1cd-b2219ee8034c.
Assign variables.
$ url='https://appliance.domain.com' $ api_version='2019-09-12' $ blueprint_id='1f170637-81a3-4257-b1cd-b2219ee8034c' $ blueprint_version='v5'
Version the blueprint without releasing it.
$ curl -X POST \ $url/blueprint/api/blueprints/$blueprint_id/versions?apiVersion=$api_version \ -H "Authorization: Bearer $access_token" \ -H 'Content-Type: application/json' \ -d '{ "changeLog": "Creating a version '"$blueprint_version"'", "description": "Creating a version from the current draft", "release": false, "version": "'"$blueprint_version"'" }' | jq "."
Release the blueprint.
$ curl -X POST \ $url/blueprint/api/blueprints/$blueprint_id/versions/$blueprint_version/actions/release?apiVersion=$api_version \ -H "Authorization: Bearer $access_token" \ -H 'Content-Type: application/json' | jq "."
A snippet of the response shows the new blueprint version with a RELEASED status.
... "blueprintId": "1f170637-81a3-4257-b1cd-b2219ee8034c", "name": "MyExampleBlueprint", "description": "Basic Cloud Machine blueprint", "version": "v5", "tags": [], "content": "formatVersion: 1\ninputs:\n flavor:\n type: string\n title: Flavor\n description: Flavor Mapping Name\n image:\n type: string\n title: Image\n description: Image Mapping Name\n count:\n type: integer\n minimum: 1\n default: 1\n maximum: 2\n title: Number of Instances\nresources:\n BasicCloudMachine:\n type: Cloud.Machine\n properties:\n name: BasicCloudMachine\n flavor: '${input.flavor}' \n image: '${input.image}'\n count: '${input.count}'\n tags: [\n {\n \"key\": \"env\",\n \"value\": \"prod\"\n }\n ]\n", "status": "RELEASED", "versionDescription": "Creating a version from the current draft", "versionChangeLog": "Creating a version v5", "valid": true }