This command provisions a blueprint to the cloud along with the parameters in the submitted JSON string.
Request
PUT http://{hostname}:{port}
/landscaper/rest/blueprint/{blueprintId}/deploy
Accept: application/json
Content-Type: application/json
Table 1. URL parametersParameter |
Type |
Required |
Description |
blueprintId |
string |
true |
Name or ID of the blueprint |
This command takes a JSON request string or file. Use the following template for
the request:
{
"configuration": "Configuration name (Optional)",
"environmentName": "Environment name",
"configurationLocation":"Complete location of the configuration file (Optional)",
"cloudProjectId":"ID of the cloud project",
"parameters": {"name": "value (Optional - repeat as
necessary"},
"teamMappings": "Array of team ids (Optional)",
"validate": "Boolean - whether or not to validate the
data (Optional - default is false)"
}
Example
curl -u jsmith:passwd
http://myserver.example.com:8080/landscaper/rest/blueprint/MyBlueprint/
deploy
-H 'Content-Type: application/json'
-H "Location: /landscaper/orion/file/jsmith_8a6bfff7_2c77_45db_a235_adda61ad6653-OrionContent/myTeam/myBlueprint/myBlueprint.yml"
-d @deployBlueprint.json
-X PUT
Note: To specify a region for the environment, include the region in the
X-Region-Name header parameter, as in this
example:
curl -u jsmith:passwd
http://myserver.example.com:8080/landscaper/rest/blueprint/MyBlueprint/
deploy
-H 'Content-Type: application/json'
-H "Location: /landscaper/orion/file/jsmith_8a6bfff7_2c77_45db_a235_adda61ad6653-OrionContent/myTeam/myBlueprint/myBlueprint.yml"
-H 'X-Region-Name: MyCloudRegion'
-d @deployBlueprint.json
-X PUT
Example JSON request
{
"environmentName": "myNewEnvironment1",
"configuration": "myConfigFile",
"cloudProjectId":"3d16879f-7b43-4909-9862-12767dad7f04",
"configurationLocation":"/landscaper/orion/file/jsmith_00000000_2-OrionContent/default/configurations/myConfigFile.yml",
"parameters": {
"availability_zone" : "nova",
"flavor" : "m1.tiny",
"key_name" : "myKey",
"ucd_password":"cc99a431-d96c-4154-99d6-1a5532275015",
"ucd_relay_url":"None",
"ucd_server_url":"http://ucd.example.com:9080",
"ucd_user":"PasswordIsAuthToken"
},
"teamMappings":[],
"validate": "true"
}
Example response
{
"id": "08df12323-fb35-4d63-8937-d78ea3c5efcb",
"links": [
{
"href": "http://ucdp.example.com:8004/v1/1234/stacks/
NewEnvironment/08df1414-aac5-4d63-8937-d78ea3c5efcb",
"rel": "self"
}
]
}