From ee7270a9f26a8716aef7fefda714091a96d4a790 Mon Sep 17 00:00:00 2001 From: Venkata Harish K Kajur Date: Mon, 5 Jun 2017 23:52:59 -0400 Subject: [AAI-ONAP] Add recipes and templates for dmaap Change-Id: I47dbb80f66871f7c8642fbc8c277039b2ef1e1c7 Signed-off-by: Venkata Harish K Kajur --- .../attributes/aaiEventDMaaPPublisher.rb | 3 +++ .../aai-resources-config/recipes/aaiEventDMaaPPublisher.rb | 14 ++++++++++++++ .../aai-resources-config/aaiEventDMaaPPublisher.properties | 4 ++++ cookbooks/aai-resources/runlist-aai-resources.json | 1 + .../attributes/aaiEventDMaaPPublisher.rb | 3 +++ .../aai-traversal-config/recipes/aaiEventDMaaPPublisher.rb | 14 ++++++++++++++ .../aaiEventDMaaPPublisher.properties | 4 ++++ cookbooks/aai-traversal/runlist-aai-traversal.json | 3 ++- 8 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 cookbooks/aai-resources/aai-resources-config/attributes/aaiEventDMaaPPublisher.rb create mode 100644 cookbooks/aai-resources/aai-resources-config/recipes/aaiEventDMaaPPublisher.rb create mode 100644 cookbooks/aai-resources/aai-resources-config/templates/default/aai-resources-config/aaiEventDMaaPPublisher.properties create mode 100644 cookbooks/aai-traversal/aai-traversal-config/attributes/aaiEventDMaaPPublisher.rb create mode 100644 cookbooks/aai-traversal/aai-traversal-config/recipes/aaiEventDMaaPPublisher.rb create mode 100644 cookbooks/aai-traversal/aai-traversal-config/templates/default/aai-traversal-app-config/aaiEventDMaaPPublisher.properties 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 +} -- cgit 1.2.3-korg