diff options
author | Venkata Harish K Kajur <vk250x@att.com> | 2017-06-05 23:52:59 -0400 |
---|---|---|
committer | Venkata Harish K Kajur <vk250x@att.com> | 2017-06-06 02:10:08 -0400 |
commit | ee7270a9f26a8716aef7fefda714091a96d4a790 (patch) | |
tree | 3b6cdfb9120a42433df4da8afc75b6ceab44dd3f | |
parent | 0cd55fc1d50f066720bbe0ce591d9cbc59ecddf4 (diff) |
[AAI-ONAP] Add recipes and templates for dmaap
Change-Id: I47dbb80f66871f7c8642fbc8c277039b2ef1e1c7
Signed-off-by: Venkata Harish K Kajur <vk250x@att.com>
8 files changed, 45 insertions, 1 deletions
diff --git a/cookbooks/aai-resources/aai-resources-config/attributes/aaiEventDMaaPPublisher.rb b/cookbooks/aai-resources/aai-resources-config/attributes/aaiEventDMaaPPublisher.rb new file mode 100644 index 0000000..91bc7bb --- /dev/null +++ b/cookbooks/aai-resources/aai-resources-config/attributes/aaiEventDMaaPPublisher.rb @@ -0,0 +1,3 @@ +node.default["aai-resources-config"]["AAI_DMAAP_PROTOCOL"] = 'http' +node.default["aai-resources-config"]["AAI_DMAAP_HOST_PORT"] = 'localhost:3904' +node.default["aai-resources-config"]["AAI_DMAAP_TOPIC_NAME"] = 'AAI-EVENT' diff --git a/cookbooks/aai-resources/aai-resources-config/recipes/aaiEventDMaaPPublisher.rb b/cookbooks/aai-resources/aai-resources-config/recipes/aaiEventDMaaPPublisher.rb new file mode 100644 index 0000000..1e626db --- /dev/null +++ b/cookbooks/aai-resources/aai-resources-config/recipes/aaiEventDMaaPPublisher.rb @@ -0,0 +1,14 @@ +['aaiEventDMaaPPublisher.properties'].each do |file| + template "#{node['aai-resources-config']['PROJECT_HOME']}/bundleconfig/etc/appprops/#{file}" do + source "aai-resources-config/aaiEventDMaaPPublisher.properties" + owner "aaiadmin" + group "aaiadmin" + mode "0644" + variables( +:AAI_DMAAP_PROTOCOL => node["aai-resources-config"]["AAI_DMAAP_PROTOCOL"], +:AAI_DMAAP_HOST_PORT => node["aai-resources-config"]["AAI_DMAAP_HOST_PORT"], +:AAI_DMAAP_TOPIC_NAME => node["aai-resources-config"]["AAI_DMAAP_TOPIC_NAME"] + ) + end +end + diff --git a/cookbooks/aai-resources/aai-resources-config/templates/default/aai-resources-config/aaiEventDMaaPPublisher.properties b/cookbooks/aai-resources/aai-resources-config/templates/default/aai-resources-config/aaiEventDMaaPPublisher.properties new file mode 100644 index 0000000..8ad92cd --- /dev/null +++ b/cookbooks/aai-resources/aai-resources-config/templates/default/aai-resources-config/aaiEventDMaaPPublisher.properties @@ -0,0 +1,4 @@ +Protocol=<%= @AAI_DMAAP_PROTOCOL %> +contenttype=application/json +host=<%= @AAI_DMAAP_HOST_PORT %> +topic=<%= @AAI_DMAAP_TOPIC_NAME %> diff --git a/cookbooks/aai-resources/runlist-aai-resources.json b/cookbooks/aai-resources/runlist-aai-resources.json index a163f94..92c493d 100644 --- a/cookbooks/aai-resources/runlist-aai-resources.json +++ b/cookbooks/aai-resources/runlist-aai-resources.json @@ -2,6 +2,7 @@ "run_list": [ "recipe[aai-resources-config::createConfigDirectories]", "recipe[aai-resources-auth::aai-resources-aai-keystore]", + "recipe[aai-resources-config::aaiEventDMaaPPublisher]", "recipe[aai-resources-config::aai-resources-config]", "recipe[aai-resources-config::titan-cached]", "recipe[aai-resources-config::titan-realtime]", diff --git a/cookbooks/aai-traversal/aai-traversal-config/attributes/aaiEventDMaaPPublisher.rb b/cookbooks/aai-traversal/aai-traversal-config/attributes/aaiEventDMaaPPublisher.rb new file mode 100644 index 0000000..7d20b30 --- /dev/null +++ b/cookbooks/aai-traversal/aai-traversal-config/attributes/aaiEventDMaaPPublisher.rb @@ -0,0 +1,3 @@ +node.default["aai-traversal-config"]["AAI_DMAAP_PROTOCOL"] = 'http' +node.default["aai-traversal-config"]["AAI_DMAAP_HOST_PORT"] = 'localhost:3904' +node.default["aai-traversal-config"]["AAI_DMAAP_TOPIC_NAME"] = 'AAI-EVENT' diff --git a/cookbooks/aai-traversal/aai-traversal-config/recipes/aaiEventDMaaPPublisher.rb b/cookbooks/aai-traversal/aai-traversal-config/recipes/aaiEventDMaaPPublisher.rb new file mode 100644 index 0000000..6b66a6d --- /dev/null +++ b/cookbooks/aai-traversal/aai-traversal-config/recipes/aaiEventDMaaPPublisher.rb @@ -0,0 +1,14 @@ +['aaiEventDMaaPPublisher.properties'].each do |file| + template "#{node['aai-traversal-config']['PROJECT_HOME']}/bundleconfig/etc/appprops/#{file}" do + source "aai-traversal-app-config/aaiEventDMaaPPublisher.properties" + owner "aaiadmin" + group "aaiadmin" + mode "0644" + variables( +:AAI_DMAAP_PROTOCOL => node["aai-traversal-config"]["AAI_DMAAP_PROTOCOL"], +:AAI_DMAAP_HOST_PORT => node["aai-traversal-config"]["AAI_DMAAP_HOST_PORT"], +:AAI_DMAAP_TOPIC_NAME => node["aai-traversal-config"]["AAI_DMAAP_TOPIC_NAME"] + ) + end +end + diff --git a/cookbooks/aai-traversal/aai-traversal-config/templates/default/aai-traversal-app-config/aaiEventDMaaPPublisher.properties b/cookbooks/aai-traversal/aai-traversal-config/templates/default/aai-traversal-app-config/aaiEventDMaaPPublisher.properties new file mode 100644 index 0000000..8ad92cd --- /dev/null +++ b/cookbooks/aai-traversal/aai-traversal-config/templates/default/aai-traversal-app-config/aaiEventDMaaPPublisher.properties @@ -0,0 +1,4 @@ +Protocol=<%= @AAI_DMAAP_PROTOCOL %> +contenttype=application/json +host=<%= @AAI_DMAAP_HOST_PORT %> +topic=<%= @AAI_DMAAP_TOPIC_NAME %> diff --git a/cookbooks/aai-traversal/runlist-aai-traversal.json b/cookbooks/aai-traversal/runlist-aai-traversal.json index bd2fab2..8baa3e4 100644 --- a/cookbooks/aai-traversal/runlist-aai-traversal.json +++ b/cookbooks/aai-traversal/runlist-aai-traversal.json @@ -2,10 +2,11 @@ "run_list": [ "recipe[aai-traversal-config::createConfigDirectories]", "recipe[aai-traversal-auth::aai-traversal-aai-keystore]", + "recipe[aai-traversal-config::aaiEventDMaaPPublisher]", "recipe[aai-traversal-config::titan-cached]", "recipe[aai-traversal-config::titan-realtime]", "recipe[aai-traversal-config::gremlin-server-config]", "recipe[aai-traversal-config::aai-traversal-config]", "recipe[aai-traversal-config::aai-preferredRoute]" ] -}
\ No newline at end of file +} |