1 tosca_definitions_version: tosca_simple_yaml_1_0
4 This TOSCA simple profile deploys nodejs, mongodb, elasticsearch, logstash
5 and kibana each on a separate server with monitoring enabled for nodejs
6 server where a sample nodejs application is running. The rsyslog and collectd
7 are installed on a nodejs server.
10 - custom_types/paypalpizzastore_nodejs_app.yaml
11 - custom_types/elasticsearch.yaml
12 - custom_types/logstash.yaml
13 - custom_types/kibana.yaml
14 - custom_types/collectd.yaml
15 - custom_types/rsyslog.yaml
18 host_capabilities: &host_capabilities
20 num_cpus: { get_input: my_cpus }
22 os_capabilities: &os_capabilities
32 description: Number of CPUs for the server.
34 - valid_values: [ 1, 2, 4, 8 ]
38 description: The URL to download nodejs.
39 default: http://github.com/paypal/rest-api-sample-app-nodejs.git
43 type: tosca.nodes.WebApplication.PayPalPizzaStore
45 github_url: { get_input: github_url }
48 - database_connection: mongo_db
52 implementation: nodejs/config.sh
54 github_url: { get_property: [ SELF, github_url ] }
55 mongodb_ip: { get_attribute: [mongo_server, private_address] }
56 start: nodejs/start.sh
58 type: tosca.nodes.WebServer
63 create: nodejs/create.sh
65 type: tosca.nodes.Database
70 create: mongodb/create_database.sh
72 type: tosca.nodes.DBMS
77 create: mongodb/create.sh
79 implementation: mongodb/config.sh
81 mongodb_ip: { get_attribute: [mongo_server, private_address] }
82 start: mongodb/start.sh
84 type: tosca.nodes.SoftwareComponent.Elasticsearch
86 - host: elasticsearch_server
89 create: elasticsearch/create.sh
90 start: elasticsearch/start.sh
92 type: tosca.nodes.SoftwareComponent.Logstash
94 - host: logstash_server
97 capability: search_endpoint
99 type: tosca.relationships.ConnectsTo
102 pre_configure_source:
103 implementation: logstash/configure_elasticsearch.py
105 elasticsearch_ip: { get_attribute: [elasticsearch_server, private_address] }
108 create: logstash/create.sh
109 start: logstash/start.sh
111 type: tosca.nodes.SoftwareComponent.Kibana
113 - host: kibana_server
116 capability: search_endpoint
119 create: kibana/create.sh
121 implementation: kibana/config.sh
123 elasticsearch_ip: { get_attribute: [elasticsearch_server, private_address] }
124 kibana_ip: { get_attribute: [kibana_server, private_address] }
125 start: kibana/start.sh
127 type: tosca.nodes.SoftwareComponent.Collectd
132 capability: log_endpoint
134 type: tosca.relationships.ConnectsTo
137 pre_configure_target:
138 implementation: logstash/configure_collectd.py
141 create: collectd/create.sh
143 implementation: collectd/config.py
145 logstash_ip: { get_attribute: [logstash_server, private_address] }
146 start: collectd/start.sh
148 type: tosca.nodes.SoftwareComponent.Rsyslog
153 capability: log_endpoint
155 type: tosca.relationships.ConnectsTo
158 pre_configure_target:
159 implementation: logstash/configure_rsyslog.py
162 create: rsyslog/create.sh
164 implementation: rsyslog/config.sh
166 logstash_ip: { get_attribute: [logstash_server, private_address] }
167 start: rsyslog/start.sh
169 type: tosca.nodes.Compute
172 properties: *host_capabilities
174 properties: *os_capabilities
176 type: tosca.nodes.Compute
179 properties: *host_capabilities
181 properties: *os_capabilities
182 elasticsearch_server:
183 type: tosca.nodes.Compute
186 properties: *host_capabilities
188 properties: *os_capabilities
190 type: tosca.nodes.Compute
193 properties: *host_capabilities
195 properties: *os_capabilities
197 type: tosca.nodes.Compute
200 properties: *host_capabilities
202 properties: *os_capabilities
206 description: URL for the nodejs server, http://<IP>:3000
207 value: { get_attribute: [ app_server, private_address ] }
209 description: URL for the mongodb server.
210 value: { get_attribute: [ mongo_server, private_address ] }
212 description: URL for the elasticsearch server.
213 value: { get_attribute: [ elasticsearch_server, private_address ] }
215 description: URL for the logstash server.
216 value: { get_attribute: [ logstash_server, private_address ] }
218 description: URL for the kibana server.
219 value: { get_attribute: [ kibana_server, private_address ] }