Module for handling OpenStack Heat calls
New in version 2017.7.0.
heatclient Python module
This module is not usable until the user, password, tenant, and auth URL are specified either in a pillar or in the minion's config file. For example:
keystone.user: admin
keystone.password: verybadpass
keystone.tenant: admin
keystone.insecure: False #(optional)
keystone.auth_url: 'http://127.0.0.1:5000/v2.0/'
# Optional
keystone.region_name: 'RegionOne'
If configuration for multiple OpenStack accounts is required, they can be set up as different configuration profiles: For example:
openstack1:
keystone.user: admin
keystone.password: verybadpass
keystone.tenant: admin
keystone.auth_url: 'http://127.0.0.1:5000/v2.0/'
openstack2:
keystone.user: admin
keystone.password: verybadpass
keystone.tenant: admin
keystone.auth_url: 'http://127.0.0.2:5000/v2.0/'
With this configuration in place, any of the heat functions can make use of a configuration profile by declaring it explicitly. For example:
salt '*' heat.flavor_list profile=openstack1
Create a stack (heat stack-create)
Name of the new stack
File of template
File of environment
Parameter dict used to create the stack
Poll and report events until stack complete
Enable rollback on create failure
Stack creation timeout in minutes
Profile to build on
CLI Example:
salt '*' heat.create_stack name=mystack \
template_file=salt://template.yaml \
environment=salt://environment.yaml \
parameters="{"image": "Debian 8", "flavor": "m1.small"}" \
poll=5 rollback=False timeout=60 profile=openstack1
New in version 2017.7.5,2018.3.1: The spelling mistake in parameter enviroment was corrected to environment. The enviroment spelling mistake has been removed in Salt 3000.
Delete a stack (heat stack-delete)
Name of the stack
Poll and report events until stack complete
Stack creation timeout in minute
Profile to use
CLI Examples:
salt '*' heat.delete_stack name=mystack poll=5 \
profile=openstack1
Return a list of available stack (heat stack-list)
Profile to use
CLI Example:
salt '*' heat.list_stack profile=openstack1
Return details about a specific stack (heat stack-show)
Name of the stack
Profile to use
CLI Example:
salt '*' heat.show_stack name=mystack profile=openstack1
Return template a specific stack (heat stack-template)
Name of the stack
Profile to use
CLI Example:
salt '*' heat.template_stack name=mystack profile=openstack1
Update a stack (heat stack-template)
Name of the stack
File of template
File of environment
Parameter dict used to update the stack
Poll and report events until stack complete
Enable rollback on update failure
Stack creation timeout in minutes
Profile to build on
CLI Example:
salt '*' heat.update_stack name=mystack \
template_file=salt://template.yaml \
environment=salt://environment.yaml \
parameters="{"image": "Debian 8", "flavor": "m1.small"}" \
poll=5 rollback=False timeout=60 profile=openstack1
New in version 2017.7.5,2018.3.1: The spelling mistake in parameter enviroment was corrected to environment. The enviroment spelling mistake has been removed in Salt 3000.