-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Will Fog supports nested templates for openstack orchestration #3753
Comments
@dhague @Ladas @TerryHowe - could one of you provide insight? Thanks! |
@phijojoseph https://github.com/ManageIQ/manageiq/blob/387a461df7f11f65cb4bff61c422629ac4872ba9/app/models/manageiq/providers/openstack/infra_manager/orchestration_stack.rb#L26 this is the code I used for stack update, create should be the same It's a bit different to OpenStack CLI, since Heat CLI is doing some processing of files for you, using your filesystem. E.g. for the 'files' hash, it contains { filename => content } pairs, which you will need to build by scanning the templates recursively, same as heat CLI does. What is the question about the resource registry and env.yaml? Resource registry contains mapping of resource types to filenames, than the filename has to be present in 'files' hash attribute |
@geemus @Ladas As i was not able to pass the file, I thought to pass the file via resource registry or env.yaml. But both failed. Now i ll try with files. how will i access the file in my master.yaml? it will be great if you can share a sample yaml template using nested templates Thanks in advance. |
@phijojoseph look e.g. on http://docs.openstack.org/developer/heat/template_guide/composition.html, you might want to also check http://hardysteven.blogspot.cz/ where he explains complex TripleO nested Heat templates the :files needs to contain content of the yamls as a string, so if you have resource registry then files needs to have {"my_nova.yaml" => "content of my_nova.yaml"} Similar for any file directly linked from template. The filename in a template or resource registry acts only as an index in the files Hash. Which is different in Heat CLI, which builds the files Hash for you and expects the file to be in your filesystem on a relative path. |
@Ladas please find my code snippet response=heat.stacks.new.save({ Slave_Template_CONFIG Completed 500 Internal Server Error in 3619ms (ActiveRecord: 0.0ms) Is there anything that i need to change? Sorry for the trouble Thanks |
@phijojoseph hm some syntax errors maybe, this might need to be a string? "heat_template_version"=>Thu, 23 May 2013 I think you need to also send the template content as a string, so dump your yaml or json to string. |
@Ladas the issue got solved, i have converted the yaml out to json, and parsed with file. seems to be working now. can i use like this Thanks for all the supports. and i would like to add a suggestion that, it will be great if fog can give some documentation about the supported options or add some comments like this Once again thanks Phijo |
@phijojoseph yes, exactly like this, files should include all the file names and their contents used, otherwise Heat will throw an exception. If you could send a patch to documentation, based on you findings, that would be nice :-) |
@Ladas Sure , I ll share my findings. And I would like to know how to pass the parameters to slave.yaml and get the output from slave.yaml. Regards |
@phijojoseph you can check the tripleo templates for that or e.g. this https://developer.rackspace.com/blog/openstack-orchestration-in-depth-part-3-multi-instance-deployments/ there is always interface to the nested stack. It should be creating nested stack, where each of them has output, so check e.g. fog call @stack_service.stacks.all(:show_nested => true). There is a link between stack resources and nested stacks. |
Closed in favor of fog/fog-openstack#53 |
I tried to use a nested template to deploy a couple of instances . It works fine on heat command.But not with fog. If someone has tried on it, please let me know how to work on resource_resgistry or env.yaml .
Regards
Phijo
The text was updated successfully, but these errors were encountered: