diff options
author | k.kedron <k.kedron@partner.samsung.com> | 2019-09-05 17:50:23 +0200 |
---|---|---|
committer | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2019-09-06 09:11:47 +0000 |
commit | 176a760ebe4293c19eeb96cf88269215fce870a9 (patch) | |
tree | c559a1f2bafbf6147612b88a46a0299a579af57f /docker/docker_tools/chef-repo | |
parent | 64636c2148414c1fa5da4b46a69570cdab003837 (diff) |
Fully HTTPS support in the dcaedt-tools
Fully HTTPS support:
-Updated the onap/base_sdc-jetty docker image version
-Updated the chef script to properly used of the new docker image
-Updated jvm configuration to support call to
the SDC components using HTTPS.
-Added buildRestClient method to create the DcaeRestClient
supporting the SSL connection
-Checkstyle in the recipes adn tools.Main method
-Update the docker_run.sh:
- Change JAVA_OPTIONS
-Update docker_run script
-Add proper dependency in the pom (waiting for solving the SDC-2554 bug)
Issue-ID: SDC-2552
Signed-off-by: Krystian Kedron <k.kedron@partner.samsung.com>
Change-Id: Ie8dd1f54619f1101c13de13ae3cbb296bba57210
Diffstat (limited to 'docker/docker_tools/chef-repo')
6 files changed, 331 insertions, 0 deletions
diff --git a/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/README.md b/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/README.md new file mode 100644 index 0000000..27aba53 --- /dev/null +++ b/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/README.md @@ -0,0 +1,4 @@ +# Deploy-DCAE + +TODO: Enter the cookbook description here. + diff --git a/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/attributes/default.rb b/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/attributes/default.rb new file mode 100644 index 0000000..250947e --- /dev/null +++ b/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/attributes/default.rb @@ -0,0 +1,4 @@ +default['DCAE']['BE'][:http_port] = 8082 +default['DCAE']['BE'][:https_port] = 8444 + +default['disableHttp'] = true diff --git a/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/files/default/config.json b/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/files/default/config.json new file mode 100644 index 0000000..202ee54 --- /dev/null +++ b/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/files/default/config.json @@ -0,0 +1,250 @@ + +{ + "templateInfo": [{ + "name": "Syslog Collector", + "flowType": "Syslog Collector", + "description": "Syslog Collector", + "category": "Template", + "subCategory":"Base Monitoring Template", + "updateIfExist": "false", + "composition": [{ + "type": "SyslogCollector", + "alias": "" + }] + },{ + "name": "Syslog MSEA", + "flowType": "Syslog MSEA", + "description": "Syslog MSEA", + "category": "Template", + "subCategory":"Base Monitoring Template", + "updateIfExist": "false", + "composition": [{ + "type": "Map", + "alias": "" + }, { + "type": "Supplement", + "alias": "" + }, { + "type": "Enrich", + "alias": "" + }, { + "type": "Alert", + "alias": "" + }], + "relations": [{ + "fromComponent": "Supplement", + "fromRequirement": "dependency", + "toComponent": "Map", + "toCapability": "feature" + },{ + "fromComponent": "Enrich", + "fromRequirement": "dependency", + "toComponent": "Supplement", + "toCapability": "feature" + },{ + "fromComponent": "Alert", + "fromRequirement": "dependency", + "toComponent": "Enrich", + "toCapability": "feature" + }] + }, + + { + "name": "Status Poller MSE", + "flowType": "Status Poller MSE", + "description": "Status Poller MSE", + "category": "Template", + "subCategory":"Base Monitoring Template", + "updateIfExist": "false", + "composition": [{ + "type": "Map", + "alias": "" + }, { + "type": "Supplement", + "alias": "" + }, { + "type": "Enrich", + "alias": "" + }], + "relations": [{ + "fromComponent": "Supplement", + "fromRequirement": "dependency", + "toComponent": "Map", + "toCapability": "feature" + },{ + "fromComponent": "Enrich", + "fromRequirement": "dependency", + "toComponent": "Supplement", + "toCapability": "feature" + }] + }, { + "name": "FOI Collector", + "flowType": "FOI Collector", + "description": "FOI Collector", + "category": "Template", + "subCategory":"Base Monitoring Template", + "updateIfExist": "false", + "composition": [{ + "type": "FOICollector", + "alias": "" + }] + + }, { + "name": "SNMP MSE", + "flowType": "SNMP MSE", + "description": "SNMP MSE", + "category": "Template", + "subCategory":"Base Monitoring Template", + "updateIfExist": "false", + "composition": [{ + "type": "Map", + "alias": "" + }, { + "type": "Supplement", + "alias": "" + }, { + "type": "Enrich", + "alias": "" + }], + "relations": [{ + "fromComponent": "Supplement", + "fromRequirement": "dependency", + "toComponent": "Map", + "toCapability": "feature" + },{ + "fromComponent": "Enrich", + "fromRequirement": "dependency", + "toComponent": "Supplement", + "toCapability": "feature" + }] + }, { + "name": "Docker Map", + "flowType": "Docker Map", + "description": "Docker Map", + "category": "Template", + "subCategory":"Base Monitoring Template", + "updateIfExist": "false", + "composition": [{ + "type": "DockerMap", + "alias": "" + }] + }, + { + "name": "SAM Collector", + "flowType": "SAM Collector", + "description": "SAM Collector", + "category": "Template", + "subCategory":"Base Monitoring Template", + "updateIfExist": "false", + "composition": [{ + "type": "SAMCollector1806", + "alias": "" + }] + }, + { + "name": "SNMP PM Poller", + "flowType": "SNMP PM Poller", + "description": "SNMP PM Poller", + "category": "Template", + "subCategory":"Base Monitoring Template", + "updateIfExist": "false", + "composition": [{ + "type": "PM Poller", + "alias": "" + }] + }, + { + "name": "Status Poller Collector", + "flowType": "Status Poller Collector", + "description": "Status Poller Collector", + "category": "Template", + "subCategory": "Base Monitoring Template", + "updateIfExist": "false", + "composition": [ + { + "type": "StatusPoller", + "alias": "" + }] + }, + { + "name": "VES Collector", + "flowType": "VES Collector", + "description": "VES Collector", + "category": "Template", + "subCategory":"Base Monitoring Template", + "updateIfExist": "false", + "composition": [{ + "type": "VES Collector", + "alias": "" + }] + }, + { + "name": "VES Fault SE", + "flowType": "VES Fault SE", + "description": "VES Fault SE", + "category": "Template", + "subCategory":"Base Monitoring Template", + "updateIfExist": "false", + "composition": [{ + "type": "Supplement", + "alias": "" + }, { + "type": "Enrich", + "alias": "" + }], + "relations": [{ + "fromComponent": "Enrich", + "fromRequirement": "dependency", + "toComponent": "Supplement", + "toCapability": "feature" + }] + }, + { + "name": "Docker Supplement", + "flowType": "Docker Supplement", + "description": "Docker Supplement", + "category": "Template", + "subCategory":"Base Monitoring Template", + "updateIfExist": "false", + "composition": [{ + "type": "Docker_Supplement", + "alias": "" + }] + }, + { + "name": "Docker Enrich", + "flowType": "Docker Enrich", + "description": "Docker Enrich", + "category": "Template", + "subCategory":"Base Monitoring Template", + "updateIfExist": "false", + "composition": [{ + "type": "DockerEnrich", + "alias": "" + }] + }, + { + "name": "MIB Poller", + "flowType": "MIB Poller", + "description": "MIB Poller", + "category": "Template", + "subCategory":"Base Monitoring Template", + "updateIfExist": "false", + "composition": [{ + "type": "MIBPoller", + "alias": "" + }] + }, + { + "name": "Discovery Poller", + "flowType": "Discovery Poller", + "description": "Discovery Poller", + "category": "Template", + "subCategory":"Base Monitoring Template", + "updateIfExist": "false", + "composition": [{ + "type": "Discovery", + "alias": "" + }] + }] +}
\ No newline at end of file diff --git a/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/files/default/org.onap.sdc.trust.jks b/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/files/default/org.onap.sdc.trust.jks Binary files differnew file mode 100755 index 0000000..077a7f3 --- /dev/null +++ b/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/files/default/org.onap.sdc.trust.jks diff --git a/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/recipes/dcae_tools_setup.rb b/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/recipes/dcae_tools_setup.rb new file mode 100644 index 0000000..a989201 --- /dev/null +++ b/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/recipes/dcae_tools_setup.rb @@ -0,0 +1,61 @@ +dcae_be_host = node['DCAE_BE_VIP'] + +if node['disableHttp'] + protocol = "https" + dcae_be_port = node['DCAE']['BE'][:https_port] +else + protocol = "http" + dcae_be_port = node['DCAE']['BE'][:http_port] +end + +printf("DEBUG: [%s]:[%s] disableHttp=[%s], protocol=[%s], dcae_be_vip=[%s], dcae_be_port=[%s] !!! \n", cookbook_name, recipe_name, node['disableHttp'], protocol, dcae_be_host ,dcae_be_port ) + +directory "Jetty_etc dir_creation" do + path "#{ENV['JETTY_BASE']}/etc" + owner 'jetty' + group 'jetty' + mode '0755' + action :create +end + + +cookbook_file "#{ENV['JETTY_BASE']}/etc/org.onap.sdc.trust.jks" do + source "org.onap.sdc.trust.jks" + owner "jetty" + group "jetty" + mode 0755 +end + + +directory "#{ENV['JETTY_BASE']}/conf" do + mode '0755' + owner "jetty" + group "jetty" + recursive true + action :create +end + + +template "dcae-tools-config-yaml" do + sensitive true + path "/#{ENV['JETTY_BASE']}/conf/environment.json" + source "environment.json.erb" + mode "0755" + owner "jetty" + group "jetty" + variables({ + :dcae_be_host => dcae_be_host, + :dcae_be_port => dcae_be_port, + :protocol => protocol + }) +end + + +cookbook_file "/#{ENV['JETTY_BASE']}/conf/config.json" do + sensitive true + source "config.json" + owner "jetty" + group "jetty" + mode "0755" + action :create +end diff --git a/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/templates/default/environment.json.erb b/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/templates/default/environment.json.erb new file mode 100644 index 0000000..d30881c --- /dev/null +++ b/docker/docker_tools/chef-repo/cookbooks/Deploy-DCAE/templates/default/environment.json.erb @@ -0,0 +1,12 @@ +{ + "dcaeBeHost": "<%= @protocol %>://<%= @dcae_be_host %>", + "dcaeBePort": "<%= @dcae_be_port %>", + "apiPath": "/dcae", + "credential" :{ + "editor": "", + "username": "jh0003", + "password": "", + "firstName": "", + "lastName": "" + } +}
\ No newline at end of file |