Ask Your Question

Separate parts of stack - heat

asked 2016-05-07 08:56:36 -0500

matancha gravatar image

Hello. I am looking for the best way of creating a stack, in a number of separate steps.

I would like in the first template, to only get up the compute nodes and the network configuration.

In the second template, I would like to create the storage nodes and attach them to the already existing compute nodes.

What do you think is the best way to do this?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-05-19 15:58:08 -0500

zaneb gravatar image

A lot depends on why you want to do that.

If by 'storage nodes' you mean Cinder volumes, then you can easily create these in a separate template and attach them to the servers using VolumeAttachment resources. You'd just need to pass the server ID(s) as an output from the first stack, and use that as an input to the second stack. This can be a pain when it comes to adding and removing servers later, because the dependency relationship is broken by the split between the stacks.

You can manually control when a resource starts by setting a hook (probably pre-create in this case) on it in the environment. So you could put everything in one template and set pre-create hooks on all the Cinder volumes so that they wait for you to make an API call to clear the hooks before proceeding. Note that this is subject to the regular stack timeout.

Finally, you could have two versions of the template (without and with storage) and use a stack update to move from one to the other. The downside here is obviously that you have to maintain two versions and keep them in sync. You could probably easily write a small script to generate the two versions though.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-05-07 08:56:15 -0500

Seen: 80 times

Last updated: May 19 '16