vFW and vDNS support added to azure-plugin
[multicloud/azure.git] / azure / aria / aria-extension-cloudify / src / aria / examples / tosca-simple-1.0 / use-cases / multi-tier-1 / multi-tier-1.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0
2
3 description: >-
4   This TOSCA simple profile deploys nodejs, mongodb, elasticsearch, logstash and kibana each on a
5   separate server with monitoring enabled for nodejs server where a sample nodejs application is
6   running. The syslog and collectd are installed on a nodejs server.
7
8 metadata:
9   template_name: multi-tier-1
10   template_author: TOSCA Simple Profile in YAML
11   template_version: '1.0'
12
13 imports:
14   - ../webserver-dbms-2/custom_types/paypalpizzastore_nodejs_app.yaml # ARIA NOTE: moved
15   - custom_types/elasticsearch.yaml
16   - custom_types/logstash.yaml
17   - custom_types/kibana.yaml
18   - custom_types/collectd.yaml
19   - custom_types/rsyslog.yaml
20
21 dsl_definitions:
22
23   host_capabilities: &host_capabilities
24     # container properties (flavor)
25     disk_size: 10 GB
26     num_cpus: { get_input: my_cpus }
27     mem_size: 4096 MB
28   os_capabilities: &os_capabilities
29     architecture: x86_64
30     type: Linux
31     distribution: Ubuntu
32     version: 14.04
33
34 topology_template:
35
36   inputs:
37     my_cpus:
38       type: integer
39       description: Number of CPUs for the server.
40       constraints:
41         - valid_values: [ 1, 2, 4, 8 ]
42     github_url:
43        type: string
44        description: The URL to download nodejs.
45        default: https://github.com/sample.git
46
47   node_templates:
48
49     paypal_pizzastore:
50       type: tosca.nodes.WebApplication.PayPalPizzaStore
51       properties:
52         github_url: { get_input: github_url }
53       requirements:
54         - host: nodejs
55         - database_connection: mongo_db
56       interfaces:
57         Standard:
58            configure:
59              implementation: scripts/nodejs/configure.sh
60              inputs:
61                github_url: { get_property: [ SELF, github_url ] }
62                mongodb_ip: { get_attribute: [ mongo_server, private_address ] }
63            start: scripts/nodejs/start.sh
64
65     nodejs:
66       type: tosca.nodes.WebServer.Nodejs
67       requirements:
68         - host: app_server
69       interfaces:
70         Standard:
71           create: scripts/nodejs/create.sh
72
73     mongo_db:
74       type: tosca.nodes.Database
75       properties:
76         name: 'pizzastore' # ARIA NOTE: missing in spec
77       requirements:
78         - host: mongo_dbms
79       interfaces:
80         Standard:
81          create: create_database.sh
82
83     mongo_dbms:
84       type: tosca.nodes.DBMS
85       requirements:
86         - host: mongo_server
87       interfaces:
88         Standard: # ARIA NOTE: wrong in spec
89           create: scripts/mongodb/create.sh
90           configure:
91             implementation: scripts/mongodb/config.sh
92             inputs:
93               mongodb_ip: { get_attribute: [ mongo_server, private_address ] } # ARIA NOTE: wrong in spec
94           start: scripts/mongodb/start.sh
95
96     elasticsearch:
97       type: tosca.nodes.SoftwareComponent.Elasticsearch
98       requirements:
99         - host: elasticsearch_server
100       interfaces:
101         Standard: # ARIA NOTE: wrong in spec
102           create: scripts/elasticsearch/create.sh
103           start: scripts/elasticsearch/start.sh
104
105     logstash:
106       type: tosca.nodes.SoftwareComponent.Logstash
107       requirements:
108         - host: logstash_server
109         # ARIA NOTE: mangled in the spec
110         - search_endpoint:
111             node: elasticsearch
112             relationship:
113               interfaces:
114                 Configure:
115                   pre_configure_source:
116                     implementation: python/logstash/configure_elasticsearch.py
117                     inputs:
118                       elasticsearch_ip: { get_attribute: [ elasticsearch_server, private_address ] } # ARIA NOTE: wrong in spec
119       interfaces:
120         Standard: # ARIA NOTE: wrong in spec
121           create: scripts/lostash/create.sh
122           configure: scripts/logstash/config.sh
123           start: scripts/logstash/start.sh
124
125     kibana:
126       type: tosca.nodes.SoftwareComponent.Kibana
127       requirements:
128         - host: kibana_server
129         - search_endpoint: elasticsearch
130       interfaces:
131         Standard: # ARIA NOTE: wrong in spec
132           create: scripts/kibana/create.sh
133           configure:
134             implementation: scripts/kibana/config.sh
135             inputs:
136               elasticsearch_ip: { get_attribute: [ elasticsearch_server, private_address ] } # ARIA NOTE: wrong in spec
137               kibana_ip: { get_attribute: [ kibana_server, private_address ] } # ARIA NOTE: wrong in spec
138           start: scripts/kibana/start.sh
139
140     app_collectd:
141       type: tosca.nodes.SoftwareComponent.Collectd
142       requirements:
143         - host: app_server
144         # ARIA NOTE: mangled in the spec
145         - collectd_endpoint:
146             node: logstash
147             relationship:
148               interfaces:
149                 Configure:
150                   pre_configure_target:
151                     implementation: python/logstash/configure_collectd.py
152       interfaces:
153         Standard: # ARIA NOTE: wrong in spec
154           create: scripts/collectd/create.sh
155           configure:
156             implementation: python/collectd/config.py
157             inputs:
158               logstash_ip: { get_attribute: [ logstash_server, private_address ] } # ARIA NOTE: wrong in spec
159           start: scripts/collectd/start.sh
160
161     app_rsyslog:
162       type: tosca.nodes.SoftwareComponent.Rsyslog
163       requirements:
164         - host: app_server
165         # ARIA NOTE: mangled in the spec
166         - rsyslog_endpoint:
167             node: logstash
168             relationship:
169               interfaces:
170                 Configure:
171                   pre_configure_target:
172                     implementation: python/logstash/configure_rsyslog.py
173       interfaces:
174         Standard: # ARIA NOTE: wrong in spec
175           create: scripts/rsyslog/create.sh
176           configure:
177             implementation: scripts/rsyslog/config.sh
178             inputs:
179               logstash_ip: { get_attribute: [ logstash_server, private_address ] } # ARIA NOTE: wrong in spec
180           start: scripts/rsyslog/start.sh
181
182     app_server:
183       type: tosca.nodes.Compute
184       capabilities:
185         host:
186           properties: *host_capabilities
187         os:
188           properties: *os_capabilities
189
190     mongo_server:
191       type: tosca.nodes.Compute
192       capabilities:
193         host:
194           properties: *host_capabilities
195         os:
196           properties: *os_capabilities
197
198     elasticsearch_server:
199       type: tosca.nodes.Compute
200       capabilities:
201         host:
202           properties: *host_capabilities
203         os:
204           properties: *os_capabilities
205
206     logstash_server:
207       type: tosca.nodes.Compute
208       capabilities:
209         host:
210           properties: *host_capabilities
211         os:
212           properties: *os_capabilities
213
214     kibana_server:
215       type: tosca.nodes.Compute
216       capabilities:
217         host:
218           properties: *host_capabilities
219         os:
220           properties: *os_capabilities
221
222   outputs:
223     nodejs_url:
224       description: URL for the nodejs server.
225       value: { get_attribute: [ app_server, private_address ] }
226     mongodb_url:
227       description: URL for the mongodb server.
228       value: { get_attribute: [ mongo_server, private_address ] }
229     elasticsearch_url:
230       description: URL for the elasticsearch server.
231       value: { get_attribute: [ elasticsearch_server, private_address ] }
232     logstash_url:
233       description: URL for the logstash server.
234       value: { get_attribute: [ logstash_server, private_address ] }
235     kibana_url:
236       description: URL for the kibana server.
237       value: { get_attribute: [ kibana_server, private_address ] }