diff options
author | Yuli Shlosberg <ys9693@att.com> | 2018-02-15 12:04:46 +0200 |
---|---|---|
committer | Yuli Shlosberg <ys9693@att.com> | 2018-02-21 17:28:40 +0200 |
commit | 958c32d2d7a3e5cbd9bc672645cdeb95a49b719a (patch) | |
tree | 1ba5b0d1dbece6daa5618a005d6281bbd5c7c1dc /sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_Number_create_DMaaP_keys.rb-NotUsed | |
parent | 4cc47ac3abe00eda7c04b9955e56dafc819e2657 (diff) |
OOM Alignment BE,FE,KBN
Change-Id: I8ff609a6be919d5709ce95af5a6a903aeb7afc43
Issue-ID: SDC-918
Signed-off-by: Yuli Shlosberg <ys9693@att.com>
Diffstat (limited to 'sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_Number_create_DMaaP_keys.rb-NotUsed')
-rw-r--r-- | sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_Number_create_DMaaP_keys.rb-NotUsed | 34 |
1 files changed, 0 insertions, 34 deletions
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 - |