<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 11/01/2013 09:35 PM, Therese Persson
      wrote:<br>
    </div>
    <blockquote
      cite="mid:80E1BEB0634ED149BA5FA5A989258107319EB6@ESESSMB101.ericsson.se"
      type="cite">
      <pre wrap="">Thank you for your answer Angus.

I tried to remove the parameters from the file as you suggested and tried to create a stack with horizon, but I seem to have an authorization problem.
</pre>
    </blockquote>
    ...<br>
    <blockquote
      cite="mid:80E1BEB0634ED149BA5FA5A989258107319EB6@ESESSMB101.ericsson.se"
      type="cite">
      <pre wrap="">
In my heat.conf file:

[DEFAULT]
connection = <a class="moz-txt-link-abbreviated" href="mailto:mysql://heat:heat@10.10.10.51/heat">mysql://heat:heat@10.10.10.51/heat</a>

(Everything else is commented out.)

In my /etc/heat/api-paste.conf file:
</pre>
    </blockquote>
    ...<br>
    <blockquote
      cite="mid:80E1BEB0634ED149BA5FA5A989258107319EB6@ESESSMB101.ericsson.se"
      type="cite">
      <pre wrap="">
# Auth middleware that validates token against keystone
[filter:authtoken]
paste.filter_factory = heat.common.auth_token:filter_factory
auth_host = 10.10.10.51
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = heat
admin_password = heat
</pre>
    </blockquote>
    This section is missing auth_uri, as per this doc fix:<br>
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a href="https://review.openstack.org/#/c/55020/">https://review.openstack.org/#/c/55020/</a><br>
    <br>
    As an aside, these values should not be set at all in api-paste.ini,
    but instead they should be set in heat.conf, section
    [keystone_authtoken]
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <blockquote
      cite="mid:80E1BEB0634ED149BA5FA5A989258107319EB6@ESESSMB101.ericsson.se"
      type="cite">
      <pre wrap="">


-----Original Message-----
From: Angus Salkeld [<a class="moz-txt-link-freetext" href="mailto:asalkeld@redhat.com">mailto:asalkeld@redhat.com</a>] 
Sent: den 1 november 2013 00:52
To: <a class="moz-txt-link-abbreviated" href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a>
Subject: Re: [Openstack] [Heat] Error - Template not in valid format

On 31/10/13 15:17 +0000, Therese Persson wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Hi,

I have recently upgraded to Havana and just started trying out Heat. I tried to launch a stack by using this template file:
<a class="moz-txt-link-freetext" href="https://github.com/openstack/heat-templates/blob/master/hot/servers_in_">https://github.com/openstack/heat-templates/blob/master/hot/servers_in_</a>
existing_neutron_net.yaml

However, I am not familiar with these type of files and I am not sure of what information I should add to the file to make it valid for Heat.
This is what my modified file looks like:
</pre>
      </blockquote>
      <pre wrap="">
Hi Therese,

It's just yaml, so I sometimes head over to <a class="moz-txt-link-freetext" href="http://yaml-online-parser.appspot.com/">http://yaml-online-parser.appspot.com/</a> and dump my template in there and tells you what is wrong.

Basically you are putting your parameter values in the wrong place.

instead of:
parameters:
   key_name: mykey
     type: string
     description: Name of keypair to assign to servers remove the "mykey" so it is back to:

parameters:
   key_name:
     type: string
     description: Name of keypair to assign to servers


Then start the template like this:

heat stack-create mystack --template-file=/scripts/servers_in_existing_neutron_net.yaml -P "key_name=mykey;image=Ubuntu;flavor=m1.small"

Hope that helps
-Angus

</pre>
      <blockquote type="cite">
        <pre wrap="">
heat_template_version: 2013-05-23

description: >
 HOT template to deploy two servers into an existing neutron tenant 
network and
 assign floating IP addresses to each server so they are routable from 
the
 public network.

parameters:
 key_name: mykey
   type: string
   description: Name of keypair to assign to servers
 image: Ubuntu
   type: string
   description: Name of image to use for servers
 flavor: m1.small
   type: string
   description: Flavor to use for servers
 public_net_id: 55896cd0-040a-4e7b-8a92-cb27f32b4ad9
   type: string
   description: >
     ID of public network for which floating IP addresses will be 
allocated
 private_net_id: 3bd4e56f-1e8c-4316-8e59-a358016e9ef8
   type: string
   description: ID of private network into which servers get deployed
 private_subnet_id: f4bac2ea-b74d-47ef-a8b3-5969d60bfbba
   type: string
   description: ID of private sub network into which servers get 
deployed

resources:
 server1:
   type: OS::Nova::Server
   properties:
     name: Server1
     image: { get_param: image }
     flavor: { get_param: flavor }
     key_name: { get_param: key_name }
     networks:
       - port: { get_resource: server1_port }

 server1_port:
   type: OS::Neutron::Port
   properties:
     network_id: { get_param: private_net_id }
     fixed_ips:
       - subnet_id: { get_param: private_subnet_id }

 server1_floating_ip:
   type: OS::Neutron::FloatingIP
   properties:
     floating_network_id: { get_param: public_net_id }
     port_id: { get_resource: server1_port }

 server2:
   type: OS::Nova::Server
   properties:
     name: Server2
     image: { get_param: image }
     flavor: { get_param: flavor }
     key_name: { get_param: key_name }
     networks:
       - port: { get_resource: server2_port }

 server2_port:
   type: OS::Neutron::Port
   properties:
     network_id: { get_param: private_net_id }
     fixed_ips:
       - subnet_id: { get_param: private_subnet_id }

 server2_floating_ip:
   type: OS::Neutron::FloatingIP
   properties:
     floating_network_id: { get_param: public_net_id }
     port_id: { get_resource: server2_port }

outputs:
 server1_private_ip:
   description: IP address of server1 in private network
   value: { get_attr: [ server1, first_address ] }
 server1_public_ip:
   description: Floating IP address of server1 in public network
   value: { get_attr: [ server1_floating_ip, floating_ip_address ] }
 server2_private_ip:
   description: IP address of server2 in private network
   value: { get_attr: [ server2, first_address ] }
 server2_public_ip:
   description: Floating IP address of server2 in public network
   value: { get_attr: [ server2_floating_ip, floating_ip_address ] }


When I try to run the command:
heat stack-create mystack 
--template-file=/scripts/servers_in_existing_neutron_net.yaml

I get the following error:
ERROR: Template not in valid format


Any ideas?

Therese
</pre>
      </blockquote>
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap="">_______________________________________________
Mailing list: <a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a>
Post to     : <a class="moz-txt-link-abbreviated" href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a>
Unsubscribe : 
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a>
</pre>
      </blockquote>
      <pre wrap="">

_______________________________________________
Mailing list: <a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a>
Post to     : <a class="moz-txt-link-abbreviated" href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a>
Unsubscribe : <a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a>

_______________________________________________
Mailing list: <a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a>
Post to     : <a class="moz-txt-link-abbreviated" href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a>
Unsubscribe : <a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>