1 tosca_definitions_version: tosca_simple_yaml_1_0
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.
9 template_name: multi-tier-1
10 template_author: TOSCA Simple Profile in YAML
11 template_version: '1.0'
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
23 host_capabilities: &host_capabilities
24 # container properties (flavor)
26 num_cpus: { get_input: my_cpus }
28 os_capabilities: &os_capabilities
39 description: Number of CPUs for the server.
41 - valid_values: [ 1, 2, 4, 8 ]
44 description: The URL to download nodejs.
45 default: https://github.com/sample.git
50 type: tosca.nodes.WebApplication.PayPalPizzaStore
52 github_url: { get_input: github_url }
55 - database_connection: mongo_db
59 implementation: scripts/nodejs/configure.sh
61 github_url: { get_property: [ SELF, github_url ] }
62 mongodb_ip: { get_attribute: [ mongo_server, private_address ] }
63 start: scripts/nodejs/start.sh
66 type: tosca.nodes.WebServer.Nodejs
71 create: scripts/nodejs/create.sh
74 type: tosca.nodes.Database
76 name: 'pizzastore' # ARIA NOTE: missing in spec
81 create: create_database.sh
84 type: tosca.nodes.DBMS
88 Standard: # ARIA NOTE: wrong in spec
89 create: scripts/mongodb/create.sh
91 implementation: scripts/mongodb/config.sh
93 mongodb_ip: { get_attribute: [ mongo_server, private_address ] } # ARIA NOTE: wrong in spec
94 start: scripts/mongodb/start.sh
97 type: tosca.nodes.SoftwareComponent.Elasticsearch
99 - host: elasticsearch_server
101 Standard: # ARIA NOTE: wrong in spec
102 create: scripts/elasticsearch/create.sh
103 start: scripts/elasticsearch/start.sh
106 type: tosca.nodes.SoftwareComponent.Logstash
108 - host: logstash_server
109 # ARIA NOTE: mangled in the spec
115 pre_configure_source:
116 implementation: python/logstash/configure_elasticsearch.py
118 elasticsearch_ip: { get_attribute: [ elasticsearch_server, private_address ] } # ARIA NOTE: wrong in spec
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
126 type: tosca.nodes.SoftwareComponent.Kibana
128 - host: kibana_server
129 - search_endpoint: elasticsearch
131 Standard: # ARIA NOTE: wrong in spec
132 create: scripts/kibana/create.sh
134 implementation: scripts/kibana/config.sh
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
141 type: tosca.nodes.SoftwareComponent.Collectd
144 # ARIA NOTE: mangled in the spec
150 pre_configure_target:
151 implementation: python/logstash/configure_collectd.py
153 Standard: # ARIA NOTE: wrong in spec
154 create: scripts/collectd/create.sh
156 implementation: python/collectd/config.py
158 logstash_ip: { get_attribute: [ logstash_server, private_address ] } # ARIA NOTE: wrong in spec
159 start: scripts/collectd/start.sh
162 type: tosca.nodes.SoftwareComponent.Rsyslog
165 # ARIA NOTE: mangled in the spec
171 pre_configure_target:
172 implementation: python/logstash/configure_rsyslog.py
174 Standard: # ARIA NOTE: wrong in spec
175 create: scripts/rsyslog/create.sh
177 implementation: scripts/rsyslog/config.sh
179 logstash_ip: { get_attribute: [ logstash_server, private_address ] } # ARIA NOTE: wrong in spec
180 start: scripts/rsyslog/start.sh
183 type: tosca.nodes.Compute
186 properties: *host_capabilities
188 properties: *os_capabilities
191 type: tosca.nodes.Compute
194 properties: *host_capabilities
196 properties: *os_capabilities
198 elasticsearch_server:
199 type: tosca.nodes.Compute
202 properties: *host_capabilities
204 properties: *os_capabilities
207 type: tosca.nodes.Compute
210 properties: *host_capabilities
212 properties: *os_capabilities
215 type: tosca.nodes.Compute
218 properties: *host_capabilities
220 properties: *os_capabilities
224 description: URL for the nodejs server.
225 value: { get_attribute: [ app_server, private_address ] }
227 description: URL for the mongodb server.
228 value: { get_attribute: [ mongo_server, private_address ] }
230 description: URL for the elasticsearch server.
231 value: { get_attribute: [ elasticsearch_server, private_address ] }
233 description: URL for the logstash server.
234 value: { get_attribute: [ logstash_server, private_address ] }
236 description: URL for the kibana server.
237 value: { get_attribute: [ kibana_server, private_address ] }