Ask Your Question
0

OS::Heat::Stack The template is not a JSON object or YAML mapping

asked 2015-06-15 07:13:49 -0500

humankind135 gravatar image

Hi There

Thanks in advance for any help anyone can provide, I am trying to use the OS::Heat:Stack resource in Openstack Kilo with the following:

heatstacks_global.yaml

heat_template_version: 2015-04-30

description: Multi-Region Deployment

parameters:

resources:
  wtg1:
    type: OS::Heat::Stack
    properties:
      context:
        region_name: Worthing1
      parameters:
      template: test_stack.yaml

test_stack.yaml

heat_template_version: 2015-04-30

description: Scaling Lamp Stack

parameters:

resources:
  http_security_group:
    type: OS::Neutron::SecurityGroup
    properties:
      name: http_security_group
      rules:
        - protocol: tcp
          port_range_min: 80
          port_range_max: 80
        - protocol: icmp
        - protocol: tcp
          port_range_min: 22
          port_range_max: 22
          remote_ip_prefix: 10.3.0.0/16

  http_server:
    type: OS::Nova::Server
    properties:
      flavor: m1.small
      image: Ubuntu 14.04 Trusy Tahir
      key_name: JamesH
      networks:
        - network: admin-testnet
      security_groups:
        - { get_resource: http_security_group }

I have hardcoded all the values but trying to instantiate it from the command line in the folder with both files returns:

ERROR: Failed validating stack template using Heat endpoint at region "Worthing1" due to "The template is not a JSON object or YAML mapping." None

Worthing1 is definately a region and I have instantiated test_stack.yaml on its own without issue. Any advice would be welcome.

James

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-07-05 18:26:12 -0500

Steve Baker gravatar image

The documentation says that the value of the template should be the template string, so you should have better luck with the following:

resources:   wtg1:
    type: OS::Heat::Stack
    properties:
      context:
        region_name: Worthing1
      parameters:
      template: {get_file: test_stack.yaml}
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

Stats

Asked: 2015-06-15 07:13:49 -0500

Seen: 1,005 times

Last updated: Jul 05 '15