Use integration-java11 Dockerfile
Use onap/integration-java11:7.1.0 as a source for the images requiring JDK 11 in SDC
Issue-ID: SDC-3298
Change-Id: Ifee3d2942dcb9c078f2ebb686bdabc0ecca857b3
Signed-off-by: xuegao <xue.gao@intl.att.com>
diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/01-createCsUser.rb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/01-createCsUser.rb
index 84b0cb2..3c67715 100644
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/01-createCsUser.rb
+++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/01-createCsUser.rb
@@ -11,9 +11,8 @@
})
end
-
-bash "create-sdc-user" do
- code <<-EOH
- cd /tmp ; /tmp/create_cassandra_user.sh
- EOH
-end
+execute "create-sdc-user" do
+ command "/tmp/create_cassandra_user.sh"
+ cwd "/tmp/"
+ action :run
+end
\ No newline at end of file
diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb
index 38de1e8..5f740a8 100644
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb
+++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb
@@ -19,21 +19,16 @@
action :create
end
+execute "onboard-db-schema-creation" do
+ ignore_failure true
+ command "chmod +x onboard-db-schema-creation.sh && sh -x /tmp/tools/build/scripts/onboard-db-schema-creation.sh"
+ cwd "/tmp/tools/build/scripts"
+ action :run
+end
-bash "onboard-db-schema-creation" do
+execute "create-DOX-schema" do
ignore_failure true
- code <<-EOH
- cd /tmp/tools/build/scripts
- chmod +x onboard-db-schema-creation.sh
- bash /tmp/tools/build/scripts/onboard-db-schema-creation.sh
- EOH
-end
-
-bash "create-DOX-schema" do
- ignore_failure true
- code <<-EOH
- cd /tmp
- chmod +x /tmp/create_dox_keyspace.sh
- /tmp/create_dox_keyspace.sh
- EOH
-end
+ command "chmod +x /tmp/create_dox_keyspace.sh && /tmp/create_dox_keyspace.sh"
+ cwd "/tmp"
+ action :run
+end
\ No newline at end of file
diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb
index a62550e..e60740f 100644
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb
+++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb
@@ -3,15 +3,12 @@
mode 0755
end
-## extract sdctool.tar
-bash "install tar" do
+execute "install tar" do
+ command "/bin/tar xf /tmp/sdctool.tar -C /tmp"
cwd "/tmp"
- code <<-EOH
- /bin/tar xf /tmp/sdctool.tar -C /tmp
- EOH
+ action :run
end
-
template "janusgraph.properties" do
sensitive true
path "/tmp/sdctool/config/janusgraph.properties"
@@ -49,19 +46,13 @@
})
end
-
-
-bash "executing-schema-creation" do
- code <<-EOH
- cd /tmp
- chmod +x /tmp/sdctool/scripts/schemaCreation.sh
- /tmp/sdctool/scripts/schemaCreation.sh /tmp/sdctool/config
- EOH
+execute "executing-schema-creation" do
+ command "chmod +x /tmp/sdctool/scripts/schemaCreation.sh && /tmp/sdctool/scripts/schemaCreation.sh /tmp/sdctool/config"
+ cwd "/tmp"
+ action :run
end
-bash "executing-janusGraphSchemaCreation.sh" do
- code <<-EOH
- chmod +x /tmp/sdctool/scripts/janusGraphSchemaCreation.sh
- /tmp/sdctool/scripts/janusGraphSchemaCreation.sh /tmp/sdctool/config
- EOH
-end
+execute "executing-janusGraphSchemaCreation.sh" do
+ command "chmod +x /tmp/sdctool/scripts/janusGraphSchemaCreation.sh && /tmp/sdctool/scripts/janusGraphSchemaCreation.sh /tmp/sdctool/config"
+ action :run
+end
\ No newline at end of file
diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importConformance.rb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importConformance.rb
index 0490c89..8c2ee50 100644
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importConformance.rb
+++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importConformance.rb
@@ -2,19 +2,8 @@
cl_release=node['version'].split('.')[0..2].join('.').split('-')[0]
printf("\033[33mcl_release=[%s]\n\033[0m", cl_release)
-
-
-bash "import-Conformance" do
+execute "import-Conformance" do
+ command "conf_dir=/tmp/sdctool/config && tosca_dir=/tmp/sdctool/tosca && cl_version=`grep 'toscaConformanceLevel:' $conf_dir/configuration.yaml |awk '{print $2}'` && cd /tmp/sdctool/scripts && /bin/chmod +x sdcSchemaFileImport.sh && echo \"execute /tmp/sdctool/scripts/sdcSchemaFileImport.sh ${tosca_dir} #{cl_release} ${cl_version} ${conf_dir} onap\" && ./sdcSchemaFileImport.sh ${tosca_dir} #{cl_release} ${cl_version} ${conf_dir} onap"
cwd "#{working_directory}"
- code <<-EOH
- conf_dir=/tmp/sdctool/config
- tosca_dir=/tmp/sdctool/tosca
-
- cl_version=`grep 'toscaConformanceLevel:' $conf_dir/configuration.yaml |awk '{print $2}'`
-
- cd /tmp/sdctool/scripts
- /bin/chmod +x sdcSchemaFileImport.sh
- echo "execute /tmp/sdctool/scripts/sdcSchemaFileImport.sh ${tosca_dir} #{cl_release} ${cl_version} ${conf_dir} onap"
- ./sdcSchemaFileImport.sh ${tosca_dir} #{cl_release} ${cl_version} ${conf_dir} onap
- EOH
+ action :run
end
\ No newline at end of file