1 tosca_definitions_version: tosca_simple_yaml_1_0
4 This TOSCA simple profile deploys nodejs, mongodb, elasticsearch, logstash and kibana each on a separate server
5 with monitoring enabled for nodejs server where a sample nodejs application is running. The rsyslog and collectd are
6 installed on a nodejs server.
9 - paypalpizzastore_nodejs_app.yaml
17 host_capabilities: &host_capabilities
18 # container properties (flavor)
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 ]
37 description: The URL to download nodejs.
38 default: http://github.com/paypal/rest-api-sample-app-nodejs.git
42 type: tosca.nodes.WebApplication.PayPalPizzaStore
44 github_url: { get_input: github_url }
47 - database_connection: mongo_db
51 implementation: ../Scripts/nodejs/config.sh
53 github_url: { get_property: [ SELF, github_url ] }
54 mongodb_ip: { get_attribute: [mongo_server, private_address] }
55 start: ../Scripts/nodejs/start.sh
57 type: tosca.nodes.WebServer
63 create: ../Scripts/nodejs/create.sh
65 type: tosca.nodes.Database
70 create: ../Scripts/mongodb/create_database.sh
72 type: tosca.nodes.DBMS
77 create: ../Scripts/mongodb/create.sh
79 implementation: ../Scripts/mongodb/config.sh
81 mongodb_ip: { get_attribute: [mongo_server, private_address] }
82 start: ../Scripts/mongodb/start.sh
84 type: tosca.nodes.SoftwareComponent.Elasticsearch
86 - host: elasticsearch_server
89 create: ../Scripts/elasticsearch/create.sh
90 start: ../Scripts/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: ../Python/logstash/configure_elasticsearch.py
105 elasticsearch_ip: { get_attribute: [elasticsearch_server, private_address] }
108 create: ../Scripts/logstash/create.sh
109 start: ../Scripts/logstash/start.sh
111 type: tosca.nodes.SoftwareComponent.Kibana
113 - host: kibana_server
114 - search_endpoint: elasticsearch
117 create: ../Scripts/kibana/create.sh
119 implementation: ../Scripts/kibana/config.sh
121 elasticsearch_ip: { get_attribute: [elasticsearch_server, private_address] }
122 kibana_ip: { get_attribute: [kibana_server, private_address] }
123 start: ../Scripts/kibana/start.sh
125 type: tosca.nodes.SoftwareComponent.Collectd
130 capability: log_endpoint
132 type: tosca.relationships.ConnectsTo
135 pre_configure_target:
136 implementation: ../Python/logstash/configure_collectd.py
139 create: ../Scripts/collectd/create.sh
141 implementation: ../Python/collectd/config.py
143 logstash_ip: { get_attribute: [logstash_server, private_address] }
144 start: ../Scripts/collectd/start.sh
146 type: tosca.nodes.SoftwareComponent.Rsyslog
151 capability: log_endpoint
153 type: tosca.relationships.ConnectsTo
156 pre_configure_target:
157 implementation: ../Python/logstash/configure_rsyslog.py
160 create: ../Scripts/rsyslog/create.sh
162 implementation: ../Scripts/rsyslog/config.sh
164 logstash_ip: { get_attribute: [logstash_server, private_address] }
165 start: ../Scripts/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 ] }