On Mon, Mar 27, 2017 at 01:43:39PM -0700, Dan Sneddon wrote: > I've been trying to figure out a workflow for previewing the results of > importing custom templates in an overcloud deployment (without actually > deploying). For instance, I am overriding some parameters using custom > templates, and I want to make sure those parameters will be expressed > correctly when I deploy. > > I know about "heat stack-preview", but between the complexity of the > overcloud stack and the jinja2 template processing, I can't figure out a > way to preview the entire overcloud stack. > > Is this possible? If not, any hints on what would it take to write a > script that would accomplish this?
Yes this is possible, but when I tested it I ran into this bug: https://bugs.launchpad.net/heat/+bug/1676823 Which it seems from IRC discussion may be a duplicate of: https://bugs.launchpad.net/heat/+bug/1669571 I'll re-test later with the patch proposed applied, but the basic steps are: 1. Get a rendered copy of the tripleo-heat-templates There are two ways to do this, either run ./tools/process-templates.py in a local t-h-t tree, or create a plan (either via openstack overcloud plan create, or openstack overcloud plan deploy --update-plan-only). If you do this via creating a plan you can download the rendered files from swift, e.g mkdir tmp-tht; cd tmp-tht; swift download overcloud 2. Run the stack preview To do this, you need to generate an environment file with all the passwords normally created by tripleo-common. The easiest way to do it is to look at an existing deployment and run "mistral environment-get overcloud", then copy/paste and sed an environment like: http://paste.openstack.org/show/604475/ Then you just run the preview like: openstack stack create test --dry-run -t overcloud.yaml -e overcloud-resource-registry-puppet.yaml -e dummy_passwords.yaml This will break due to the bug above, but in the past it's worked fine for me, and as mentioned by Saravanan it's also possible to do a template validate: openstack orchestration template validate --show-nested -t overcloud.yaml -e overcloud-resource-registry-puppet.yaml -e dummy_passwords.yaml Hopefully we can confirm the heat bugfix later then you'll be able to use one of the above to do what you need. Thanks, Steve __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev