Revision history [back]

click to hide/show revision 1
initial version

[Heat] How to use meta-data exchange in Heat

Hi there,

i'd like to use the meta-data service of heat to let two nodes exchange data.

My Scenario 1. server-i writes meta-data. 2. server-ii reads that meta-data and echos it during its cloud-init execution.

Therefore, I am looking for a tag similar to get_attr: to accomplish this.

My ideal understanding is something like this:

---
heat_template_version: "2013-05-23"
resources:
  server-i:
    metadata:
      a: test-value
    properties:
      flavor: "6"
      image: F17-i386-cfntools
      key_name: test-key
      user_data: |
          #!/bin/sh
          echo 'Start-Test'
          echo 'End-Test'
    type: "OS::Nova::Server"

  server-ii:
    properties:
      flavor: "6"
      image: F17-i386-cfntools
      key_name: test-key
      user_data:
        str_replace:
          template: |
            #!/bin/sh
            echo 'Start-Test'
            echo test-value
            echo 'End-Test'
          params:
            **test-value: { get_metadata: [server-i, a] }**
    type: "OS::Nova::Server"

I am looking for the correct syntax for the bolded line in the server-ii definition element.

How can I accomplish the above described scenario with Heat/Hot?

Thanks! -Andreas

[Heat] How to use meta-data exchange in Heat

Hi there,

i'd like to use the meta-data service of heat to let two nodes exchange data.

My Scenario 1. server-i writes meta-data. 2. server-ii reads that meta-data and echos it during its cloud-init execution.

Therefore, I am looking for a tag similar to get_attr: to accomplish this.

My ideal understanding is something like this:

---
heat_template_version: "2013-05-23"
resources:
  server-i:
    metadata:
      a: test-value
    properties:
      flavor: "6"
      image: F17-i386-cfntools
      key_name: test-key
      user_data: |
          #!/bin/sh
          echo 'Start-Test'
          echo 'End-Test'
    type: "OS::Nova::Server"

  server-ii:
    properties:
      flavor: "6"
      image: F17-i386-cfntools
      key_name: test-key
      user_data:
        str_replace:
          template: |
            #!/bin/sh
            echo 'Start-Test'
            echo test-value
            echo 'End-Test'
          params:
            **test-value: { get_metadata: [server-i, a] }**
    type: "OS::Nova::Server"

I am looking for the correct syntax for the bolded line in the server-ii definition element.

How can I accomplish the above described scenario with Heat/Hot?

Thanks! -Andreas

[Heat] How to use meta-data exchange in Heat

Hi there,

i'd like to use the meta-data service of heat to let two nodes exchange data.

My Scenario
1. server-i writes meta-data. meta-data.
2. server-ii reads that meta-data and echos it during its cloud-init execution.

Therefore, I am looking for a tag similar to get_attr: to accomplish this.

My ideal understanding is something like this:

---
heat_template_version: "2013-05-23"
resources:
  server-i:
    metadata:
      a: test-value
    properties:
      flavor: "6"
      image: F17-i386-cfntools
      key_name: test-key
      user_data: |
          #!/bin/sh
          echo 'Start-Test'
          echo 'End-Test'
    type: "OS::Nova::Server"

  server-ii:
    properties:
      flavor: "6"
      image: F17-i386-cfntools
      key_name: test-key
      user_data:
        str_replace:
          template: |
            #!/bin/sh
            echo 'Start-Test'
            echo test-value
            echo 'End-Test'
          params:
            **test-value: test-value: { get_metadata: [server-i, a] }**
}
    type: "OS::Nova::Server"

I am looking for the correct syntax for the bolded params line in the server-ii definition element.

How can I one accomplish the above described scenario with Heat/Hot?

Thanks! Thanks!
-Andreas

[Heat] How to use meta-data exchange in Heat

Hi there,

i'd like to use the meta-data service of heat to let two nodes exchange data.

My Scenario
1. server-i writes meta-data.
2. server-ii reads that meta-data and echos it during its cloud-init execution.

Therefore, I am looking for a tag similar to get_attr: to accomplish this.

My ideal understanding is something like this:

---
heat_template_version: "2013-05-23"
resources:
  server-i:
    metadata:
      a: test-value
    properties:
      flavor: "6"
      image: F17-i386-cfntools
      key_name: test-key
      user_data: |
          #!/bin/sh
          echo 'Start-Test'
          echo 'End-Test'
    type: "OS::Nova::Server"

  server-ii:
    properties:
      flavor: "6"
      image: F17-i386-cfntools
      key_name: test-key
      user_data:
        str_replace:
          template: |
            #!/bin/sh
            echo 'Start-Test'
            echo test-value
            echo 'End-Test'
          params:
           test-value: { get_metadata: [server-i, a] }
    type: "OS::Nova::Server"

I am looking for the correct syntax for the params line in the server-ii definition element.element.

Therefore: How can one accomplish the above described scenario with Heat/Hot?

Thanks!
-Andreas