summaryrefslogtreecommitdiffstats
path: root/cookbooks/aai-resources/aai-resources-config/recipes/createConfigDirectories.rb
diff options
context:
space:
mode:
authorVenkata Harish K Kajur <vk250x@att.com>2017-05-19 12:29:43 -0400
committerVenkata Harish K Kajur <vk250x@att.com>2017-05-19 12:40:51 -0400
commit0cd55fc1d50f066720bbe0ce591d9cbc59ecddf4 (patch)
treec01e51a84caa6baac7511352451281c3759097e0 /cookbooks/aai-resources/aai-resources-config/recipes/createConfigDirectories.rb
parentb160c3cc1e58e85502ccaa7358cd38ff210ed34a (diff)
Add the chef config changes for the new repos
Change-Id: If1fc90402ca70449cd181fab9f469eded4831638 Signed-off-by: Venkata Harish K Kajur <vk250x@att.com>
Diffstat (limited to 'cookbooks/aai-resources/aai-resources-config/recipes/createConfigDirectories.rb')
-rw-r--r--cookbooks/aai-resources/aai-resources-config/recipes/createConfigDirectories.rb44
1 files changed, 44 insertions, 0 deletions
diff --git a/cookbooks/aai-resources/aai-resources-config/recipes/createConfigDirectories.rb b/cookbooks/aai-resources/aai-resources-config/recipes/createConfigDirectories.rb
new file mode 100644
index 0000000..e944195
--- /dev/null
+++ b/cookbooks/aai-resources/aai-resources-config/recipes/createConfigDirectories.rb
@@ -0,0 +1,44 @@
+# 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
+
+[
+ "#{node['aai-resources-config']['LOGROOT']}/AAI-RES",
+ "#{node['aai-resources-config']['LOGROOT']}/AAI-RES/data",
+ "#{node['aai-resources-config']['LOGROOT']}/AAI-RES/misc",
+ "#{node['aai-resources-config']['LOGROOT']}/AAI-RES/ajsc-jetty" ].each do |path|
+ directory path do
+ owner 'aaiadmin'
+ group 'aaiadmin'
+ mode '0755'
+ recursive=true
+ action :create
+ end
+end
+
+[ "#{node['aai-resources-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-resources-config']['PROJECT_HOME']}/logs" do
+ to "#{node['aai-resources-config']['LOGROOT']}/AAI-RES"
+ owner 'aaiadmin'
+ group 'aaiadmin'
+ mode '0755'
+end
+
+#Make a link from /opt/app/aai-resources/scripts to /opt/app/aai-resources/bin
+link "#{node['aai-resources-config']['PROJECT_HOME']}/scripts" do
+ to "#{node['aai-resources-config']['PROJECT_HOME']}/bin"
+ owner 'aaiadmin'
+ group 'aaiadmin'
+ mode '0755'
+end