2 be_ip=node['Nodes'][:BE]
6 be_port = node['BE']['https_port']
7 param="-i #{be_ip} -p #{be_port} --https"
10 be_port = node['BE']['http_port']
11 param="-i #{be_ip} -p #{be_port}"
15 basic_auth_enabled = node['basic_auth']['enabled']
16 basic_auth_user = node['basic_auth']['user_name']
17 basic_auth_pass = node['basic_auth']['user_pass']
19 basic_auth_config = "--header " + Base64.strict_encode64(basic_auth_user + ":" + basic_auth_pass)
21 # set default user configuration file
22 basic_auth_config = ""
25 cookbook_file "/var/tmp/normatives.tar.gz" do
26 source "normatives.tar.gz"
29 bash "executing-import_Normatives" do
34 tar -xvf normatives.tar.gz
36 # executing the normatives
37 # add --debug to the sdcinit command to enable debug
39 cd /var/tmp/normatives/import/tosca
40 sdcinit #{param} #{basic_auth_config} > /var/lib/jetty/logs/init.log
42 if [[ $rc != 0 ]]; then exit $rc; fi