aboutsummaryrefslogtreecommitdiffstats
path: root/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes
diff options
context:
space:
mode:
Diffstat (limited to 'asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes')
-rw-r--r--asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/01-createCsUser.rb18
-rw-r--r--asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb34
-rw-r--r--asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb58
-rw-r--r--asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importConformance.rb9
4 files changed, 0 insertions, 119 deletions
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
deleted file mode 100644
index 3c67715922..0000000000
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/01-createCsUser.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-template "/tmp/create_cassandra_user.sh" do
- source "create_cassandra_user.sh.erb"
- sensitive true
- mode 0755
- variables({
- :cassandra_ip => node['Nodes']['CS'].first,
- :cassandra_port => node['cassandra']['cassandra_port'],
- :cassandra_pwd => ENV['CS_PASSWORD'],
- :sdc_usr => ENV['SDC_USER'],
- :sdc_pwd => ENV['SDC_PASSWORD']
- })
-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
deleted file mode 100644
index 5f740a8909..0000000000
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/02-createDoxKeyspace.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-template "/tmp/create_dox_keyspace.sh" do
- source "create_dox_keyspace.sh.erb"
- sensitive true
- mode 0755
- variables({
- :cassandra_ip => node['Nodes']['CS'].first,
- :cassandra_port => node['cassandra'][:cassandra_port],
- :DC_NAME => node['cassandra']['datacenter_name'],
- :cassandra_pwd => node['cassandra'][:cassandra_password],
- :cassandra_usr => node['cassandra'][:cassandra_user]
- })
-end
-
-
-remote_directory '/tmp/tools' do
- source 'tools'
- mode '0755'
- files_mode '0755'
- 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
-
-execute "create-DOX-schema" do
- ignore_failure true
- 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
deleted file mode 100644
index e60740fb3d..0000000000
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/03-schemaCreation.rb
+++ /dev/null
@@ -1,58 +0,0 @@
-cookbook_file "/tmp/sdctool.tar" do
- source "sdctool.tar"
- mode 0755
-end
-
-execute "install tar" do
- command "/bin/tar xf /tmp/sdctool.tar -C /tmp"
- cwd "/tmp"
- action :run
-end
-
-template "janusgraph.properties" do
- sensitive true
- path "/tmp/sdctool/config/janusgraph.properties"
- source "janusgraph.properties.erb"
- mode "0755"
- variables({
- :DC_NAME => node['cassandra']['datacenter_name'],
- :cassandra_ip => node['Nodes']['CS'].first,
- :cassandra_port_num => node['cassandra'][:cassandra_port],
- :janus_connection_timeout => node['cassandra'][:janusgraph_connection_timeout],
- :cassandra_pwd => node['cassandra'][:cassandra_password],
- :cassandra_usr => node['cassandra'][:cassandra_user],
- :replication_factor => node['cassandra']['replication_factor']
- })
-end
-
-
-template "/tmp/sdctool/config/configuration.yaml" do
- sensitive true
- source "configuration.yaml.erb"
- mode 0755
- variables({
- :host_ip => node['Nodes']['BE'],
- :catalog_port => node['BE'][:http_port],
- :ssl_port => node['BE'][:https_port],
- :cassandra_ip => node['Nodes']['CS'].first,
- :cassandra_port => node['cassandra']['cassandra_port'],
- :rep_factor => node['cassandra']['replication_factor'],
- :DC_NAME => node['cassandra']['datacenter_name'],
- :janusgraph_Path => "/tmp/sdctool/config/",
- :socket_connect_timeout => node['cassandra']['socket_connect_timeout'],
- :socket_read_timeout => node['cassandra']['socket_read_timeout'],
- :cassandra_pwd => node['cassandra'][:cassandra_password],
- :cassandra_usr => node['cassandra'][:cassandra_user]
- })
-end
-
-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
-
-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
deleted file mode 100644
index 8c2ee505be..0000000000
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/recipes/04-importConformance.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-working_directory = "/tmp"
-cl_release=node['version'].split('.')[0..2].join('.').split('-')[0]
-printf("\033[33mcl_release=[%s]\n\033[0m", cl_release)
-
-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}"
- action :run
-end \ No newline at end of file