diff options
author | VENKATESH KUMAR <vv770d@att.com> | 2017-08-22 23:36:51 +0100 |
---|---|---|
committer | VENKATESH KUMAR <vv770d@att.com> | 2017-08-23 00:57:24 -0400 |
commit | 64dd2f365ce28e8254ba8fa4407dc5d7f192dacf (patch) | |
tree | f950dd24404a02acfdd0a853cbb9fef3fb4b65ce /dpo | |
parent | ef607b769611ddb809a4c13ce421f88ece16017d (diff) |
dcaegen2 vescollector seedcode
Initial seed code delivery for vescollector for support
on the gen2dcae platform
Issue-ID: DCAEGEN2-52
Change-Id: Id2477eb266f05caf64c67dd809b1ad146ff4fb92
Signed-off-by: VENKATESH KUMAR <vv770d@att.com>
Diffstat (limited to 'dpo')
-rw-r--r-- | dpo/blueprint/blueprint_ves.yaml | 167 | ||||
-rw-r--r-- | dpo/spec/vescollector-componentspec.json | 222 | ||||
-rw-r--r-- | dpo/tosca_model/schema.yaml | 240 | ||||
-rw-r--r-- | dpo/tosca_model/template.yaml | 101 | ||||
-rw-r--r-- | dpo/tosca_model/translate.yaml | 119 |
5 files changed, 849 insertions, 0 deletions
diff --git a/dpo/blueprint/blueprint_ves.yaml b/dpo/blueprint/blueprint_ves.yaml new file mode 100644 index 00000000..4012ea7e --- /dev/null +++ b/dpo/blueprint/blueprint_ves.yaml @@ -0,0 +1,167 @@ +tosca_definitions_version: cloudify_dsl_1_3 + +description: > + This handcrafted blueprint will install the ves collector and provision the needed message router topics. This blueprint can be used to verify that a platform installation is operational and working correctly. + +imports: + - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml + - https://NEXUS_REPO_HOST:8443/repository/NEXUS_RAW/type_files/docker/2.2.0/node-type.yaml + - https://NEXUS_REPO_HOST:8443/repository/NEXUS_RAW/type_files/relationship/1.0.0/node-type.yaml + - http://NEXUS_REPO_HOST:8081/repository/NEXUS_RAW/type_files/dmaap/dmaap_mr.yaml + +inputs: + + service_id: + description: Unique id used for an instance of this DCAE service. Use deployment id + default: 'foobar' + location_id: + default: 'solutioning-central' + docker_host_override: + default: 'component_dockerhost' + + topic00_aaf_username: + topic00_aaf_password: + topic00_location: + default: mtc5 + topic00_client_role: + default: com.att.dcae.member + + topic01_aaf_username: + topic01_aaf_password: + topic01_location: + default: mtc5 + topic01_client_role: + default: com.att.dcae.member + + topic02_aaf_username: + topic02_aaf_password: + topic02_location: + default: mtc5 + topic02_client_role: + default: com.att.dcae.member + + topic03_aaf_username: + topic03_aaf_password: + topic03_location: + default: mtc5 + topic03_client_role: + default: com.att.dcae.member + +node_templates: + + topic00: + type: dcae.nodes.Topic + properties: + topic_name: sec-fault-unsecure + + topic01: + type: dcae.nodes.Topic + properties: + topic_name: sec-measurement + + topic02: + type: dcae.nodes.Topic + properties: + topic_name: sec-measurement-unsecure + + topic03: + type: dcae.nodes.Topic + properties: + topic_name: sec-fault + + component00: + type: dcae.nodes.DockerContainerForComponentsUsingDmaap + properties: + service_component_type: + 'dcae-controller-ves-collector' + service_id: + { get_input: service_id } + location_id: + { get_input: location_id } + application_config: + collector.keystore.passwordfile: "/opt/app/dcae-certificate/.password" + collector.service.secure.port: -1 + tomcat.maxthreads: '200' + collector.keystore.file.location: "/opt/app/dcae-certificate/keystore.jks" + header.authflag: 0 + collector.service.port: 8080 + streams_publishes: + sec_fault_unsecure: + aaf_password: { get_input: topic00_aaf_password } + dmaap_info: "<<topic00>>" + type: message_router + aaf_username: { get_input: topic00_aaf_username } + sec_measurement: + aaf_password: { get_input: topic01_aaf_password } + aaf_username: { get_input: topic01_aaf_username } + type: message_router + dmaap_info: "<<topic01>>" + sec_measurement_unsecure: + aaf_password: { get_input: topic02_aaf_password } + aaf_username: { get_input: topic02_aaf_username } + dmaap_info: "<<topic02>>" + type: message_router + sec_fault: + aaf_password: { get_input: topic03_aaf_password } + aaf_username: { get_input: topic03_aaf_username } + dmaap_info: "<<topic03>>" + type: message_router + services_calls: {} + collector.schema.checkflag: 1 + collector.dmaap.streamid: fault=sec_fault,roadm-sec-to-hp|syslog=sec_syslog|heartbeat=sec_heartbeat|measurementsForVfScaling=sec_measurement|mobileFlow=sec_mobileflow|other=sec_other|stateChange=sec_statechange|thresholdCrossingAlert=sec_thresholdCrossingAlert + header.authlist: userid1,base64encodepwd1|userid2,base64encodepwd2 + streams_subscribes: {} + collector.inputQueue.maxPending: 8096 + collector.schema.file: "./etc/CommonEventFormat_27.2.json" + collector.keystore.alias: dynamically generated + image: + NEXUS_REPO_HOST:18443/dcae-dev-raw/dcae-controller-ves-collector:1.1.3 + docker_config: + healthcheck: + type: "http" + interval: "15s" + timeout: "1s" + endpoint: "/" + streams_publishes: + - name: topic00 + location: { get_input: topic00_location } + client_role: { get_input: topic00_client_role } + type: message_router + - name: topic01 + location: { get_input: topic01_location } + client_role: { get_input: topic01_client_role } + type: message_router + - name: topic02 + location: { get_input: topic02_location } + client_role: { get_input: topic02_client_role } + type: message_router + - name: topic03 + location: { get_input: topic03_location } + client_role: { get_input: topic03_client_role } + type: message_router + streams_subscribes: [] + relationships: + - type: dcae.relationships.component_contained_in + target: docker_host + - type: dcae.relationships.publish_events + target: topic00 + - type: dcae.relationships.publish_events + target: topic01 + - type: dcae.relationships.publish_events + target: topic02 + - type: dcae.relationships.publish_events + target: topic03 + interfaces: + cloudify.interfaces.lifecycle: + stop: + inputs: + cleanup_image: + True + + docker_host: + type: dcae.nodes.SelectedDockerHost + properties: + location_id: + { get_input: location_id } + docker_host_override: + { get_input: docker_host_override } diff --git a/dpo/spec/vescollector-componentspec.json b/dpo/spec/vescollector-componentspec.json new file mode 100644 index 00000000..b53a772c --- /dev/null +++ b/dpo/spec/vescollector-componentspec.json @@ -0,0 +1,222 @@ +{ + "self": { + "version": "1.1.4", + "name": "dcae-controller-ves-collector", + "description": "Collector for receiving VES events through restful interface", + "component_type": "docker" + }, + "streams": { + "subscribes": [ + + ], + "publishes": [ + { + "format": "VES_specification", + "version": "5.28.3", + "type": "message router", + "config_key": "sec_fault" + }, + { + "format": "VES_specification", + "version": "5.28.3", + "type": "message router", + "config_key": "sec_measurement" + }, + { + "format": "VES_specification", + "version": "5.28.3", + "type": "message router", + "config_key": "sec_syslog" + }, + { + "format": "VES_specification", + "version": "5.28.3", + "type": "message router", + "config_key": "sec_heartbeat" + }, + { + "format": "VES_specification", + "version": "5.28.3", + "type": "message router", + "config_key": "sec_other" + }, + { + "format": "VES_specification", + "version": "5.28.3", + "type": "message router", + "config_key": "sec_mobileflow" + }, + { + "format": "VES_specification", + "version": "5.28.3", + "type": "message router", + "config_key": "sec_statechange" + }, + { + "format": "VES_specification", + "version": "5.28.3", + "type": "message router", + "config_key": "sec_thresholdCrossingAlert" + }, + { + "format": "VES_specification", + "version": "5.28.3", + "type": "message router", + "config_key": "ves_voicequality" + }, + { + "format": "VES_specification", + "version": "5.28.3", + "type": "message router", + "config_key": "ves_sipsignaling" + } + ] + }, + "services": { + "calls": [], + "provides": [ + { + "route": "/eventListener/v1", + "verb": "POST", + "request": { + "format": "VES_specification", + "version": "4.27.2" + }, + "response": { + "format": "ves.coll.response", + "version": "1.0.0" + } + }, + { + "route": "/eventListener/v2", + "verb": "POST", + "request": { + "format": "VES_specification", + "version": "4.27.2" + }, + "response": { + "format": "ves.coll.response", + "version": "1.0.0" + } + }, + { + "route": "/eventListener/v3", + "verb": "POST", + "request": { + "format": "VES_specification", + "version": "4.27.2" + }, + "response": { + "format": "ves.coll.response", + "version": "1.0.0" + } + }, + { + "route": "/eventListener/v4", + "verb": "POST", + "request": { + "format": "VES_specification", + "version": "4.27.2" + }, + "response": { + "format": "ves.coll.response", + "version": "1.0.0" + } + }, + { + "route": "/eventListener/v5", + "verb": "POST", + "request": { + "format": "VES_specification", + "version": "5.28.3" + }, + "response": { + "format": "ves.coll.response", + "version": "1.0.0" + } + } + + ] + }, + "parameters": [ + { + "name": "collector.service.port", + "value": 8080, + "description": "standard http port" + }, + { + "name": "collector.service.secure.port", + "value": -1, + "description": "secure port " + }, + { + "name": "collector.keystore.file.location", + "value": "/opt/app/dcae-certificate/keystore.jks", + "description": "fs location of keystore in vm" + }, + { + "name": "collector.keystore.passwordfile", + "value": "/opt/app/dcae-certificate/.password", + "description": "location of keystore password file in vm" + }, + { + "name": "collector.keystore.alias", + "value": "dynamically generated", + "description": "alias to access the keystore" + }, + { + "name": "collector.inputQueue.maxPending", + "value": 8096, + "description": "Maximum queue limit before publish" + }, + { + "name": "collector.dmaap.streamid", + "value": "fault=sec_fault|syslog=sec_syslog|heartbeat=sec_heartbeat|measurementsForVfScaling=sec_measurement|mobileFlow=sec_mobileflow|other=sec_other|stateChange=sec_statechange|thresholdCrossingAlert=sec_thresholdCrossingAlert|voiceQuality=ves_voicequality|sipSignaling=ves_sipsignaling", + "description": "domain-streamid mapping" + }, + { + "name": "header.authflag", + "value": 0, + "description": "Basic Authentication flag" + }, + { + "name": "header.authlist", + "value": "userid1,base64encodepwd1|userid2,base64encodepwd2", + "description": "List of id and base64 encoded pwd" + }, + { + "name": "collector.schema.checkflag", + "value": 1, + "description": "Schema check validation flag" + }, + { + "name": "collector.schema.file", + "value": "{\"v4\":\"./etc/CommonEventFormat_27.2.json\",\"v5\":\"./etc/CommonEventFormat_28.3.json\"}", + "description": "validation schema file name per version" + }, + { + "name": "event.transform.flag", + "value": 1, + "description": "flag to enable tranformation rules defined under eventTransform.json" + }, + { + "name": "tomcat.maxthreads", + "value": "200", + "description": "Tomcat control for concurrent request" + } + ], + "auxilary": { + "healthcheck": { + "type": "http", + "interval": "15s", + "timeout": "1s", + "endpoint": "/healthcheck" + } + }, + "artifacts": [ + { + "type": "docker image", + "uri": "NEXUS_REPO/com.att.dcae.controller/dcae-controller-ves-collector:17.10-011" + } + ] +} diff --git a/dpo/tosca_model/schema.yaml b/dpo/tosca_model/schema.yaml new file mode 100644 index 00000000..f2eaae76 --- /dev/null +++ b/dpo/tosca_model/schema.yaml @@ -0,0 +1,240 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +capability_types: + dcae.capabilities.cdapHost: + derived_from: tosca.capabilities.Root + dcae.capabilities.composition.host: + derived_from: tosca.capabilities.Root + properties: + location_id: + type: string + service_id: + type: string + dcae.capabilities.dockerHost: + derived_from: tosca.capabilities.Root + dcae.capabilities.service.provide: + derived_from: tosca.capabilities.Root + properties: + request_format: + type: string + request_version: + type: string + response_format: + type: string + response_version: + type: string + dcae.capabilities.stream.subscribe: + derived_from: tosca.capabilities.Root + properties: + format: + type: string + version: + type: string +relationship_types: + dcae.relationships.rework_connected_to: + derived_from: tosca.relationships.Root + dcae.relationships.rework_contained_in: + derived_from: tosca.relationships.Root +node_types: + cloudify.dcae.nodes.Root: + derived_from: tosca.nodes.Root + cloudify.dcae.nodes.rework.DockerContainer: + attributes: + service_component_name: + type: string + capabilities: + service: + type: dcae.capabilities.service.provide + stream: + type: dcae.capabilities.stream.subscribe + derived_from: cloudify.dcae.nodes.Root + properties: + application_config: + required: true + type: map + image: + required: true + type: string + location_id: + required: true + type: string + service_component_type: + required: true + type: string + service_id: + required: true + type: string + requirements: + - host: + capability: dcae.capabilities.dockerHost + relationship: dcae.relationships.rework_contained_in + - stream: + capability: dcae.capabilities.stream.subscribe + relationship: dcae.relationships.rework_connected_to + dcae.nodes.MicroService.cdap: + attributes: + service_component_name: + type: string + capabilities: + service: + type: dcae.capabilities.service.provide + stream: + type: dcae.capabilities.stream.subscribe + derived_from: cloudify.dcae.nodes.Root + properties: + app_config: + required: false + type: map + app_preferences: + required: false + type: map + artifact_name: + required: false + type: string + artifact_version: + required: false + type: string + jar_url: + type: string + location_id: + type: string + namespace: + required: false + type: string + program_preferences: + required: false + type: list + programs: + required: false + type: list + service_component_type: + type: string + service_endpoints: + required: false + type: list + service_id: + type: string + streamname: + required: false + type: string + requirements: + - host: + capability: dcae.capabilities.cdapHost + relationship: dcae.relationships.rework_contained_in + - stream: + capability: dcae.capabilities.stream.subscribe + relationship: dcae.relationships.rework_connected_to + dcae.nodes.Root: + derived_from: tosca.nodes.Root + dcae.nodes.cdapApp: + attributes: + service_component_name: + type: string + derived_from: dcae.nodes.Root + properties: + jar_url: + required: true + type: string + location_id: + required: true + type: string + service_component_type: + required: true + type: string + service_id: + required: true + type: string + requirements: + - host: + capability: dcae.capabilities.cdapHost + relationship: dcae.relationships.rework_contained_in + - composition: + capability: dcae.capabilities.composition.host + dcae.nodes.dockerApp: + attributes: + service_component_name: + type: string + derived_from: dcae.nodes.Root + properties: + image: + required: true + type: string + location_id: + required: true + type: string + service_component_type: + required: true + type: string + service_id: + required: true + type: string + requirements: + - host: + capability: dcae.capabilities.dockerHost + relationship: dcae.relationships.rework_contained_in + - composition: + capability: dcae.capabilities.composition.host + dcae.nodes.dockerApp.ves: + derived_from: dcae.nodes.dockerApp + properties: + docker_collector.dmaap.streamid: + type: string + docker_collector.inputQueue.maxPending: + type: string + docker_collector.keystore.alias: + type: string + docker_collector.keystore.file.location: + type: string + docker_collector.keystore.passwordfile: + type: string + docker_collector.schema.checkflag: + type: string + docker_collector.schema.file: + type: string + docker_collector.service.port: + type: string + docker_collector.service.secure.port: + type: string + docker_header.authflag: + type: string + docker_header.authlist: + type: string + docker_tomcat.maxthreads: + type: string + service_0_service_endpoint: + type: string + service_0_service_name: + type: string + service_0_verb: + type: string + stream_0_key: + type: string + stream_0_route: + type: string + stream_1_key: + type: string + stream_1_route: + type: string + stream_2_key: + type: string + stream_3_key: + type: string + capabilities: + service_0: + type: dcae.capabilities.service.provide + stream_0: + type: dcae.capabilities.stream.subscribe + stream_1: + type: dcae.capabilities.stream.subscribe + requirements: + - stream_0: + capability: dcae.capabilities.stream.subscribe + relationship: dcae.relationships.rework_connected_to + - stream_1: + capability: dcae.capabilities.stream.subscribe + relationship: dcae.relationships.rework_connected_to + - stream_2: + capability: dcae.capabilities.stream.subscribe + relationship: dcae.relationships.rework_connected_to + - stream_3: + capability: dcae.capabilities.stream.subscribe + relationship: dcae.relationships.rework_connected_to diff --git a/dpo/tosca_model/template.yaml b/dpo/tosca_model/template.yaml new file mode 100644 index 00000000..9f2379ea --- /dev/null +++ b/dpo/tosca_model/template.yaml @@ -0,0 +1,101 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: ves +imports: +- schema: schema.yaml +topology_template: + node_templates: + ves: + type: dcae.nodes.dockerApp.ves + properties: + docker_collector.dmaap.streamid: fault=sec_fault,roadm-sec-to-hp|syslog=sec_syslog|heartbeat=sec_heartbeat|measurementsForVfScaling=sec_measurement|mobileFlow=sec_mobileflow|other=sec_other|stateChange=sec_statechange|thresholdCrossingAlert=sec_thresholdCrossingAlert + docker_collector.inputQueue.maxPending: '8096' + docker_collector.keystore.alias: dynamically generated + docker_collector.keystore.file.location: /opt/app/dcae-certificate/keystore.jks + docker_collector.keystore.passwordfile: /opt/app/dcae-certificate/.password + docker_collector.schema.checkflag: '1' + docker_collector.schema.file: ./etc/CommonEventFormat_27.2.json + docker_collector.service.port: '8080' + docker_collector.service.secure.port: '-1' + docker_header.authflag: '0' + docker_header.authlist: userid1,base64encodepwd1|userid2,base64encodepwd2 + docker_tomcat.maxthreads: '200' + location_id: + get_property: + - SELF + - composition + - location_id + service_0_service_endpoint: null + service_0_service_name: null + service_0_verb: POST + service_id: + get_property: + - SELF + - composition + - service_id + stream_0_key: sec_measurement_unsecure + stream_0_route: eventListener/v1 + stream_1_key: sec_measurement + stream_1_route: eventListener/v1/eventBatch + stream_2_key: sec_fault + stream_3_key: sec_fault_unsecure + capabilities: + service_0: + properties: + request_format: VES_specification + request_version: 4.27.2 + response_format: ves.coll.response + response_version: 1.0.0 + stream_0: + properties: + format: VES_specification + version: 4.27.2 + stream_1: + properties: + format: VES_specification + version: 4.27.2 + requirements: + - stream_0: + capability: dcae.capabilities.stream.subscribe + relationship: dcae.relationships.rework_connected_to + node_filter: + capabilities: + - dcae.capabilities.stream.subscribe: + properties: + - format: + - equal: VES_specification + - version: + - equal: 4.27.2 + - stream_1: + capability: dcae.capabilities.stream.subscribe + relationship: dcae.relationships.rework_connected_to + node_filter: + capabilities: + - dcae.capabilities.stream.subscribe: + properties: + - format: + - equal: VES_specification + - version: + - equal: 4.27.2 + - stream_2: + capability: dcae.capabilities.stream.subscribe + relationship: dcae.relationships.rework_connected_to + node_filter: + capabilities: + - dcae.capabilities.stream.subscribe: + properties: + - format: + - equal: VES_specification + - version: + - equal: 4.27.2 + - stream_3: + capability: dcae.capabilities.stream.subscribe + relationship: dcae.relationships.rework_connected_to + node_filter: + capabilities: + - dcae.capabilities.stream.subscribe: + properties: + - format: + - equal: VES_specification + - version: + - equal: 4.27.2 diff --git a/dpo/tosca_model/translate.yaml b/dpo/tosca_model/translate.yaml new file mode 100644 index 00000000..f1607e76 --- /dev/null +++ b/dpo/tosca_model/translate.yaml @@ -0,0 +1,119 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +metadata: + template_name: ves_translate +imports: +- schema: schema.yaml +topology_template: + inputs: + docker_collector.dmaap.streamid: + type: string + docker_collector.inputQueue.maxPending: + type: string + docker_collector.keystore.alias: + type: string + docker_collector.keystore.file.location: + type: string + docker_collector.keystore.passwordfile: + type: string + docker_collector.schema.checkflag: + type: string + docker_collector.schema.file: + type: string + docker_collector.service.port: + type: string + docker_collector.service.secure.port: + type: string + docker_header.authflag: + type: string + docker_header.authlist: + type: string + docker_tomcat.maxthreads: + type: string + image: + type: string + location_id: + type: string + service_0_service_endpoint: + type: string + service_0_service_name: + type: string + service_0_verb: + type: string + service_component_type: + type: string + service_id: + type: string + stream_0_key: + type: string + stream_0_route: + type: string + stream_1_key: + type: string + stream_1_route: + type: string + stream_2_key: + type: string + stream_3_key: + type: string + substitution_mappings: + node_type: dcae.nodes.dockerApp.ves + capabilities: + service_0: + - ves + - stream + stream_0: + - ves + - stream + stream_1: + - ves + - stream + requirements: + host: + - ves + - host + stream_0: + - ves + - stream + stream_1: + - ves + - stream + stream_2: + - ves + - stream + stream_3: + - ves + - stream + node_templates: + ves: + type: cloudify.dcae.nodes.rework.DockerContainer + properties: + application_config: + collector.dmaap.streamid: + get_input: docker_collector.dmaap.streamid + collector.inputQueue.maxPending: + get_input: docker_collector.inputQueue.maxPending + collector.keystore.alias: + get_input: docker_collector.keystore.alias + collector.keystore.file.location: + get_input: docker_collector.keystore.file.location + collector.keystore.passwordfile: + get_input: docker_collector.keystore.passwordfile + collector.schema.checkflag: + get_input: docker_collector.schema.checkflag + collector.schema.file: + get_input: docker_collector.schema.file + collector.service.port: + get_input: docker_collector.service.port + collector.service.secure.port: + get_input: docker_collector.service.secure.port + header.authflag: + get_input: docker_header.authflag + header.authlist: + get_input: docker_header.authlist + tomcat.maxthreads: + get_input: docker_tomcat.maxthreads + location_id: + get_input: location_id + service_component_type: cdap_app_ves + service_id: + get_input: service_id |