From 6a8ce801a6afe0a26694b02532773b1938e2dd70 Mon Sep 17 00:00:00 2001 From: kj Date: Mon, 19 Mar 2018 15:07:44 +0200 Subject: Add standardized helm chart for aai Issue-ID: OOM-734 Change-Id: I6b1a85017d79b92afcae44cf823ab000a10ce4be Signed-off-by: kj --- charts/aai-sparky-be/.helmignore | 21 + charts/aai-sparky-be/Chart.yaml | 4 + .../aai-sparky-be/resources/config/aai.properties | 87 + .../resources/config/auth/aai-os-cert.p12 | Bin 0 -> 4357 bytes .../resources/config/auth/client-cert-onap.p12 | Bin 0 -> 2556 bytes .../resources/config/auth/inventory-ui-keystore | Bin 0 -> 7201 bytes .../resources/config/elasticsearch.properties | 72 + .../aai-sparky-be/resources/config/log/logback.xml | 200 + .../resources/config/model/aai_oxm_v9.xml | 4775 ++++++++++++++++++++ .../config/portal/portal-authentication.properties | 14 + .../resources/config/portal/portal.properties | 23 + charts/aai-sparky-be/resources/config/roles.config | 6 + .../resources/config/search-service.properties | 32 + .../resources/config/suggestive-search.properties | 27 + .../resources/config/synchronizer.properties | 33 + charts/aai-sparky-be/templates/configmap.yaml | 31 + charts/aai-sparky-be/templates/deployment.yaml | 149 + charts/aai-sparky-be/templates/secret.yaml | 8 + charts/aai-sparky-be/templates/service.yaml | 25 + charts/aai-sparky-be/values.yaml | 70 + 20 files changed, 5577 insertions(+) create mode 100644 charts/aai-sparky-be/.helmignore create mode 100644 charts/aai-sparky-be/Chart.yaml create mode 100644 charts/aai-sparky-be/resources/config/aai.properties create mode 100644 charts/aai-sparky-be/resources/config/auth/aai-os-cert.p12 create mode 100644 charts/aai-sparky-be/resources/config/auth/client-cert-onap.p12 create mode 100644 charts/aai-sparky-be/resources/config/auth/inventory-ui-keystore create mode 100644 charts/aai-sparky-be/resources/config/elasticsearch.properties create mode 100644 charts/aai-sparky-be/resources/config/log/logback.xml create mode 100644 charts/aai-sparky-be/resources/config/model/aai_oxm_v9.xml create mode 100644 charts/aai-sparky-be/resources/config/portal/portal-authentication.properties create mode 100644 charts/aai-sparky-be/resources/config/portal/portal.properties create mode 100644 charts/aai-sparky-be/resources/config/roles.config create mode 100644 charts/aai-sparky-be/resources/config/search-service.properties create mode 100644 charts/aai-sparky-be/resources/config/suggestive-search.properties create mode 100644 charts/aai-sparky-be/resources/config/synchronizer.properties create mode 100644 charts/aai-sparky-be/templates/configmap.yaml create mode 100644 charts/aai-sparky-be/templates/deployment.yaml create mode 100644 charts/aai-sparky-be/templates/secret.yaml create mode 100644 charts/aai-sparky-be/templates/service.yaml create mode 100644 charts/aai-sparky-be/values.yaml (limited to 'charts/aai-sparky-be') diff --git a/charts/aai-sparky-be/.helmignore b/charts/aai-sparky-be/.helmignore new file mode 100644 index 0000000..f0c1319 --- /dev/null +++ b/charts/aai-sparky-be/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/charts/aai-sparky-be/Chart.yaml b/charts/aai-sparky-be/Chart.yaml new file mode 100644 index 0000000..4d8a3a4 --- /dev/null +++ b/charts/aai-sparky-be/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: ONAP AAI sparky-be +name: aai-sparky-be +version: 2.0.0 diff --git a/charts/aai-sparky-be/resources/config/aai.properties b/charts/aai-sparky-be/resources/config/aai.properties new file mode 100644 index 0000000..813a263 --- /dev/null +++ b/charts/aai-sparky-be/resources/config/aai.properties @@ -0,0 +1,87 @@ +################################################################################################################ +############################## ActiveInventoryDataCollector TLS/SSL configuration ############################## +################################################################################################################ + +############################## Networking ############################## +# +# The ip address/hostname and port to the desired AAI instance +# +aai.rest.host=aai.{{.Release.Namespace}} +aai.rest.port=8443 + +############################## REST ############################## +# OXM version +aai.rest.resourceBasePath=/aai/v9 +aai.rest.connectTimeoutInMs=30000 +aai.rest.readTimeoutInMs=60000 +aai.rest.numRequestRetries=5 +# HTTP_NOAUTH - straight HTTP no user/pass +# SSL_BASIC - HTTP/S with user/pass +# SSL_CERT - HTTP/S with client cert +aai.rest.authenticationMode=SSL_BASIC + +############################## Cache ############################## +# Experimental caching feature that is NOT production ready. +# Enable at your own risk... it might not work. +aai.rest.cache.enabled=false +aai.rest.cache.numWorkers=10 +aai.rest.cache.cacheFailures=false +aai.rest.cache.useCacheOnly=false +aai.rest.cache.storageFolderOverride= +aai.rest.cache.maxTimeToLiveInMs=-1 + +# The shallowEntity filter will display the entity in a visualization +# but will not collect it's relationships or complex attributes. +aai.rest.shallowEntities=cloud-region,complex,vnf-image,att-aic,image + +############################## Certs, Auth, and SSL Settings ############################## +aai.ssl.keystore.filename=aai-os-cert.p12 +aai.ssl.keystore.pass=OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o +aai.ssl.keystore.type=pkcs12 +# Enable debug on the SSL connections +aai.ssl.enableDebug=false +# Degree of strictness to SSL connection standards +aai.ssl.validateServerHostName=false; +aai.ssl.validateServerCertificateChain=false; +# If basic auth is implemented, username and password as required +aai.ssl.basicAuth.username=AaiUI +aai.ssl.basicAuth.password=OBF:1gfr1p571unz1p4j1gg7 + +############################## Statistics Report Formatting ############################## +# +# During synchronization, a formatted statisitics log is generated +# +# Response size in bytes histogram +aai.taskProcessor.bytesHistogramLabel="[Response Size In Bytes]" +aai.taskProcessor.bytesHistogramMaxYAxis=1000000 +aai.taskProcessor.bytesHistogramNumBins=20 +aai.taskProcessor.bytesHistogramNumDecimalPoints=2 +# "Work on Hand" statisitcs for external resource requests +aai.taskProcessor.queueLengthHistogramLabel="[Queue Item Length]" +aai.taskProcessor.queueLengthHistogramMaxYAxis=20000 +aai.taskProcessor.queueLengthHistogramNumBins=20 +aai.taskProcessor.queueLengthHistogramNumDecimalPoints=2 +# Time on queue (how long does a task stay on the work queue) +aai.taskProcessor.taskAgeHistogramLabel="[Task Age In Ms]" +aai.taskProcessor.taskAgeHistogramMaxYAxis=600000 +aai.taskProcessor.taskAgeHistogramNumBins=20 +aai.taskProcessor.taskAgeHistogramNumDecimalPoints=2 +# Per transaction response time for external resource requests +aai.taskProcessor.responseTimeHistogramLabel="[Response Time In Ms]" +aai.taskProcessor.responseTimeHistogramMaxYAxis=10000 +aai.taskProcessor.responseTimeHistogramNumBins=20 +aai.taskProcessor.responseTimeHistogramNumDecimalPoints=2 +# Transaction throughput velocity +aai.taskProcessor.tpsHistogramLabel="[Transactions Per Second]" +aai.taskProcessor.tpsHistogramMaxYAxis=100 +aai.taskProcessor.tpsHistogramNumBins=20 +aai.taskProcessor.tpsHistogramNumDecimalPoints=2 + +############################## Deprecated, to be removed or updated ############################## +aai.rest.numResolverWorkers=15 +aai.ssl.truststore.filename=asdc-client.jks +aai.ssl.truststore.type=jks +aai.taskProcessor.maxConcurrentWorkers=5 +aai.taskProcessor.transactionRateControllerEnabled=false +aai.taskProcessor.numSamplesPerThreadForRunningAverage=100 +aai.taskProcessor.targetTPS=100 diff --git a/charts/aai-sparky-be/resources/config/auth/aai-os-cert.p12 b/charts/aai-sparky-be/resources/config/auth/aai-os-cert.p12 new file mode 100644 index 0000000..ee57120 Binary files /dev/null and b/charts/aai-sparky-be/resources/config/auth/aai-os-cert.p12 differ diff --git a/charts/aai-sparky-be/resources/config/auth/client-cert-onap.p12 b/charts/aai-sparky-be/resources/config/auth/client-cert-onap.p12 new file mode 100644 index 0000000..dbf4fca Binary files /dev/null and b/charts/aai-sparky-be/resources/config/auth/client-cert-onap.p12 differ diff --git a/charts/aai-sparky-be/resources/config/auth/inventory-ui-keystore b/charts/aai-sparky-be/resources/config/auth/inventory-ui-keystore new file mode 100644 index 0000000..efa01f8 Binary files /dev/null and b/charts/aai-sparky-be/resources/config/auth/inventory-ui-keystore differ diff --git a/charts/aai-sparky-be/resources/config/elasticsearch.properties b/charts/aai-sparky-be/resources/config/elasticsearch.properties new file mode 100644 index 0000000..082744b --- /dev/null +++ b/charts/aai-sparky-be/resources/config/elasticsearch.properties @@ -0,0 +1,72 @@ +####################################################################################### +############################## ElasticSearch Config ################################### +####################################################################################### + +############################## Networking ############################## +# +# The ip address/hostname and port to the desired AAI instance +# For development it's recommended to use a local instance of ES +# +elasticsearch.ipAddress=aai-elasticsearch.{{.Release.Namespace}} +elasticsearch.httpPort={{ .Values.config.elasticsearchHttpPort }} +elasticsearch.javaApiPort=8443 + +############################## Indexes ############################## +# +# Index names for various searches. +# +elasticsearch.indexName=entitysearchindex +elasticsearch.topographicalIndexName=topographicalsearchindex +elasticsearch.entityCountHistoryIndexName=entitycounthistoryindex +elasticsearch.autosuggestIndexname=entityautosuggestindex + +# Default document type +elasticsearch.type=default + +############################## Index Mappings and Settings ############################## +# +# JSON files for sparky elasticsearch indexes. +# +elasticsearch.mappingsFileName=/etc/es_mappings.json +elasticsearch.settingsFileName=/etc/es_settings.json +elasticsearch.autosuggestSettingsFileName=/etc/autoSuggestSettings.json +elasticsearch.autosuggestMappingsFileName=/etc/autoSuggestMappings.json +elasticsearch.dynamicMappingsFileName=/etc/dynamicMappings.json +elasticsearch.entityCountHistoryMappingsFileName=/etc/entityCountHistoryMappings.json + +############################## Statistics Report Formatting ############################## +# +# During synchronization, a formatted statisitics log is generated. +# +# Response size in bytes histogram +elasticsearch.taskProcessor.bytesHistogramLabel="[Response Size In Bytes]" +elasticsearch.taskProcessor.bytesHistogramMaxYAxis=1000000 +elasticsearch.taskProcessor.bytesHistogramNumBins=20 +elasticsearch.taskProcessor.bytesHistogramNumDecimalPoints=2 +# "Work on Hand" statisitcs for external resource requests +elasticsearch.taskProcessor.queueLengthHistogramLabel="[Queue Item Length]" +elasticsearch.taskProcessor.queueLengthHistogramMaxYAxis=20000 +elasticsearch.taskProcessor.queueLengthHistogramNumBins=20 +elasticsearch.taskProcessor.queueLengthHistogramNumDecimalPoints=2 +# Time on queue (how long does a task stay on the work queue) +elasticsearch.taskProcessor.taskAgeHistogramLabel="[Task Age In Ms]" +elasticsearch.taskProcessor.taskAgeHistogramMaxYAxis=600000 +elasticsearch.taskProcessor.taskAgeHistogramNumBins=20 +elasticsearch.taskProcessor.taskAgeHistogramNumDecimalPoints=2 +# Per transaction response time for external resource requests +elasticsearch.taskProcessor.responseTimeHistogramLabel="[Response Time In Ms]" +elasticsearch.taskProcessor.responseTimeHistogramMaxYAxis=1000 +elasticsearch.taskProcessor.responseTimeHistogramNumBins=20 +elasticsearch.taskProcessor.responseTimeHistogramNumDecimalPoints=2 +# Transaction throughput velocity +elasticsearch.taskProcessor.tpsHistogramLabel="[Transactions Per Second]" +elasticsearch.taskProcessor.tpsHistogramMaxYAxis=100 +elasticsearch.taskProcessor.tpsHistogramNumBins=20 +elasticsearch.taskProcessor.tpsHistogramNumDecimalPoints=2 + +############################## Deprecated, to be removed or updated ############################## +elasticsearch.taskProcessor.maxConcurrentWorkers=5 +elasticsearch.taskProcessor.transactionRateControllerEnabled=false +elasticsearch.taskProcessor.numSamplesPerThreadForRunningAverage=100 +elasticsearch.taskProcessor.targetTPS=100 +elasticsearch.clusterName=ES_AAI_LOCALHOST diff --git a/charts/aai-sparky-be/resources/config/log/logback.xml b/charts/aai-sparky-be/resources/config/log/logback.xml new file mode 100644 index 0000000..c1b99c1 --- /dev/null +++ b/charts/aai-sparky-be/resources/config/log/logback.xml @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + + + + + + + + + + ${pattern} + + + + + + + + ${logDirectory}/${generalLogName}.log + + ${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + + INFO + + ${queueSize} + + + + + ${logDirectory}/${auditLogName}.log + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + + + ${logDirectory}/${metricsLogName}.log + + ${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + + + + ${logDirectory}/${errorLogName}.log + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + INFO + + + + ${queueSize} + + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + ${queueSize} + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/charts/aai-sparky-be/resources/config/model/aai_oxm_v9.xml b/charts/aai-sparky-be/resources/config/model/aai_oxm_v9.xml new file mode 100644 index 0000000..6337c32 --- /dev/null +++ b/charts/aai-sparky-be/resources/config/model/aai_oxm_v9.xml @@ -0,0 +1,4775 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/charts/aai-sparky-be/resources/config/portal/portal-authentication.properties b/charts/aai-sparky-be/resources/config/portal/portal-authentication.properties new file mode 100644 index 0000000..0873fc1 --- /dev/null +++ b/charts/aai-sparky-be/resources/config/portal/portal-authentication.properties @@ -0,0 +1,14 @@ +########################################################################################## +############################## eCOMP Portal Auth Properties ############################## +########################################################################################## + +############################## Auth ############################## +username=aaiui +password=1t2v1vfv1unz1vgz1t3b + +############################## ############################## +# +# ONAP Cookie Processing - During initial development, this flag, if true, will +# prevent the portal interface's login processing from searching for a user +# specific cookie, and will instead allow passage if a valid session cookie is discovered. +onap_enabled=true \ No newline at end of file diff --git a/charts/aai-sparky-be/resources/config/portal/portal.properties b/charts/aai-sparky-be/resources/config/portal/portal.properties new file mode 100644 index 0000000..04a1955 --- /dev/null +++ b/charts/aai-sparky-be/resources/config/portal/portal.properties @@ -0,0 +1,23 @@ +###################################################################################### +############################## eCOMP Portal properties ############################### +###################################################################################### + +# Java class that implements the ECOMP role and user mgt API +portal.api.impl.class = org.openecomp.sparky.security.portal.PortalRestAPIServiceImpl + +# Instance of ECOMP Portal where the app has been on-boarded +# use insecure http for dev purposes to avoid self-signed certificate +ecomp_rest_url = http://portalapps.{{.Release.Namespace}}:8989/ONAPPORTAL/auxapi + +# Standard global logon page +ecomp_redirect_url = http://portalapps.{{.Release.Namespace}}:8989/ONAPPORTAL/login.htm + +# Name of cookie to extract on login request +csp_cookie_name = EPService +# Alternate values: DEVL, V_DEVL, V_PROD +csp_gate_keeper_prod_key = PROD + +# Toggles use of UEB +ueb_listeners_enable = false +# IDs application withing UEB flow +ueb_app_key = qFKles9N8gDTV0Zc diff --git a/charts/aai-sparky-be/resources/config/roles.config b/charts/aai-sparky-be/resources/config/roles.config new file mode 100644 index 0000000..b8313bd --- /dev/null +++ b/charts/aai-sparky-be/resources/config/roles.config @@ -0,0 +1,6 @@ +[ + { + "id":1, + "name":"View" + } +] \ No newline at end of file diff --git a/charts/aai-sparky-be/resources/config/search-service.properties b/charts/aai-sparky-be/resources/config/search-service.properties new file mode 100644 index 0000000..f280473 --- /dev/null +++ b/charts/aai-sparky-be/resources/config/search-service.properties @@ -0,0 +1,32 @@ +######################################################################################## +############################## Search Data Service Config ############################## +######################################################################################## + +############################## Networking ############################## +# +# The ip address/hostname and port to the desired Search Data Service instance +# +search-service.ipAddress=aai-search-data.{{.Release.Namespace}} +search-service.httpPort=9509 + +############################## Indexes ############################## +# +# Index values that will be associated with searches +# +# Searchable entities +search-service.indexName=entitysearchindex +# Inventory searches +search-service.topographicalIndexName=topographicalsearchindex +search-service.entityCountHistoryIndexName=entitycounthistoryindex + +############################## Version ############################## +# +# Search Data Service version and type (see Search Data Service for more details) +# +search-service.version=v1 +search-service.type=default + +############################## Certs ############################## +search-service.ssl.cert-name=client-cert-onap.p12 +search-service.ssl.keystore-password=OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10 +search-service.ssl.keystore=tomcat_keystore diff --git a/charts/aai-sparky-be/resources/config/suggestive-search.properties b/charts/aai-sparky-be/resources/config/suggestive-search.properties new file mode 100644 index 0000000..b82baff --- /dev/null +++ b/charts/aai-sparky-be/resources/config/suggestive-search.properties @@ -0,0 +1,27 @@ +###################################################################################### +############################## Suggestive Search Config ############################## +###################################################################################### + +# Indexes to be taken into account when generating suggestion entries +suggestion.indexes=elasticsearch.autosuggestIndexname,elasticsearch.indexName +# List of stop words to be used during suggestive search +suggestion.stopwords=a,an,and,are,as,at,be,but,by,called,for,if,in,into,is,it,no,not,of,on,or,such,that,the,their,then,there,these,they,this,to,was,will,with +# Assigns which class, within sparky, will process the searches related to an assosiated index +suggestion.routing=elasticsearch.autosuggestIndexname:SearchServiceWrapper,elasticsearch.indexName:VnfSearchService + +############################## Pairings ############################## +# +# "called" pairings, keys reference types within the OXM, and the value +# is the suggestion term used for matches with any of the "called" keys. +# e.g. "x called vserver-id" (but actual value of vserver-id) +suggestion.pairing.called.key=volume-group-id,volume-group-name,physical-location-id,data-center-code,complex-name,tenant-id,tenant-name,vserver-id,vserver-name,vserver-name2,hostname,pserver-name2,pserver-id,global-customer-id,subscriber-name,service-instance-id,service-instance-name,link-name,vpn-id,vpn-name,vpe-id,vnf-id,vnf-name,vnf-name2,vnfc-name,network-id,network-name,network-policy-id,vf-module-id,vf-module-name,vnf-id2,pnf-name,circuit-id +suggestion.pairing.called.value=called +# +# Exact same explanation as the "called" pairings above. +# e.g. "x at ipv4-oam-address" +suggestion.pairing.at.key=street1,street2,postal-code,ipv4-oam-address,network-policy-fqdn +suggestion.pairing.at.value=at +# +# Default pairing values for any OXM types that aren't part of the the other +# pairing lists. +suggestion.pairing.default.value=with \ No newline at end of file diff --git a/charts/aai-sparky-be/resources/config/synchronizer.properties b/charts/aai-sparky-be/resources/config/synchronizer.properties new file mode 100644 index 0000000..0b84f06 --- /dev/null +++ b/charts/aai-sparky-be/resources/config/synchronizer.properties @@ -0,0 +1,33 @@ +############################################################################################## +############################## ElasticSearchSynchronizer Config ############################## +############################################################################################## + +# Initial delay on startup before starting synchronization tasks +synchronizer.syncTask.initialDelayInMs=60000 +# The frequency at which the synchronizationtask will be run +synchronizer.syncTask.taskFrequencyInDay=2 + +# Time at which to run synchronization. Format = hh:mm:ss UTC(-/+)hh:mm +synchronizer.syncTask.startTimestamp=05:00:00 UTC+00:00 + +# Generates a count in elasticsearch related to inventory +synchronizer.historicalEntitySummarizerEnabled=true +# Toggles the suggestion synchronizer +synchronizer.autosuggestSynchronizationEnabled=true +# Frequency at which above count is generated +synchronizer.historicalEntitySummarizedFrequencyInMinutes=60 + +# Elasticsearch scroll api context keep alive value +synchronizer.scrollContextTimeToLiveInMinutes=5 +# Elasticsearch scroll api context max items per batch request +synchronizer.numScrollContextItemsToRetrievePerRequest=5000 + + +############################## Deprecated, to be removed or updated ############################## +synchronizer.resolver.progressLogFrequencyInMs=60000 +synchronizer.resolver.queueMonitorFrequencyInMs=1000 +synchronizer.resolver.displayVerboseQueueManagerStats=false +synchronizer.indexIntegrityValidator.enabled=false +synchronizer.indexIntegrityValidatorFrequencyInMs=3600000 +synchronizer.suppressResourceNotFoundErrors=true +synchronizer.applyNodesOnlyModifier=false \ No newline at end of file diff --git a/charts/aai-sparky-be/templates/configmap.yaml b/charts/aai-sparky-be/templates/configmap.yaml new file mode 100644 index 0000000..68fa1e4 --- /dev/null +++ b/charts/aai-sparky-be/templates/configmap.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-model + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/model/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-portal + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/portal/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-log + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/log/logback.xml").AsConfig . | indent 2 }} diff --git a/charts/aai-sparky-be/templates/deployment.yaml b/charts/aai-sparky-be/templates/deployment.yaml new file mode 100644 index 0000000..278a327 --- /dev/null +++ b/charts/aai-sparky-be/templates/deployment.yaml @@ -0,0 +1,149 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ include "common.name" . }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + name: {{ include "common.name" . }} + spec: + containers: + - name: {{ include "common.name" . }} + image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + env: + - name: CONFIG_HOME + value: /opt/app/sparky/config/ + - name: KEY_MANAGER_PASSWORD + value: {{ .Values.config.keyManagerPassword }} + - name: KEY_STORE_PASSWORD + value: {{ .Values.config.keyStorePassword }} + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /opt/app/sparky/config/auth/ + name: {{ include "common.fullname" . }}-auth-config + - mountPath: /opt/app/sparky/config/synchronizer.properties + subPath: synchronizer.properties + name: {{ include "common.fullname" . }}-config + - mountPath: /opt/app/sparky/config/suggestive-search.properties + subPath: suggestive-search.properties + name: {{ include "common.fullname" . }}-config + - mountPath: /opt/app/sparky/config/search-service.properties + subPath: search-service.properties + name: {{ include "common.fullname" . }}-config + - mountPath: /opt/app/sparky/config/roles.config + subPath: roles.config + name: {{ include "common.fullname" . }}-config + - mountPath: /opt/app/sparky/config/elasticsearch.properties + subPath: elasticsearch.properties + name: {{ include "common.fullname" . }}-config + - mountPath: /opt/app/sparky/config/aai.properties + subPath: aai.properties + name: {{ include "common.fullname" . }}-config + - mountPath: /opt/app/sparky/config/model/ + name: {{ include "common.fullname" . }}-model-config + - mountPath: /opt/app/sparky/config/portal/ + name: {{ include "common.fullname" . }}-portal-config + - mountPath: /var/log/onap + name: {{ include "common.fullname" . }}-logs + - mountPath: /opt/app/sparky/bundleconfig/etc/logback.xml + name: {{ include "common.fullname" . }}-log-conf + subPath: logback.xml + ports: + - containerPort: {{ .Values.service.internalPort }} + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end -}} + readinessProbe: + tcpSocket: + port: {{ .Values.service.internalPort }} + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + periodSeconds: {{ .Values.readiness.periodSeconds }} + resources: +{{ toYaml .Values.resources | indent 10 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + {{- end }} + + # side car containers + - name: filebeat-onap + image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + volumeMounts: + - mountPath: /usr/share/filebeat/filebeat.yml + subPath: filebeat.yml + name: filebeat-conf + - mountPath: /var/log/onap + name: {{ include "common.fullname" . }}-logs + - mountPath: /usr/share/filebeat/data + name: aai-sparky-filebeat + + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: {{ include "common.fullname" . }}-config + configMap: + name: {{ include "common.fullname" . }} + - name: {{ include "common.fullname" . }}-model-config + configMap: + name: {{ include "common.fullname" . }}-model + - name: {{ include "common.fullname" . }}-portal-config + configMap: + name: {{ include "common.fullname" . }}-portal + - name: {{ include "common.fullname" . }}-auth-config + secret: + secretName: {{ include "common.fullname" . }} + - name: filebeat-conf + configMap: + name: aai-filebeat + - name: {{ include "common.fullname" . }}-logs + emptyDir: {} + - name: aai-sparky-filebeat + emptyDir: {} + - name: {{ include "common.fullname" . }}-log-conf + configMap: + name: {{ include "common.fullname" . }}-log + restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }} + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/charts/aai-sparky-be/templates/secret.yaml b/charts/aai-sparky-be/templates/secret.yaml new file mode 100644 index 0000000..69bd3f8 --- /dev/null +++ b/charts/aai-sparky-be/templates/secret.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "common.fullname" . }} + namespace: {{ include "common.namespace" . }} +type: Opaque +data: +{{ tpl (.Files.Glob "resources/config/auth/*").AsSecrets . | indent 2 }} diff --git a/charts/aai-sparky-be/templates/service.yaml b/charts/aai-sparky-be/templates/service.yaml new file mode 100644 index 0000000..41bc163 --- /dev/null +++ b/charts/aai-sparky-be/templates/service.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.name" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + {{if eq .Values.service.type "NodePort" -}} + - port: {{ .Values.service.internalPort }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }} + name: {{ .Values.service.name }} + {{- else -}} + - port: {{ .Values.service.internalPort }} + name: {{ .Values.service.name }} + {{- end}} + selector: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + clusterIP: None diff --git a/charts/aai-sparky-be/values.yaml b/charts/aai-sparky-be/values.yaml new file mode 100644 index 0000000..34be1be --- /dev/null +++ b/charts/aai-sparky-be/values.yaml @@ -0,0 +1,70 @@ +# Default values for sparky-be. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +global: # global defaults + nodePortPrefix: 302 + repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== + + +# application image +repository: nexus3.onap.org:10001 +image: onap/sparky-be:v1.1.0 +pullPolicy: Always +restartPolicy: Always + +# application configuration +config: + elasticsearchHttpPort: 9200 + keyStorePassword: OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o + keyManagerPassword: OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o + +# override chart name (sparky-be) to share a common namespace +# suffix with parent chart (aai) +nsSuffix: aai + + +# default number of instances +replicaCount: 1 + +nodeSelector: {} + +affinity: {} + +# probe configuration parameters +liveness: + initialDelaySeconds: 10 + periodSeconds: 10 + # necessary to disable liveness probe when setting breakpoints + # in debugger so K8s doesn't restart unresponsive container + enabled: true + +readiness: + initialDelaySeconds: 10 + periodSeconds: 10 + +service: + type: ClusterIP + name: aai-sparky-be + internalPort: 9517 + +ingress: + enabled: false + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # + # Example: + # Configure resource requests and limits + # ref: http://kubernetes.io/docs/user-guide/compute-resources/ + # Minimum memory for development is 2 CPU cores and 4GB memory + # Minimum memory for production is 4 CPU cores and 8GB memory +#resources: +# limits: +# cpu: 2 +# memory: 4Gi +# requests: +# cpu: 2 +# memory: 4Gi -- cgit 1.2.3-korg