summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-normatives/recipes/upgrade_Normatives.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-normatives/recipes/upgrade_Normatives.rb')
-rw-r--r--sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-normatives/recipes/upgrade_Normatives.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-normatives/recipes/upgrade_Normatives.rb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-normatives/recipes/upgrade_Normatives.rb
new file mode 100644
index 0000000000..1f71f8cf32
--- /dev/null
+++ b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-normatives/recipes/upgrade_Normatives.rb
@@ -0,0 +1,17 @@
+cookbook_file "/tmp/normatives.tar.gz" do
+ source "normatives.tar.gz"
+end
+
+working_directory = "/tmp"
+
+bash "upgrade-normatives" do
+ cwd "#{working_directory}"
+ code <<-EOH
+ tar xvfz /tmp/normatives.tar.gz
+ cd normatives/scripts/import/tosca/
+ /bin/chmod +x upgradeNormative.py importGroupTypes.py
+ python upgradeNormative.py -i "#{node['HOST_IP']}" --debug=true > /var/lib/jetty/logs/upgradeNormative.log
+ python importGroupTypes.py -i "#{node['HOST_IP']}" > /var/lib/jetty/logs/importGroupTypes.log
+ EOH
+end
+