diff options
author | Yuli Shlosberg <ys9693@att.com> | 2018-01-25 13:53:36 +0200 |
---|---|---|
committer | Michael Lando <ml636r@att.com> | 2018-02-04 10:39:20 +0000 |
commit | 0875ce0faad191c21b32cc9c95ffc20ebd57d586 (patch) | |
tree | 28520da212637e0f67697d9ff837e80da6eaa408 /sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes | |
parent | b676b6dcada5549348003191c09142e92de4d352 (diff) |
Cassandra OOM Alignment
Change-Id: If9792919dba17936965b45361888a44a12a76b67
Issue-ID: SDC-911
Signed-off-by: Yuli Shlosberg <ys9693@att.com>
Diffstat (limited to 'sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes')
9 files changed, 26 insertions, 231 deletions
diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/01-configureCassandra.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/01-configureCassandra.rb index f167c3ec8d..32e89c9b21 100644 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/01-configureCassandra.rb +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/01-configureCassandra.rb @@ -47,4 +47,4 @@ template "cassandra-rackdc.properties" do :dc => cluster_name, :rack => "Rack"+"#{rackNum}-"+node.chef_environment }) -end +end
\ No newline at end of file diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-changeCSpass.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-changeCSpass.rb new file mode 100644 index 0000000000..22ef07907d --- /dev/null +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-changeCSpass.rb @@ -0,0 +1,16 @@ +template "/tmp/change_cassandra_pass.sh" do + source "change_cassandra_pass.sh.erb" + sensitive true + mode 0755 + variables({ + :cassandra_ip => node['Nodes']['CS'], + :cassandra_pwd => ENV['CS_PASSWORD'] + }) +end + + +bash "change-cassandra-pass" do + code <<-EOH + cd /tmp ; /tmp/change_cassandra_pass.sh + EOH +end
\ No newline at end of file diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-createCsUser.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-createCsUser.rb deleted file mode 100644 index d9041f2841..0000000000 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/02-createCsUser.rb +++ /dev/null @@ -1,17 +0,0 @@ -template "/tmp/create_cassandra_user.sh" do - source "create_cassandra_user.sh.erb" - sensitive true - mode 0755 - variables({ - :cassandra_ip => "HOSTIP", - :cassandra_pwd => node['cassandra'][:cassandra_password], - :cassandra_usr => node['cassandra'][:cassandra_user] - }) -end - - -bash "create-sdc-user" do - code <<-EOH - cd /tmp ; /tmp/create_cassandra_user.sh - EOH -end 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 deleted file mode 100644 index 4e37d49ee0..0000000000 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-createDoxKeyspace.rb +++ /dev/null @@ -1,38 +0,0 @@ -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, - :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 - - -bash "onboard-db-schema-creation" 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 diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-prepareProbeFile.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-prepareProbeFile.rb new file mode 100644 index 0000000000..0eb9800fe5 --- /dev/null +++ b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/03-prepareProbeFile.rb @@ -0,0 +1,9 @@ +template "/var/lib/ready-probe.sh" do + source "ready-probe.sh.erb" + sensitive true + mode 0755 + variables({ + :cassandra_ip => node['Nodes']['CS'], + :cassandra_pwd => ENV['CS_PASSWORD'] + }) +end
\ No newline at end of file diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb deleted file mode 100644 index 0bb0027325..0000000000 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/04-schemaCreation.rb +++ /dev/null @@ -1,65 +0,0 @@ -cookbook_file "/tmp/sdctool.tar" do - source "sdctool.tar" - mode 0755 -end - -## extract sdctool.tar -bash "install tar" do - cwd "/tmp" - code <<-EOH - /bin/tar xf /tmp/sdctool.tar -C /tmp - EOH -end - - -template "titan.properties" do - sensitive true - path "/tmp/sdctool/config/titan.properties" - source "titan.properties.erb" - mode "0755" - variables({ - :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment, - :cassandra_pwd => node['cassandra'][:cassandra_password], - :cassandra_usr => node['cassandra'][:cassandra_user], - :titan_connection_timeout => node['cassandra']['titan_connection_timeout'] - }) -end - - -template "/tmp/sdctool/config/configuration.yaml" do - sensitive true - source "configuration.yaml.erb" - mode 0755 - variables({ - :host_ip => node['HOST_IP'], - :catalog_port => node['BE'][:http_port], - :ssl_port => node['BE'][:https_port], - :cassandra_ip => node['Nodes']['CS'], - :rep_factor => 1, - :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment, - :titan_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 - - -template "/tmp/sdctool/config/elasticsearch.yml" do - sensitive true - source "elasticsearch.yml.erb" - mode 0755 - variables({ - :elastic_ip => "HOSTIP" - }) -end - - -bash "excuting-schema-creation" do - code <<-EOH - cd /tmp - chmod +x /tmp/sdctool/scripts/schemaCreation.sh - /tmp/sdctool/scripts/schemaCreation.sh /tmp/sdctool/config - EOH -end diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/05-titanSchemaCreation.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/05-titanSchemaCreation.rb deleted file mode 100644 index fa9ae79690..0000000000 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/05-titanSchemaCreation.rb +++ /dev/null @@ -1,68 +0,0 @@ -cookbook_file "/tmp/sdctool.tar" do - sensitive true - source "sdctool.tar" - mode 0755 -end - -## extract sdctool.tar -bash "install tar" do - cwd "/tmp" - code <<-EOH - /bin/tar xf /tmp/sdctool.tar -C /tmp - EOH -end - - -template "titan.properties" do - sensitive true - path "/tmp/sdctool/config/titan.properties" - source "titan.properties.erb" - mode "0755" - variables({ - :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment, - :cassandra_pwd => node['cassandra'][:cassandra_password], - :cassandra_usr => node['cassandra'][:cassandra_user], - :titan_connection_timeout => node['cassandra']['titan_connection_timeout'] - }) -end - - -template "/tmp/sdctool/config/configuration.yaml" do - sensitive true - source "configuration.yaml.erb" - mode 0755 - variables({ - :host_ip => node['HOST_IP'], - :catalog_port => node['BE'][:http_port], - :ssl_port => node['BE'][:https_port], - :cassandra_ip => node['Nodes']['CS'], - :rep_factor => 1, - :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment, - :titan_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 - -template "/tmp/sdctool/config/elasticsearch.yml" do - sensitive true - source "elasticsearch.yml.erb" - mode 0755 - variables({ - :elastic_ip => "HOSTIP" - }) -end - - -bash "excuting-titanSchemaCreation.sh" do - code <<-EOH - echo "XXXXXXXXXXXX executing /tmp/sdctool/scripts/titanSchemaCreation.sh XXXXXXXXXXXX" - chmod +x /tmp/sdctool/scripts/titanSchemaCreation.sh - /tmp/sdctool/scripts/titanSchemaCreation.sh /tmp/sdctool/config - EOH -end - - - diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/06-migrateZusammenFromDox.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/06-migrateZusammenFromDox.rb deleted file mode 100644 index e1fcf4f556..0000000000 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/06-migrateZusammenFromDox.rb +++ /dev/null @@ -1,14 +0,0 @@ -#onboarding_version = "#{node['onboarding'][:version]}" -#GROUP_ID = "com/att/asdc/onboarding/#{onboarding_version}" -#NEXUS_IP = "#{node['nexus_ip']}" - -bash "Excuting openecomp-zusammen-migration-1707.0.0-SNAPSHOT.jar" do - code <<-EOH - [ -d /var/tmp/onboarding/migration ] && rm -rf /var/tmp/onboarding || mkdir -p /var/tmp/onboarding/migration - cd /var/tmp/onboarding/migration - /bin/tar -xzf /root/chef-solo/cookbooks/cassandra-actions/files/default/zusammen.tgz -C /var/tmp/onboarding/migration - cd /var/tmp/onboarding/migration - java -Dlog.home=/var/tmp/onboarding/migration/logs -Dconfiguration.yaml=/tmp/sdctool/config/configuration.yaml -jar openecomp-zusammen-migration-1707.0.0-SNAPSHOT.jar org.openecomp.core.migration.MigrationMain - EOH -end - diff --git a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/07-importComformance.rb b/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/07-importComformance.rb deleted file mode 100644 index ce1d50b8ea..0000000000 --- a/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/recipes/07-importComformance.rb +++ /dev/null @@ -1,28 +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) - - - -bash "import-Comformance" do - 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} " - ./sdcSchemaFileImport.sh ${tosca_dir} #{cl_release} ${cl_version} ${conf_dir} - EOH -end -bash "echo status" do - code <<-EOH - echo "DOCKER STARTED" - EOH -end - - - |