summaryrefslogtreecommitdiffstats
path: root/tosca2heat/heat-translator/translator/tests/data/hot_output/hot_host_assignment.yaml
blob: 8a031e2eb6bfda54ae978d6d81b08ba1f08c5f70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
heat_template_version: 2013-05-23

description: >
  A template to test host assignment for translated hot resources.
  It makes sure if a resource depends on multiple hosts only the
  one with the "HostedOn" relationship is picked as the host. In
  this template, the translated resource 'app_collectd_create_deploy'
  would depend on 'logstash_server' and 'app_server'. But it would
  have "HostedOn" relationship with 'app_server', and that server
  would be its host.

parameters: {}
resources:
  app_server:
    type: OS::Nova::Server
    properties:
      flavor: m1.medium
      image: ubuntu-software-config-os-init
      user_data_format: SOFTWARE_CONFIG
      software_config_transport: POLL_SERVER_HEAT

  logstash_server:
    type: OS::Nova::Server
    properties:
      flavor: m1.medium
      image: ubuntu-software-config-os-init
      user_data_format: SOFTWARE_CONFIG
      software_config_transport: POLL_SERVER_HEAT

  app_collectd_create_config:
    type: OS::Heat::SoftwareConfig
    properties:
      config:
        get_file: collectd/create.sh
      group: script

  app_collectd_create_deploy:
    type: OS::Heat::SoftwareDeployment
    properties:
      config:
        get_resource: app_collectd_create_config
      server:
        get_resource: app_server
      signal_transport: HEAT_SIGNAL
    depends_on:
    - logstash_start_deploy

  app_collectd_configure_config:
    type: OS::Heat::SoftwareConfig
    properties:
      config:
        get_file: collectd/config.py
      group: script

  app_collectd_configure_deploy:
    type: OS::Heat::SoftwareDeployment
    properties:
      config:
        get_resource: app_collectd_configure_config
      input_values:
        logstash_ip:
          get_attr:
          - logstash_server
          - first_address
      server:
        get_resource: app_server
      signal_transport: HEAT_SIGNAL
    depends_on:
    - app_collectd_create_deploy

  app_collectd_start_config:
    type: OS::Heat::SoftwareConfig
    properties:
      config:
        get_file: collectd/start.sh
      group: script

  app_collectd_start_deploy:
    type: OS::Heat::SoftwareDeployment
    properties:
      config:
        get_resource: app_collectd_start_config
      server:
        get_resource: app_server
      signal_transport: HEAT_SIGNAL
    depends_on:
    - app_collectd_configure_deploy

  logstash_create_config:
    type: OS::Heat::SoftwareConfig
    properties:
      config:
        get_file: logstash/create.sh
      group: script

  logstash_create_deploy:
    type: OS::Heat::SoftwareDeployment
    properties:
      config:
        get_resource: logstash_create_config
      server:
        get_resource: logstash_server
      signal_transport: HEAT_SIGNAL

  logstash_start_config:
    type: OS::Heat::SoftwareConfig
    properties:
      config:
        get_file: logstash/start.sh
      group: script

  logstash_start_deploy:
    type: OS::Heat::SoftwareDeployment
    properties:
      config:
        get_resource: logstash_start_config
      server:
        get_resource: logstash_server
      signal_transport: HEAT_SIGNAL
    depends_on:
    - logstash_create_deploy

  app_collectd_logstash_connect_config:
    type: OS::Heat::SoftwareConfig
    properties:
      config:
        get_file: logstash/configure_collectd.py
      group: script

  app_collectd_logstash_connect_deploy:
    type: OS::Heat::SoftwareDeployment
    properties:
      config:
        get_resource: app_collectd_logstash_connect_config
      server:
        get_resource: logstash_server
      signal_transport: HEAT_SIGNAL
    depends_on:
    - logstash_create_deploy

outputs: {}