OpenStack OpenStack Orchestration (Heat) 2 — Questions and Answers
Question 1: Which OpenStack CLI command is used to create a new Heat stack from a template file?
- openstack stack create (Correct answer)
- heat stack-create
- openstack heat create
- openstack template deploy
Correct answer: openstack stack create
The 'openstack stack create' command is the current unified CLI command for creating a Heat stack from a template.
Question 2: What is the purpose of the 'get_attr' intrinsic function in Heat?
- To retrieve an attribute value from a resource defined in the template (Correct answer)
- To get a parameter value from the parameters section
- To fetch an environment variable from the OS
- To retrieve a resource's UUID only
Correct answer: To retrieve an attribute value from a resource defined in the template
'get_attr' retrieves a specific attribute (e.g., IP address, port) from a resource defined within the same Heat template.
Question 3: What is a Heat environment file used for?
- To override template parameters and resource registry mappings without modifying the template (Correct answer)
- To store Heat API credentials
- To define new resource types
- To configure the Heat engine service
Correct answer: To override template parameters and resource registry mappings without modifying the template
A Heat environment file allows operators to supply parameter values and resource registry overrides externally, keeping templates clean and reusable.
Question 4: Which Heat resource type is used to create an auto-scaling group?
- OS::Heat::AutoScalingGroup (Correct answer)
- OS::Nova::AutoScale
- OS::Heat::ScalingPolicy
- OS::Compute::ScalingGroup
Correct answer: OS::Heat::AutoScalingGroup
OS::Heat::AutoScalingGroup is the resource type used to define a collection of identical resources that can scale in or out.
Question 5: In a Heat template, what does 'depends_on' accomplish?
- Explicitly defines the creation order between resources that Heat cannot automatically determine (Correct answer)
- Lists the Python packages a resource depends on
- Specifies which OpenStack services must be running
- Defines resource quotas for the stack
Correct answer: Explicitly defines the creation order between resources that Heat cannot automatically determine
'depends_on' lets you explicitly state that one resource must be created before another, overriding Heat's automatic dependency resolution.
Question 6: What command checks the current status and events of a deployed Heat stack?
- openstack stack show (Correct answer)
- openstack stack list
- openstack stack status
- heat stack-info
Correct answer: openstack stack show
'openstack stack show' displays detailed information including the current status, creation time, and parameters of a specific stack.
Question 7: Which OpenStack Heat component is responsible for executing template resource operations?
- heat-engine (Correct answer)
- heat-api
- heat-conductor
- heat-scheduler
Correct answer: heat-engine
heat-engine is the core service that processes templates, manages resource lifecycles, and orchestrates calls to other OpenStack services.
Which OpenStack CLI command is used to create a new Heat stack from a template file?