Ask Your Question
0

Heat global environment yaml

asked 2018-04-17 23:14:08 -0500

eplatt gravatar image

updated 2018-11-26 14:14:54 -0500

zaneb gravatar image

Hi everyone,

I have created a complex series of nested heat templates for use in my company and the goal is to make these portable between openstack deployments. The user_data passed in the various resources often have lab specific data which means that every environment needs to modify the template with their IPs (think NTP, DNS etc). With that in mind, I am trying to leverage the /etc/heat/environment.d/ global environment to allow each separate deployment to have a "config.yaml" where they can put the IPs / FQDNs that apply to their environment. The goal is that I would not need to modify any of the existing templates to support a new environment, only the config.yaml that would be placed into /etc/heat/environment.d/.

The problem I am having here is that no matter what I put into this directory I cannot get it to work as described in the documentation. In the docs, there is an example given where they use the stack-create command with -e <something>.yaml. Further in the docs when it is describing the global environments it states that the same yaml provided in the earlier command could also be put into this directory and would no longer need to be passed in.

In my case, I am doing a simple example:

main.yaml

parameters:
  test:
    type: string
    label: test

...

config.yaml

parameters:
  test: value

When I run the stack create with -e passing in config.yaml it works as expected. When I put config.yaml into that directory, restart heat, and try it again without -e it complains that I have not provided all of the parameters.

Is there something I am missing to make this work? I can see in the logs that it has loaded my config.yaml and there are no errors.

Thanks a lot in advance for your help.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-11-26 14:18:03 -0500

zaneb gravatar image

The 'global environment' doesn't do what you think it does. It's a place where the operator can put templates and environment files that map resource type names to either other types or to templates in that directory. It's not something that end-users can access.

You'll need to distribute the environment files with your templates, or put them somewhere accessible (e.g. in Swift). Users will need to specifically select an environment file when they create or update a stack.

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

Stats

Asked: 2018-04-17 23:14:08 -0500

Seen: 47 times

Last updated: Nov 26 '18