From b160c3cc1e58e85502ccaa7358cd38ff210ed34a Mon Sep 17 00:00:00 2001 From: Steve Smokowski Date: Thu, 9 Feb 2017 15:38:13 -0500 Subject: Initial OpenECOMP A&AI commit Change-Id: Ic953856ef5e44eebf05bd00fe26cb5901fb49289 Signed-off-by: Steve Smokowski --- cookbooks/ajsc-aai-config/CHANGELOG.md | 13 + cookbooks/ajsc-aai-config/README.md | 68 +++++ .../attributes/aaiWorkloadConsumer.properties.rb | 21 ++ .../attributes/aaiWorkloadPublisher.properties.rb | 21 ++ .../aaiWorkloadStatusPublisher.properties.rb | 21 ++ .../attributes/aaiconfig-properties.rb | 34 +++ cookbooks/ajsc-aai-config/attributes/logback.rb | 1 + .../ajsc-aai-config/attributes/preferredRoute.rb | 1 + cookbooks/ajsc-aai-config/metadata.rb | 7 + cookbooks/ajsc-aai-config/recipes/aai-config.rb | 89 ++++++ cookbooks/ajsc-aai-config/recipes/aai-logback.rb | 15 ++ .../ajsc-aai-config/recipes/aai-preferredRoute.rb | 11 + .../ajsc-aai-config/recipes/aaiWorkloadConsumer.rb | 32 +++ .../recipes/aaiWorkloadPublisher.rb | 31 +++ .../recipes/aaiWorkloadStatusPublisher.rb | 31 +++ .../recipes/createConfigDirectories.rb | 60 +++++ .../aai-app-config/aaiWorkloadConsumer.properties | 30 +++ .../aai-app-config/aaiWorkloadPublisher.properties | 29 ++ .../aaiWorkloadStatusPublisher.properties | 29 ++ .../default/aai-app-config/aaiconfig.properties | 92 +++++++ .../default/aai-app-config/aft.properties | 8 + .../templates/default/aai-app-config/logback.erb | 298 +++++++++++++++++++++ .../default/aai-app-config/preferredRoute.txt | 1 + 23 files changed, 943 insertions(+) create mode 100644 cookbooks/ajsc-aai-config/CHANGELOG.md create mode 100644 cookbooks/ajsc-aai-config/README.md create mode 100644 cookbooks/ajsc-aai-config/attributes/aaiWorkloadConsumer.properties.rb create mode 100644 cookbooks/ajsc-aai-config/attributes/aaiWorkloadPublisher.properties.rb create mode 100644 cookbooks/ajsc-aai-config/attributes/aaiWorkloadStatusPublisher.properties.rb create mode 100644 cookbooks/ajsc-aai-config/attributes/aaiconfig-properties.rb create mode 100644 cookbooks/ajsc-aai-config/attributes/logback.rb create mode 100644 cookbooks/ajsc-aai-config/attributes/preferredRoute.rb create mode 100644 cookbooks/ajsc-aai-config/metadata.rb create mode 100644 cookbooks/ajsc-aai-config/recipes/aai-config.rb create mode 100644 cookbooks/ajsc-aai-config/recipes/aai-logback.rb create mode 100644 cookbooks/ajsc-aai-config/recipes/aai-preferredRoute.rb create mode 100644 cookbooks/ajsc-aai-config/recipes/aaiWorkloadConsumer.rb create mode 100644 cookbooks/ajsc-aai-config/recipes/aaiWorkloadPublisher.rb create mode 100644 cookbooks/ajsc-aai-config/recipes/aaiWorkloadStatusPublisher.rb create mode 100644 cookbooks/ajsc-aai-config/recipes/createConfigDirectories.rb create mode 100644 cookbooks/ajsc-aai-config/templates/default/aai-app-config/aaiWorkloadConsumer.properties create mode 100644 cookbooks/ajsc-aai-config/templates/default/aai-app-config/aaiWorkloadPublisher.properties create mode 100644 cookbooks/ajsc-aai-config/templates/default/aai-app-config/aaiWorkloadStatusPublisher.properties create mode 100644 cookbooks/ajsc-aai-config/templates/default/aai-app-config/aaiconfig.properties create mode 100644 cookbooks/ajsc-aai-config/templates/default/aai-app-config/aft.properties create mode 100644 cookbooks/ajsc-aai-config/templates/default/aai-app-config/logback.erb create mode 100644 cookbooks/ajsc-aai-config/templates/default/aai-app-config/preferredRoute.txt (limited to 'cookbooks/ajsc-aai-config') diff --git a/cookbooks/ajsc-aai-config/CHANGELOG.md b/cookbooks/ajsc-aai-config/CHANGELOG.md new file mode 100644 index 0000000..ea3ec7a --- /dev/null +++ b/cookbooks/ajsc-aai-config/CHANGELOG.md @@ -0,0 +1,13 @@ +ajsc-aai-config CHANGELOG +========================= + +This file is used to list changes made in each version of the ajsc-aai-config cookbook. + +0.1.0 +----- +- [your_name] - Initial release of ajsc-aai-config + +- - - +Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown. + +The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown. diff --git a/cookbooks/ajsc-aai-config/README.md b/cookbooks/ajsc-aai-config/README.md new file mode 100644 index 0000000..decd065 --- /dev/null +++ b/cookbooks/ajsc-aai-config/README.md @@ -0,0 +1,68 @@ +ajsc-aai-config Cookbook +======================== +TODO: Enter the cookbook description here. + +e.g. +This cookbook makes your favorite breakfast sandwich. + +Requirements +------------ +TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc. + +e.g. +#### packages +- `toaster` - ajsc-aai-config needs toaster to brown your bagel. + +Attributes +---------- +TODO: List your cookbook attributes here. + +e.g. +#### ajsc-aai-config::default + + + + + + + + + + + + + +
KeyTypeDescriptionDefault
['ajsc-aai-config']['bacon']Booleanwhether to include bacontrue
+ +Usage +----- +#### ajsc-aai-config::default +TODO: Write usage instructions for each cookbook. + +e.g. +Just include `ajsc-aai-config` in your node's `run_list`: + +```json +{ + "name":"my_node", + "run_list": [ + "recipe[ajsc-aai-config]" + ] +} +``` + +Contributing +------------ +TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section. + +e.g. +1. Fork the repository on Github +2. Create a named feature branch (like `add_component_x`) +3. Write your change +4. Write tests for your change (if applicable) +5. Run the tests, ensuring they all pass +6. Submit a Pull Request using Github + +License and Authors +------------------- +Authors: TODO: List authors diff --git a/cookbooks/ajsc-aai-config/attributes/aaiWorkloadConsumer.properties.rb b/cookbooks/ajsc-aai-config/attributes/aaiWorkloadConsumer.properties.rb new file mode 100644 index 0000000..bbd266a --- /dev/null +++ b/cookbooks/ajsc-aai-config/attributes/aaiWorkloadConsumer.properties.rb @@ -0,0 +1,21 @@ +node.default["aai-app-config"]["AAI_WORKLOAD_SERVICE_NAME"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_ENVIRONMENT"] = 'TEST' +node.default["aai-app-config"]["AAI_WORKLOAD_USERNAME"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_PASSWORD"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_HOST"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EXCHANGE_REQUEST_HANDLERS"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EXCHANGE_REPLY_HANDLERS"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_REQ_TRACE_ON"] = 'true' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_ENVIRONMENT"] = 'AFTUAT' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EP_CONN_TIMEOUT"] = '15000' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_ROUNDTRIP_TIMEOUT_MS"] = '240000' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EP_READ_TIMEOUT_MS"] = '50000' +node.default["aai-app-config"]["AAI_WORKLOAD_SESSION_STICKINESS_REQUIRED"] = 'no' +node.default["aai-app-config"]["AAI_WORKLOAD_DME2_PREFERRED_ROUTER_FILE_PATH"] = '/opt/app/aai/bundleconfig/etc/appprops/preferredRoute.txt' +node.default["aai-app-config"]["AAI_WORKLOAD_PARTNER"] = 'BOT_R' +node.default["aai-app-config"]["AAI_WORKLOAD_ROUTE_OFFER"] = 'MR1' +node.default["aai-app-config"]["AAI_WORKLOAD_PROTOCOL"] = 'http' +node.default["aai-app-config"]["AAI_WORKLOAD_TOPIC"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_ID"] = 'aaiConsumerId' +node.default["aai-app-config"]["AAI_WORKLOAD_TIMEOUT"] = '15000' +node.default["aai-app-config"]["AAI_WORKLOAD_LIMIT"] = '1000' \ No newline at end of file diff --git a/cookbooks/ajsc-aai-config/attributes/aaiWorkloadPublisher.properties.rb b/cookbooks/ajsc-aai-config/attributes/aaiWorkloadPublisher.properties.rb new file mode 100644 index 0000000..aeede1e --- /dev/null +++ b/cookbooks/ajsc-aai-config/attributes/aaiWorkloadPublisher.properties.rb @@ -0,0 +1,21 @@ +node.default["aai-app-config"]["AAI_WORKLOAD_SERVICE_NAME"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_ENVIRONMENT"] = 'TEST' +node.default["aai-app-config"]["AAI_WORKLOAD_USERNAME"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_PASSWORD"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_HOST"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EXCHANGE_REQUEST_HANDLERS"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EXCHANGE_REPLY_HANDLERS"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_REQ_TRACE_ON"] = 'true' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_ENVIRONMENT"] = 'AFTUAT' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EP_CONN_TIMEOUT"] = '15000' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_ROUNDTRIP_TIMEOUT_MS"] = '240000' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EP_READ_TIMEOUT_MS"] = '50000' +node.default["aai-app-config"]["AAI_WORKLOAD_SESSION_STICKINESS_REQUIRED"] = 'no' +node.default["aai-app-config"]["AAI_WORKLOAD_DME2_PREFERRED_ROUTER_FILE_PATH"] = '/opt/app/aai/bundleconfig/etc/appprops/preferredRoute.txt' +node.default["aai-app-config"]["AAI_WORKLOAD_PARTNER"] = 'BOT_R' +node.default["aai-app-config"]["AAI_WORKLOAD_ROUTE_OFFER"] = 'MR1' +node.default["aai-app-config"]["AAI_WORKLOAD_PROTOCOL"] = 'http' +node.default["aai-app-config"]["AAI_WORKLOAD_TOPIC"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_MAX_BATCH_SIZE"] = '100' +node.default["aai-app-config"]["AAI_WORKLOAD_MAX_AGE_MS"] = '250' +node.default["aai-app-config"]["AAI_WORKLOAD_MESSAGE_SENT_THREAD_OCCURANCE"] = '50' \ No newline at end of file diff --git a/cookbooks/ajsc-aai-config/attributes/aaiWorkloadStatusPublisher.properties.rb b/cookbooks/ajsc-aai-config/attributes/aaiWorkloadStatusPublisher.properties.rb new file mode 100644 index 0000000..7fee37d --- /dev/null +++ b/cookbooks/ajsc-aai-config/attributes/aaiWorkloadStatusPublisher.properties.rb @@ -0,0 +1,21 @@ +node.default["aai-app-config"]["AAI_WORKLOAD_SERVICE_NAME"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_ENVIRONMENT"] = 'TEST' +node.default["aai-app-config"]["AAI_WORKLOAD_USERNAME"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_PASSWORD"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_HOST"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EXCHANGE_REQUEST_HANDLERS"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EXCHANGE_REPLY_HANDLERS"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_REQ_TRACE_ON"] = 'true' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_ENVIRONMENT"] = 'AFTUAT' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EP_CONN_TIMEOUT"] = '15000' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_ROUNDTRIP_TIMEOUT_MS"] = '240000' +node.default["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EP_READ_TIMEOUT_MS"] = '50000' +node.default["aai-app-config"]["AAI_WORKLOAD_SESSION_STICKINESS_REQUIRED"] = 'no' +node.default["aai-app-config"]["AAI_WORKLOAD_DME2_PREFERRED_ROUTER_FILE_PATH"] = '/opt/app/aai/bundleconfig/etc/appprops/preferredRoute.txt' +node.default["aai-app-config"]["AAI_WORKLOAD_PARTNER"] = 'BOT_R' +node.default["aai-app-config"]["AAI_WORKLOAD_ROUTE_OFFER"] = 'MR1' +node.default["aai-app-config"]["AAI_WORKLOAD_PROTOCOL"] = 'http' +node.default["aai-app-config"]["AAI_WORKLOAD_STATUS_PUBLISHER_TOPIC"] = '' +node.default["aai-app-config"]["AAI_WORKLOAD_MAX_BATCH_SIZE"] = '100' +node.default["aai-app-config"]["AAI_WORKLOAD_MAX_AGE_MS"] = '250' +node.default["aai-app-config"]["AAI_WORKLOAD_MESSAGE_SENT_THREAD_OCCURANCE"] = '50' \ No newline at end of file diff --git a/cookbooks/ajsc-aai-config/attributes/aaiconfig-properties.rb b/cookbooks/ajsc-aai-config/attributes/aaiconfig-properties.rb new file mode 100644 index 0000000..a6df800 --- /dev/null +++ b/cookbooks/ajsc-aai-config/attributes/aaiconfig-properties.rb @@ -0,0 +1,34 @@ +node.default["aai-app-config"]["AAIENV"] = 'solo' +node.default["aai-app-config"]["PROJECT_HOME"] = '/opt/app/aai' +#CATALINA_BASE is PROJECT_HOME + /servers/aai +node.default["aai-app-config"]["CATALINA_BASE"] = '/servers/aai' +node.default["aai-app-config"]["LOGROOT"] = '/opt/aai/logroot' +node.default["aai-app-config"]["JAVA_HOME"] = '/usr/lib/jvm/java-8-openjdk-amd64' +node.default["aai-app-config"]["TOMCAT_SHUTDOWN_PORT_1"] = '8005' +node.default["aai-app-config"]["TOMCAT_HTTP_SERVER_PORT_1"] = '8080' +node.default["aai-app-config"]["TOMCAT_HTTPS_SERVER_PORT_1"] = '8443' +node.default["aai-app-config"]["TOMCAT_AJP13_CONNECTOR_PORT_1"] = '8009' +node.default["aai-app-config"]["AAI_SERVER_URL_BASE"] = 'https://localhost:8443/aai/' +node.default["aai-app-config"]["AAI_SERVER_URL"] = 'https://localhost:8443/aai/v8/' +node.default["aai-app-config"]["AAI_GLOBAL_CALLBACK_URL"] = 'https://localhost:8443/aai/' +node.default["aai-app-config"]["AAI_TRUSTSTORE_FILENAME"] = 'aai_keystore' +node.default["aai-app-config"]["AAI_TRUSTSTORE_PASSWD_X"] = 'OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o' +node.default["aai-app-config"]["STORAGE_HOSTNAME"] = 'localhost' +node.default["aai-app-config"]["STORAGE_HBASE_TABLE"] = 'aaigraph.dev' +node.default["aai-app-config"]["STORAGE_HBASE_ZOOKEEPER_ZNODE_PARENT"] = '/hbase-unsecure' +node.default["aai-app-config"]["TXN_HBASE_TABLE_NAME"] = 'aailogging.dev' +node.default["aai-app-config"]["TXN_ZOOKEEPER_QUORUM"] = 'localhost' +node.default["aai-app-config"]["TXN_ZOOKEEPER_PROPERTY_CLIENTPORT"] = '2181' +node.default["aai-app-config"]["TXN_HBASE_ZOOKEEPER_ZNODE_PARENT"] = '/hbase-unsecure' +node.default["aai-app-config"]["APPLICATION_SERVERS"] = 'localhost' +node.default["aai-app-config"]["AAI_NOTIFICATION_CURRENT_VERSION"] = 'v8' +node.default["aai-app-config"]["AAI_NOTIFICATION_EVENT_DEFAULT_EVENT_STATUS"] = 'UNPROCESSED' +node.default["aai-app-config"]["AAI_NOTIFICATION_EVENT_DEFAULT_EVENT_TYPE"] = 'AAI-EVENT' +node.default["aai-app-config"]["AAI_NOTIFICATION_EVENT_DEFAULT_DOMAIN"] = 'application' +node.default["aai-app-config"]["AAI_NOTIFICATION_EVENT_DEFAULT_SOURCE_NAME"] = 'aai' +node.default["aai-app-config"]["AAI_NOTIFICATION_EVENT_DEFAULT_SEQUENCE_NUMBER"] = '0' +node.default["aai-app-config"]["AAI_NOTIFICATION_EVENT_DEFAULT_SEVERITY"] = 'NORMAL' +node.default["aai-app-config"]["AAI_NOTIFICATION_EVENT_DEFAULT_VERSION"] = 'v1' +node.default["aai-app-config"]["AAI_DEFAULT_API_VERSION"] = 'v8' +node.default["aai-app-config"]["AAI_DMAPP_WORKLOAD_ENABLE_EVENT_PROCESSING"] = 'false' +node.default["aai-app-config"]["HBASE_COLUMN_TTL_DAYS"] = '15' diff --git a/cookbooks/ajsc-aai-config/attributes/logback.rb b/cookbooks/ajsc-aai-config/attributes/logback.rb new file mode 100644 index 0000000..58ecdf3 --- /dev/null +++ b/cookbooks/ajsc-aai-config/attributes/logback.rb @@ -0,0 +1 @@ +node.default["aai-app-config"]["ORG_OPENECOMP_AAI_LEVEL"] = 'INFO' diff --git a/cookbooks/ajsc-aai-config/attributes/preferredRoute.rb b/cookbooks/ajsc-aai-config/attributes/preferredRoute.rb new file mode 100644 index 0000000..dec40c7 --- /dev/null +++ b/cookbooks/ajsc-aai-config/attributes/preferredRoute.rb @@ -0,0 +1 @@ +node.default["aai-app-config"]["AAI_WORKLOAD_PREFERRED_ROUTE_KEY"] = 'MR1' \ No newline at end of file diff --git a/cookbooks/ajsc-aai-config/metadata.rb b/cookbooks/ajsc-aai-config/metadata.rb new file mode 100644 index 0000000..26a76d5 --- /dev/null +++ b/cookbooks/ajsc-aai-config/metadata.rb @@ -0,0 +1,7 @@ +name 'ajsc-aai-config' +maintainer 'YOUR_COMPANY_NAME' +maintainer_email 'YOUR_EMAIL' +license 'All rights reserved' +description 'Installs/Configures ajsc-aai-config' +long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) +version '0.2.2' diff --git a/cookbooks/ajsc-aai-config/recipes/aai-config.rb b/cookbooks/ajsc-aai-config/recipes/aai-config.rb new file mode 100644 index 0000000..7cbae3a --- /dev/null +++ b/cookbooks/ajsc-aai-config/recipes/aai-config.rb @@ -0,0 +1,89 @@ +################ +# Update aaiconfig.properties +###### +include_recipe 'ajsc-aai-config::createConfigDirectories' + +['aaiconfig.properties'].each do |file| + template "#{node['aai-app-config']['PROJECT_HOME']}/bundleconfig/etc/appprops/#{file}" do + source "aai-app-config/#{file}" + owner "aaiadmin" + group "aaiadmin" + mode "0644" + variables( +:TOMCAT_SHUTDOWN_PORT_1 => node["aai-app-config"]["TOMCAT_SHUTDOWN_PORT_1"], +:TOMCAT_HTTP_SERVER_PORT_1 => node["aai-app-config"]["TOMCAT_HTTP_SERVER_PORT_1"], +:TOMCAT_HTTPS_SERVER_PORT_1 => node["aai-app-config"]["TOMCAT_HTTPS_SERVER_PORT_1"], +:TOMCAT_AJP13_CONNECTOR_PORT_1 => node["aai-app-config"]["TOMCAT_AJP13_CONNECTOR_PORT_1"], +:AAI_SERVER_URL_BASE => node["aai-app-config"]["AAI_SERVER_URL_BASE"], +:AAI_SERVER_URL => node["aai-app-config"]["AAI_SERVER_URL"], +:AAI_OLDSERVER_URL => node["aai-app-config"]["AAI_OLDSERVER_URL"], +:AAI_GLOBAL_CALLBACK_URL => node["aai-app-config"]["AAI_GLOBAL_CALLBACK_URL"], +:AAI_TRUSTSTORE_FILENAME => node["aai-app-config"]["AAI_TRUSTSTORE_FILENAME"], +:AAI_TRUSTSTORE_PASSWD_X => node["aai-app-config"]["AAI_TRUSTSTORE_PASSWD_X"], +:AAI_KEYSTORE_FILENAME => node["aai-app-config"]["AAI_KEYSTORE_FILENAME"], +:AAI_KEYSTORE_PASSWD_X => node["aai-app-config"]["AAI_KEYSTORE_PASSWD_X"], +:STORAGE_HOSTNAME => node["aai-app-config"]["STORAGE_HOSTNAME"], +:STORAGE_BACKEND => node["aai-app-config"]["STORAGE_BACKEND"], +:STORAGE_HBASE_TABLE => node["aai-app-config"]["STORAGE_HBASE_TABLE"], +:STORAGE_HBASE_ZOOKEEPER_ZNODE_PARENT => node["aai-app-config"]["STORAGE_HBASE_ZOOKEEPER_ZNODE_PARENT"], +:HBASE_COLUMN_TTL_DAYS => node["aai-app-config"]["HBASE_COLUMN_TTL_DAYS"], +:TXN_HBASE_TABLE_NAME => node["aai-app-config"]["TXN_HBASE_TABLE_NAME"], +:TXN_ZOOKEEPER_QUORUM => node["aai-app-config"]["TXN_ZOOKEEPER_QUORUM"], +:TXN_ZOOKEEPER_PROPERTY_CLIENTPORT => node["aai-app-config"]["TXN_ZOOKEEPER_PROPERTY_CLIENTPORT"], +:TXN_HBASE_ZOOKEEPER_ZNODE_PARENT => node["aai-app-config"]["TXN_HBASE_ZOOKEEPER_ZNODE_PARENT"], +:NOTIFICATION_HBASE_TABLE_NAME => node["aai-app-config"]["NOTIFICATION_HBASE_TABLE_NAME"], +:APPLICATION_SERVERS => node["aai-app-config"]["APPLICATION_SERVERS"], +:AAI_NOTIFICATION_CURRENT_VERSION => node["aai-app-config"]["AAI_NOTIFICATION_CURRENT_VERSION"], +:AAI_NOTIFICATION_EVENT_DEFAULT_EVENT_STATUS => node["aai-app-config"]["AAI_NOTIFICATION_EVENT_DEFAULT_EVENT_STATUS"], +:AAI_NOTIFICATION_EVENT_DEFAULT_EVENT_TYPE => node["aai-app-config"]["AAI_NOTIFICATION_EVENT_DEFAULT_EVENT_TYPE"], +:AAI_NOTIFICATION_EVENT_DEFAULT_DOMAIN => node["aai-app-config"]["AAI_NOTIFICATION_EVENT_DEFAULT_DOMAIN"], +:AAI_NOTIFICATION_EVENT_DEFAULT_SOURCE_NAME => node["aai-app-config"]["AAI_NOTIFICATION_EVENT_DEFAULT_SOURCE_NAME"], +:AAI_NOTIFICATION_EVENT_DEFAULT_SEQUENCE_NUMBER => node["aai-app-config"]["AAI_NOTIFICATION_EVENT_DEFAULT_SEQUENCE_NUMBER"], +:AAI_NOTIFICATION_EVENT_DEFAULT_SEVERITY => node["aai-app-config"]["AAI_NOTIFICATION_EVENT_DEFAULT_SEVERITY"], +:AAI_NOTIFICATION_EVENT_DEFAULT_VERSION => node["aai-app-config"]["AAI_NOTIFICATION_EVENT_DEFAULT_VERSION"], +:RESOURCE_VERSION_ENABLE_FLAG => node["aai-app-config"]["RESOURCE_VERSION_ENABLE_FLAG"], +:AAI_DEFAULT_API_VERSION => node["aai-app-config"]["AAI_DEFAULT_API_VERSION"], +:AAI_DMAPP_WORKLOAD_ENABLE_EVENT_PROCESSING => node["aai-app-config"]["AAI_DMAPP_WORKLOAD_ENABLE_EVENT_PROCESSING"] + ) + end +end + +#remote_directory "/opt/mso/etc/ecomp/mso/config/" do +# source "mso-asdc-controller-config" +# #cookbook "default is current" +# files_mode "0700" +# files_owner "jboss" +# files_group "jboss" +# mode "0755" +# owner "jboss" +# group "jboss" +# overwrite true +# recursive true +# action :create +#end + + +################ +# Alternative example1 +# This updates all the timestamps +# Seting preserve never changes the timestamp when the file is changed +###### +# ruby_block "copy_recurse" do +# block do +# FileUtils.cp_r("#{Chef::Config[:file_cache_path]}/cookbooks/mso-config/files/default/mso-api-handler-config/.",\ +# "/opt/mso/etc/ecomp/mso/config/", :preserve => true) +# end +# action :run +# end + +################ +# Alternative example2 +###### +# Dir.glob("#{Chef::Config[:file_cache_path]}/cookbooks/mso-config/files/default/mso-api-handler-config/*").sort.each do |entry| +# cookbook_file "/opt/mso/etc/ecomp/mso/config/#{entry}" do +# source entry +# owner "root" +# group "root" +# mode 0755 +# end +# end diff --git a/cookbooks/ajsc-aai-config/recipes/aai-logback.rb b/cookbooks/ajsc-aai-config/recipes/aai-logback.rb new file mode 100644 index 0000000..505c44a --- /dev/null +++ b/cookbooks/ajsc-aai-config/recipes/aai-logback.rb @@ -0,0 +1,15 @@ +################ +# Update logback.xml +###### + +['logback.xml'].each do |file| + template "#{node['aai-app-config']['PROJECT_HOME']}/bundleconfig/etc/#{file}" do + source "aai-app-config/logback.erb" + owner "aaiadmin" + group "aaiadmin" + mode "0777" + variables( +:ORG_OPENECOMP_AAI_LEVEL => node["aai-app-config"]["ORG_OPENECOMP_AAI_LEVEL"] + ) + end +end diff --git a/cookbooks/ajsc-aai-config/recipes/aai-preferredRoute.rb b/cookbooks/ajsc-aai-config/recipes/aai-preferredRoute.rb new file mode 100644 index 0000000..c9f4887 --- /dev/null +++ b/cookbooks/ajsc-aai-config/recipes/aai-preferredRoute.rb @@ -0,0 +1,11 @@ +['preferredRoute.txt'].each do |file| + template "#{node['aai-app-config']['PROJECT_HOME']}/bundleconfig/etc/appprops/#{file}" do + source "aai-app-config/preferredRoute.txt" + owner "aaiadmin" + group "aaiadmin" + mode "0644" + variables( +:AAI_WORKLOAD_PREFERRED_ROUTE_KEY => node["aai-app-config"]["AAI_WORKLOAD_PREFERRED_ROUTE_KEY"] + ) + end +end \ No newline at end of file diff --git a/cookbooks/ajsc-aai-config/recipes/aaiWorkloadConsumer.rb b/cookbooks/ajsc-aai-config/recipes/aaiWorkloadConsumer.rb new file mode 100644 index 0000000..676e5ce --- /dev/null +++ b/cookbooks/ajsc-aai-config/recipes/aaiWorkloadConsumer.rb @@ -0,0 +1,32 @@ +['aaiWorkloadConsumer.properties'].each do |file| + template "#{node['aai-app-config']['PROJECT_HOME']}/bundleconfig/etc/appprops/#{file}" do + source "aai-app-config/aaiWorkloadConsumer.properties" + owner "aaiadmin" + group "aaiadmin" + mode "0644" + variables( +:AAI_WORKLOAD_SERVICE_NAME => node["aai-app-config"]["AAI_WORKLOAD_SERVICE_NAME"], +:AAI_WORKLOAD_ENVIRONMENT => node["aai-app-config"]["AAI_WORKLOAD_ENVIRONMENT"], +:AAI_WORKLOAD_USERNAME => node["aai-app-config"]["AAI_WORKLOAD_USERNAME"], +:AAI_WORKLOAD_PASSWORD => node["aai-app-config"]["AAI_WORKLOAD_PASSWORD"], +:AAI_WORKLOAD_HOST => node["aai-app-config"]["AAI_WORKLOAD_HOST"], +:AAI_WORKLOAD_AFT_DME2_EXCHANGE_REQUEST_HANDLERS => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EXCHANGE_REQUEST_HANDLERS"], +:AAI_WORKLOAD_AFT_DME2_EXCHANGE_REPLY_HANDLERS => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EXCHANGE_REPLY_HANDLERS"], +:AAI_WORKLOAD_AFT_DME2_REQ_TRACE_ON => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_REQ_TRACE_ON"], +:AAI_WORKLOAD_AFT_ENVIRONMENT => node["aai-app-config"]["AAI_WORKLOAD_AFT_ENVIRONMENT"], +:AAI_WORKLOAD_AFT_DME2_EP_CONN_TIMEOUT => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EP_CONN_TIMEOUT"], +:AAI_WORKLOAD_AFT_DME2_ROUNDTRIP_TIMEOUT_MS => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_ROUNDTRIP_TIMEOUT_MS"], +:AAI_WORKLOAD_AFT_DME2_EP_READ_TIMEOUT_MS => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EP_READ_TIMEOUT_MS"], +:AAI_WORKLOAD_SESSION_STICKINESS_REQUIRED => node["aai-app-config"]["AAI_WORKLOAD_SESSION_STICKINESS_REQUIRED"], +:AAI_WORKLOAD_DME2_PREFERRED_ROUTER_FILE_PATH => node["aai-app-config"]["AAI_WORKLOAD_DME2_PREFERRED_ROUTER_FILE_PATH"], +:AAI_WORKLOAD_PARTNER => node["aai-app-config"]["AAI_WORKLOAD_PARTNER"], +:AAI_WORKLOAD_ROUTE_OFFER => node["aai-app-config"]["AAI_WORKLOAD_ROUTE_OFFER"], +:AAI_WORKLOAD_PROTOCOL => node["aai-app-config"]["AAI_WORKLOAD_PROTOCOL"], +:AAI_WORKLOAD_FILTER => node["aai-app-config"]["AAI_WORKLOAD_FILTER"], +:AAI_WORKLOAD_TOPIC => node["aai-app-config"]["AAI_WORKLOAD_TOPIC"], +:AAI_WORKLOAD_ID => node["aai-app-config"]["AAI_WORKLOAD_ID"], +:AAI_WORKLOAD_TIMEOUT => node["aai-app-config"]["AAI_WORKLOAD_TIMEOUT"], +:AAI_WORKLOAD_LIMIT => node["aai-app-config"]["AAI_WORKLOAD_LIMIT"] + ) + end +end \ No newline at end of file diff --git a/cookbooks/ajsc-aai-config/recipes/aaiWorkloadPublisher.rb b/cookbooks/ajsc-aai-config/recipes/aaiWorkloadPublisher.rb new file mode 100644 index 0000000..815f29c --- /dev/null +++ b/cookbooks/ajsc-aai-config/recipes/aaiWorkloadPublisher.rb @@ -0,0 +1,31 @@ +['aaiWorkloadPublisher.properties'].each do |file| + template "#{node['aai-app-config']['PROJECT_HOME']}/bundleconfig/etc/appprops/#{file}" do + source "aai-app-config/aaiWorkloadPublisher.properties" + owner "aaiadmin" + group "aaiadmin" + mode "0644" + variables( +:AAI_WORKLOAD_SERVICE_NAME => node["aai-app-config"]["AAI_WORKLOAD_SERVICE_NAME"], +:AAI_WORKLOAD_ENVIRONMENT => node["aai-app-config"]["AAI_WORKLOAD_ENVIRONMENT"], +:AAI_WORKLOAD_USERNAME => node["aai-app-config"]["AAI_WORKLOAD_USERNAME"], +:AAI_WORKLOAD_PASSWORD => node["aai-app-config"]["AAI_WORKLOAD_PASSWORD"], +:AAI_WORKLOAD_HOST => node["aai-app-config"]["AAI_WORKLOAD_HOST"], +:AAI_WORKLOAD_AFT_DME2_EXCHANGE_REQUEST_HANDLERS => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EXCHANGE_REQUEST_HANDLERS"], +:AAI_WORKLOAD_AFT_DME2_EXCHANGE_REPLY_HANDLERS => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EXCHANGE_REPLY_HANDLERS"], +:AAI_WORKLOAD_AFT_DME2_REQ_TRACE_ON => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_REQ_TRACE_ON"], +:AAI_WORKLOAD_AFT_ENVIRONMENT => node["aai-app-config"]["AAI_WORKLOAD_AFT_ENVIRONMENT"], +:AAI_WORKLOAD_AFT_DME2_EP_CONN_TIMEOUT => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EP_CONN_TIMEOUT"], +:AAI_WORKLOAD_AFT_DME2_ROUNDTRIP_TIMEOUT_MS => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_ROUNDTRIP_TIMEOUT_MS"], +:AAI_WORKLOAD_AFT_DME2_EP_READ_TIMEOUT_MS => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EP_READ_TIMEOUT_MS"], +:AAI_WORKLOAD_SESSION_STICKINESS_REQUIRED => node["aai-app-config"]["AAI_WORKLOAD_SESSION_STICKINESS_REQUIRED"], +:AAI_WORKLOAD_DME2_PREFERRED_ROUTER_FILE_PATH => node["aai-app-config"]["AAI_WORKLOAD_DME2_PREFERRED_ROUTER_FILE_PATH"], +:AAI_WORKLOAD_PARTNER => node["aai-app-config"]["AAI_WORKLOAD_PARTNER"], +:AAI_WORKLOAD_ROUTE_OFFER => node["aai-app-config"]["AAI_WORKLOAD_ROUTE_OFFER"], +:AAI_WORKLOAD_PROTOCOL => node["aai-app-config"]["AAI_WORKLOAD_PROTOCOL"], +:AAI_WORKLOAD_TOPIC => node["aai-app-config"]["AAI_WORKLOAD_TOPIC"], +:AAI_WORKLOAD_MAX_BATCH_SIZE => node["aai-app-config"]["AAI_WORKLOAD_MAX_BATCH_SIZE"], +:AAI_WORKLOAD_MAX_AGE_MS => node["aai-app-config"]["AAI_WORKLOAD_MAX_AGE_MS"], +:AAI_WORKLOAD_MESSAGE_SENT_THREAD_OCCURANCE => node["aai-app-config"]["AAI_WORKLOAD_MESSAGE_SENT_THREAD_OCCURANCE"] + ) + end +end \ No newline at end of file diff --git a/cookbooks/ajsc-aai-config/recipes/aaiWorkloadStatusPublisher.rb b/cookbooks/ajsc-aai-config/recipes/aaiWorkloadStatusPublisher.rb new file mode 100644 index 0000000..032737e --- /dev/null +++ b/cookbooks/ajsc-aai-config/recipes/aaiWorkloadStatusPublisher.rb @@ -0,0 +1,31 @@ +['aaiWorkloadStatusPublisher.properties'].each do |file| + template "#{node['aai-app-config']['PROJECT_HOME']}/bundleconfig/etc/appprops/#{file}" do + source "aai-app-config/aaiWorkloadStatusPublisher.properties" + owner "aaiadmin" + group "aaiadmin" + mode "0644" + variables( +:AAI_WORKLOAD_SERVICE_NAME => node["aai-app-config"]["AAI_WORKLOAD_SERVICE_NAME"], +:AAI_WORKLOAD_ENVIRONMENT => node["aai-app-config"]["AAI_WORKLOAD_ENVIRONMENT"], +:AAI_WORKLOAD_USERNAME => node["aai-app-config"]["AAI_WORKLOAD_USERNAME"], +:AAI_WORKLOAD_PASSWORD => node["aai-app-config"]["AAI_WORKLOAD_PASSWORD"], +:AAI_WORKLOAD_HOST => node["aai-app-config"]["AAI_WORKLOAD_HOST"], +:AAI_WORKLOAD_AFT_DME2_EXCHANGE_REQUEST_HANDLERS => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EXCHANGE_REQUEST_HANDLERS"], +:AAI_WORKLOAD_AFT_DME2_EXCHANGE_REPLY_HANDLERS => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EXCHANGE_REPLY_HANDLERS"], +:AAI_WORKLOAD_AFT_DME2_REQ_TRACE_ON => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_REQ_TRACE_ON"], +:AAI_WORKLOAD_AFT_ENVIRONMENT => node["aai-app-config"]["AAI_WORKLOAD_AFT_ENVIRONMENT"], +:AAI_WORKLOAD_AFT_DME2_EP_CONN_TIMEOUT => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EP_CONN_TIMEOUT"], +:AAI_WORKLOAD_AFT_DME2_ROUNDTRIP_TIMEOUT_MS => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_ROUNDTRIP_TIMEOUT_MS"], +:AAI_WORKLOAD_AFT_DME2_EP_READ_TIMEOUT_MS => node["aai-app-config"]["AAI_WORKLOAD_AFT_DME2_EP_READ_TIMEOUT_MS"], +:AAI_WORKLOAD_SESSION_STICKINESS_REQUIRED => node["aai-app-config"]["AAI_WORKLOAD_SESSION_STICKINESS_REQUIRED"], +:AAI_WORKLOAD_DME2_PREFERRED_ROUTER_FILE_PATH => node["aai-app-config"]["AAI_WORKLOAD_DME2_PREFERRED_ROUTER_FILE_PATH"], +:AAI_WORKLOAD_PARTNER => node["aai-app-config"]["AAI_WORKLOAD_PARTNER"], +:AAI_WORKLOAD_ROUTE_OFFER => node["aai-app-config"]["AAI_WORKLOAD_ROUTE_OFFER"], +:AAI_WORKLOAD_PROTOCOL => node["aai-app-config"]["AAI_WORKLOAD_PROTOCOL"], +:AAI_WORKLOAD_MAX_BATCH_SIZE => node["aai-app-config"]["AAI_WORKLOAD_MAX_BATCH_SIZE"], +:AAI_WORKLOAD_MAX_AGE_MS => node["aai-app-config"]["AAI_WORKLOAD_MAX_AGE_MS"], +:AAI_WORKLOAD_MESSAGE_SENT_THREAD_OCCURANCE => node["aai-app-config"]["AAI_WORKLOAD_MESSAGE_SENT_THREAD_OCCURANCE"], +:AAI_WORKLOAD_STATUS_PUBLISHER_TOPIC => node["aai-app-config"]["AAI_WORKLOAD_STATUS_PUBLISHER_TOPIC"] + ) + end +end \ No newline at end of file diff --git a/cookbooks/ajsc-aai-config/recipes/createConfigDirectories.rb b/cookbooks/ajsc-aai-config/recipes/createConfigDirectories.rb new file mode 100644 index 0000000..eac5cd1 --- /dev/null +++ b/cookbooks/ajsc-aai-config/recipes/createConfigDirectories.rb @@ -0,0 +1,60 @@ +# Create or update the needed directories/links. +# If the directory already exists, it is updated to match +# +# LOGROOT should already be created by the SWM installation script +# It needs to run as root + +execute "mv logs logs.bak" do + only_if { ::File.directory?("#{node['aai-app-config']['PROJECT_HOME']}/logs") } + user 'aaiadmin' + group 'aaiadmin' + cwd "#{node['aai-app-config']['PROJECT_HOME']}" +end + +[ + "#{node['aai-app-config']['LOGROOT']}/AAI", + "#{node['aai-app-config']['LOGROOT']}/AAI/data", + "#{node['aai-app-config']['LOGROOT']}/AAI/misc", + "#{node['aai-app-config']['LOGROOT']}/AAI/ajsc-jetty" ].each do |path| + directory path do + owner 'aaiadmin' + group 'aaiadmin' + mode '0755' + recursive=true + action :create + end +end + +[ "#{node['aai-app-config']['PROJECT_HOME']}/bundleconfig/etc/auth" ].each do |path| + directory path do + owner 'aaiadmin' + group 'aaiadmin' + mode '0777' + recursive=true + action :create + end +end +#Application logs +link "#{node['aai-app-config']['PROJECT_HOME']}/logs" do + to "#{node['aai-app-config']['LOGROOT']}/AAI" + owner 'aaiadmin' + group 'aaiadmin' + mode '0755' +end + +#Make a link from /opt/app/aai/scripts to /opt/app/aai/bin +link "#{node['aai-app-config']['PROJECT_HOME']}/scripts" do + to "#{node['aai-app-config']['PROJECT_HOME']}/bin" + owner 'aaiadmin' + group 'aaiadmin' + mode '0755' +end + +#Process logs?? +#ln -s ${LOGROOT}/aai/servers/${server}/logs ${TRUE_PROJECT_HOME}/servers/${server}/logs +#link "#{node['aai-app-config']['PROJECT_HOME']}/servers/aai/logs" do +# to "#{node['aai-app-config']['LOGROOT']}/aai/servers/aai/logs" +# owner 'aaiadmin' +# group 'aaiadmin' +# mode '0755' +#end diff --git a/cookbooks/ajsc-aai-config/templates/default/aai-app-config/aaiWorkloadConsumer.properties b/cookbooks/ajsc-aai-config/templates/default/aai-app-config/aaiWorkloadConsumer.properties new file mode 100644 index 0000000..81b0e30 --- /dev/null +++ b/cookbooks/ajsc-aai-config/templates/default/aai-app-config/aaiWorkloadConsumer.properties @@ -0,0 +1,30 @@ +TransportType=DME2 +Latitude=47.778998 +Longitude=-122.182883 +Version=1.0 +ServiceName=<%= @AAI_WORKLOAD_SERVICE_NAME %> +Environment=<%= @AAI_WORKLOAD_ENVIRONMENT %> +Partner=<%= @AAI_WORKLOAD_PARTNER %> +routeOffer=<%= @AAI_WORKLOAD_ROUTE_OFFER %> +SubContextPath=/ +Protocol=<%= @AAI_WORKLOAD_PROTOCOL %> +MethodType=GET +username=<%= @AAI_WORKLOAD_USERNAME %> +password=<%= @AAI_WORKLOAD_PASSWORD %> +contenttype=application/json +host=<%= @AAI_WORKLOAD_HOST %> +topic=<%= @AAI_WORKLOAD_TOPIC %> +group=aaiWorkloadConsumer +id=<%= @AAI_WORKLOAD_ID %> +timeout=<%= @AAI_WORKLOAD_TIMEOUT %> +limit=<%= @AAI_WORKLOAD_LIMIT %> +filter=<%= @AAI_WORKLOAD_FILTER %> +AFT_DME2_EXCHANGE_REQUEST_HANDLERS=<%= @AAI_WORKLOAD_AFT_DME2_EXCHANGE_REQUEST_HANDLERS %> +AFT_DME2_EXCHANGE_REPLY_HANDLERS=<%= @AAI_WORKLOAD_AFT_DME2_EXCHANGE_REPLY_HANDLERS %> +AFT_DME2_REQ_TRACE_ON=<%= @AAI_WORKLOAD_AFT_DME2_REQ_TRACE_ON %> +AFT_ENVIRONMENT=<%= @AAI_WORKLOAD_AFT_ENVIRONMENT %> +AFT_DME2_EP_CONN_TIMEOUT=<%= @AAI_WORKLOAD_AFT_DME2_EP_CONN_TIMEOUT %> +AFT_DME2_ROUNDTRIP_TIMEOUT_MS=<%= @AAI_WORKLOAD_AFT_DME2_ROUNDTRIP_TIMEOUT_MS %> +AFT_DME2_EP_READ_TIMEOUT_MS=<%= @AAI_WORKLOAD_AFT_DME2_EP_READ_TIMEOUT_MS %> +sessionstickinessrequired=<%= @AAI_WORKLOAD_SESSION_STICKINESS_REQUIRED %> +DME2preferredRouterFilePath=<%= @AAI_WORKLOAD_DME2_PREFERRED_ROUTER_FILE_PATH %> \ No newline at end of file diff --git a/cookbooks/ajsc-aai-config/templates/default/aai-app-config/aaiWorkloadPublisher.properties b/cookbooks/ajsc-aai-config/templates/default/aai-app-config/aaiWorkloadPublisher.properties new file mode 100644 index 0000000..87a47bc --- /dev/null +++ b/cookbooks/ajsc-aai-config/templates/default/aai-app-config/aaiWorkloadPublisher.properties @@ -0,0 +1,29 @@ +TransportType=DME2 +Latitude=47.778998 +Longitude=-122.182883 +Version=1.0 +ServiceName=<%= @AAI_WORKLOAD_SERVICE_NAME %> +Environment=<%= @AAI_WORKLOAD_ENVIRONMENT %> +Partner=<%= @AAI_WORKLOAD_PARTNER %> +routeOffer=<%= @AAI_WORKLOAD_ROUTE_OFFER %> +SubContextPath=/ +Protocol=<%= @AAI_WORKLOAD_PROTOCOL %> +MethodType=POST +username=<%= @AAI_WORKLOAD_USERNAME %> +password=<%= @AAI_WORKLOAD_PASSWORD %> +contenttype=application/json +host=<%= @AAI_WORKLOAD_HOST %> +topic=<%= @AAI_WORKLOAD_TOPIC %> +partition=AAI_WORKLOAD +maxBatchSize=<%= @AAI_WORKLOAD_MAX_BATCH_SIZE %> +maxAgeMs=<%= @AAI_WORKLOAD_MAX_AGE_MS %> +AFT_DME2_EXCHANGE_REQUEST_HANDLERS=<%= @AAI_WORKLOAD_AFT_DME2_EXCHANGE_REQUEST_HANDLERS %> +AFT_DME2_EXCHANGE_REPLY_HANDLERS=<%= @AAI_WORKLOAD_AFT_DME2_EXCHANGE_REPLY_HANDLERS %> +AFT_DME2_REQ_TRACE_ON=<%= @AAI_WORKLOAD_AFT_DME2_REQ_TRACE_ON %> +AFT_ENVIRONMENT=<%= @AAI_WORKLOAD_AFT_ENVIRONMENT %> +AFT_DME2_EP_CONN_TIMEOUT=<%= @AAI_WORKLOAD_AFT_DME2_EP_CONN_TIMEOUT %> +AFT_DME2_ROUNDTRIP_TIMEOUT_MS=<%= @AAI_WORKLOAD_AFT_DME2_ROUNDTRIP_TIMEOUT_MS %> +AFT_DME2_EP_READ_TIMEOUT_MS=<%= @AAI_WORKLOAD_AFT_DME2_EP_READ_TIMEOUT_MS %> +sessionstickinessrequired=<%= @AAI_WORKLOAD_SESSION_STICKINESS_REQUIRED %> +DME2preferredRouterFilePath=<%= @AAI_WORKLOAD_DME2_PREFERRED_ROUTER_FILE_PATH %> +MessageSentThreadOccurance=<%= @AAI_WORKLOAD_MESSAGE_SENT_THREAD_OCCURANCE %> \ No newline at end of file diff --git a/cookbooks/ajsc-aai-config/templates/default/aai-app-config/aaiWorkloadStatusPublisher.properties b/cookbooks/ajsc-aai-config/templates/default/aai-app-config/aaiWorkloadStatusPublisher.properties new file mode 100644 index 0000000..73cc1c9 --- /dev/null +++ b/cookbooks/ajsc-aai-config/templates/default/aai-app-config/aaiWorkloadStatusPublisher.properties @@ -0,0 +1,29 @@ +TransportType=DME2 +Latitude=47.778998 +Longitude=-122.182883 +Version=1.0 +ServiceName=<%= @AAI_WORKLOAD_SERVICE_NAME %> +Environment=<%= @AAI_WORKLOAD_ENVIRONMENT %> +Partner=<%= @AAI_WORKLOAD_PARTNER %> +routeOffer=<%= @AAI_WORKLOAD_ROUTE_OFFER %> +SubContextPath=/ +Protocol=<%= @AAI_WORKLOAD_PROTOCOL %> +MethodType=POST +username=<%= @AAI_WORKLOAD_USERNAME %> +password=<%= @AAI_WORKLOAD_PASSWORD %> +contenttype=application/json +host=<%= @AAI_WORKLOAD_HOST %> +topic=<%= @AAI_WORKLOAD_STATUS_PUBLISHER_TOPIC %> +partition=AAI_WORKLOAD +maxBatchSize=<%= @AAI_WORKLOAD_MAX_BATCH_SIZE %> +maxAgeMs=<%= @AAI_WORKLOAD_MAX_AGE_MS %> +AFT_DME2_EXCHANGE_REQUEST_HANDLERS=<%= @AAI_WORKLOAD_AFT_DME2_EXCHANGE_REQUEST_HANDLERS %> +AFT_DME2_EXCHANGE_REPLY_HANDLERS=<%= @AAI_WORKLOAD_AFT_DME2_EXCHANGE_REPLY_HANDLERS %> +AFT_DME2_REQ_TRACE_ON=<%= @AAI_WORKLOAD_AFT_DME2_REQ_TRACE_ON %> +AFT_ENVIRONMENT=<%= @AAI_WORKLOAD_AFT_ENVIRONMENT %> +AFT_DME2_EP_CONN_TIMEOUT=<%= @AAI_WORKLOAD_AFT_DME2_EP_CONN_TIMEOUT %> +AFT_DME2_ROUNDTRIP_TIMEOUT_MS=<%= @AAI_WORKLOAD_AFT_DME2_ROUNDTRIP_TIMEOUT_MS %> +AFT_DME2_EP_READ_TIMEOUT_MS=<%= @AAI_WORKLOAD_AFT_DME2_EP_READ_TIMEOUT_MS %> +sessionstickinessrequired=<%= @AAI_WORKLOAD_SESSION_STICKINESS_REQUIRED %> +DME2preferredRouterFilePath=<%= @AAI_WORKLOAD_DME2_PREFERRED_ROUTER_FILE_PATH %> +MessageSentThreadOccurance=<%= @AAI_WORKLOAD_MESSAGE_SENT_THREAD_OCCURANCE %> \ No newline at end of file diff --git a/cookbooks/ajsc-aai-config/templates/default/aai-app-config/aaiconfig.properties b/cookbooks/ajsc-aai-config/templates/default/aai-app-config/aaiconfig.properties new file mode 100644 index 0000000..efeeb82 --- /dev/null +++ b/cookbooks/ajsc-aai-config/templates/default/aai-app-config/aaiconfig.properties @@ -0,0 +1,92 @@ +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +aai.config.checktime=1000 + +# this could come from siteconfig.pl? +aai.config.nodename=AutomaticallyOverwritten + +aai.logging.hbase.interceptor=false +aai.logging.hbase.enabled=false +aai.logging.hbase.logrequest=false +aai.logging.hbase.logresponse=false + +aai.logging.trace.enabled=true +aai.logging.trace.logrequest=false +aai.logging.trace.logresponse=false + +aai.tools.enableBasicAuth=true +aai.tools.username=AAI +aai.tools.password=AAI + +aai.auth.cspcookies_on=false +aai.dbmodel.filename=ex5.json +aai.server.url.base=<%= @AAI_SERVER_URL_BASE %> +aai.server.url=<%= @AAI_SERVER_URL %> +aai.global.callback.url=<%= @AAI_GLOBAL_CALLBACK_URL %> +aai.truststore.filename=<%= @AAI_TRUSTSTORE_FILENAME %> +aai.truststore.passwd.x=<%= @AAI_TRUSTSTORE_PASSWD_X %> +aai.keystore.filename=<%= @AAI_KEYSTORE_FILENAME %> +aai.keystore.passwd.x=<%= @AAI_KEYSTORE_PASSWD_X %> + +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=<%= @STORAGE_BACKEND %> +storage.hostname=<%= @STORAGE_HOSTNAME %> +#schema.default=none +storage.lock.wait-time=300 +storage.hbase.table=<%= @STORAGE_HBASE_TABLE %> +storage.hbase.ext.zookeeper.znode.parent=<%= @STORAGE_HBASE_ZOOKEEPER_ZNODE_PARENT %> +# Setting db-cache to false ensure the fastest propagation of changes across servers +cache.db-cache = false +#cache.db-cache-clean-wait = 20 +#cache.db-cache-time = 180000 +#cache.db-cache-size = 0.5 + +# for transaction log +hbase.table.name=<%= @TXN_HBASE_TABLE_NAME %> +hbase.table.timestamp.format=YYYYMMdd-HH:mm:ss:SSS +hbase.zookeeper.quorum=<%= @TXN_ZOOKEEPER_QUORUM %> +hbase.zookeeper.property.clientPort=<%= @TXN_ZOOKEEPER_PROPERTY_CLIENTPORT %> +hbase.zookeeper.znode.parent=<%= @TXN_HBASE_ZOOKEEPER_ZNODE_PARENT %> +hbase.column.ttl.days=<%= @HBASE_COLUMN_TTL_DAYS %> + +# single primary server +aai.primary.filetransfer.serverlist=<%= @APPLICATION_SERVERS %> +aai.primary.filetransfer.primarycheck=echo:8443/aai/util/echo +aai.primary.filetransfer.pingtimeout=5000 +aai.primary.filetransfer.pingcount=5 + +#rsync properties +aai.rsync.command=rsync +aai.rsync.options.list=-v|-t +aai.rsync.remote.user=aaiadmin +aai.rsync.enabled=y + +aai.notification.current.version=<%= @AAI_NOTIFICATION_CURRENT_VERSION %> +aai.notificationEvent.default.status=<%= @AAI_NOTIFICATION_EVENT_DEFAULT_EVENT_STATUS %> +aai.notificationEvent.default.eventType=<%= @AAI_NOTIFICATION_EVENT_DEFAULT_EVENT_TYPE %> +aai.notificationEvent.default.domain=<%= @AAI_NOTIFICATION_EVENT_DEFAULT_DOMAIN %> +aai.notificationEvent.default.sourceName=<%= @AAI_NOTIFICATION_EVENT_DEFAULT_SOURCE_NAME %> +aai.notificationEvent.default.sequenceNumber=<%= @AAI_NOTIFICATION_EVENT_DEFAULT_SEQUENCE_NUMBER %> +aai.notificationEvent.default.severity=<%= @AAI_NOTIFICATION_EVENT_DEFAULT_SEVERITY %> +aai.notificationEvent.default.version=<%= @AAI_NOTIFICATION_EVENT_DEFAULT_VERSION %> +# This one lets us enable/disable resource-version checking on updates/deletes +aai.resourceversion.enableflag=<%= @RESOURCE_VERSION_ENABLE_FLAG %> +aai.logging.maxStackTraceEntries=10 +aai.default.api.version=<%= @AAI_DEFAULT_API_VERSION %> + +# Used by Model-processing code +aai.model.delete.sleep.per.vtx.msec=500 +aai.model.query.resultset.maxcount=30 +aai.model.query.timeout.sec=90 + +# Used by Data Grooming +aai.grooming.default.max.fix=150 +aai.grooming.default.sleep.minutes=7 + +aai.model.proc.max.levels=50 +aai.edgeTag.proc.max.levels=50 + +aai.dmaap.workload.enableEventProcessing=<%= @AAI_DMAPP_WORKLOAD_ENABLE_EVENT_PROCESSING %> \ No newline at end of file diff --git a/cookbooks/ajsc-aai-config/templates/default/aai-app-config/aft.properties b/cookbooks/ajsc-aai-config/templates/default/aai-app-config/aft.properties new file mode 100644 index 0000000..d3165d2 --- /dev/null +++ b/cookbooks/ajsc-aai-config/templates/default/aai-app-config/aft.properties @@ -0,0 +1,8 @@ +com.att.aft.discovery.client.environment=<%= @COM_ATT_AFT_DISCOVERY_CLIENT_ENVIRONMENT %> +com.att.aft.discovery.client.latitude=<%= @COM_ATT_AFT_DISCOVERY_CLIENT_LATITUDE %> +com.att.aft.discovery.client.longitude=<%= @COM_ATT_AFT_DISCOVERY_CLIENT_LONGITUDE %> +com.att.aft.alias=ecomp-aai +com.att.aft.keyStore=/opt/app/aai/bundleconfig/etc/m04353t.jks +com.att.aft.keyStorePassword=<%= @COM_ATT_AFT_KEY_STORE_PASSWORD %> +com.att.aft.trustStore=/opt/app/aai/bundleconfig/etc/m04353t.jks +com.att.aft.trustStorePassword=<%= @COM_ATT_AFT_TRUST_STORE_PASSWORD %> diff --git a/cookbooks/ajsc-aai-config/templates/default/aai-app-config/logback.erb b/cookbooks/ajsc-aai-config/templates/default/aai-app-config/logback.erb new file mode 100644 index 0000000..e438b89 --- /dev/null +++ b/cookbooks/ajsc-aai-config/templates/default/aai-app-config/logback.erb @@ -0,0 +1,298 @@ + + ${module.ajsc.namespace.name} + + + + + + ERROR + ACCEPT + DENY + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + + + + + + INFO + ACCEPT + DENY + + ${logDirectory}/rest/metrics.log + + ${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd} + + + %m%n + + + + 1000 + + + + + + DEBUG + ACCEPT + DENY + + ${logDirectory}/rest/debug.log + + ${logDirectory}/rest/debug.log.%d{yyyy-MM-dd} + + + %m%n + + + + 1000 + + + + + + WARN + + ${logDirectory}/rest/error.log + + ${logDirectory}/rest/error.log.%d{yyyy-MM-dd} + + + %m%n + + + + 1000 + + + + + ${logDirectory}/rest/audit.log + + ${logDirectory}/rest/audit.log.%d{yyyy-MM-dd} + + + %m%n + + + + 1000 + + + + + + WARN + + ${logDirectory}/dmaapAAIWorkloadConsumer/error.log + + ${logDirectory}/dmaapAAIWorkloadConsumer/error.log.%d{yyyy-MM-dd} + + + %m%n + + + + + + DEBUG + ACCEPT + DENY + + ${logDirectory}/dmaapAAIWorkloadConsumer/debug.log + + ${logDirectory}/dmaapAAIWorkloadConsumer/debug.log.%d{yyyy-MM-dd} + + + %m%n + + + + + INFO + ACCEPT + DENY + + ${logDirectory}/dmaapAAIWorkloadConsumer/metrics.log + + ${logDirectory}/dmaapAAIWorkloadConsumer/metrics.log.%d{yyyy-MM-dd} + + + %m%n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.log + + ${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + 1 + 9 + + + 5MB + + + "%d [%thread] %-5level %logger{1024} - %msg%n" + + + + + ${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.log + + ${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + 1 + 9 + + + 5MB + + + "%d [%thread] %-5level %logger{1024} - %msg%n" + + + + + + + 1000 + 0 + + + + + + + + + + + + 1000 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cookbooks/ajsc-aai-config/templates/default/aai-app-config/preferredRoute.txt b/cookbooks/ajsc-aai-config/templates/default/aai-app-config/preferredRoute.txt new file mode 100644 index 0000000..d09d49e --- /dev/null +++ b/cookbooks/ajsc-aai-config/templates/default/aai-app-config/preferredRoute.txt @@ -0,0 +1 @@ +preferredRouteKey=<%= @AAI_WORKLOAD_PREFERRED_ROUTE_KEY %> \ No newline at end of file -- cgit 1.2.3-korg