COA OpenStack Heat & Orchestration 2 — Questions and Answers
Question 1: What is a Heat environment file used for?
- Setting OS-level environment variables on compute instances
- Overriding template parameters and resource registrations without modifying the template (Correct answer)
- Configuring the Heat API service endpoints
- Defining the OpenStack region for stack deployment
Correct answer: Overriding template parameters and resource registrations without modifying the template
Environment files allow operators to provide parameter defaults, override values, and register custom resource types without altering the original template.
Question 2: Which intrinsic function in HOT is used to reference the value of a parameter defined in the same template?
- get_resource
- get_attr
- get_param (Correct answer)
- str_replace
Correct answer: get_param
The 'get_param' intrinsic function retrieves the value of a parameter defined in the 'parameters' section of the template.
Question 3: What does the 'get_resource' intrinsic function return in a HOT template?
- The UUID or name identifier of a resource defined in the template (Correct answer)
- The current status of a resource being created
- An attribute value from a resource in a different stack
- The resource quota remaining in the current project
Correct answer: The UUID or name identifier of a resource defined in the template
The 'get_resource' function returns the ID (UUID or name) of a resource defined in the same template's 'resources' section, enabling resource interdependencies.
Question 4: Which command lists all stacks in the current project along with their status?
- openstack stack show
- openstack stack list (Correct answer)
- openstack heat list
- openstack resource list
Correct answer: openstack stack list
The 'openstack stack list' command displays all stacks accessible in the current project, showing their names, IDs, and statuses.
Question 5: What happens to resources in a Heat stack when the stack is deleted?
- Resources are moved to a suspended state and retained for 30 days
- All resources defined in the stack are deleted by default (Correct answer)
- Resources are preserved but removed from Heat management
- Deletion only removes the stack record; resources remain running
Correct answer: All resources defined in the stack are deleted by default
Deleting a Heat stack triggers deletion of all resources it manages, making Heat stacks the atomic unit of lifecycle management.
Question 6: What is a 'nested stack' in Heat orchestration?
- A stack deployed inside a virtual machine
- A stack referenced as a resource within another template, enabling modular design (Correct answer)
- Multiple stacks sharing the same network resources
- A stack created automatically by Heat autoscaling
Correct answer: A stack referenced as a resource within another template, enabling modular design
Nested stacks allow a template to reference another template as a resource type, enabling modular, reusable infrastructure components.
Question 7: Which Heat resource type is used to create an OpenStack Nova compute instance?
- OS::Nova::Instance
- OS::Nova::Server (Correct answer)
- OS::Compute::VM
- OS::Nova::Compute
Correct answer: OS::Nova::Server
The resource type 'OS::Nova::Server' is the correct Heat resource type for creating a compute instance managed by OpenStack Nova.
What is a Heat environment file used for?