summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes
diff options
context:
space:
mode:
Diffstat (limited to 'sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes')
-rw-r--r--sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_1_cleanup_jettydir.rb48
-rw-r--r--sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb59
-rw-r--r--sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_3_locate_keystore.rb16
-rw-r--r--sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_4_jetty_Modules.rb22
-rw-r--r--sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_5_setup_elasticsearch.rb15
-rw-r--r--sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_6_setup_portal_properties.rb17
-rw-r--r--sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_7_logback.rb7
-rw-r--r--sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_8_errors_config.rb14
-rw-r--r--sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_Number_create_DMaaP_keys.rb-NotUsed34
-rw-r--r--sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_Number_import_Normatives.rb16
10 files changed, 0 insertions, 248 deletions
diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_1_cleanup_jettydir.rb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_1_cleanup_jettydir.rb
deleted file mode 100644
index d989eb20bb..0000000000
--- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_1_cleanup_jettydir.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-#directory "BE_tempdir_cleanup" do
-# path "/var/lib/jetty/tempdir"
-# recursive true
-# action :delete
-#end
-
-
-directory "BE_tempdir_creation" do
- path "/var/lib/jetty/temp"
- owner 'jetty'
- group 'jetty'
- mode '0755'
- action :create
-end
-
-
-#directory "BE_webapps_cleanup" do
-# path "/var/lib/jetty/webapps"
-# recursive true
-# action :delete
-#end
-
-
-#directory "BE_webapps_creation" do
-# path "/var/lib/jetty/webapps"
-# owner 'jetty'
-# group 'jetty'
-# mode '0755'
-# action :create
-#end
-
-
-directory "BE_create_config_dir" do
- path "/var/lib/jetty/config"
- owner 'jetty'
- group 'jetty'
- mode '0755'
- action :create
-end
-
-
-directory "BE_create_catalog-be" do
- path "/var/lib/jetty/config/catalog-be"
- owner 'jetty'
- group 'jetty'
- mode '0755'
- action :create
-end
diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb
deleted file mode 100644
index fde367da7c..0000000000
--- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb
+++ /dev/null
@@ -1,59 +0,0 @@
-jetty_base="/var/lib/jetty"
-replication_factor=1
-
-template "titan.properties" do
- path "/#{jetty_base}/config/catalog-be/titan.properties"
- source "BE-titan.properties.erb"
- owner "jetty"
- group "jetty"
- mode "0755"
- variables({
- :CASSANDRA_IP => node['Nodes']['CS'],
- :CASSANDRA_PWD => node['cassandra'][:cassandra_password],
- :CASSANDRA_USR => node['cassandra'][:cassandra_user],
- :rep_factor => replication_factor,
- :DC_NAME => node['cassandra'][:cluster_name]+node.chef_environment,
- :titan_connection_timeout => node['cassandra']['titan_connection_timeout']
- })
-end
-
-
-template "catalog-be-config" do
- path "/#{jetty_base}/config/catalog-be/configuration.yaml"
- source "BE-configuration.yaml.erb"
- owner "jetty"
- group "jetty"
- mode "0755"
- variables({
- :catalog_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 => "/var/lib/jetty/config/catalog-be/",
- :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 "distribution-engine-configuration" do
- path "/#{jetty_base}/config/catalog-be/distribution-engine-configuration.yaml"
- source "BE-distribution-engine-configuration.yaml.erb"
- owner "jetty"
- group "jetty"
- mode "0755"
-end
-
-
-cookbook_file "ArtifactGenerator" do
- path "/#{jetty_base}/config/catalog-be/Artifact-Generator.properties"
- source "Artifact-Generator.properties"
- owner "jetty"
- group "jetty"
- mode "0755"
-end
diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_3_locate_keystore.rb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_3_locate_keystore.rb
deleted file mode 100644
index 148eaaf4d3..0000000000
--- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_3_locate_keystore.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-jetty_base="/var/lib/jetty"
-
-directory "Jetty_etcdir_creation" do
- path "/#{jetty_base}/etc"
- owner 'jetty'
- group 'jetty'
- mode '0755'
- action :create
-end
-
-cookbook_file "/#{jetty_base}/etc/keystore" do
- source "keystore"
- owner "jetty"
- group "jetty"
- mode 0755
-end
diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_4_jetty_Modules.rb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_4_jetty_Modules.rb
deleted file mode 100644
index 45055f95b8..0000000000
--- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_4_jetty_Modules.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-jetty_base="/var/lib/jetty"
-jetty_home="/usr/local/jetty"
-
-###### create Jetty modules
-bash "create-jetty-modules" do
-cwd "#{jetty_base}"
-code <<-EOH
- cd "#{jetty_base}"
- java -jar "/#{jetty_home}"/start.jar --add-to-start=deploy
- java -jar "/#{jetty_home}"/start.jar --add-to-startd=http,https,logging,setuid
-EOH
-not_if "ls /#{jetty_base}/start.d/https.ini"
-end
-
-template "ssl-ini" do
- path "/#{jetty_base}/start.d/ssl.ini"
- source "ssl-ini.erb"
- owner "jetty"
- group "jetty"
- mode "0755"
- variables :BE_https_port => "#{node['BE'][:https_port]}"
-end
diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_5_setup_elasticsearch.rb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_5_setup_elasticsearch.rb
deleted file mode 100644
index 39fc5af883..0000000000
--- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_5_setup_elasticsearch.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-clusterName = node['elasticsearch'][:cluster_name]+node.chef_environment
-node_name = node[:hostname]
-
-template "elasticsearch.yml-config" do
- path "/var/lib/jetty/config/elasticsearch.yml"
- source "BE-elasticsearch.yml.erb"
- owner "jetty"
- group "jetty"
- mode "0755"
- variables({
- :cluster_name => "#{clusterName}",
- :es_host_ip => node['Nodes']['ES']
- })
-end
-
diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_6_setup_portal_properties.rb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_6_setup_portal_properties.rb
deleted file mode 100644
index 8c57de6caf..0000000000
--- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_6_setup_portal_properties.rb
+++ /dev/null
@@ -1,17 +0,0 @@
-template "template portal.properties" do
- path "/var/lib/jetty/resources/portal.properties"
- source "BE-portal.properties.erb"
- owner "jetty"
- group "jetty"
- mode "0755"
- variables ({
- :ecomp_rest_url => node['ECompP']['ecomp_rest_url'],
- :ecomp_redirect_url => node['ECompP']['ecomp_redirect_url'],
- :ueb_url_list => node['ECompP']['ueb_url_list'],
- :inbox_name => node['ECompP']['inbox_name'],
- :app_key => node['ECompP']['app_key'],
- :app_secret => node['ECompP']['app_secret'],
- :app_topic_name => node['ECompP']['app_topic_name'],
- :decrypt_key => node['ECompP']['decryption_key']
- })
-end
diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_7_logback.rb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_7_logback.rb
deleted file mode 100644
index 2dfc4f1089..0000000000
--- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_7_logback.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-cookbook_file "/var/lib/jetty/config/catalog-be/logback.xml" do
- source "logback.xml"
- mode 0755
- owner "jetty"
- group "jetty"
-end
-
diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_8_errors_config.rb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_8_errors_config.rb
deleted file mode 100644
index 684d730709..0000000000
--- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_8_errors_config.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-cookbook_file "/var/lib/jetty/config/catalog-be/ecomp-error-configuration.yaml" do
- source "ecomp-error-configuration.yaml"
- mode 0755
- owner "jetty"
- group "jetty"
-end
-
-cookbook_file "/var/lib/jetty/config/catalog-be/error-configuration.yaml" do
- source "error-configuration.yaml"
- mode 0755
- owner "jetty"
- group "jetty"
-end
-
diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_Number_create_DMaaP_keys.rb-NotUsed b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_Number_create_DMaaP_keys.rb-NotUsed
deleted file mode 100644
index 583dfff7b2..0000000000
--- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_Number_create_DMaaP_keys.rb-NotUsed
+++ /dev/null
@@ -1,34 +0,0 @@
-http_request 'create-DMaaP-apiKeys' do
- action :post
- url 'http://23.253.97.75:3904/apiKeys/create'
- message ({:some => 'data'}.to_json)
- headers({
- 'Content-Type' => 'application/json'
- })
-end
-
-
-selfEnviroment = node.chef_environment
-
-ruby_block "create-DMaaP-apiKeys" do
- block do
- sleep(15)
- #tricky way to load this Chef::Mixin::ShellOut utilities
- Chef::Resource::RubyBlock.send(:include, Chef::Mixin::ShellOut)
- curl_command = "https://es_admin:Aa123456@#{application_host}:9200/_cluster/health?pretty=true --insecure"
- resp = Net::HTTP.get_response URI.parse(curl_command)
- stat = JSON.parse(resp.read_body)['status']
-
- case stat
- when "green"
- printf("\033[32m%s\n\033[0m", " ElasticSearch tests completed successfully.")
- when "yellow"
- printf("\033[33m%s\n\033[0m", " ElasticSearch tests completed successfully, with warnings")
- when "red"
- printf("\033[31m%s\n\033[0m", " ElasticSearch tests failed!!!")
- end
- end
-end
-
-curl POST -d '{"email":"Grinberg.Moti","description":"New Api Key for ASDC OS"}' http://23.253.97.75:3904/apiKeys/create
-
diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_Number_import_Normatives.rb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_Number_import_Normatives.rb
deleted file mode 100644
index 6e9b24133d..0000000000
--- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_Number_import_Normatives.rb
+++ /dev/null
@@ -1,16 +0,0 @@
-cookbook_file "/tmp/normatives.tar.gz" do
- source "normatives.tar.gz"
-end
-
-working_directory = "/tmp"
-
-bash "import-normatives" do
- cwd "#{working_directory}"
- code <<-EOH
- tar xvfz /tmp/normatives.tar.gz
- cd scripts/import/tosca/
- /bin/chmod +x importNormativeAll.py
- python importNormativeAll.py
- EOH
-end
-