summaryrefslogtreecommitdiffstats
path: root/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions
diff options
context:
space:
mode:
authorZhaoxing <meng.zhaoxing1@zte.com.cn>2017-09-22 15:40:57 +0800
committerZhaoxing <meng.zhaoxing1@zte.com.cn>2017-09-22 15:40:57 +0800
commit6a3e9d53686eda1d45fb54b97869a594741f089c (patch)
tree9afe1eaae4311726ea30dd65142cd22325324c98 /nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions
parent723a89591b73ed1f7ad43a31c38b40b2cc784e0e (diff)
Move python files to root dir
Change-Id: I16a66e1f6bcb65cbb68f2b622618252885ab47fc Issue-Id: MODELING-20 Signed-off-by: Zhaoxing <meng.zhaoxing1@zte.com.cn>
Diffstat (limited to 'nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions')
-rw-r--r--nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/collectd.yaml13
-rw-r--r--nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/elasticsearch.yaml11
-rw-r--r--nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/kibana.yaml16
-rw-r--r--nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/logstash.yaml25
-rw-r--r--nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/paypalpizzastore_nodejs_app.yaml29
-rw-r--r--nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/rsyslog.yaml13
-rw-r--r--nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/tosca_elk.yaml217
7 files changed, 324 insertions, 0 deletions
diff --git a/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/collectd.yaml b/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/collectd.yaml
new file mode 100644
index 0000000..1ac0935
--- /dev/null
+++ b/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/collectd.yaml
@@ -0,0 +1,13 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ collectd is a daemon which gathers statistics about the system it is running on.
+
+node_types:
+ tosca.nodes.SoftwareComponent.Collectd:
+ derived_from: tosca.nodes.SoftwareComponent
+ requirements:
+ - log_endpoint:
+ capability: tosca.capabilities.Endpoint
+ node: tosca.nodes.SoftwareComponent.Logstash
+ relationship: tosca.relationships.ConnectsTo \ No newline at end of file
diff --git a/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/elasticsearch.yaml b/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/elasticsearch.yaml
new file mode 100644
index 0000000..4a1770f
--- /dev/null
+++ b/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/elasticsearch.yaml
@@ -0,0 +1,11 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Elasticsearch is an open-source search engine built on top of Apache Lucene, a full-text search-engine library.
+
+node_types:
+ tosca.nodes.SoftwareComponent.Elasticsearch:
+ derived_from: tosca.nodes.SoftwareComponent
+ capabilities:
+ search_endpoint:
+ type: tosca.capabilities.Endpoint
diff --git a/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/kibana.yaml b/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/kibana.yaml
new file mode 100644
index 0000000..3a4351c
--- /dev/null
+++ b/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/kibana.yaml
@@ -0,0 +1,16 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Kibana is an open source analytics and visualization platform designed to work with Elasticsearch.
+ You use Kibana to search, view, and interact with data stored in Elasticsearch.
+
+node_types:
+ tosca.nodes.SoftwareComponent.Kibana:
+ derived_from: tosca.nodes.SoftwareComponent
+ requirements:
+ - search_endpoint:
+ capability: tosca.capabilities.Endpoint
+ node: tosca.nodes.SoftwareComponent.Elasticsearch
+ relationship: tosca.relationships.ConnectsTo
+
+
diff --git a/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/logstash.yaml b/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/logstash.yaml
new file mode 100644
index 0000000..8495954
--- /dev/null
+++ b/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/logstash.yaml
@@ -0,0 +1,25 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Logstash is a tool for receiving, processing and outputting logs. All kinds of logs. System logs, webserver logs,
+ error logs, application logs, and just about anything you can throw at it.
+
+node_types:
+ tosca.nodes.SoftwareComponent.Logstash:
+ derived_from: tosca.nodes.SoftwareComponent
+ requirements:
+ - search_endpoint:
+ capability: tosca.capabilities.Endpoint
+ node: tosca.nodes.SoftwareComponent.Elasticsearch
+ relationship:
+ type: tosca.relationships.ConnectsTo
+ interfaces:
+ Configure:
+ pre_configure_source:
+ inputs:
+ elasticsearch_ip:
+ type: string
+ capabilities:
+ log_endpoint:
+ type: tosca.capabilities.Endpoint
+
diff --git a/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/paypalpizzastore_nodejs_app.yaml b/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/paypalpizzastore_nodejs_app.yaml
new file mode 100644
index 0000000..cdabeae
--- /dev/null
+++ b/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/paypalpizzastore_nodejs_app.yaml
@@ -0,0 +1,29 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ Pizza store app that allows you to explore the features provided by PayPal's REST APIs.
+ More detail can be found at https://github.com/paypal/rest-api-sample-app-nodejs/
+
+node_types:
+ tosca.nodes.WebApplication.PayPalPizzaStore:
+ derived_from: tosca.nodes.WebApplication
+ properties:
+ github_url:
+ required: false
+ type: string
+ description: location of the application on the github.
+ default: https://github.com/sample.git
+ requirements:
+ #WebApplication inherits Computer, so host implied.
+ - database_connection:
+ capability: tosca.capabilities.Endpoint.Database
+ node: tosca.nodes.Database
+ relationship: tosca.relationships.ConnectsTo
+ interfaces:
+ Standard:
+ configure:
+ inputs:
+ github_url:
+ type: string
+ mongodb_ip:
+ type: string
diff --git a/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/rsyslog.yaml b/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/rsyslog.yaml
new file mode 100644
index 0000000..4614ee7
--- /dev/null
+++ b/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/rsyslog.yaml
@@ -0,0 +1,13 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ RSYSLOG is the Rocket-fast SYStem for LOG processing.
+
+node_types:
+ tosca.nodes.SoftwareComponent.Rsyslog:
+ derived_from: tosca.nodes.SoftwareComponent
+ requirements:
+ - log_endpoint:
+ capability: tosca.capabilities.Endpoint
+ node: tosca.nodes.SoftwareComponent.Logstash
+ relationship: tosca.relationships.ConnectsTo
diff --git a/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/tosca_elk.yaml b/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/tosca_elk.yaml
new file mode 100644
index 0000000..932f131
--- /dev/null
+++ b/nfvparser/toscaparser/tests/data/CSAR/tosca_elk/Definitions/tosca_elk.yaml
@@ -0,0 +1,217 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: >
+ This TOSCA simple profile deploys nodejs, mongodb, elasticsearch, logstash and kibana each on a separate server
+ with monitoring enabled for nodejs server where a sample nodejs application is running. The rsyslog and collectd are
+ installed on a nodejs server.
+
+imports:
+ - paypalpizzastore_nodejs_app.yaml
+ - elasticsearch.yaml
+ - logstash.yaml
+ - kibana.yaml
+ - collectd.yaml
+ - rsyslog.yaml
+
+dsl_definitions:
+ host_capabilities: &host_capabilities
+ # container properties (flavor)
+ disk_size: 10 GB
+ num_cpus: { get_input: my_cpus }
+ mem_size: 4096 MB
+ os_capabilities: &os_capabilities
+ architecture: x86_64
+ type: Linux
+ distribution: Ubuntu
+ version: 14.04
+
+topology_template:
+ inputs:
+ my_cpus:
+ type: integer
+ description: Number of CPUs for the server.
+ constraints:
+ - valid_values: [ 1, 2, 4, 8 ]
+ github_url:
+ type: string
+ description: The URL to download nodejs.
+ default: http://github.com/paypal/rest-api-sample-app-nodejs.git
+
+ node_templates:
+ paypal_pizzastore:
+ type: tosca.nodes.WebApplication.PayPalPizzaStore
+ properties:
+ github_url: { get_input: github_url }
+ requirements:
+ - host: nodejs
+ - database_connection: mongo_db
+ interfaces:
+ Standard:
+ configure:
+ implementation: ../Scripts/nodejs/config.sh
+ inputs:
+ github_url: { get_property: [ SELF, github_url ] }
+ mongodb_ip: { get_attribute: [mongo_server, private_address] }
+ start: ../Scripts/nodejs/start.sh
+ nodejs:
+ type: tosca.nodes.WebServer
+ requirements:
+ - host:
+ node: app_server
+ interfaces:
+ Standard:
+ create: ../Scripts/nodejs/create.sh
+ mongo_db:
+ type: tosca.nodes.Database
+ requirements:
+ - host: mongo_dbms
+ interfaces:
+ Standard:
+ create: ../Scripts/mongodb/create_database.sh
+ mongo_dbms:
+ type: tosca.nodes.DBMS
+ requirements:
+ - host: mongo_server
+ interfaces:
+ Standard:
+ create: ../Scripts/mongodb/create.sh
+ configure:
+ implementation: ../Scripts/mongodb/config.sh
+ inputs:
+ mongodb_ip: { get_attribute: [mongo_server, private_address] }
+ start: ../Scripts/mongodb/start.sh
+ elasticsearch:
+ type: tosca.nodes.SoftwareComponent.Elasticsearch
+ requirements:
+ - host: elasticsearch_server
+ interfaces:
+ Standard:
+ create: ../Scripts/elasticsearch/create.sh
+ start: ../Scripts/elasticsearch/start.sh
+ logstash:
+ type: tosca.nodes.SoftwareComponent.Logstash
+ requirements:
+ - host: logstash_server
+ - search_endpoint:
+ node: elasticsearch
+ capability: search_endpoint
+ relationship:
+ type: tosca.relationships.ConnectsTo
+ interfaces:
+ Configure:
+ pre_configure_source:
+ implementation: ../Python/logstash/configure_elasticsearch.py
+ inputs:
+ elasticsearch_ip: { get_attribute: [elasticsearch_server, private_address] }
+ interfaces:
+ Standard:
+ create: ../Scripts/logstash/create.sh
+ start: ../Scripts/logstash/start.sh
+ kibana:
+ type: tosca.nodes.SoftwareComponent.Kibana
+ requirements:
+ - host: kibana_server
+ - search_endpoint: elasticsearch
+ interfaces:
+ Standard:
+ create: ../Scripts/kibana/create.sh
+ configure:
+ implementation: ../Scripts/kibana/config.sh
+ inputs:
+ elasticsearch_ip: { get_attribute: [elasticsearch_server, private_address] }
+ kibana_ip: { get_attribute: [kibana_server, private_address] }
+ start: ../Scripts/kibana/start.sh
+ app_collectd:
+ type: tosca.nodes.SoftwareComponent.Collectd
+ requirements:
+ - host: app_server
+ - log_endpoint:
+ node: logstash
+ capability: log_endpoint
+ relationship:
+ type: tosca.relationships.ConnectsTo
+ interfaces:
+ Configure:
+ pre_configure_target:
+ implementation: ../Python/logstash/configure_collectd.py
+ interfaces:
+ Standard:
+ create: ../Scripts/collectd/create.sh
+ configure:
+ implementation: ../Python/collectd/config.py
+ inputs:
+ logstash_ip: { get_attribute: [logstash_server, private_address] }
+ start: ../Scripts/collectd/start.sh
+ app_rsyslog:
+ type: tosca.nodes.SoftwareComponent.Rsyslog
+ requirements:
+ - host: app_server
+ - log_endpoint:
+ node: logstash
+ capability: log_endpoint
+ relationship:
+ type: tosca.relationships.ConnectsTo
+ interfaces:
+ Configure:
+ pre_configure_target:
+ implementation: ../Python/logstash/configure_rsyslog.py
+ interfaces:
+ Standard:
+ create: ../Scripts/rsyslog/create.sh
+ configure:
+ implementation: ../Scripts/rsyslog/config.sh
+ inputs:
+ logstash_ip: { get_attribute: [logstash_server, private_address] }
+ start: ../Scripts/rsyslog/start.sh
+ app_server:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties: *host_capabilities
+ os:
+ properties: *os_capabilities
+ mongo_server:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties: *host_capabilities
+ os:
+ properties: *os_capabilities
+ elasticsearch_server:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties: *host_capabilities
+ os:
+ properties: *os_capabilities
+ logstash_server:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties: *host_capabilities
+ os:
+ properties: *os_capabilities
+ kibana_server:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties: *host_capabilities
+ os:
+ properties: *os_capabilities
+
+ outputs:
+ nodejs_url:
+ description: URL for the nodejs server, http://<IP>:3000
+ value: { get_attribute: [ app_server, private_address ] }
+ mongodb_url:
+ description: URL for the mongodb server.
+ value: { get_attribute: [ mongo_server, private_address ] }
+ elasticsearch_url:
+ description: URL for the elasticsearch server.
+ value: { get_attribute: [ elasticsearch_server, private_address ] }
+ logstash_url:
+ description: URL for the logstash server.
+ value: { get_attribute: [ logstash_server, private_address ] }
+ kibana_url:
+ description: URL for the kibana server.
+ value: { get_attribute: [ kibana_server, private_address ] }