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 --- .gitignore | 1 + .gitreview | 4 + cookbooks/README.md | 54 ++++ cookbooks/ajsc-aai-auth/CHANGELOG.md | 13 + cookbooks/ajsc-aai-auth/README.md | 68 +++++ .../ajsc-aai-auth/files/default/aai_keystore-dev | Bin 0 -> 4002 bytes .../ajsc-aai-auth/files/default/aai_keystore-int | Bin 0 -> 4002 bytes .../ajsc-aai-auth/files/default/aai_keystore-local | Bin 0 -> 4002 bytes .../files/default/aai_keystore-simpledemo | Bin 0 -> 4002 bytes .../ajsc-aai-auth/files/default/aai_keystore-solo | Bin 0 -> 4002 bytes cookbooks/ajsc-aai-auth/metadata.rb | 7 + cookbooks/ajsc-aai-auth/recipes/aai-keystore.rb | 8 + 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 + cookbooks/runlist-app-server.json | 12 + cookbooks/user/CHANGELOG.md | 13 + cookbooks/user/README.md | 42 +++ cookbooks/user/metadata.rb | 7 + cookbooks/user/recipes/default.rb | 33 +++ 40 files changed, 1205 insertions(+) create mode 100644 .gitignore create mode 100644 .gitreview create mode 100644 cookbooks/README.md create mode 100644 cookbooks/ajsc-aai-auth/CHANGELOG.md create mode 100644 cookbooks/ajsc-aai-auth/README.md create mode 100644 cookbooks/ajsc-aai-auth/files/default/aai_keystore-dev create mode 100644 cookbooks/ajsc-aai-auth/files/default/aai_keystore-int create mode 100644 cookbooks/ajsc-aai-auth/files/default/aai_keystore-local create mode 100644 cookbooks/ajsc-aai-auth/files/default/aai_keystore-simpledemo create mode 100644 cookbooks/ajsc-aai-auth/files/default/aai_keystore-solo create mode 100644 cookbooks/ajsc-aai-auth/metadata.rb create mode 100644 cookbooks/ajsc-aai-auth/recipes/aai-keystore.rb 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 create mode 100755 cookbooks/runlist-app-server.json create mode 100644 cookbooks/user/CHANGELOG.md create mode 100644 cookbooks/user/README.md create mode 100644 cookbooks/user/metadata.rb create mode 100644 cookbooks/user/recipes/default.rb diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d8fe4fa --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.project diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..85d8994 --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=gerrit.openecomp.org +port=29418 +project=aai/aai-config.git diff --git a/cookbooks/README.md b/cookbooks/README.md new file mode 100644 index 0000000..c7ec3b0 --- /dev/null +++ b/cookbooks/README.md @@ -0,0 +1,54 @@ +This directory contains the cookbooks used to configure systems in your infrastructure with Chef. + +Knife needs to be configured to know where the cookbooks are located with the `cookbook_path` setting. If this is not set, then several cookbook operations will fail to work properly. + + cookbook_path ["./cookbooks"] + +This setting tells knife to look for the cookbooks directory in the present working directory. This means the knife cookbook subcommands need to be run in the `chef-repo` directory itself. To make sure that the cookbooks can be found elsewhere inside the repository, use an absolute path. This is a Ruby file, so something like the following can be used: + + current_dir = File.dirname(__FILE__) + cookbook_path ["#{current_dir}/../cookbooks"] + +Which will set `current_dir` to the location of the knife.rb file itself (e.g. `~/chef-repo/.chef/knife.rb`). + +Configure knife to use your preferred copyright holder, email contact and license. Add the following lines to `.chef/knife.rb`. + + cookbook_copyright "Example, Com." + cookbook_email "cookbooks@example.com" + cookbook_license "apachev2" + +Supported values for `cookbook_license` are "apachev2", "mit","gplv2","gplv3", or "none". These settings are used to prefill comments in the default recipe, and the corresponding values in the metadata.rb. You are free to change the the comments in those files. + +Create new cookbooks in this directory with Knife. + + knife cookbook create COOKBOOK + +This will create all the cookbook directory components. You don't need to use them all, and can delete the ones you don't need. It also creates a README file, metadata.rb and default recipe. + +You can also download cookbooks directly from the Opscode Cookbook Site. There are two subcommands to help with this depending on what your preference is. + +The first and recommended method is to use a vendor branch if you're using Git. This is automatically handled with Knife. + + knife cookbook site install COOKBOOK + +This will: + +* Download the cookbook tarball from the Chef Supermarket. +* Ensure its on the git master branch. +* Checks for an existing vendor branch, and creates if it doesn't. +* Checks out the vendor branch (chef-vendor-COOKBOOK). +* Removes the existing (old) version. +* Untars the cookbook tarball it downloaded in the first step. +* Adds the cookbook files to the git index and commits. +* Creates a tag for the version downloaded. +* Checks out the master branch again. +* Merges the cookbook into master. +* Repeats the above for all the cookbooks dependencies, downloading them from the community site + +The last step will ensure that any local changes or modifications you have made to the cookbook are preserved, so you can keep your changes through upstream updates. + +If you're not using Git, use the site download subcommand to download the tarball. + + knife cookbook site download COOKBOOK + +This creates the COOKBOOK.tar.gz from in the current directory (e.g., `~/chef-repo`). We recommend following a workflow similar to the above for your version control tool. diff --git a/cookbooks/ajsc-aai-auth/CHANGELOG.md b/cookbooks/ajsc-aai-auth/CHANGELOG.md new file mode 100644 index 0000000..575f2f7 --- /dev/null +++ b/cookbooks/ajsc-aai-auth/CHANGELOG.md @@ -0,0 +1,13 @@ +ajsc-aai-auth CHANGELOG +======================= + +This file is used to list changes made in each version of the ajsc-aai-auth cookbook. + +0.1.0 +----- +- [your_name] - Initial release of ajsc-aai-auth + +- - - +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-auth/README.md b/cookbooks/ajsc-aai-auth/README.md new file mode 100644 index 0000000..da8fe00 --- /dev/null +++ b/cookbooks/ajsc-aai-auth/README.md @@ -0,0 +1,68 @@ +ajsc-aai-auth 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-auth needs toaster to brown your bagel. + +Attributes +---------- +TODO: List your cookbook attributes here. + +e.g. +#### ajsc-aai-auth::default + + + + + + + + + + + + + +
KeyTypeDescriptionDefault
['ajsc-aai-auth']['bacon']Booleanwhether to include bacontrue
+ +Usage +----- +#### ajsc-aai-auth::default +TODO: Write usage instructions for each cookbook. + +e.g. +Just include `ajsc-aai-auth` in your node's `run_list`: + +```json +{ + "name":"my_node", + "run_list": [ + "recipe[ajsc-aai-auth]" + ] +} +``` + +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-auth/files/default/aai_keystore-dev b/cookbooks/ajsc-aai-auth/files/default/aai_keystore-dev new file mode 100644 index 0000000..3eef135 Binary files /dev/null and b/cookbooks/ajsc-aai-auth/files/default/aai_keystore-dev differ diff --git a/cookbooks/ajsc-aai-auth/files/default/aai_keystore-int b/cookbooks/ajsc-aai-auth/files/default/aai_keystore-int new file mode 100644 index 0000000..3eef135 Binary files /dev/null and b/cookbooks/ajsc-aai-auth/files/default/aai_keystore-int differ diff --git a/cookbooks/ajsc-aai-auth/files/default/aai_keystore-local b/cookbooks/ajsc-aai-auth/files/default/aai_keystore-local new file mode 100644 index 0000000..3eef135 Binary files /dev/null and b/cookbooks/ajsc-aai-auth/files/default/aai_keystore-local differ diff --git a/cookbooks/ajsc-aai-auth/files/default/aai_keystore-simpledemo b/cookbooks/ajsc-aai-auth/files/default/aai_keystore-simpledemo new file mode 100644 index 0000000..3eef135 Binary files /dev/null and b/cookbooks/ajsc-aai-auth/files/default/aai_keystore-simpledemo differ diff --git a/cookbooks/ajsc-aai-auth/files/default/aai_keystore-solo b/cookbooks/ajsc-aai-auth/files/default/aai_keystore-solo new file mode 100644 index 0000000..3eef135 Binary files /dev/null and b/cookbooks/ajsc-aai-auth/files/default/aai_keystore-solo differ diff --git a/cookbooks/ajsc-aai-auth/metadata.rb b/cookbooks/ajsc-aai-auth/metadata.rb new file mode 100644 index 0000000..1cf7e82 --- /dev/null +++ b/cookbooks/ajsc-aai-auth/metadata.rb @@ -0,0 +1,7 @@ +name 'ajsc-aai-auth' +maintainer 'YOUR_COMPANY_NAME' +maintainer_email 'YOUR_EMAIL' +license 'All rights reserved' +description 'Installs/Configures ajsc-aai-auth' +long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) +version '0.2.0' diff --git a/cookbooks/ajsc-aai-auth/recipes/aai-keystore.rb b/cookbooks/ajsc-aai-auth/recipes/aai-keystore.rb new file mode 100644 index 0000000..e5c0599 --- /dev/null +++ b/cookbooks/ajsc-aai-auth/recipes/aai-keystore.rb @@ -0,0 +1,8 @@ +cookbook_file "#{node['aai-app-config']['PROJECT_HOME']}/bundleconfig/etc/auth/aai_keystore" do + source "aai_keystore-#{node['aai-app-config']['AAIENV']}" + owner 'aaiadmin' + group 'aaiadmin' + mode '0755' + action :create +end + 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 diff --git a/cookbooks/runlist-app-server.json b/cookbooks/runlist-app-server.json new file mode 100755 index 0000000..a15ddbf --- /dev/null +++ b/cookbooks/runlist-app-server.json @@ -0,0 +1,12 @@ +{ + "run_list": [ + "recipe[ajsc-aai-config::aai-config]", + "recipe[ajsc-aai-config::aai-logback]", + "recipe[ajsc-aai-config::aai-preferredRoute]", + "recipe[ajsc-aai-config::aaiWorkloadConsumer]", + "recipe[ajsc-aai-config::aaiWorkloadPublisher]", + "recipe[ajsc-aai-config::aaiWorkloadStatusPublisher]", + "recipe[ajsc-aai-config::createConfigDirectories]", + "recipe[ajsc-aai-auth::aai-keystore]" + ] +} diff --git a/cookbooks/user/CHANGELOG.md b/cookbooks/user/CHANGELOG.md new file mode 100644 index 0000000..dec3520 --- /dev/null +++ b/cookbooks/user/CHANGELOG.md @@ -0,0 +1,13 @@ +user CHANGELOG +============== + +This file is used to list changes made in each version of the user cookbook. + +0.1.0 +----- +- [your_name] - Initial release of user + +- - - +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/user/README.md b/cookbooks/user/README.md new file mode 100644 index 0000000..7d85a9f --- /dev/null +++ b/cookbooks/user/README.md @@ -0,0 +1,42 @@ +user Cookbook +============= +Configures users and mechids + +Requirements +------------ + +Attributes +---------- +#### user::mech_users + + + + + + + + + + + + + +
KeyTypeDescriptionDefault
['aai-app-config']['mech-ids']HashMech ID, is the mech ID enabled?, shoud the cookbook update the key?true
+ +Usage +----- +#### user::default +Just include `user` in your node's `run_list`: + +```json +{ + "name":"my_node", + "run_list": [ + "recipe[user]" + ] +} +``` + +License and Authors +------------------- +Authors: AT&T A&AI diff --git a/cookbooks/user/metadata.rb b/cookbooks/user/metadata.rb new file mode 100644 index 0000000..9a97b5f --- /dev/null +++ b/cookbooks/user/metadata.rb @@ -0,0 +1,7 @@ +name 'user' +maintainer 'AT&T' +maintainer_email 'id@xxx.com' +license 'All rights reserved' +description 'Configures Users and Mech Ids' +long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) +version '0.1.9' diff --git a/cookbooks/user/recipes/default.rb b/cookbooks/user/recipes/default.rb new file mode 100644 index 0000000..20c5ac3 --- /dev/null +++ b/cookbooks/user/recipes/default.rb @@ -0,0 +1,33 @@ +# +# Cookbook Name:: user +# Recipe:: default +# +# Copyright 2015, AT&T +# +# All rights reserved - Do Not Redistribute +# +group 'aaiadmin' do + append true +#gid 492381 + members members ['aaiadmin'] + action :create +end + +user 'aaiadmin' do + comment "A&AI Application User" + gid "aaiadmin" + home "/opt/aaihome/aaiadmin" + manage_home true + non_unique false + shell "/bin/ksh" +#uid 341790 + username "aaiadmin" + ignore_failure true + action :create +end +directory "/opt/aaihome/aaiadmin" do + owner 'aaiadmin' + group 'aaiadmin' + mode "0755" + ignore_failure true +end -- cgit 1.2.3-korg