Sample Template
The Cloud provides some commonly used sample templates for you to quickly create resource stacks in CloudFormation.
Supported operations on sample template are as follows:
- Get the details of a sample template
- Generate a resource stack by using a sample template
Get the Details of a Sample Template
In the navigation pane of the ZStack Private Cloud UI, choose . On the Sample Template page, select a sample
template and expand its details page. You can get the details of the sample
template, including basic attributes, stack template content, and audit.
- Basic attributes: Displays the current status, name, description, UUID, and
md5sum of the sample template.
Note: The sample template remains enabled and
cannot be modified. - Stack template content: Displays the details of the template.
Note: For more
information about the template syntax, see the
Stack Template Syntax topic. - Audit: Checks related operations about the template.
Generate a Resource Stack by Using a Sample Template
On the Sample Template page, select a sample template and click . Then, the Generate Resource Stack page is displayed.
To create a resource stack by using a sample template, follow the steps below:
- Configure the following parameters:
- Zone: The current zone is automatically displayed.
- Name: Enter a name for the resource stack.
- Description: Optional. Enter a description for the resource stack.
- Timeout: Specify the timeout during the resource stack creation. If the timeout period expires before the resource stack creation completes, CloudFormation marks the resource stack as failed. The timeout is 60 minutes by default.
- Rollback on failure: Specify whether to roll back the resource stack if the creation fails. The checkbox is selected by default.
- Choose a stack template: The selected template is automatically displayed.
- Specify each parameter according to the needed stack resource. Different
parameters are specified according to different types of resource stacks.
The following is an example of creating a resource stack by using the selected sample template (ZStack.System.v1.EIP) above. CloudFormation will automatically create an EIP and attach it to a VM instance. Configure the following parameters:
- Instance Offering: Select the instance offering for VM instance creation.
- Image: Select the image for VM instance creation.
- Private IP: Select the private network for VM instance creation.
- Public IP: Select the public network for VIP provision. The EIP service can be provided by a VIP.
As shown in Figure 2. Click OK. Then, the resource stack creation starts.Figure 2. Create resource stack 2 
Note:
- Before the resource stack creation starts, you can click Preview to check the resource list to be created.
- It will take some time to create a resource stack. Please wait for the completion.
