[openstack-dev] Heat SoftwareConfig and SoftwareDevelopment

Steve Baker sbaker at redhat.com
Sun May 18 22:39:48 UTC 2014


On 12/05/14 20:56, LIU Casper A wrote:
>
> Hello dear Heat Developers,
>  
> I am Casper Liu from Alcatel-Lucent. I am doing a project based on
> *Heat(Icehouse)*, and have questions about Heat SoftwareConfig and
> SoftwareDevelopment resources.
>
> Your reply would be highly appreciated!
> We really anticipate your support and help.
>  
> The key point of our project is to execute*"heat stack-update" *to
> update*a stack with a number of VMs*, and this "heat stack-update"
> will trigger a specified script to be executed on a specified VM
> instance(this VM already has the specified script) of the stack, and
> there should be no reboot/rebuild of any VM of the stack. If possible
> we would like to use SoftwareConfig to do this, for it is modularized
> and easy to manage, but cfn tool should also be OK.
>
>
> Takeour projectas example, we have one stack which has 4 VMs (we can
> name them as VM1, VM2, VM3 and VM4), there is an need to let Heat
> template to execute one script(we have coded this Python script.) on
> VM1 when I execute "heat stack-update -f <my_stack_template_file> -p
> <my_param_list>" each time.
> VM1 can be associated with SoftwareConfig and SoftwareDevelopment
> resources.
> VM1 can NOT be rebooted or rebuilt during execution of "heat
> stack-update".
>  
> My question is:
>
>  
>
> (1) Could you advise a solution based on Heat for our project scenario?
>
Assuming you want to configure with shell scripts then this example
would be closest to what you require
http://git.openstack.org/cgit/openstack/heat-templates/tree/hot/software-config/example-templates/example-script-template.yaml

> (2) If a SoftwareDevelopment is set as "UPDATE" in "actions" field of
> template and associated with VM1 and SoftwareConfig and when "heat
> stack-update" happens, can the VM1 execute SoftwareConfig without reboot?
>
Yes, although default is to run on CREATE and UPDATE, which may be what
you need anyway.

Please note that the script is only triggered if something has actually
changed in the configuration since the previous update. We plan to
include the API request-id as a derived input value, which will
guarantee retriggering on UPDATE regardless of whether anything has
changed. In the meantime you might want to specify a unique value in the
deployment input_values from a param passed in to stack-update. This
will ensure re-triggering on every update
>
> (3) If SoftwareConfig can be execute successfully for VM1, then what
> packages/tools should be installed in VM instance?
> Such as hook-script.py (
> http://git.openstack.org/cgit/openstack/heat-templates/tree/hot/software-config/elements/heat-config-script/install.d/hook-script.py(http://git.openstack.org/cgit/opensta...)
> ), is this a must for SoftwareDevelopment?
>
You can build an image with the recommended toolchain with these
instructions:
http://git.openstack.org/cgit/openstack/heat-templates/tree/hot/software-config/elements/README.rst

Please note that you'll need to wait for this fix to be included in a
released os-collect-config before the image will work for heat
software-config:
https://review.openstack.org/#/c/91733/4

> (4) Is my software version(icehouse) proper to support
> SoftwareDevelopment and SoftwareConfig?
>
Yes, although keep an eye out for activity in
http://git.openstack.org/cgit/openstack/heat-templates/tree/hot/software-config
for changes which require a new image to be built.

Also I expect there will be some backports to icehouse for some issues,
so please keep up to date with the latest icehouse release.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140519/29cad858/attachment.html>


More information about the OpenStack-dev mailing list