...
<list all the test blueprint along with small description on what the scope of each blueprints)
All test blueprint should be uploaded into https://git.onap.org/dcaegen2/platform/blueprints/tree/blueprints/reference_templates
Currently available DMaap plugin test blueprints arewe have the following blueprints:
- test_mr_pubsub_extra.yaml
- test_mr_pubsub.yaml
- test_mr_multipub.yaml
- test_mr_multisub.yaml
- test_dr_pubsub.yaml
- test_dr_mr.yaml
In the following discussion we assume that you already download these test scripts into directory /blueprints/blueprints/ directory on the test VM. (We loaded the blueprints manually in our test.)
Test Setup
<env dependencies; and pre-requisite for testing + any data load (e.g location details + consul load)>
Pre-requisite for running the test blueprints:
1) Add the following dmaap kv into consul
{
"dmaap" :
{
"username": "whatever",
"password": "whatever",
"owner" : "dcaeorch",
"protocol" : "http"
}
}
2) Add location san-francisco into DMaap DBCL
Deployment Steps
<steps for running blueprint listed earlier >
For each of the test blueprints, run the following commands:
- cfy install -b <blueprint
...
- -id> -d <deployment-id> <blueprint_name>
...
where <blueprint-id> and <deployment-id> can be any string choose by the user.
During deployment, Monitor the output of deployment for error messages.
After the blueprint is successfully deployed, check the DMaap DBCL url to verify the configuration. (Detailed commands are described later.)
After validation, uninstall the blueprint with the following command:
- cfy uninstall <deployment_
...
- id>
Recheck the DMaap DBCL url to verify that the previous configuration is deleted from DMaap DBCL.
Notice: since most of the blueprints reuse the same topic name(s) and feed name, please uninstall the current blueprint before testing the next one.
For example, the screen output of deploying/verifying test_mr_pubsub_extra.yaml is as follows:
[root@dev-dcaegen2-dcae-bootstrap-55cb5596b7-phdct blueprints]# cfy install -b test0 -d test0 test_mr_pubsub_extra.yaml
Uploading blueprint test_mr_pubsub_extra.yaml...
test_mr_pubsub_ex... |################################################| 100.0%
Blueprint uploaded. The blueprint's id is test0
Creating new deployment from blueprint test0...
Deployment created. The deployment's id is test0
Executing workflow install on deployment test0 [timeout=900 seconds]
Deployment environment creation is pending...
2019-05-09 20:53:07.512 CFY <test0> Starting 'create_deployment_environment' workflow execution
2019-05-09 20:53:08.088 CFY <test0> Installing deployment plugins
2019-05-09 20:53:08.088 CFY <test0> Sending task 'cloudify_agent.operations.install_plugins'
2019-05-09 20:53:08.088 CFY <test0> Task started 'cloudify_agent.operations.install_plugins'
2019-05-09 20:53:08.742 LOG <test0> INFO: Installing plugin: k8s
2019-05-09 20:53:08.742 LOG <test0> INFO: Using existing installation of managed plugin: 99e0f852-a688-4ecf-b606-37df263f6fa0 [package_name: k8splugin, package_version: 1.4.13, supported_platform: linux_x86_64, distribution: centos, distribution_release: core]
2019-05-09 20:53:08.742 LOG <test0> INFO: Installing plugin: dmaapplugin
2019-05-09 20:53:09.987 LOG <test0> INFO: Using existing installation of managed plugin: d8abab9c-2e52-4caa-a9fe-d74bf24609ad [package_name: dmaap, package_version: 1.3.2, supported_platform: any]
2019-05-09 20:53:09.987 CFY <test0> Task succeeded 'cloudify_agent.operations.install_plugins'
2019-05-09 20:53:09.987 CFY <test0> Skipping starting deployment policy engine core - no policies defined
2019-05-09 20:53:09.987 CFY <test0> Creating deployment work directory
2019-05-09 20:53:09.987 CFY <test0> 'create_deployment_environment' workflow execution succeeded
2019-05-09 20:53:15.444 CFY <test0> Starting 'install' workflow execution
2019-05-09 20:53:17.083 CFY <test0> [topic00_incvxj] Creating node instance
2019-05-09 20:53:17.718 CFY <test0> [topic01_34hei2] Creating node instance
2019-05-09 20:53:17.718 CFY <test0> [topic00_incvxj.create] Sending task 'dmaapplugin.mr_lifecycle.create_topic'
2019-05-09 20:53:18.396 CFY <test0> [topic01_34hei2.create] Sending task 'dmaapplugin.mr_lifecycle.create_topic'
2019-05-09 20:53:19.322 LOG <test0> [topic00_incvxj.create] INFO: Attempting to create topic name topic00
2019-05-09 20:53:19.826 LOG <test0> [topic00_incvxj.create] INFO: Posting to URL: http://dmaap-bc:8080/webapi/topics with body: {'txenable': False, 'globalMrURL': u'message-router', 'replicationCase': u'REPLICATION_EDGE_TO_CENTRAL_TO_GLOBAL', 'topicDescription': 'No description provided', 'owner': u'dcaeorch', 'topicName': u'topic00'}
2019-05-09 20:53:19.826 LOG <test0> [topic01_34hei2.create] INFO: Attempting to create topic name topic01
2019-05-09 20:53:19.826 LOG <test0> [topic01_34hei2.create] INFO: Posting to URL: http://dmaap-bc:8080/webapi/topics with body: {'owner': u'dcaeorch', 'topicDescription': 'No description provided', 'topicName': u'topic01', 'replicationCase': u'REPLICATION_EDGE_TO_CENTRAL', 'txenable': False}
2019-05-09 20:53:21.331 CFY <test0> [topic01_34hei2.create] Task succeeded 'dmaapplugin.mr_lifecycle.create_topic'
2019-05-09 20:53:21.965 CFY <test0> [topic00_incvxj.create] Task succeeded 'dmaapplugin.mr_lifecycle.create_topic'
2019-05-09 20:53:21.965 CFY <test0> [topic01_34hei2] Node instance created
2019-05-09 20:53:21.965 CFY <test0> [topic00_incvxj] Node instance created
2019-05-09 20:53:22.648 CFY <test0> [topic01_34hei2] Configuring node instance: nothing to do
2019-05-09 20:53:22.648 CFY <test0> [topic00_incvxj] Configuring node instance: nothing to do
2019-05-09 20:53:22.648 CFY <test0> [topic01_34hei2] Starting node instance: nothing to do
2019-05-09 20:53:22.648 CFY <test0> [topic00_incvxj] Starting node instance: nothing to do
2019-05-09 20:53:23.375 CFY <test0> [topic01_34hei2] Node instance started
2019-05-09 20:53:23.995 CFY <test0> [topic00_incvxj] Node instance started
2019-05-09 20:53:24.700 CFY <test0> [client00_cowri2] Creating node instance
2019-05-09 20:53:25.368 CFY <test0> [client00_cowri2.create] Sending task 'k8splugin.create_for_components_with_streams'
2019-05-09 20:53:29.247 LOG <test0> [client00_cowri2.create] INFO: Done setting up: sc972b27b7f5d4835976efbe93316e253-nginx-web
2019-05-09 20:53:28.560 LOG <test0> [client00_cowri2.create] INFO: Added config for sc972b27b7f5d4835976efbe93316e253-nginx-web
2019-05-09 20:53:29.247 CFY <test0> [client00_cowri2.create] Task succeeded 'k8splugin.create_for_components_with_streams'
2019-05-09 20:53:29.857 CFY <test0> [client00_cowri2] Node instance created
2019-05-09 20:53:29.857 CFY <test0> [client00_cowri2] Pre-configuring relationships
2019-05-09 20:53:29.857 CFY <test0> [preconfigure] Sending task 'dmaapplugin.mr_relationships.add_mr_publisher'
2019-05-09 20:53:32.143 LOG <test0> [preconfigure] INFO: Posting to URL: http://dmaap-bc:8080/webapi/mr_clients with body: {'action': ['view', 'pub'], 'clientRole': u'org.onap.dcae.pnfPublisher', 'fqtn': u'org.onap.dmaap.mr.topic00', 'dcaeLocationName': u'san-francisco'}
2019-05-09 20:53:31.518 LOG <test0> [preconfigure] INFO: Attempting to add client00 as publisher to topic org.onap.dmaap.mr.topic00
2019-05-09 20:53:32.143 LOG <test0> [preconfigure] INFO: Added publisher id 1557435211391 to feed org.onap.dmaap.mr.topic00 at san-francisco
2019-05-09 20:53:32.777 CFY <test0> [preconfigure] Task succeeded 'dmaapplugin.mr_relationships.add_mr_publisher'
2019-05-09 20:53:32.777 CFY <test0> [preconfigure] Sending task 'dmaapplugin.mr_relationships.add_mr_subscriber'
2019-05-09 20:53:33.963 LOG <test0> [preconfigure] INFO: Attempting to add client00 as subscriber to topic org.onap.dmaap.mr.topic01
2019-05-09 20:53:34.601 LOG <test0> [preconfigure] INFO: Posting to URL: http://dmaap-bc:8080/webapi/mr_clients with body: {'action': ['view', 'sub'], 'clientRole': u'org.onap.dcae.pnfSubscriber', 'fqtn': u'org.onap.dmaap.mr.topic01', 'dcaeLocationName': u'san-francisco'}
2019-05-09 20:53:34.601 LOG <test0> [preconfigure] INFO: Added subscriber id 1557435213810 to feed org.onap.dmaap.mr.topic01 at san-francisco
2019-05-09 20:53:35.180 CFY <test0> [preconfigure] Task succeeded 'dmaapplugin.mr_relationships.add_mr_subscriber'
2019-05-09 20:53:35.180 CFY <test0> [client00_cowri2] Relationships pre-configured
2019-05-09 20:53:35.802 CFY <test0> [client00_cowri2] Configuring node instance: nothing to do
2019-05-09 20:53:35.802 CFY <test0> [client00_cowri2] Starting node instance
2019-05-09 20:53:35.802 CFY <test0> [client00_cowri2.start] Sending task 'k8splugin.create_and_start_container_for_components_with_streams'
2019-05-09 20:53:37.229 LOG <test0> [client00_cowri2.start] INFO: Starting k8s deployment for sc972b27b7f5d4835976efbe93316e253-nginx-web, image: nginx, env: {'CONSUL_HOST': u'consul-server.onap', 'SERVICE_TAGS': 'test0', 'CONFIG_BINDING_SERVICE': 'config-binding-service'}, kwargs: {'readiness': {u'endpoint': u'/', u'type': u'http'}, 'labels': {'cfydeployment': u'test0', 'cfynodeinstance': u'client00_cowri2', 'cfynode': u'client00'}, 'tls_info': {}, 'envs': {'SERVICE_TAGS': 'test0'}, 'liveness': {}, 'resource_config': {}, 'volumes': [], 'log_info': {}, 'ports': [u'80:0'], 'k8s_location': u'central'}
2019-05-09 20:53:37.732 LOG <test0> [client00_cowri2.start] INFO: Passing k8sconfig: {'tls': {u'cert_path': u'/opt/tls/shared', u'image': u'nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tls-init-container:1.0.3'}, 'filebeat': {u'config_map': u'dcae-filebeat-configmap', u'config_path': u'/usr/share/filebeat/filebeat.yml', u'log_path': u'/var/log/onap', u'image': u'docker.elastic.co/beats/filebeat:5.5.0', u'data_path': u'/usr/share/filebeat/data', u'config_subpath': u'filebeat.yml'}, 'consul_dns_name': u'consul-server.onap', 'image_pull_secrets': [u'onap-docker-registry-key'], 'namespace': u'onap', 'consul_host': 'consul-server:8500', 'default_k8s_location': u'central'}
2019-05-09 20:53:38.354 LOG <test0> [client00_cowri2.start] INFO: k8s deployment initiated successfully for sc972b27b7f5d4835976efbe93316e253-nginx-web: {'services': ['sc972b27b7f5d4835976efbe93316e253-nginx-web'], 'namespace': u'onap', 'location': u'central', 'deployment': 'dep-sc972b27b7f5d4835976efbe93316e253-nginx-web'}
2019-05-09 20:53:38.354 LOG <test0> [client00_cowri2.start] INFO: Waiting up to 1800 secs for sc972b27b7f5d4835976efbe93316e253-nginx-web to become ready
2019-05-09 20:54:36.905 LOG <test0> [client00_cowri2.start] INFO: k8s deployment is ready for: sc972b27b7f5d4835976efbe93316e253-nginx-web
2019-05-09 20:54:37.429 LOG <test0> [client00_cowri2.start] INFO: Done starting: sc972b27b7f5d4835976efbe93316e253-nginx-web
2019-05-09 20:54:38.176 CFY <test0> [client00_cowri2.start] Task succeeded 'k8splugin.create_and_start_container_for_components_with_streams'
2019-05-09 20:54:38.176 CFY <test0> [client00_cowri2] Node instance started
2019-05-09 20:54:38.792 CFY <test0> 'install' workflow execution succeeded
Finished executing workflow install on deployment test0
* Run 'cfy events list -e 99a9d61a-e62c-4e83-ae3e-baa20a8eea39' to retrieve the execution's events/logs
[root@dev-dcaegen2-dcae-bootstrap-55cb5596b7-phdct blueprints]# curl http://dmaap-bc:8080/webapi/topics/org.onap.dmaap.mr.topic00 | python -mjson.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 738 100 738 0 0 27245 0 --:--:-- --:--:-- --:--:-- 28384
{
"clients": [
{
"action": [
"view",
"pub"
],
"clientRole": "org.onap.dcae.pnfPublisher",
"dcaeLocationName": "san-francisco",
"fqtn": "org.onap.dmaap.mr.topic00",
"lastMod": "2019-05-09T20:53:31.391",
"mrClientId": "1557435211391",
"status": "VALID",
"topicURL": "http://message-router:3904/events/org.onap.dmaap.mr.topic00"
}
],
"fqtn": "org.onap.dmaap.mr.topic00",
"globalMrURL": "message-router",
"lastMod": "2019-05-09T20:53:19.247",
"owner": "dcaeorch",
"partitionCount": "2",
"publisherRole": "org.onap.dmaap.mr.topic00.publisher",
"replicationCase": "REPLICATION_EDGE_TO_CENTRAL_TO_GLOBAL",
"replicationCount": "1",
"status": "VALID",
"subscriberRole": "org.onap.dmaap.mr.topic00.subscriber",
"topicDescription": "No description provided",
"topicName": "topic00",
"type": "topic"
}
[root@dev-dcaegen2-dcae-bootstrap-55cb5596b7-phdct blueprints]# curl http://dmaap-bc:8080/webapi/topics/org.onap.dmaap.mr.topic01 | python -mjson.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 697 100 697 0 0 47062 0 --:--:-- --:--:-- --:--:-- 49785
{
"clients": [
{
"action": [
"view",
"sub"
],
"clientRole": "org.onap.dcae.pnfSubscriber",
"dcaeLocationName": "san-francisco",
"fqtn": "org.onap.dmaap.mr.topic01",
"lastMod": "2019-05-09T20:53:33.81",
"mrClientId": "1557435213810",
"status": "VALID",
"topicURL": "http://message-router:3904/events/org.onap.dmaap.mr.topic01"
}
],
"fqtn": "org.onap.dmaap.mr.topic01",
"lastMod": "2019-05-09T20:53:19.448",
"owner": "dcaeorch",
"partitionCount": "2",
"publisherRole": "org.onap.dmaap.mr.topic01.publisher",
"replicationCase": "REPLICATION_EDGE_TO_CENTRAL",
"replicationCount": "1",
"status": "VALID",
"subscriberRole": "org.onap.dmaap.mr.topic01.subscriber",
"topicDescription": "No description provided",
"topicName": "topic01",
"type": "topic"
}
[root@dev-dcaegen2-dcae-bootstrap-55cb5596b7-phdct blueprints]# curl http://dmaap-bc:8080/webapi/mr_clients/1557435211391 | python -mjson.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 311 100 311 0 0 4675 0 --:--:-- --:--:-- --:--:-- 4712
{
"action": [
"view",
"pub"
],
"clientRole": "org.onap.dcae.pnfPublisher",
"dcaeLocationName": "san-francisco",
"fqtn": "org.onap.dmaap.mr.topic00",
"lastMod": "2019-05-09T20:53:31.391",
"mrClientId": "1557435211391",
"status": "VALID",
"topicURL": "http://message-router:3904/events/org.onap.dmaap.mr.topic00",
"type": "mr_Client"
}
[root@dev-dcaegen2-dcae-bootstrap-55cb5596b7-phdct blueprints]# curl http://dmaap-bc:8080/webapi/mr_clients/1557435213810 | python -mjson.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 311 100 311 0 0 9155 0 --:--:-- --:--:-- --:--:-- 9424
{
"action": [
"view",
"sub"
],
"clientRole": "org.onap.dcae.pnfSubscriber",
"dcaeLocationName": "san-francisco",
"fqtn": "org.onap.dmaap.mr.topic01",
"lastMod": "2019-05-09T20:53:33.81",
"mrClientId": "1557435213810",
"status": "VALID",
"topicURL": "http://message-router:3904/events/org.onap.dmaap.mr.topic01",
"type": "mr_Client"
}
...
Examples of deploy/un-deploy commands, the curl commands for checking DMaap DBCL configuration, and screen output for all the blueprints are available in the attached file. <link?<link to be added later>
Validation
<expected logs + consul entry + curl commands/postman + any other steps for verification from MS standpoint>
...