What is the way to call nested heat file from the main template, in Murano.

Asked by Aqsa Malik

I am calling my nested file as "type: Heat/Environments/network.yaml" but it is not working in Murano on Liberty. What is the correct way to do that. The files are located in the package under folder "Heat/Environments".

Question information

Language:
English Edit question
Status:
Solved
For:
Murano Edit question
Assignee:
No assignee Edit question
Solved by:
Stan Lagun
Solved:
Last query:
Last reply:
Revision history for this message
Stan Lagun (slagun) said :
#1

have you tried to call it just network.yaml (without the path)?

Revision history for this message
Aqsa Malik (aqsamm) said :
#2

Still getting this error:

2016-05-03 03:49:10 — [heatclient.exc.HTTPBadRequest]: ERROR: Could not fetch remote template "network.yaml": Invalid URL scheme
2016-05-03 03:49:10 — ERROR: Could not fetch remote template "network.yaml": Invalid URL scheme

Revision history for this message
Stan Lagun (slagun) said :
#3

As far as I can see from the code the environment files must be placed in Resources/HotEnvironments and HOT-accessible files are under Resources/HotFiles. You can place them in some subfolder there. To reference those files you use relative path to those locations. In most cases it means file name only.

If it still doesn't help, please share your package and I'll take a look

Revision history for this message
Aqsa Malik (aqsamm) said :
#4

I am still not able to get it running.
Here is my package https://drive.google.com/file/d/0B3No1UHUN3G2VW9JUDdZcEpZVjg/view?usp=sharing
Any help will be appreciated.

Revision history for this message
Stan Lagun (slagun) said :
#5

I'm not a Heat expert and probably just don't know that such syntax is possible. Can you point me to a documentation that says that you can put a file name as a resource type? I'm looking at http://docs.openstack.org/developer/heat/template_guide/environment.html and from what I understand you need to have one environment file that has a resource registry (that can reference other files) and use it to define new resource types. And this is the model that Murano supports. You can supply HOT app with a environment file that is going to be used for the whole stack. Also it looks like the generated UI form doesn't ask for environment file name so the only way to provide it is to create application with Murano CLI or API or from another application in MuranoPL code. Though it should be relatively easy to implement such feature.

Revision history for this message
Aqsa Malik (aqsamm) said :
#6

Hi Stan,

This article will help you to understand the working of heat nested templates:
https://developer.rackspace.com/blog/openstack-orchestration-in-depth-part-3-multi-instance-deployments/

Also the package that I am using is of heat templates for clearwater IMS deployment which is hosted at:
https://github.com/Metaswitch/clearwater-heat/tree/stable

Revision history for this message
Best Stan Lagun (slagun) said :
#7

I found a very easy workaround. Put all your sub-templates in Resources/HotFiles and reference them without the path. I.e. as you're doing now, just rename HotEnvironments to HotFiles. It didn't work on your template because of some template errors but it did when I tested on a simple template

Revision history for this message
Aqsa Malik (aqsamm) said :
#8

Thanks alot Stan!! Its working now.

Revision history for this message
Aqsa Malik (aqsamm) said :
#9

Thanks Stan Lagun, that solved my question.