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
114 - search_endpoint: elasticsearch
117 create: kibana/create.sh
119 implementation: kibana/config.sh
121 elasticsearch_ip: { get_attribute: [elasticsearch_server, private_address] }
122 kibana_ip: { get_attribute: [kibana_server, private_address] }
123 start: kibana/start.sh
125 type: tosca.nodes.SoftwareComponent.Collectd
130 capability: log_endpoint
132 type: tosca.relationships.ConnectsTo
135 pre_configure_target:
136 implementation: logstash/configure_collectd.py
139 create: collectd/create.sh
141 implementation: collectd/config.py
143 logstash_ip: { get_attribute: [logstash_server, private_address] }
144 start: collectd/start.sh
146 type: tosca.nodes.SoftwareComponent.Rsyslog
151 capability: log_endpoint
153 type: tosca.relationships.ConnectsTo
156 pre_configure_target:
157 implementation: logstash/configure_rsyslog.py
160 create: rsyslog/create.sh
162 implementation: rsyslog/config.sh
164 logstash_ip: { get_attribute: [logstash_server, private_address] }
165 start: rsyslog/start.sh
167 type: tosca.nodes.Compute
170 properties: *host_capabilities
172 properties: *os_capabilities
174 type: tosca.nodes.Compute
177 properties: *host_capabilities
179 properties: *os_capabilities
180 elasticsearch_server:
181 type: tosca.nodes.Compute
184 properties: *host_capabilities
186 properties: *os_capabilities
188 type: tosca.nodes.Compute
191 properties: *host_capabilities
193 properties: *os_capabilities
195 type: tosca.nodes.Compute
198 properties: *host_capabilities
200 properties: *os_capabilities
204 description: URL for the nodejs server, http://<IP>:3000
205 value: { get_attribute: [ app_server, private_address ] }
207 description: URL for the mongodb server.
208 value: { get_attribute: [ mongo_server, private_address ] }
210 description: URL for the elasticsearch server.
211 value: { get_attribute: [ elasticsearch_server, private_address ] }
213 description: URL for the logstash server.
214 value: { get_attribute: [ logstash_server, private_address ] }
216 description: URL for the kibana server.
217 value: { get_attribute: [ kibana_server, private_address ] }