From 417b3b46c64f965bed72793b3572ee89b73b22e6 Mon Sep 17 00:00:00 2001 From: Geora Barsky Date: Fri, 17 Aug 2018 13:31:36 -0400 Subject: Add Search Data Service to POMBA OOM Issue-ID: LOG-612 Change-Id: I3ef3707e332c44d3dbaee5a9601607063b99c3ea Signed-off-by: Geora Barsky --- .../resources/config/analysis-config.json | 32 ++++ .../resources/config/auth/search_policy.json | 31 ++++ .../resources/config/auth/tomcat_keystore | Bin 0 -> 2214 bytes .../resources/config/dynamic-custom-template.json | 12 ++ .../resources/config/elastic-search.properties | 5 + .../resources/config/es-payload-translation.json | 20 +++ .../resources/config/filter-config.json | 7 + .../resources/config/log/logback.xml | 177 +++++++++++++++++++++ 8 files changed, 284 insertions(+) create mode 100644 kubernetes/pomba/charts/pomba-search-data/resources/config/analysis-config.json create mode 100644 kubernetes/pomba/charts/pomba-search-data/resources/config/auth/search_policy.json create mode 100644 kubernetes/pomba/charts/pomba-search-data/resources/config/auth/tomcat_keystore create mode 100644 kubernetes/pomba/charts/pomba-search-data/resources/config/dynamic-custom-template.json create mode 100644 kubernetes/pomba/charts/pomba-search-data/resources/config/elastic-search.properties create mode 100644 kubernetes/pomba/charts/pomba-search-data/resources/config/es-payload-translation.json create mode 100644 kubernetes/pomba/charts/pomba-search-data/resources/config/filter-config.json create mode 100644 kubernetes/pomba/charts/pomba-search-data/resources/config/log/logback.xml (limited to 'kubernetes/pomba/charts/pomba-search-data/resources/config') diff --git a/kubernetes/pomba/charts/pomba-search-data/resources/config/analysis-config.json b/kubernetes/pomba/charts/pomba-search-data/resources/config/analysis-config.json new file mode 100644 index 0000000000..dce0e40b98 --- /dev/null +++ b/kubernetes/pomba/charts/pomba-search-data/resources/config/analysis-config.json @@ -0,0 +1,32 @@ +[ + { + "name": "whitespace_analyzer", + "description": "A standard whitespace analyzer.", + "behaviours": [ + "Tokenize the text using white space characters as delimeters.", + "Convert all characters to lower case.", + "Convert all alphanumeric and symbolic Unicode characters above the first 127 ASCII characters into their ASCII equivalents." + ], + "tokenizer": "whitespace", + "filters": [ + "lowercase", + "asciifolding" + ] + }, + { + "name": "ngram_analyzer", + "description": "An analyzer which performs ngram filtering on the data stream.", + "behaviours": [ + "Tokenize the text using white space characters as delimeters.", + "Convert all characters to lower case.", + "Convert all alphanumeric and symbolic Unicode characters above the first 127 ASCII characters into their ASCII equivalents.", + "Apply ngram filtering using the following values for minimum and maximum size in codepoints of a single n-gram: minimum = 1, maximum = 2." + ], + "tokenizer": "whitespace", + "filters": [ + "lowercase", + "asciifolding", + "ngram_filter" + ] + } +] \ No newline at end of file diff --git a/kubernetes/pomba/charts/pomba-search-data/resources/config/auth/search_policy.json b/kubernetes/pomba/charts/pomba-search-data/resources/config/auth/search_policy.json new file mode 100644 index 0000000000..a83422753d --- /dev/null +++ b/kubernetes/pomba/charts/pomba-search-data/resources/config/auth/search_policy.json @@ -0,0 +1,31 @@ +{ + "roles": [ + { + "name": "admin", + "functions": [ + { + "name": "search", + "methods": [ + { + "name": "GET" + }, + { + "name": "DELETE" + }, + { + "name": "PUT" + }, + { + "name": "POST" + } + ] + } + ], + "users": [ + { + "username": "CN=ONAP, OU=ONAP, O=ONAP, L=Ottawa, ST=Ontario, C=CA" + } + ] + } + ] +} \ No newline at end of file diff --git a/kubernetes/pomba/charts/pomba-search-data/resources/config/auth/tomcat_keystore b/kubernetes/pomba/charts/pomba-search-data/resources/config/auth/tomcat_keystore new file mode 100644 index 0000000000..9eec841aa2 Binary files /dev/null and b/kubernetes/pomba/charts/pomba-search-data/resources/config/auth/tomcat_keystore differ diff --git a/kubernetes/pomba/charts/pomba-search-data/resources/config/dynamic-custom-template.json b/kubernetes/pomba/charts/pomba-search-data/resources/config/dynamic-custom-template.json new file mode 100644 index 0000000000..b0eb539443 --- /dev/null +++ b/kubernetes/pomba/charts/pomba-search-data/resources/config/dynamic-custom-template.json @@ -0,0 +1,12 @@ +"dynamic_templates":[ + { + "strings":{ + "match_mapping_type":"string", + "match": "*", + "mapping":{ + "type":"text", + "fielddata":true + } + } + } +], diff --git a/kubernetes/pomba/charts/pomba-search-data/resources/config/elastic-search.properties b/kubernetes/pomba/charts/pomba-search-data/resources/config/elastic-search.properties new file mode 100644 index 0000000000..b5c7feed94 --- /dev/null +++ b/kubernetes/pomba/charts/pomba-search-data/resources/config/elastic-search.properties @@ -0,0 +1,5 @@ +# ElasticSearch Configuration + +es.cluster-name=POMBA_ES +es.ip-address=pomba-es.{{.Release.Namespace}} +es.http-port={{ .Values.config.elasticsearchHttpPort }} diff --git a/kubernetes/pomba/charts/pomba-search-data/resources/config/es-payload-translation.json b/kubernetes/pomba/charts/pomba-search-data/resources/config/es-payload-translation.json new file mode 100644 index 0000000000..93888befbc --- /dev/null +++ b/kubernetes/pomba/charts/pomba-search-data/resources/config/es-payload-translation.json @@ -0,0 +1,20 @@ +{ + "attr-translations": [ + { + "from": "\"type\":\"string\",\"index\":\"analyzed\"", + "to": "\"type\":\"text\",\"index\":\"true\"" + }, + { + "from": "\"type\":\"string\",\"index\":\"not_analyzed\"", + "to": "\"type\":\"keyword\",\"index\":\"true\"" + }, + { + "from": "\"type\":\"string\"", + "to": "\"type\":\"text\"" + }, + { + "from": "searchable", + "to": "index" + } + ] +} \ No newline at end of file diff --git a/kubernetes/pomba/charts/pomba-search-data/resources/config/filter-config.json b/kubernetes/pomba/charts/pomba-search-data/resources/config/filter-config.json new file mode 100644 index 0000000000..e2d5285824 --- /dev/null +++ b/kubernetes/pomba/charts/pomba-search-data/resources/config/filter-config.json @@ -0,0 +1,7 @@ +[ + { + "name": "ngram_filter", + "description": "Custom NGram Filter.", + "configuration": " \"type\": \"nGram\", \"min_gram\": 1, \"max_gram\": 50, \"token_chars\": [ \"letter\", \"digit\", \"punctuation\", \"symbol\" ]" + } +] \ No newline at end of file diff --git a/kubernetes/pomba/charts/pomba-search-data/resources/config/log/logback.xml b/kubernetes/pomba/charts/pomba-search-data/resources/config/log/logback.xml new file mode 100644 index 0000000000..3fbbbab864 --- /dev/null +++ b/kubernetes/pomba/charts/pomba-search-data/resources/config/log/logback.xml @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + ${errorLogPattern} + + + + + + + + + + + ${logDirectory}/${generalLogName}.log + + ${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${errorLogPattern} + + + + + + INFO + + 256 + + + + + + + + ${logDirectory}/${auditLogName}.log + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${auditMetricPattern} + + + + 256 + + + + + ${logDirectory}/${metricsLogName}.log + + ${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + + ${auditMetricPattern} + + + + + + 256 + + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${errorLogPattern} + + + + + 256 + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit 1.2.3-korg