OpenStack OpenStack Orchestration (Heat) 1 — Questions and Answers
Question 1: What file format does OpenStack Heat use to define infrastructure templates?
- YAML or JSON (Correct answer)
- XML only
- INI format
- TOML format
Correct answer: YAML or JSON
Heat Orchestration Templates (HOT) support both YAML and JSON formats, with YAML being the most commonly used.
Question 2: What is the top-level key required in every Heat Orchestration Template (HOT)?
- heat_template_version (Correct answer)
- template_version
- openstack_version
- stack_version
Correct answer: heat_template_version
Every HOT file must begin with the 'heat_template_version' key, which indicates the HOT version being used.
Question 3: In OpenStack Heat, what is a 'stack'?
- A collection of OpenStack resources created and managed as a single unit (Correct answer)
- A single VM instance
- A network subnet
- A group of users in Keystone
Correct answer: A collection of OpenStack resources created and managed as a single unit
A Heat stack is a set of OpenStack resources (VMs, networks, volumes, etc.) that are created, updated, and deleted together as one deployable unit.
Question 4: Which Heat resource type is used to create a Nova compute instance?
- OS::Nova::Server (Correct answer)
- OS::Compute::Instance
- OS::Nova::Instance
- OS::Heat::Server
Correct answer: OS::Nova::Server
OS::Nova::Server is the Heat resource type used to provision a Nova compute instance within a template.
Question 5: What is the purpose of the 'parameters' section in a Heat template?
- To define user-supplied inputs that customize the stack at launch time (Correct answer)
- To list all resources in the stack
- To define output values from the stack
- To specify the Heat API endpoint
Correct answer: To define user-supplied inputs that customize the stack at launch time
The 'parameters' section allows template authors to define inputs that users provide when creating a stack, making templates reusable.
Question 6: Which Heat function is used to reference another resource within the same template?
- get_resource (Correct answer)
- get_attr
- get_param
- ref_resource
Correct answer: get_resource
'get_resource' is the intrinsic function used to reference another resource defined within the same Heat template.
Question 7: What does the Heat 'outputs' section provide?
- Values returned to the user after a stack is created, such as IP addresses or URLs (Correct answer)
- Error messages from failed deployments
- Log files from compute instances
- A list of all available resource types
Correct answer: Values returned to the user after a stack is created, such as IP addresses or URLs
The 'outputs' section defines values Heat exposes to the user after stack creation, such as instance IP addresses or endpoints.
What file format does OpenStack Heat use to define infrastructure templates?