summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-os-chef')
-rw-r--r--sdc-os-chef/pom.xml1
-rw-r--r--sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb44
-rw-r--r--sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb8
3 files changed, 29 insertions, 24 deletions
diff --git a/sdc-os-chef/pom.xml b/sdc-os-chef/pom.xml
index 76046feb42..41372d5801 100644
--- a/sdc-os-chef/pom.xml
+++ b/sdc-os-chef/pom.xml
@@ -236,6 +236,7 @@
<configuration>
<verbose>true</verbose>
<apiVersion>1.23</apiVersion>
+ <registry>nexus3.onap.org:10003</registry>
<images>
diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb
index e54932d1c4..68c1870832 100644
--- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb
+++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb
@@ -1,32 +1,36 @@
template "/tmp/create_dox_keyspace.sh" do
- source "create_dox_keyspace.sh.erb"
- sensitive true
- mode 0755
- variables({
- :cassandra_ip => "HOSTIP",
- :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment
- })
+ source "create_dox_keyspace.sh.erb"
+ sensitive true
+ mode 0755
+ variables({
+ :cassandra_ip => "HOSTIP",
+ :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment
+ })
end
-cookbook_file "/tmp/create_dox_db.cql" do
- sensitive true
- source "create_dox_db.cql"
- mode 0755
-end
-
-cookbook_file "/tmp/alter_dox_db.cql" do
- sensitive true
- source "alter_dox_db.cql"
- mode 0755
+remote_directory '/tmp/tools' do
+ source 'tools'
+ mode '0755'
+ files_mode '0755'
+ action :create
end
+bash "onboard-db-schema-creation" do
+ ignore_failure true
+ code <<-EOH
+ cd /tmp/tools/build/scripts
+ chmod +x onboard-db-schema-creation.sh
+ /tmp/tools/build/scripts/onboard-db-schema-creation.sh
+ EOH
+end
+
bash "create-DOX-schema" do
- ignore_failure true
- code <<-EOH
+ ignore_failure true
+ code <<-EOH
cd /tmp
chmod +x /tmp/create_dox_keyspace.sh
/tmp/create_dox_keyspace.sh
- EOH
+ EOH
end
diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb
index f65bb945f3..37b785970c 100644
--- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb
+++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb
@@ -23,12 +23,12 @@ fi
echo "run create_dox_db.cql"
-chmod 755 /tmp/create_dox_db.cql
-cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS -f /tmp/create_dox_db.cql > /dev/null 2>&1
+chmod 755 /tmp/tools/build/scripts/create_dox_db.cql
+cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS -f /tmp/tools/build/scripts/create_dox_db.cql > /dev/null 2>&1
sleep 10
echo "run alter_dox_db.cql"
-chmod 755 /tmp/alter_dox_db.cql
-cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS -f /tmp/alter_dox_db.cql > /dev/null 2>&1
+chmod 755 /tmp/tools/build/scripts/alter_dox_db.cql
+cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS -f /tmp/tools/build/scripts/alter_dox_db.cql > /dev/null 2>&1