diff options
Diffstat (limited to 'kubernetes')
37 files changed, 1774 insertions, 320 deletions
diff --git a/kubernetes/sdc/components/sdc-be/Chart.yaml b/kubernetes/sdc/components/sdc-be/Chart.yaml index 2bb7f3be8b..5c6c0af0c7 100644 --- a/kubernetes/sdc/components/sdc-be/Chart.yaml +++ b/kubernetes/sdc/components/sdc-be/Chart.yaml @@ -29,4 +29,4 @@ dependencies: repository: '@local' - name: serviceAccount version: ~13.x-0 - repository: '@local' + repository: '@local'
\ No newline at end of file diff --git a/kubernetes/sdc/components/sdc-be/resources/config/catalog-be/configuration.yaml b/kubernetes/sdc/components/sdc-be/resources/config/catalog-be/configuration.yaml index 8103700bd9..7f0a67492b 100644 --- a/kubernetes/sdc/components/sdc-be/resources/config/catalog-be/configuration.yaml +++ b/kubernetes/sdc/components/sdc-be/resources/config/catalog-be/configuration.yaml @@ -29,14 +29,14 @@ released: 2012-11-30 toscaConformanceLevel: 11.0 minToscaConformanceLevel: 3.0 -janusGraphCfgFile: {{ .Values.janusGraphCfgFile }} -janusGraphInMemoryGraph: false -janusGraphLockTimeout: 1800 +janusGraphCfgFile: {{ .Values.janusgraph.cfgFile }} +janusGraphInMemoryGraph: {{ .Values.janusgraph.graph.inMemory }} +janusGraphLockTimeout: {{ .Values.janusgraph.graph.lockTimeout }} #startup: connect to JanusGraph DB when it is down during ASDC--More-- (2% of 27930 bytes) -janusGraphReconnectIntervalInSeconds: 3 +janusGraphReconnectIntervalInSeconds: {{ .Values.janusgraph.reconnectInterval }} # The read timeout towards JanusGraph DB when health check is invoked: -janusGraphHealthCheckReadTimeout: 1 +janusGraphHealthCheckReadTimeout: {{ .Values.janusgraph.healthCheckReadTimeout }} #startup: connect to Elasticsearch when it is down during ASDC--More-- (3% of 27930 bytes) @@ -90,9 +90,9 @@ basicAuth: cassandraConfig: - cassandraHosts: [{{ .Values.cassandra.hostname }}] + cassandraHosts: [{{ .Values.global.sdc_cassandra.serviceName }}.{{ include "common.namespace" . }}.svc.cluster.local] cassandraPort: {{ .Values.cassandra.port }} - localDataCenter: {{ .Values.cassandra.datacenterName }} + localDataCenter: {{ .Values.global.sdc_cassandra.dataCenter }} reconnectTimeout : 30000 socketReadTimeout: {{ .Values.cassandraConfig.socketReadTimeout }} socketConnectTimeout: {{ .Values.cassandraConfig.socketConnectTimeout }} @@ -105,11 +105,11 @@ cassandraConfig: truststorePath: {{ .Values.cassandraConfig.truststorePath }} truststorePassword: {{ .Values.cassandraConfig.truststorePassword }} keySpaces: - - { name: dox, replicationStrategy: NetworkTopologyStrategy, replicationInfo: [{{ if .Values.pairEnvName }}'{{ .Values.cassandra.datacenterName }}','{{ .Values.cassandra.replicationFactor }}','{{ .Values.cassandra.clusterName }}{{ .Values.pairEnvName }}','{{ .Values.cassandra.replicationFactor }}'{{ else }}'{{ .Values.cassandra.datacenterName }}','{{ .Values.cassandra.replicationFactor }}'{{ end }}]} - - { name: sdcaudit, replicationStrategy: NetworkTopologyStrategy, replicationInfo: [{{ if .Values.pairEnvName }}'{{ .Values.cassandra.datacenterName }}','{{ .Values.cassandra.replicationFactor }}','{{ .Values.cassandra.clusterName }}{{ .Values.pairEnvName }}','{{ .Values.cassandra.replicationFactor }}'{{ else }}'{{ .Values.cassandra.datacenterName }}','{{ .Values.cassandra.replicationFactor }}'{{ end }}]} - - { name: sdcartifact, replicationStrategy: NetworkTopologyStrategy, replicationInfo: [{{ if .Values.pairEnvName }}'{{ .Values.cassandra.datacenterName }}','{{ .Values.cassandra.replicationFactor }}','{{ .Values.cassandra.clusterName }}{{ .Values.pairEnvName }}','{{ .Values.cassandra.replicationFactor }}'{{ else }}'{{ .Values.cassandra.datacenterName }}','{{ .Values.cassandra.replicationFactor }}'{{ end }}]} - - { name: sdccomponent, replicationStrategy: NetworkTopologyStrategy, replicationInfo: [{{ if .Values.pairEnvName }}'{{ .Values.cassandra.datacenterName }}','{{ .Values.cassandra.replicationFactor }}','{{ .Values.cassandra.clusterName }}{{ .Values.pairEnvName }}','{{ .Values.cassandra.replicationFactor }}'{{ else }}'{{ .Values.cassandra.datacenterName }}','{{ .Values.cassandra.replicationFactor }}'{{ end }}]} - - { name: sdcrepository, replicationStrategy: NetworkTopologyStrategy, replicationInfo: [{{ if .Values.pairEnvName }}'{{ .Values.cassandra.datacenterName }}','{{ .Values.cassandra.replicationFactor }}','{{ .Values.cassandra.clusterName }}{{ .Values.pairEnvName }}','{{ .Values.cassandra.replicationFactor }}'{{ else }}'{{ .Values.cassandra.datacenterName }}','{{ .Values.cassandra.replicationFactor }}'{{ end }}]} + - { name: dox, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['{{ .Values.global.sdc_cassandra.dataCenter }}','{{ .Values.global.sdc_cassandra.replicaCount }}']} + - { name: sdcaudit, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['{{ .Values.global.sdc_cassandra.dataCenter }}','{{ .Values.global.sdc_cassandra.replicaCount }}']} + - { name: sdcartifact, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['{{ .Values.global.sdc_cassandra.dataCenter }}','{{ .Values.global.sdc_cassandra.replicaCount }}']} + - { name: sdccomponent, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['{{ .Values.global.sdc_cassandra.dataCenter }}','{{ .Values.global.sdc_cassandra.replicaCount }}']} + - { name: sdcrepository, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['{{ .Values.global.sdc_cassandra.dataCenter }}','{{ .Values.global.sdc_cassandra.replicaCount }}']} licenseTypes: - User - Installation diff --git a/kubernetes/sdc/components/sdc-be/resources/config/catalog-be/janusgraph.properties b/kubernetes/sdc/components/sdc-be/resources/config/catalog-be/janusgraph.properties index a08f7bd77a..6e4a43f9aa 100644 --- a/kubernetes/sdc/components/sdc-be/resources/config/catalog-be/janusgraph.properties +++ b/kubernetes/sdc/components/sdc-be/resources/config/catalog-be/janusgraph.properties @@ -1,39 +1,33 @@ -storage.backend=cql -storage.hostname={{ .Values.cassandra.hostname }} +storage.backend={{ .Values.janusgraph.storage.backend }} +storage.hostname={{ .Values.global.sdc_cassandra.serviceName }}.{{ include "common.namespace" . }}.svc.cluster.local storage.port={{ .Values.cassandra.port }} storage.username={{ .Values.cassandra.cassandraUsername }} storage.password={{ .Values.cassandra.cassandraPassword }} -storage.connection-timeout={{ .Values.cassandra.connectionTimeout }} -storage.cql.keyspace=sdctitan - +storage.connection-timeout={{ .Values.janusgraph.storage.connectionTimeout }} +storage.cql.keyspace={{ .Values.janusgraph.keyspace }} storage.cql.ssl.enabled={{ .Values.cassandra.cassandraSslEnabled }} +{{- if .Values.cassandra.cassandraSslEnabled }} storage.cql.ssl.keystore.location={{ .Values.cassandra.keystoreLocation }} storage.cql.ssl.keystore.password={{ .Values.cassandra.keystorePassword }} storage.cql.ssl.truststore.location={{ .Values.cassandra.truststoreLocation }} storage.cql.ssl.truststore.password={{ .Values.cassandra.truststorePassword }} +{{- end }} storage.cql.read-consistency-level={{ .Values.cassandra.readConsistencyLevel }} storage.cql.write-consistency-level={{ .Values.cassandra.writeConsistencyLevel }} storage.cql.replication-strategy-class=NetworkTopologyStrategy +storage.cql.replication-strategy-options={{ .Values.global.sdc_cassandra.dataCenter }},{{ .Values.global.sdc_cassandra.replicaCount }} +storage.cql.local-datacenter={{ .Values.global.sdc_cassandra.dataCenter }} -{{- $replicationStrategyOptions := "" -}} -{{- if .Values.pairEnvName | eq "" }} -{{- $replicationStrategyOptions = printf "%s,%d" .Values.cassandra.datacenterName (int .Values.cassandra.replicationFactor) -}} -{{- else }} -{{- $replicationStrategyOptions = printf "%s,%d,%s%s,%d" .Values.cassandra.datacenterName (int .Values.cassandra.replicationFactor) .Values.cassandra.cluster_name .Values.pairEnvName (int .Values.cassandra.replicationFactor) -}} +cache.db-cache={{ .Values.janusgraph.dbCache.enabled }} +{{- if .Values.janusgraph.dbCache.enabled }} +cache.db-cache-clean-wait={{ .Values.janusgraph.dbCache.cleanWait }} +cache.db-cache-time={{ .Values.janusgraph.dbCache.time }} +cache.db-cache-size={{ .Values.janusgraph.dbCache.size }} {{- end }} -storage.cql.replication-strategy-options={{ $replicationStrategyOptions }} - -storage.cql.local-datacenter={{ .Values.cassandra.datacenterName }} - -cache.db-cache ={{ .Values.cassandra.db_cache }} -cache.db-cache-clean-wait = 20 -cache.db-cache-time = 180000 -cache.db-cache-size = 0.5 - -cache.tx-cache-size = 1000000 +cache.tx-cache-size={{ .Values.janusgraph.txCache.size }} -storage.lock.retries=5 -graph.replace-instance-if-exists=true +storage.lock.retries={{ .Values.janusgraph.storage.lockRetries }} +graph.replace-instance-if-exists={{ .Values.janusgraph.graph.replaceInstance }} diff --git a/kubernetes/sdc/components/sdc-be/resources/config/logging/logback.xml b/kubernetes/sdc/components/sdc-be/resources/config/logging/logback.xml index b6804b379d..1e6146ccca 100644 --- a/kubernetes/sdc/components/sdc-be/resources/config/logging/logback.xml +++ b/kubernetes/sdc/components/sdc-be/resources/config/logging/logback.xml @@ -36,7 +36,6 @@ <logger name="org.janusgraph.graphdb.transaction" level="ERROR" /> <logger name="org.openecomp.sdc.be.components.impl.CassandraHealthCheck" level="WARN" /> - <!-- STDOUT --> <appender class="ch.qos.logback.core.ConsoleAppender" name="STDOUT"> <encoder> @@ -208,16 +207,16 @@ <queueSize>${queueSize}</queueSize> <appender-ref ref="AUDIT_ROLLING"/> </appender> - <root level="INFO"> - <appender-ref ref="ASYNC_ERROR"/> + <root level="{{ .Values.logback.rootLogLevel }}"> + <!--<appender-ref ref="ASYNC_ERROR"/> <appender-ref ref="ASYNC_DEBUG"/> <appender-ref ref="ASYNC_AUDIT"/> - <appender-ref ref="ASYNC_TRANSACTION"/> + <<appender-ref ref="ASYNC_TRANSACTION"/> <if condition='property("enable-all-log").equalsIgnoreCase("true")'> <then> <appender-ref ref="ALL_ROLLING"/> </then> - </if> + </if>--> <appender-ref ref="STDOUT"/> <appender-ref ref="STDERR"/> </root> diff --git a/kubernetes/sdc/components/sdc-be/values.yaml b/kubernetes/sdc/components/sdc-be/values.yaml index c57b252c7c..637ef50e03 100644 --- a/kubernetes/sdc/components/sdc-be/values.yaml +++ b/kubernetes/sdc/components/sdc-be/values.yaml @@ -29,7 +29,8 @@ global: #to match with its own cluster replica replicaCount: 3 clusterName: cassandra - dataCenter: Pod + #datacenter name (use "dc1" in case of k8ssandra-operator, otherwise "Pod") + dataCenter: dc1 # Global Strimzi kafka config overridden # from parent values.yaml kafka: @@ -39,8 +40,8 @@ global: # Application configuration defaults. ################################################################# # application image -image: onap/sdc-backend-all-plugins:1.13.9 -backendInitImage: onap/sdc-backend-init:1.13.9 +image: onap/sdc-backend-all-plugins:1.14.1 +backendInitImage: onap/sdc-backend-init:1.14.1 pullPolicy: Always @@ -155,14 +156,14 @@ flavor: small resources: small: limits: - cpu: "1" + cpu: "2" memory: "3Gi" requests: - cpu: "0.5" + cpu: "1" memory: "3Gi" large: limits: - cpu: "2" + cpu: "3" memory: "6Gi" requests: cpu: "1" @@ -212,9 +213,6 @@ cassandra: readConsistencyLevel: ONE writeConsistencyLevel: ALL #replication_strategy_options: dc1,3 - datacenterName: dc1 - replicationFactor: 3 - db_cache: true cassandraConfig: cassandraHosts: [cassandra-dc1-service.onap] @@ -229,13 +227,35 @@ cassandraConfig: keystorePassword: false truststorePath: "" truststorePassword: "" + +janusgraph: + keyspace: sdctitan + cfgFile: /app/jetty/config/catalog-be/janusgraph.properties + dbCache: + enabled: false + cleanWait: 20 + time: 18000 + size: 0.5 + txCache: + size: '1000000' + storage: + lockRetries: 5 + lockWaitTime: 500 + backend: cql + connectionTimeout: 5000 + graph: + replaceInstance: true + inMemory: false + lockTimeout: 1800 + reconnectInterval: 3 + healthCheckReadTimeout: 8 + dmaapConsumerConfiguration: active: false permittedAncestors: "" tlsCert: "" tlsKey: "" caCert: "" -janusGraphCfgFile: /app/jetty/config/catalog-be/janusgraph.properties ONBOARDING_BE: host: sdc-onboarding-be.onap httpPort: 8081 @@ -260,6 +280,9 @@ uebSecretKey: Ehq3WyT4bkif4zwgEbvshGal kafkaBootStrapServers: onap-strimzi-kafka-bootstrap:9092 chefEnvironment: AUTO +logback: + rootLogLevel: INFO + jetty: httpPort: 8080 httpsPort: 8443 @@ -286,7 +309,6 @@ beInit: tlsKeyPw: "" caCert: "" - be: tlsCert: "" tlsKey: "" @@ -329,5 +351,4 @@ updateStrategy: # "helm.sh/hook": "pre-upgrade,pre-rollback,post-install" # "helm.sh/hook-delete-policy": "before-hook-creation" # "helm.sh/hook-weight": "1" - #END diff --git a/kubernetes/sdc/components/sdc-cs/Chart.yaml b/kubernetes/sdc/components/sdc-cs/Chart.yaml index 9fc41bb6da..2a79e80f7d 100644 --- a/kubernetes/sdc/components/sdc-cs/Chart.yaml +++ b/kubernetes/sdc/components/sdc-cs/Chart.yaml @@ -37,4 +37,3 @@ dependencies: # be published independently to a repo (at this point) repository: '@local' condition: global.sdc_cassandra.localCluster - diff --git a/kubernetes/sdc/components/sdc-cs/resources/config/change_cassandra_pass.sh b/kubernetes/sdc/components/sdc-cs/resources/config/change_cassandra_pass.sh new file mode 100644 index 0000000000..4c4ab6df69 --- /dev/null +++ b/kubernetes/sdc/components/sdc-cs/resources/config/change_cassandra_pass.sh @@ -0,0 +1,33 @@ +#!/bin/sh +CASSANDRA_IP={{ .Values.global.sdc_cassandra.serviceName }}.{{ include "common.namespace" . }}.svc.cluster.local +CASSANDRA_PORT={{ .Values.cassandraConfiguration.cassandraPort }} +echo "Changing Cassandra password..." +SDC_USER="$SDC_USER" +SDC_PASSWORD="$SDC_PASSWORD" + +retry_num=1 +is_up=0 +while [ $is_up -eq 0 ] && [ $retry_num -le 100 ]; do + echo "exit" | cqlsh -u {{ .Values.global.sdc_cassandra.username }} -p {{ .Values.global.sdc_cassandra.password }} $CASSANDRA_IP $CASSANDRA_PORT --cqlversion="{{ .Values.cassandraConfiguration.cql_version }}" + res1=$? + echo "exit" | cqlsh -u {{ .Values.global.sdc_cassandra.username }} -p {{ .Values.global.sdc_cassandra.password }} $CASSANDRA_IP $CASSANDRA_PORT --cqlversion="{{ .Values.cassandraConfiguration.cql_version }}" + res2=$? + + if [ $res1 -eq 0 ] || [ $res2 -eq 0 ]; then + echo "$(date) --- cqlsh is able to connect." + is_up=1 + else + echo "$(date) --- cqlsh is NOT able to connect yet. Sleeping for 5 seconds." + sleep 5 + fi + retry_num=$((retry_num + 1)) +done + +if [ $res1 -eq 0 ] && [ $res2 -eq 1 ] && [ $is_up -eq 1 ]; then + echo "Modifying Cassandra password" + echo "ALTER USER $SDC_USER WITH PASSWORD '$SDC_PASSWORD';" | cqlsh -u {{ .Values.global.sdc_cassandra.username }} -p {{ .Values.global.sdc_cassandra.password }} $CASSANDRA_IP $CASSANDRA_PORT --cqlversion="{{ .Values.cassandraConfiguration.cql_version }}" +elif [ $res1 -eq 1 ] && [ $res2 -eq 0 ] && [ $is_up -eq 1 ]; then + echo "Cassandra password already modified" +else + exit 1 +fi diff --git a/kubernetes/sdc/components/sdc-cs/resources/config/change_cassandra_user.sh b/kubernetes/sdc/components/sdc-cs/resources/config/change_cassandra_user.sh new file mode 100644 index 0000000000..32939e8177 --- /dev/null +++ b/kubernetes/sdc/components/sdc-cs/resources/config/change_cassandra_user.sh @@ -0,0 +1,28 @@ +#!/bin/sh +CASSANDRA_IP={{ .Values.global.sdc_cassandra.serviceName }}.{{ include "common.namespace" . }}.svc.cluster.local +CASSANDRA_PORT={{ .Values.cassandraConfiguration.cassandraPort }} +SDC_USER="$SDC_USER" +SDC_PASSWORD="$SDC_PASSWORD" + +retry_num=1 +is_up=0 +while [ $is_up -eq 0 -a $retry_num -le 100 ]; do + echo "exit" | cqlsh -u {{ .Values.global.sdc_cassandra.username }} -p {{ .Values.global.sdc_cassandra.password }} $CASSANDRA_IP $CASSANDRA_PORT --cqlversion="{{ .Values.cassandraConfiguration.cql_version }}" + res1=$? + if [ $res1 -eq 0 ]; then + echo "`date` --- cqlsh is able to connect." + is_up=1 + else + echo "`date` --- cqlsh is NOT able to connect yet. sleep 5" + sleep 5 + fi + retry_num=$((retry_num+1)) +done + +cassandra_user_exist=$(echo "list users;" | cqlsh -u {{ .Values.global.sdc_cassandra.username }} -p {{ .Values.global.sdc_cassandra.password }} $CASSANDRA_IP $CASSANDRA_PORT --cqlversion="{{ .Values.cassandraConfiguration.cql_version }}" | grep -c $SDC_USER) +if [ $cassandra_user_exist -eq 1 ]; then + echo "Cassandra user $SDC_USER already exists" +else + echo "Going to create $SDC_USER" + echo "create user $SDC_USER with password '$SDC_PASSWORD' nosuperuser;" | cqlsh -u {{ .Values.global.sdc_cassandra.username }} -p {{ .Values.global.sdc_cassandra.password }} $CASSANDRA_IP $CASSANDRA_PORT --cqlversion="{{ .Values.cassandraConfiguration.cql_version }}" +fi diff --git a/kubernetes/sdc/components/sdc-cs/resources/config/configuration.yaml b/kubernetes/sdc/components/sdc-cs/resources/config/configuration.yaml new file mode 100644 index 0000000000..db30a44521 --- /dev/null +++ b/kubernetes/sdc/components/sdc-cs/resources/config/configuration.yaml @@ -0,0 +1,399 @@ +identificationHeaderFields: + - HTTP_IV_USER + - HTTP_CSP_FIRSTNAME + - HTTP_CSP_LASTNAME + - HTTP_IV_REMOTE_ADDRESS + - HTTP_CSP_WSTYPE + +# catalog backend hostname +beFqdn: sdc-be.{{ include "common.namespace" . }}.svc.cluster.local + +# catalog backend http port +beHttpPort: {{ .Values.cassandraConfiguration.catalogPort }} + +# catalog backend http context +beContext: /sdc/rest/config/get + +# catalog backend protocol +{{- if .Values.cassandraConfiguration.disableHttp }} +beProtocol: https +{{- else }} +beProtocol: http +{{- end }} + +# catalog backend ssl port +beSslPort: {{ .Values.cassandraConfiguration.sslPort }} + +version: 1.0 +released: 2012-11-30 +toscaConformanceLevel: 11.0 +minToscaConformanceLevel: 3.0 + +janusGraphCfgFile: {{ .Values.janusgraph.cfgFile }} +janusGraphInMemoryGraph: false +janusGraphLockTimeout: 1800 +# The interval to try and reconnect to JanusGraph DB when it is down during ASDC startup: +janusGraphReconnectIntervalInSeconds: 3 + +# The read timeout towards JanusGraph DB when health check is invoked: +janusGraphHealthCheckReadTimeout: 8 + +# The interval to try and reconnect to Elasticsearch when it is down during ASDC startup: +uebHealthCheckReconnectIntervalInSeconds: 15 +uebHealthCheckReadTimeout: 4 + +# Protocols +protocols: + - http + - https + +# Default imports +defaultImports: + - nodes: + file: nodes.yml + - datatypes: + file: data.yml + - capabilities: + file: capabilities.yml + - relationships: + file: relationships.yml + - groups: + file: groups.yml + - policies: + file: policies.yml + +# Users +users: + tom: passwd + bob: passwd + +cassandraConfig: + cassandraHosts: [{{ .Values.global.sdc_cassandra.serviceName }}.{{ include "common.namespace" . }}.svc.cluster.local] + cassandraPort: 9042 + localDataCenter: {{ .Values.global.sdc_cassandra.dataCenter }} + reconnectTimeout: 30000 + socketReadTimeout: {{ .Values.cassandraConfiguration.socketReadTimeout }} + socketConnectTimeout: {{ .Values.cassandraConfiguration.socketConnectTimeout }} + authenticate: true + username: {{ .Values.cassandraConfiguration.cassandra_user }} + password: {{ .Values.cassandraConfiguration.cassandra_password }} + ssl: {{ .Values.cassandraConfiguration.ssl }} + truststorePath: {{ .Values.cassandraConfiguration.truststorePath }} + truststorePassword: {{ .Values.cassandraConfiguration.truststorePassword }} + maxWaitSeconds: 120 + keySpaces: + - { name: dox, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['{{ .Values.global.sdc_cassandra.dataCenter }}','{{ .Values.global.sdc_cassandra.replicaCount }}']} + - { name: sdcaudit, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['{{ .Values.global.sdc_cassandra.dataCenter }}','{{ .Values.global.sdc_cassandra.replicaCount }}']} + - { name: sdcartifact, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['{{ .Values.global.sdc_cassandra.dataCenter }}','{{ .Values.global.sdc_cassandra.replicaCount }}']} + - { name: sdccomponent, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['{{ .Values.global.sdc_cassandra.dataCenter }}','{{ .Values.global.sdc_cassandra.replicaCount }}']} + - { name: sdcrepository, replicationStrategy: NetworkTopologyStrategy, replicationInfo: ['{{ .Values.global.sdc_cassandra.dataCenter }}','{{ .Values.global.sdc_cassandra.replicaCount }}']} + +licenseTypes: + - User + - Installation + - CPU + +# Deployment artifacts placeholder +resourceTypes: &allResourceTypes + - VFC + - CP + - VL + - VF + - VFCMT + - Abstract + - CVFC + +deploymentResourceArtifacts: + deploymentResourceInstanceArtifacts: + heatEnv: + displayName: "HEAT ENV" + type: HEAT_ENV + description: "Auto-generated HEAT Environment deployment artifact" + fileExtension: "env" + VfHeatEnv: + displayName: "VF HEAT ENV" + type: HEAT_ENV + description: "VF Auto-generated HEAT Environment deployment artifact" + fileExtension: "env" + +# Tosca artifacts placeholders +toscaArtifacts: + assetToscaTemplate: + artifactName: -template.yml + displayName: Tosca Template + type: TOSCA_TEMPLATE + description: TOSCA representation of the asset + assetToscaCsar: + artifactName: -csar.csar + displayName: Tosca Model + type: TOSCA_CSAR + description: TOSCA definition package of the asset + +# Informational artifacts placeholder +excludeResourceCategory: + - Generic +excludeResourceType: + - PNF +informationalResourceArtifacts: + features: + displayName: Features + type: OTHER + capacity: + displayName: Capacity + type: OTHER + vendorTestResult: + displayName: Vendor Test Result + type: OTHER + testScripts: + displayName: Test Scripts + type: OTHER + CloudQuestionnaire: + displayName: Cloud Questionnaire (completed) + type: OTHER + HEATTemplateFromVendor: + displayName: HEAT Template from Vendor + type: HEAT + resourceSecurityTemplate: + displayName: Resource Security Template + type: OTHER + +excludeServiceCategory: + +informationalServiceArtifacts: + serviceArtifactPlan: + displayName: Service Artifact Plan + type: OTHER + summaryOfImpactsToECOMPElements: + displayName: Summary of impacts to ECOMP elements,OSSs, BSSs + type: OTHER + automationCompositionFunctions: + displayName: Automation Composition Functions + type: OTHER + dimensioningInfo: + displayName: Dimensioning Info + type: OTHER + affinityRules: + displayName: Affinity Rules + type: OTHER + operationalPolicies: + displayName: Operational Policies + type: OTHER + serviceSpecificPolicies: + displayName: Service-specific Policies + type: OTHER + engineeringRules: + displayName: Engineering Rules (ERD) + type: OTHER + distributionInstructions: + displayName: Distribution Instructions + type: OTHER + certificationTestResults: + displayName: TD Certification Test Results + type: OTHER + deploymentVotingRecord: + displayName: Deployment Voting Record + type: OTHER + serviceQuestionnaire: + displayName: Service Questionnaire + type: OTHER + serviceSecurityTemplate: + displayName: Service Security Template + type: OTHER + +serviceApiArtifacts: + configuration: + displayName: Configuration + type: OTHER + instantiation: + displayName: Instantiation + type: OTHER + monitoring: + displayName: Monitoring + type: OTHER + reporting: + displayName: Reporting + type: OTHER + logging: + displayName: Logging + type: OTHER + testing: + displayName: Testing + type: OTHER + +additionalInformationMaxNumberOfKeys: 50 + +systemMonitoring: + enabled: false + isProxy: false + probeIntervalInSeconds: 15 + +heatArtifactDeploymentTimeout: + defaultMinutes: 30 + minMinutes: 1 + maxMinutes: 120 + +unLoggedUrls: + - /sdc2/rest/healthCheck + +cleanComponentsConfiguration: + cleanIntervalInMinutes: 1440 + componentsToClean: + - Resource + - Service + +artifactsIndex: resources + +heatEnvArtifactHeader: "" +heatEnvArtifactFooter: "" + +# GSS IDNS +switchoverDetector: + gBeFqdn: + gFeFqdn: + beVip: 1.2.3.4 + feVip: 1.2.3.4 + beResolveAttempts: 3 + feResolveAttempts: 3 + enabled: false + interval: 60 + changePriorityUser: ecompasdc + changePriorityPassword: ecompasdc123 + publishNetworkUrl: + publishNetworkBody: '{"note":"comment"}' + groups: + beSet: + changePriorityUrl: "" + changePriorityBody: '{"name":"","uri":"","no_ad_redirection":false,"v4groups":{"failover_groups":["","","failover_policy":["FAILALL"]},"comment":"","intended_app_proto":"DNS"}' + feSet: + changePriorityUrl: "" + changePriorityBody: '{"name":"","uri":"","no_ad_redirection":false,"v4groups":{"failover_groups":["",""],"failover_policy":["FAILALL"]},"comment":"","intended_app_proto":"DNS"}' + +applicationL1Cache: + datatypes: + enabled: true + firstRunDelay: 10 + pollIntervalInSec: 60 + +applicationL2Cache: + enabled: false + catalogL1Cache: + enabled: false + resourcesSizeInCache: 300 + servicesSizeInCache: 200 + productsSizeInCache: 100 + queue: + syncIntervalInSecondes: 43200 + waitOnShutDownInMinutes: 10 + numberOfCacheWorkers: 4 + +toscaValidators: + stringMaxLength: 2500 + +disableAudit: false +vfModuleProperties: + min_vf_module_instances: + forBaseModule: 1 + forNonBaseModule: 0 + max_vf_module_instances: + forBaseModule: 1 + forNonBaseModule: + initial_count: + forBaseModule: 1 + forNonBaseModule: 0 + vf_module_type: + forBaseModule: Base + forNonBaseModule: Expansion + +genericAssetNodeTypes: + VFC: org.openecomp.resource.abstract.nodes.VFC + CVFC: org.openecomp.resource.abstract.nodes.VFC + VF: org.openecomp.resource.abstract.nodes.VF + PNF: org.openecomp.resource.abstract.nodes.PNF + Service: org.openecomp.resource.abstract.nodes.service + +workloadContext: Production + +environmentContext: + defaultValue: General_Revenue-Bearing + validValues: + - Critical_Revenue-Bearing + - Vital_Revenue-Bearing + - Essential_Revenue-Bearing + - Important_Revenue-Bearing + - Needed_Revenue-Bearing + - Useful_Revenue-Bearing + - General_Revenue-Bearing + - Critical_Non-Revenue + - Vital_Non-Revenue + - Essential_Non-Revenue + - Important_Non-Revenue + - Needed_Non-Revenue + - Useful_Non-Revenue + - General_Non-Revenue + +gabConfig: + - artifactType: 'VES_EVENTS' + pathsAndNamesDefinitions: + - friendlyName: "Action" + path: "event.action[2]" + searchable: "true" + - friendlyName: "Comment" + path: "event.comment" + searchable: "true" + - friendlyName: "Alarm Additional Information" + path: "event.structure.faultFields.structure.alarmAdditionalInformation.comment" + searchable: "true" + +dmaapConsumerConfiguration: + hosts: localhost:3905 + consumerGroup: sdc + consumerId: mama + timeoutMs: 15000 + limit: 1 + pollingInterval: 2 + topic: topic + latitude: 32.109333 + longitude: 34.855499 + version: 1.0 + serviceName: localhost/events + environment: TEST + partner: BOT_R + routeOffer: MR1 + protocol: https + contenttype: application/json + dme2TraceOn: true + aftEnvironment: AFTUAT + aftDme2ConnectionTimeoutMs: 15000 + aftDme2RoundtripTimeoutMs: 240000 + aftDme2ReadTimeoutMs: 50000 + dme2preferredRouterFilePath: DME2preferredRouter.txt + timeLimitForNotificationHandleMs: 120000 + credential: + username: user + password: + +excludedPolicyTypesMapping: + # VF: + # - a.b.c + # - c.d.e + # CR: + # - x.y.z + +excludedGroupTypesMapping: + CR: + - org.openecomp.groups.VfModule + - org.openecomp.groups.heat.HeatStack + - tosca.groups.Root + VF: + - org.openecomp.groups.VfModule + - org.openecomp.groups.heat.HeatStack + - tosca.groups.Root + Service: + - org.openecomp.groups.VfModule + - org.openecomp.groups.heat.HeatStack + - tosca.groups.Root + +healthStatusExclude: + - DE + - DMAPP + - DCAE diff --git a/kubernetes/sdc/components/sdc-cs/resources/config/create-alter-dox-db.sh b/kubernetes/sdc/components/sdc-cs/resources/config/create-alter-dox-db.sh new file mode 100644 index 0000000000..8a32bc88b9 --- /dev/null +++ b/kubernetes/sdc/components/sdc-cs/resources/config/create-alter-dox-db.sh @@ -0,0 +1,17 @@ +#!/bin/sh +CASSANDRA_IP={{ .Values.global.sdc_cassandra.serviceName }}.{{ include "common.namespace" . }}.svc.cluster.local +CASSANDRA_PASS="$SDC_PASSWORD" +CASSANDRA_PORT={{ .Values.cassandraConfiguration.cassandraPort }} +CASSANDRA_USER="$SDC_USER" + +CASSANDRA_COMMAND="cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS $CASSANDRA_IP $CASSANDRA_PORT --cqlversion={{ .Values.cassandraConfiguration.cql_version }}" + +echo "Running create_dox_db.cql" +chmod 755 /tmp/writable-config/tools/build/scripts/create_dox_db.cql +$CASSANDRA_COMMAND -f /tmp/writable-config/tools/build/scripts/create_dox_db.cql > /dev/null 2>&1 + +sleep 10 + +echo "Running alter_dox_db.cql" +chmod 755 /tmp/writable-config/tools/build/scripts/alter_dox_db.cql +$CASSANDRA_COMMAND -f /tmp/writable-config/tools/build/scripts/alter_dox_db.cql > /dev/null 2>&1 diff --git a/kubernetes/sdc/components/sdc-cs/resources/config/create_dox_keyspace.sh b/kubernetes/sdc/components/sdc-cs/resources/config/create_dox_keyspace.sh new file mode 100644 index 0000000000..16fb1ece70 --- /dev/null +++ b/kubernetes/sdc/components/sdc-cs/resources/config/create_dox_keyspace.sh @@ -0,0 +1,42 @@ +#!/bin/sh +CASSANDRA_USER="$SDC_USER" +CASSANDRA_IP={{ .Values.global.sdc_cassandra.serviceName }}.{{ include "common.namespace" . }}.svc.cluster.local +CASSANDRA_PASS="$SDC_PASSWORD" +CASSANDRA_PORT={{ .Values.cassandraConfiguration.cassandraPort }} +DC_NAME={{ .Values.global.sdc_cassandra.dataCenter }} +RC={{ .Values.global.sdc_cassandra.replicaCount }} +CASSANDRA_COMMAND="cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS $CASSANDRA_IP $CASSANDRA_PORT --cqlversion={{ .Values.cassandraConfiguration.cql_version }}" + +# Define Keyspace Creation Statements +KEYSPACE="CREATE KEYSPACE IF NOT EXISTS dox WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', '$DC_NAME': '$RC'};" +KEYSPACE1="CREATE KEYSPACE IF NOT EXISTS zusammen_dox WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', '$DC_NAME': '$RC'};" +KEYSPACE2="CREATE KEYSPACE IF NOT EXISTS {{ .Values.janusgraph.keyspace }} WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', '$DC_NAME': '$RC'} AND durable_writes = true;" + +# Save Commands to File +echo "run create_dox_keyspace.cql" +echo "$KEYSPACE" > /tmp/config/create_dox_keyspace.cql +echo "$KEYSPACE1" >> /tmp/config/create_dox_keyspace.cql +echo "$KEYSPACE2" >> /tmp/config/create_dox_keyspace.cql + +chmod 555 /tmp/config/create_dox_keyspace.cql + +# Execute Keyspace Creation +$CASSANDRA_COMMAND -f /tmp/config/create_dox_keyspace.cql > /dev/null 2>&1 + +# Verify Keyspace Creation +res=$(echo "select keyspace_name from system_schema.keyspaces;" | cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS $CASSANDRA_IP $CASSANDRA_PORT --cqlversion={{ .Values.cassandraConfiguration.cql_version }} | grep -c dox 2>/dev/null) + +if [ $res -gt 0 ]; then + echo "$(date) --- dox keyspace was created" +else + echo "$(date) --- Failed to create dox keyspace" +fi + +# Check sdctitan Keyspace Creation +res_sdctitan=$(echo "select keyspace_name from system_schema.keyspaces;" | cqlsh -u $CASSANDRA_USER -p $CASSANDRA_PASS $CASSANDRA_IP $CASSANDRA_PORT --cqlversion={{ .Values.cassandraConfiguration.cql_version }} | grep -c {{ .Values.janusgraph.keyspace }} 2>/dev/null) + +if [ $res_sdctitan -gt 0 ]; then + echo "$(date) --- {{ .Values.janusgraph.keyspace }} keyspace was created" +else + echo "$(date) --- Failed to create {{ .Values.janusgraph.keyspace }} keyspace" +fi diff --git a/kubernetes/sdc/components/sdc-cs/resources/config/execution.sh b/kubernetes/sdc/components/sdc-cs/resources/config/execution.sh new file mode 100644 index 0000000000..897a54c1ca --- /dev/null +++ b/kubernetes/sdc/components/sdc-cs/resources/config/execution.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +mkdir -p /tmp/writable-config +mkdir -p /tmp/writable-config/sdctool +mkdir -p /tmp/writable-config/tools +cp -r /home/sdc/sdctool/* /tmp/writable-config/sdctool +cp -r /home/sdc/tools/* /tmp/writable-config/tools +cp /tmp/config/cassandra-db-scripts-common/* /tmp/writable-config/ +chmod +x /tmp/writable-config/*.sh +chmod +x /tmp/writable-config/tools/*/*/* +mkdir -p /home/sdc/asdctool/logs/SDC/SDC-TOOL +chmod -R 770 /home/sdc/asdctool/logs/SDC/SDC-TOOL +cp -r /tmp/writable-config/janusgraph.properties /tmp/writable-config/sdctool/config +cp -r /tmp/writable-config/configuration.yaml /tmp/writable-config/sdctool/config +sh -x /tmp/writable-config/change_cassandra_user.sh || exit +sh -x /tmp/writable-config/create_dox_keyspace.sh || exit +cd /tmp/writable-config/tools/build/scripts +sed -i 's|#!/usr/bin/python|#!/usr/bin/python3|' /tmp/writable-config/tools/build/scripts/parse-json.py +sh -x /tmp/writable-config/tools/build/scripts/onboard-db-schema-creation.sh || exit +chmod -R 770 /tmp/writable-config/sdctool +sed -i 's/java \(.*\) -cp/java \1 -Djava.io.tmpdir=\/tmp\/writable-config\/tmp -cp/' /tmp/writable-config/sdctool/scripts/schemaCreation.sh +sed -i 's/java \(.*\) -cp/java \1 -Djava.io.tmpdir=\/tmp\/writable-config\/tmp -cp/' /tmp/writable-config/sdctool/scripts/janusGraphSchemaCreation.sh +sed -i 's/java \(.*\) -cp/java \1 -Djava.io.tmpdir=\/tmp\/writable-config\/tmp -cp/' /tmp/writable-config/sdctool/scripts/sdcSchemaFileImport.sh +sh -x /tmp/writable-config/create-alter-dox-db.sh +sh -x /tmp/writable-config/sdctool/scripts/schemaCreation.sh /tmp/writable-config/sdctool/config || exit +sh -x /tmp/writable-config/sdctool/scripts/janusGraphSchemaCreation.sh /tmp/writable-config/sdctool/config || exit +sh -x /tmp/writable-config/importconformance.sh || exit
\ No newline at end of file diff --git a/kubernetes/sdc/components/sdc-cs/resources/config/importconformance.sh b/kubernetes/sdc/components/sdc-cs/resources/config/importconformance.sh new file mode 100644 index 0000000000..eecf033a9d --- /dev/null +++ b/kubernetes/sdc/components/sdc-cs/resources/config/importconformance.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# Set the working directory +working_directory="/tmp" + +# Extract the cl_release version +version="1.14.0" # Example version string; replace with actual value +cl_release=$(echo $version | cut -d. -f1-3 | cut -d- -f1) +printf "\033[33mcl_release=[$cl_release]\033[0m\n" + +# Execute the import-Conformance command +conf_dir="/tmp/writable-config/sdctool/config" +tosca_dir="/tmp/writable-config/sdctool/tosca" +cl_version=$(grep 'toscaConformanceLevel:' $conf_dir/configuration.yaml | awk '{print $2}') + +cd /tmp/writable-config/sdctool/scripts +chmod +x sdcSchemaFileImport.sh + +echo "execute /tmp/writable-config/sdctool/scripts/sdcSchemaFileImport.sh ${tosca_dir} ${cl_release} ${cl_version} ${conf_dir} onap" +./sdcSchemaFileImport.sh ${tosca_dir} ${cl_release} ${cl_version} ${conf_dir} onap diff --git a/kubernetes/sdc/components/sdc-cs/resources/config/janusgraph.properties b/kubernetes/sdc/components/sdc-cs/resources/config/janusgraph.properties new file mode 100644 index 0000000000..5dc5b9919d --- /dev/null +++ b/kubernetes/sdc/components/sdc-cs/resources/config/janusgraph.properties @@ -0,0 +1,28 @@ +storage.backend={{ .Values.janusgraph.storage.backend }} +storage.hostname={{ .Values.global.sdc_cassandra.serviceName }}.{{ include "common.namespace" . }}.svc.cluster.local +storage.port={{ .Values.cassandraConfiguration.cassandraPort }} +storage.username={{ .Values.cassandraConfiguration.cassandra_user }} +storage.password={{ .Values.cassandraConfiguration.cassandra_password }} +storage.connection-timeout={{ .Values.janusgraph.storage.connectionTimeout }} +storage.cql.keyspace={{ .Values.janusgraph.keyspace }} +storage.cql.port={{ .Values.cassandraConfiguration.cassandraPort }} +storage.cql.ssl.enabled={{ .Values.cassandraConfiguration.ssl }} +{{- if .Values.cassandraConfiguration.ssl }} +storage.cql.ssl.truststore.location={{ .Values.truststorePath }} +storage.cql.ssl.truststore.password={{ .Values.truststorePassword }} +{{- end }} +storage.cql.read-consistency-level={{ .Values.cassandraConfiguration.readConsistencyLevel }} +storage.cql.write-consistency-level={{ .Values.cassandraConfiguration.writeConsistencyLevel }} +storage.cql.replication-strategy-class=NetworkTopologyStrategy +storage.cql.replication-strategy-options={{ .Values.global.sdc_cassandra.dataCenter }},{{ .Values.global.sdc_cassandra.replicaCount }} +storage.cql.local-datacenter={{ .Values.global.sdc_cassandra.dataCenter }} +storage.cql.grouping.keys-allowed=false +cache.db-cache={{ .Values.janusgraph.dbCache.enabled }} +{{- if .Values.janusgraph.dbCache.enabled }} +cache.db-cache-clean-wait={{ .Values.janusgraph.dbCache.cleanWait }} +cache.db-cache-time={{ .Values.janusgraph.dbCache.time }} +cache.db-cache-size={{ .Values.janusgraph.dbCache.size }} +{{- end }} +cache.tx-cache-size={{ .Values.janusgraph.txCache.size }} + +storage.lock.wait-time={{ .Values.janusgraph.storage.lockWaitTime }} diff --git a/kubernetes/sdc/components/sdc-cs/templates/configmap.yaml b/kubernetes/sdc/components/sdc-cs/templates/configmap.yaml new file mode 100644 index 0000000000..dc101cda4b --- /dev/null +++ b/kubernetes/sdc/components/sdc-cs/templates/configmap.yaml @@ -0,0 +1,29 @@ +{{/* +# Copyright © 2017 Amdocs, AT&T, Bell Canada +# Modifications Copyright © 2018 ZTE +# +# 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: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-cassandra-db-scripts + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ include "common.release" . }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} diff --git a/kubernetes/sdc/components/sdc-cs/templates/job.yaml b/kubernetes/sdc/components/sdc-cs/templates/job.yaml index 8f56851dcf..57e7cc7e3a 100644 --- a/kubernetes/sdc/components/sdc-cs/templates/job.yaml +++ b/kubernetes/sdc/components/sdc-cs/templates/job.yaml @@ -63,13 +63,22 @@ spec: - name: {{ include "common.name" . }}-job image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.cassandraInitImage }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: + - /bin/sh + - -c + - | + /tmp/config/cassandra-db-scripts-common/execution.sh volumeMounts: - - name: {{ include "common.fullname" . }}-environments - mountPath: /home/sdc/chef-solo/environments/ - - name: {{ include "common.fullname" . }}-chef-cache - mountPath: /home/sdc/chef-solo/cache - name: {{ include "common.fullname" . }}-cqlshrc mountPath: /home/sdc/.cassandra + - name: {{ include "common.fullname" . }}-cassandra-db-scripts + mountPath: /tmp/config/cassandra-db-scripts-common + - name: {{ include "common.fullname" . }}-cassandra-config + mountPath: /tmp/config + - name: {{ include "common.fullname" . }}-writable-scripts + mountPath: /tmp/writable-config + - name: {{ include "common.fullname" . }}-importconf-tmp + mountPath: /tmp/writable-config/tmp env: - name: ENVNAME value: {{ .Values.env.name }} @@ -98,12 +107,19 @@ spec: {{ include "common.waitForJobContainer" . | indent 6 | trim }} serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} volumes: - - name: {{ include "common.fullname" . }}-environments + - name: {{ include "common.fullname" . }}-cassandra-db-scripts configMap: - name: {{ include "common.release" . }}-sdc-environments-configmap + name: {{ include "common.fullname" . }}-cassandra-db-scripts defaultMode: 0755 - - name: {{ include "common.fullname" . }}-chef-cache - emptyDir: {} + - name: {{ include "common.fullname" . }}-cassandra-config + emptyDir: + sizeLimit: {{ .Values.volumes.cassandraConfigSizeLimit }} + - name: {{ include "common.fullname" . }}-writable-scripts + emptyDir: + sizeLimit: {{ .Values.volumes.writableScriptsSizeLimit }} + - name: {{ include "common.fullname" . }}-importconf-tmp + emptyDir: + sizeLimit: {{ .Values.volumes.importConfTmpSizeLimit }} - name: {{ include "common.fullname" . }}-cqlshrc configMap: name: {{ include "common.release" . }}-sdc-cqlshrc diff --git a/kubernetes/sdc/components/sdc-cs/values.yaml b/kubernetes/sdc/components/sdc-cs/values.yaml index d46c474542..05f8b68abf 100644 --- a/kubernetes/sdc/components/sdc-cs/values.yaml +++ b/kubernetes/sdc/components/sdc-cs/values.yaml @@ -25,7 +25,9 @@ global: #This flag allows SDC to instantiate its own cluster, serviceName #should be sdc-cs if this flag is enabled localCluster: false - + #Cassandra login details + username: cassandra + password: cassandra # in case of a local cassandra cluster # flag to enable the DB creation via k8ssandra-operator useOperator: true @@ -71,10 +73,48 @@ cassandra: config: clusterName: sdc-cs +cassandraConfiguration: + cassandraPort: 9042 + cql_version: 3.4.6 + catalogPort: 8080 + disableHttp: true + sslPort: 8443 + ssl: false + socketConnectTimeout: 40000 + socketReadTimeout: 40000 + truststorePath: /tmp/writable-config/sdctool/config/tmp.trust + truststorePassword: Aa123456 + cassandra_user: asdc_user + cassandra_password: Aa1234%^! + readConsistencyLevel: LOCAL_QUORUM + writeConsistencyLevel: LOCAL_QUORUM + +janusgraph: + keyspace: sdctitan + cfgFile: /tmp/writable-config/sdctool/config/janusgraph.properties + dbCache: + enabled: false + cleanWait: 20 + time: 18000 + size: 0.5 + txCache: + size: '1000000' + storage: + lockRetries: 5 + lockWaitTime: 500 + backend: cql + connectionTimeout: 5000 + graph: + replaceInstance: true + inMemory: false + lockTimeout: 1800 + reconnectInterval: 3 + healthCheckReadTimeout: 8 + # application image repository: nexus3.onap.org:10001 -image: onap/sdc-cassandra:1.13.9 -cassandraInitImage: onap/sdc-cassandra-init:1.13.9 +image: onap/sdc-cassandra:1.14.1 +cassandraInitImage: onap/sdc-cassandra-init:1.14.1 pullPolicy: Always config: @@ -163,3 +203,8 @@ serviceAccount: wait_for_job_container: containers: - '{{ include "common.name" . }}-job' + +volumes: + importConfTmpSizeLimit: 100Mi + writableScriptsSizeLimit: 1.2Gi + cassandraConfigSizeLimit: 100Mi diff --git a/kubernetes/sdc/components/sdc-fe/Chart.yaml b/kubernetes/sdc/components/sdc-fe/Chart.yaml index 3f8ae42a3b..b393ab4825 100644 --- a/kubernetes/sdc/components/sdc-fe/Chart.yaml +++ b/kubernetes/sdc/components/sdc-fe/Chart.yaml @@ -18,7 +18,7 @@ apiVersion: v2 description: ONAP Service Design and Creation Front End name: sdc-fe -version: 13.0.3 +version: 13.0.4 dependencies: - name: repositoryGenerator diff --git a/kubernetes/sdc/components/sdc-fe/resources/config/catalogfe/configuration.yaml b/kubernetes/sdc/components/sdc-fe/resources/config/catalogfe/configuration.yaml new file mode 100644 index 0000000000..95416a9f4e --- /dev/null +++ b/kubernetes/sdc/components/sdc-fe/resources/config/catalogfe/configuration.yaml @@ -0,0 +1,126 @@ +# Needed for logging purposes. To be populated by DevOps - currently dummy +feFqdn: sdc-fe.{{ include "common.namespace" . }}.svc.cluster.local + +# catalog backend hostname +beHost: sdc-be.{{ include "common.namespace" . }}.svc.cluster.local + +# catalog backend http port +beHttpPort: {{ .Values.be_http_port }} + +# catalog backend http context +beContext: /sdc2/rest/v1/catalog/upload/resources + +# catalog backend protocol +{{- if .Values.disableHttp }} +beProtocol: https +{{- else }} +beProtocol: http +{{- end }} + +# catalog backend ssl port +beSslPort: {{ .Values.fe_conf.https_port }} + +# threadpool size for handling requests +threadpoolSize: 50 + +# request processing timeout (seconds) +requestTimeout: 1200 + +# catalog ms (the host-port values need to be changed once it is deployed) +catalogFacadeMs: + protocol: http + host: {{ .Values.facade_vip }} + port: {{ .Values.facade_port }} + healthCheckUri: "/healthCheck" + path: "/uicache" + +# Determines the health check read timeout when invoking health check towards the LB (or BE whatever is configured): +healthCheckSocketTimeoutInMs: 5000 + +healthCheckIntervalInSeconds: 5 + +basicAuth: + enabled: {{ .Values.fe_conf.basic_auth }} + userName: {{ .Values.fe_conf.user_name }} + userPass: {{ .Values.fe_conf.user_pass }} + +onboarding: + hostFe: sdc-fe.{{ include "common.namespace" . }}.svc.cluster.local + {{- if .Values.disableHttp }} + protocolFe: https + portFe: {{ .Values.fe_conf.https_port }} + {{- else }} + protocolFe: http + portFe: {{ .Values.fe_conf.http_port }} + {{- end }} + healthCheckUriFe: "/onboarding/v1.0/healthcheck" + hostBe: sdc-onboarding-be.{{ include "common.namespace" . }}.svc.cluster.local + {{- if .Values.disableHttp }} + protocolBe: https + portBe: {{ .Values.onboarding_be.https_port }} + {{- else }} + protocolBe: http + portBe: {{ .Values.onboarding_be.http_port }} + {{- end }} + +identificationHeaderFields: + - + - &HTTP_IV_USER HTTP_IV_USER + - &iv-user iv-user + - + - &USER_ID USER_ID + - &user-id user-id + - + - &HTTP_CSP_ATTUID HTTP_CSP_ATTUID + - &csp-attuid csp-attuid + +optionalHeaderFields: + - + - &HTTP_CSP_FIRSTNAME HTTP_CSP_FIRSTNAME + - &csp-firstname csp-firstname + - + - &HTTP_CSP_LASTNAME HTTP_CSP_LASTNAME + - &csp-lastname csp-lastname + - + - &HTTP_IV_REMOTE_ADDRESS HTTP_IV_REMOTE_ADDRESS + - &iv-remote-address iv-remote-address + - + - &HTTP_CSP_EMAIL HTTP_CSP_EMAIL + - &csp-email csp-email + +version: 1.0 +released: 2012-11-30 + +# access restriction +authCookie: + cookieName: "AuthenticationCookie" + path: / + domain: "" + securityKey: {{ .Values.access_restriction_key }} + +# Connection parameters +connection: + url: jdbc:mysql://localhost:3306/db + poolSize: 17 + +# Protocols +protocols: + - http + - https + +systemMonitoring: + enabled: false + isProxy: true + probeIntervalInSeconds: 15 + +healthStatusExclude: + - DE + - DMAAP + - DCAE + - DMAAP_PRODUCER + - PORTAL + - CATALOG_FACADE_MS + - External API + +# Space separated list of permitted ancestors +permittedAncestors: {{ .Values.permittedAncestors }} diff --git a/kubernetes/sdc/components/sdc-fe/resources/config/catalogfe/ecomp-error-configuration.yaml b/kubernetes/sdc/components/sdc-fe/resources/config/catalogfe/ecomp-error-configuration.yaml new file mode 100644 index 0000000000..cf0cb86eda --- /dev/null +++ b/kubernetes/sdc/components/sdc-fe/resources/config/catalogfe/ecomp-error-configuration.yaml @@ -0,0 +1,42 @@ +########################################### +# Note the conventions of the field values: +# type can be one of: CONFIG_ERROR, SYSTEM_ERROR, DATA_ERROR, CONNECTION_PROBLEM +# severity can be one of: WARN, ERROR, FATAL +# alarmSeverity can be one of: CRITICAL, MAJOR, MINOR, INFORMATIONAL, NONE +# code is a unique integer in range of 3003-9999 (3000-3002 are occupied for internal usage) +# The above enumeration values are out-of-the-box and can be changed in code. +# In case of config and code mismatch, the appropriate error will be printed to log +# +# Range of FE codes - 8000-9999 + +errors: + FeHealthCheckConnectionError: + type: CONNECTION_PROBLEM + code: ASDC_8000 + severity: ERROR + description: "Connection error during FE Health Check" + alarmSeverity: CRITICAL + FeHttpLoggingError: + type: SYSTEM_ERROR + code: ASDC_8001 + severity: ERROR + description: "Error when logging FE HTTP request/response" + alarmSeverity: MINOR + FePortalServletError: + type: SYSTEM_ERROR + code: ASDC_8002 + severity: ERROR + description: "Error when trying to access FE Portal page" + alarmSeverity: MAJOR + FeHealthCheckGeneralError: + type: SYSTEM_ERROR + code: ASDC_8004 + severity: ERROR + description: "General error during FE Health Check" + alarmSeverity: CRITICAL + FeHealthCheckRecovery: + type: RECOVERY + code: ASDC_8005 + severity: INFO + description: "BE Health Check Recovery" + alarmSeverity: INFORMATIONAL diff --git a/kubernetes/sdc/components/sdc-fe/resources/config/logging/logback.xml b/kubernetes/sdc/components/sdc-fe/resources/config/catalogfe/logback.xml index f3ebf76428..a047a78c52 100644 --- a/kubernetes/sdc/components/sdc-fe/resources/config/logging/logback.xml +++ b/kubernetes/sdc/components/sdc-fe/resources/config/catalogfe/logback.xml @@ -1,226 +1,226 @@ -<?xml version="1.0" encoding="utf-8"?>
-<!--
-# Copyright © 2018 Amdocs, Bell Canada, AT&T, ZTE
-#
-# 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.
--->
-
-<configuration scan="true" scanPeriod="3 seconds">
- <property name="logDir" value="/var/log/onap"/>
- <property name="componentName" scope="system" value="sdc"/>
- <property name="subComponentName" scope="system" value="sdc-fe"/>
- <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}"/>
- <property file="${config.home}/catalog-fe/configuration.yaml"/>
- <property name="enable-all-log" scope="context" value="false"/>
- <!-- log file names -->
- <property name="errorLogName" value="error"/>
- <property name="metricsLogName" value="metrics"/>
- <property name="auditLogName" value="audit"/>
- <property name="debugLogName" value="debug"/>
- <property name="transactionLogName" value="transaction"/>
- <property name="allLogName" value="all"/>
- <property name="queueSize" value="256"/>
- <property name="maxFileSize" value="50MB"/>
- <property name="maxHistory" value="30"/>
- <property name="totalSizeCap" value="10GB"/>
- <property name="pattern"
- value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}\t[%thread]\t%-5level\t%logger{36}\t%replace(%replace(%replace(%mdc){'\t','\\\\t'}){', ','\t'}){'\n', '\\\\n'}\t%replace(%replace(%msg){'\n', '\\\\n'}){'\t','\\\\t'}%n"/>
-
- <!-- STDOUT -->
- <appender class="ch.qos.logback.core.ConsoleAppender" name="STDOUT">
- <encoder>
- <pattern>${pattern}</pattern>
- </encoder>
- </appender>
-
- <!-- STDERR -->
- <appender class="ch.qos.logback.core.ConsoleAppender" name="STDERR">
- <filter class="ch.qos.logback.classic.filter.LevelFilter">
- <level>ERROR</level>
- <onMatch>ACCEPT</onMatch>
- <onMismatch>DENY</onMismatch>
- </filter>
- <encoder>
- <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern>
- </encoder>
- </appender>
-
- <!-- All log -->
- <if condition='property("enable-all-log").equalsIgnoreCase("true")'>
- <then>
- <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="ALL_ROLLING">
- <file>${logDirectory}/${allLogName}.log</file>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>${logDirectory}/${allLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
- <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
- <maxFileSize>${maxFileSize}</maxFileSize>
- </timeBasedFileNamingAndTriggeringPolicy>
- <maxHistory>${maxHistory}</maxHistory>
- <totalSizeCap>${totalSizeCap}</totalSizeCap>
- </rollingPolicy>
- <encoder>
- <pattern>${pattern}</pattern>
- </encoder>
- </appender>
- <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_ALL">
- <appender-ref ref="ALL_ROLLING"/>
- </appender>
- </then>
- </if>
- <!-- Error log -->
- <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="ERROR_ROLLING">
- <file>${logDirectory}/${errorLogName}.log</file>
- <!-- Audit messages filter - deny audit messages -->
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
- <marker>AUDIT_MARKER</marker>
- </evaluator>
- <onMismatch>NEUTRAL</onMismatch>
- <onMatch>DENY</onMatch>
- </filter>
- <!-- Transaction messages filter - deny Transaction messages -->
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
- <marker>TRANSACTION_MARKER</marker>
- </evaluator>
- <onMismatch>NEUTRAL</onMismatch>
- <onMatch>DENY</onMatch>
- </filter>
- <!-- deny all events with a level below INFO, that is TRACE and DEBUG -->
- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
- <level>INFO</level>
- </filter>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
- <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
- <maxFileSize>${maxFileSize}</maxFileSize>
- </timeBasedFileNamingAndTriggeringPolicy>
- <maxHistory>${maxHistory}</maxHistory>
- <totalSizeCap>${totalSizeCap}</totalSizeCap>
- </rollingPolicy>
- <encoder>
- <pattern>${pattern}</pattern>
- </encoder>
- </appender>
- <!-- Debug log -->
- <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="DEBUG_ROLLING">
- <file>${logDirectory}/${debugLogName}.log</file>
- <!-- No need to deny audit messages - they are INFO only, will be denied
- anyway -->
- <!-- Transaction messages filter - deny Transaction messages, there are
- some DEBUG level messages among them -->
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
- <marker>TRANSACTION_MARKER</marker>
- </evaluator>
- <onMismatch>NEUTRAL</onMismatch>
- <onMatch>DENY</onMatch>
- </filter>
- <!-- accept DEBUG and TRACE level -->
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator">
- <expression>e.level.toInt() <= DEBUG.toInt()</expression>
- </evaluator>
- <OnMismatch>DENY</OnMismatch>
- <OnMatch>NEUTRAL</OnMatch>
- </filter>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
- <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
- <maxFileSize>${maxFileSize}</maxFileSize>
- </timeBasedFileNamingAndTriggeringPolicy>
- <maxHistory>${maxHistory}</maxHistory>
- <totalSizeCap>${totalSizeCap}</totalSizeCap>
- </rollingPolicy>
- <encoder>
- <pattern>${pattern}</pattern>
- </encoder>
- </appender>
- <!-- Audit log -->
- <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="AUDIT_ROLLING">
- <file>${logDirectory}/${auditLogName}.log</file>
- <!-- Audit messages filter - accept audit messages -->
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
- <marker>AUDIT_MARKER</marker>
- </evaluator>
- <onMismatch>DENY</onMismatch>
- <onMatch>ACCEPT</onMatch>
- </filter>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
- <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
- <maxFileSize>${maxFileSize}</maxFileSize>
- </timeBasedFileNamingAndTriggeringPolicy>
- <maxHistory>${maxHistory}</maxHistory>
- <totalSizeCap>${totalSizeCap}</totalSizeCap>
- </rollingPolicy>
- <encoder>
- <pattern>${pattern}</pattern>
- </encoder>
- </appender>
- <!-- SdncTransaction log -->
- <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="TRANSACTION_ROLLING">
- <file>${logDirectory}/${transactionLogName}.log</file>
- <!-- Transaction messages filter - accept audit messages -->
- <filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
- <marker>TRANSACTION_MARKER</marker>
- </evaluator>
- <onMismatch>DENY</onMismatch>
- <onMatch>ACCEPT</onMatch>
- </filter>
- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>${logDirectory}/${transactionLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
- <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
- <maxFileSize>${maxFileSize}</maxFileSize>
- </timeBasedFileNamingAndTriggeringPolicy>
- <maxHistory>${maxHistory}</maxHistory>
- <totalSizeCap>${totalSizeCap}</totalSizeCap>
- </rollingPolicy>
- <encoder>
- <pattern>${pattern}</pattern>
- </encoder>
- </appender>
- <!-- Asynchronicity Configurations -->
- <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_DEBUG">
- <queueSize>${queueSize}</queueSize>
- <appender-ref ref="DEBUG_ROLLING"/>
- </appender>
- <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_TRANSACTION">
- <queueSize>${queueSize}</queueSize>
- <appender-ref ref="TRANSACTION_ROLLING"/>
- </appender>
- <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_ERROR">
- <queueSize>${queueSize}</queueSize>
- <appender-ref ref="ERROR_ROLLING"/>
- </appender>
- <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_AUDIT">
- <queueSize>${queueSize}</queueSize>
- <appender-ref ref="AUDIT_ROLLING"/>
- </appender>
- <root level="INFO">
- <appender-ref ref="ASYNC_ERROR"/>
- <appender-ref ref="ASYNC_DEBUG"/>
- <appender-ref ref="ASYNC_AUDIT"/>
- <appender-ref ref="ASYNC_TRANSACTION"/>
- <if condition='property("enable-all-log").equalsIgnoreCase("true")'>
- <then>
- <appender-ref ref="ALL_ROLLING"/>
- </then>
- </if>
- <appender-ref ref="STDOUT"/>
- <appender-ref ref="STDERR"/>
- </root>
- <logger level="INFO" name="org.openecomp.sdc"/>
-</configuration>
+<?xml version="1.0" encoding="utf-8"?> +<!-- +# Copyright © 2018 Amdocs, Bell Canada, AT&T, ZTE +# +# 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. +--> + +<configuration scan="true" scanPeriod="3 seconds"> + <property name="logDir" value="/var/log/onap"/> + <property name="componentName" scope="system" value="sdc"/> + <property name="subComponentName" scope="system" value="sdc-fe"/> + <property name="logDirectory" value="${logDir}/${componentName}/${subComponentName}"/> + <property file="${config.home}/catalog-fe/configuration.yaml"/> + <property name="enable-all-log" scope="context" value="false"/> + <!-- log file names --> + <property name="errorLogName" value="error"/> + <property name="metricsLogName" value="metrics"/> + <property name="auditLogName" value="audit"/> + <property name="debugLogName" value="debug"/> + <property name="transactionLogName" value="transaction"/> + <property name="allLogName" value="all"/> + <property name="queueSize" value="256"/> + <property name="maxFileSize" value="50MB"/> + <property name="maxHistory" value="30"/> + <property name="totalSizeCap" value="10GB"/> + <property name="pattern" + value="%d{"yyyy-MM-dd'T'HH:mm:ss.SSSXXX", UTC}\t[%thread]\t%-5level\t%logger{36}\t%replace(%replace(%replace(%mdc){'\t','\\\\t'}){', ','\t'}){'\n', '\\\\n'}\t%replace(%replace(%msg){'\n', '\\\\n'}){'\t','\\\\t'}%n"/> + + <!-- STDOUT --> + <appender class="ch.qos.logback.core.ConsoleAppender" name="STDOUT"> + <encoder> + <pattern>${pattern}</pattern> + </encoder> + </appender> + + <!-- STDERR --> + <appender class="ch.qos.logback.core.ConsoleAppender" name="STDERR"> + <filter class="ch.qos.logback.classic.filter.LevelFilter"> + <level>ERROR</level> + <onMatch>ACCEPT</onMatch> + <onMismatch>DENY</onMismatch> + </filter> + <encoder> + <pattern>"%d [%thread] %-5level %logger{1024} - %msg%n"</pattern> + </encoder> + </appender> + + <!-- All log --> + <if condition='property("enable-all-log").equalsIgnoreCase("true")'> + <then> + <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="ALL_ROLLING"> + <file>${logDirectory}/${allLogName}.log</file> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/${allLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>${maxFileSize}</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + <maxHistory>${maxHistory}</maxHistory> + <totalSizeCap>${totalSizeCap}</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>${pattern}</pattern> + </encoder> + </appender> + <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_ALL"> + <appender-ref ref="ALL_ROLLING"/> + </appender> + </then> + </if> + <!-- Error log --> + <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="ERROR_ROLLING"> + <file>${logDirectory}/${errorLogName}.log</file> + <!-- Audit messages filter - deny audit messages --> + <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> + <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> + <marker>AUDIT_MARKER</marker> + </evaluator> + <onMismatch>NEUTRAL</onMismatch> + <onMatch>DENY</onMatch> + </filter> + <!-- Transaction messages filter - deny Transaction messages --> + <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> + <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> + <marker>TRANSACTION_MARKER</marker> + </evaluator> + <onMismatch>NEUTRAL</onMismatch> + <onMatch>DENY</onMatch> + </filter> + <!-- deny all events with a level below INFO, that is TRACE and DEBUG --> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>INFO</level> + </filter> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>${maxFileSize}</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + <maxHistory>${maxHistory}</maxHistory> + <totalSizeCap>${totalSizeCap}</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>${pattern}</pattern> + </encoder> + </appender> + <!-- Debug log --> + <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="DEBUG_ROLLING"> + <file>${logDirectory}/${debugLogName}.log</file> + <!-- No need to deny audit messages - they are INFO only, will be denied + anyway --> + <!-- Transaction messages filter - deny Transaction messages, there are + some DEBUG level messages among them --> + <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> + <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> + <marker>TRANSACTION_MARKER</marker> + </evaluator> + <onMismatch>NEUTRAL</onMismatch> + <onMatch>DENY</onMatch> + </filter> + <!-- accept DEBUG and TRACE level --> + <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> + <evaluator class="ch.qos.logback.classic.boolex.GEventEvaluator"> + <expression>e.level.toInt() <= DEBUG.toInt()</expression> + </evaluator> + <OnMismatch>DENY</OnMismatch> + <OnMatch>NEUTRAL</OnMatch> + </filter> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>${maxFileSize}</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + <maxHistory>${maxHistory}</maxHistory> + <totalSizeCap>${totalSizeCap}</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>${pattern}</pattern> + </encoder> + </appender> + <!-- Audit log --> + <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="AUDIT_ROLLING"> + <file>${logDirectory}/${auditLogName}.log</file> + <!-- Audit messages filter - accept audit messages --> + <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> + <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> + <marker>AUDIT_MARKER</marker> + </evaluator> + <onMismatch>DENY</onMismatch> + <onMatch>ACCEPT</onMatch> + </filter> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>${maxFileSize}</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + <maxHistory>${maxHistory}</maxHistory> + <totalSizeCap>${totalSizeCap}</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>${pattern}</pattern> + </encoder> + </appender> + <!-- SdncTransaction log --> + <appender class="ch.qos.logback.core.rolling.RollingFileAppender" name="TRANSACTION_ROLLING"> + <file>${logDirectory}/${transactionLogName}.log</file> + <!-- Transaction messages filter - accept audit messages --> + <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> + <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator"> + <marker>TRANSACTION_MARKER</marker> + </evaluator> + <onMismatch>DENY</onMismatch> + <onMatch>ACCEPT</onMatch> + </filter> + <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> + <fileNamePattern>${logDirectory}/${transactionLogName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern> + <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> + <maxFileSize>${maxFileSize}</maxFileSize> + </timeBasedFileNamingAndTriggeringPolicy> + <maxHistory>${maxHistory}</maxHistory> + <totalSizeCap>${totalSizeCap}</totalSizeCap> + </rollingPolicy> + <encoder> + <pattern>${pattern}</pattern> + </encoder> + </appender> + <!-- Asynchronicity Configurations --> + <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_DEBUG"> + <queueSize>${queueSize}</queueSize> + <appender-ref ref="DEBUG_ROLLING"/> + </appender> + <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_TRANSACTION"> + <queueSize>${queueSize}</queueSize> + <appender-ref ref="TRANSACTION_ROLLING"/> + </appender> + <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_ERROR"> + <queueSize>${queueSize}</queueSize> + <appender-ref ref="ERROR_ROLLING"/> + </appender> + <appender class="ch.qos.logback.classic.AsyncAppender" name="ASYNC_AUDIT"> + <queueSize>${queueSize}</queueSize> + <appender-ref ref="AUDIT_ROLLING"/> + </appender> + <root level="{{ .Values.logback.rootLogLevel }}"> + <!--<appender-ref ref="ASYNC_ERROR"/> + <appender-ref ref="ASYNC_DEBUG"/> + <appender-ref ref="ASYNC_AUDIT"/> + <appender-ref ref="ASYNC_TRANSACTION"/> + <if condition='property("enable-all-log").equalsIgnoreCase("true")'> + <then> + <appender-ref ref="ALL_ROLLING"/> + </then> + </if>--> + <appender-ref ref="STDOUT"/> + <appender-ref ref="STDERR"/> + </root> + <logger level="INFO" name="org.openecomp.sdc"/> +</configuration> diff --git a/kubernetes/sdc/components/sdc-fe/resources/config/catalogfe/rest-configuration-info.yaml b/kubernetes/sdc/components/sdc-fe/resources/config/catalogfe/rest-configuration-info.yaml new file mode 100644 index 0000000000..ecedafea56 --- /dev/null +++ b/kubernetes/sdc/components/sdc-fe/resources/config/catalogfe/rest-configuration-info.yaml @@ -0,0 +1,11 @@ +# rest read timeout - means no timeout +readTimeoutInSec: 0 + +# whether to ignore certificate +ignoreCertificate: false + +# the connection pool size +connectionPoolSize: 10 + +# create connection timeout +connectTimeoutInSec: 10 diff --git a/kubernetes/sdc/components/sdc-fe/resources/config/catalogfe/workspace-configuration.yaml b/kubernetes/sdc/components/sdc-fe/resources/config/catalogfe/workspace-configuration.yaml new file mode 100644 index 0000000000..f05b28c58e --- /dev/null +++ b/kubernetes/sdc/components/sdc-fe/resources/config/catalogfe/workspace-configuration.yaml @@ -0,0 +1,204 @@ +# following entries defines the workspace menus that are displayed according to type/subtype of the component in the workspace +# in addition, they can also be disabled for specific roles. +workspaceMenuConfiguration: + VFC: + - text: General + action: onMenuItemPressed + state: workspace.general + - text: Deployment Artifact + action: onMenuItemPressed + state: workspace.deployment_artifacts + - text: Information Artifact + action: onMenuItemPressed + state: workspace.information_artifacts + - text: TOSCA Artifacts + action: onMenuItemPressed + state: workspace.tosca_artifacts + - text: Properties + action: onMenuItemPressed + state: workspace.properties + - text: Attributes + action: onMenuItemPressed + state: workspace.attributes + - text: Req. & Capabilities + action: onMenuItemPressed + state: workspace.reqAndCap + - text: Activity Log + action: onMenuItemPressed + state: workspace.activity_log + VL: + - text: General + action: onMenuItemPressed + state: workspace.general + - text: Deployment Artifact + action: onMenuItemPressed + state: workspace.deployment_artifacts + - text: Information Artifact + action: onMenuItemPressed + state: workspace.information_artifacts + - text: TOSCA Artifacts + action: onMenuItemPressed + state: workspace.tosca_artifacts + - text: Properties + action: onMenuItemPressed + state: workspace.properties + - text: Attributes + action: onMenuItemPressed + state: workspace.attributes + - text: Req. & Capabilities + action: onMenuItemPressed + state: workspace.reqAndCap + - text: Activity Log + action: onMenuItemPressed + state: workspace.activity_log + CP: + - text: General + action: onMenuItemPressed + state: workspace.general + - text: Deployment Artifact + action: onMenuItemPressed + state: workspace.deployment_artifacts + - text: Information Artifact + action: onMenuItemPressed + state: workspace.information_artifacts + - text: TOSCA Artifacts + action: onMenuItemPressed + state: workspace.tosca_artifacts + - text: Properties + action: onMenuItemPressed + state: workspace.properties + - text: Attributes + action: onMenuItemPressed + state: workspace.attributes + - text: Req. & Capabilities + action: onMenuItemPressed + state: workspace.reqAndCap + - text: Activity Log + action: onMenuItemPressed + state: workspace.activity_log + VF: + - text: General + action: onMenuItemPressed + state: workspace.general + - text: Deployment Artifact + action: onMenuItemPressed + state: workspace.deployment_artifacts + - text: Information Artifact + action: onMenuItemPressed + state: workspace.information_artifacts + - text: TOSCA Artifacts + action: onMenuItemPressed + state: workspace.tosca_artifacts + - text: Composition + action: onMenuItemPressed + state: workspace.composition.details + - text: Operation + action: onMenuItemPressed + state: workspace.interface_operation + - text: Activity Log + action: onMenuItemPressed + state: workspace.activity_log + - text: Deployment + action: onMenuItemPressed + state: workspace.deployment + - text: Properties Assignment + action: onMenuItemPressed + state: workspace.properties_assignment + - text: Attributes & Outputs + action: onMenuItemPressed + state: workspace.attributes_outputs + - text: Req. & Capabilities + action: onMenuItemPressed + state: workspace.reqAndCapEditable + PNF: + - text: General + action: onMenuItemPressed + state: workspace.general + - text: Deployment Artifact + action: onMenuItemPressed + state: workspace.deployment_artifacts + - text: Information Artifact + action: onMenuItemPressed + state: workspace.information_artifacts + - text: TOSCA Artifacts + action: onMenuItemPressed + state: workspace.tosca_artifacts + - text: Composition + action: onMenuItemPressed + state: workspace.composition.details + - text: Operation + action: onMenuItemPressed + state: workspace.interface_operation + - text: Activity Log + action: onMenuItemPressed + state: workspace.activity_log + - text: Properties Assignment + action: onMenuItemPressed + state: workspace.properties_assignment + - text: Req. & Capabilities + action: onMenuItemPressed + state: workspace.reqAndCapEditable + CR: + - text: General + action: onMenuItemPressed + state: workspace.general + - text: Deployment Artifact + action: onMenuItemPressed + state: workspace.deployment_artifacts + - text: Information Artifact + action: onMenuItemPressed + state: workspace.information_artifacts + - text: TOSCA Artifacts + action: onMenuItemPressed + state: workspace.tosca_artifacts + - text: Composition + action: onMenuItemPressed + state: workspace.composition.details + - text: Activity Log + action: onMenuItemPressed + state: workspace.activity_log + - text: Properties Assignment + action: onMenuItemPressed + state: workspace.properties_assignment + SERVICE: + - text: General + action: onMenuItemPressed + state: workspace.general + - text: TOSCA Artifacts + action: onMenuItemPressed + state: workspace.tosca_artifacts + - text: Composition + action: onMenuItemPressed + state: workspace.composition.details + - text: Operation + action: onMenuItemPressed + state: workspace.interface_operation + - text: Activity Log + action: onMenuItemPressed + state: workspace.activity_log + - text: Management Workflow + action: onMenuItemPressed + state: workspace.management_workflow + - text: 'Network Call Flow ' + action: onMenuItemPressed + state: workspace.network_call_flow + - text: Distribution + action: onMenuItemPressed + state: workspace.distribution + disabledRoles: + - ADMIN + - TESTER + - GOVERNOR + - DESIGNER + - text: Deployment + action: onMenuItemPressed + state: workspace.deployment + - text: Properties Assignment + action: onMenuItemPressed + state: workspace.properties_assignment + - text: Outputs + action: onMenuItemPressed + state: workspace.outputs_assignment + - text: Req. & Capabilities + action: onMenuItemPressed + state: workspace.reqAndCapEditable diff --git a/kubernetes/sdc/components/sdc-fe/resources/config/feEtcConfig/rewrite-root-to-sdc1.xml b/kubernetes/sdc/components/sdc-fe/resources/config/feEtcConfig/rewrite-root-to-sdc1.xml new file mode 100644 index 0000000000..e0862a5bfd --- /dev/null +++ b/kubernetes/sdc/components/sdc-fe/resources/config/feEtcConfig/rewrite-root-to-sdc1.xml @@ -0,0 +1,19 @@ +<?xml version="1.0"?><!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd"> +<Configure id="Server" class="org.eclipse.jetty.server.Server"> + <Ref refid="Rewrite"> + <Call name="addRule"> + <Arg> + <New class="org.eclipse.jetty.rewrite.handler.RedirectPatternRule"> + <Set name="pattern" type="String"/> + <Set name="location">/sdc1</Set> + </New> + </Arg> + </Call> + </Ref> + <!-- ===================== --> + <!-- DefaultHandler config --> + <!-- ===================== --> + <Ref id="DefaultHandler"> + <Set name="showContexts">false</Set> + </Ref> +</Configure> diff --git a/kubernetes/sdc/components/sdc-fe/resources/config/onboardingfe/onboarding_configuration.yaml b/kubernetes/sdc/components/sdc-fe/resources/config/onboardingfe/onboarding_configuration.yaml new file mode 100644 index 0000000000..e0ed8cd6d8 --- /dev/null +++ b/kubernetes/sdc/components/sdc-fe/resources/config/onboardingfe/onboarding_configuration.yaml @@ -0,0 +1,9 @@ +notifications: + pollingIntervalMsec: 2000 + selectionSize: 100 + beHost: sdc-onboarding-be.{{ include "common.namespace" . }}.svc.cluster.local + {{- if .Values.disableHttp }} + beHttpPort: {{ .Values.onboarding_be.https_port }} + {{- else }} + beHttpPort: {{ .Values.onboarding_be.http_port }} + {{- end }} diff --git a/kubernetes/sdc/components/sdc-fe/resources/config/readyProbe/ready-probe.sh b/kubernetes/sdc/components/sdc-fe/resources/config/readyProbe/ready-probe.sh new file mode 100644 index 0000000000..6606ed3232 --- /dev/null +++ b/kubernetes/sdc/components/sdc-fe/resources/config/readyProbe/ready-probe.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# Determine the protocol and ports from Helm values +disableHttp={{ .Values.disableHttp | quote }} # Use the value from values.yaml +http_port={{ .Values.fe_conf.http_port | quote }} # Use the HTTP port from values.yaml +https_port={{ .Values.fe_conf.https_port | quote }} # Use the HTTPS port from values.yaml + +# Determine the protocol and port +if [ "$disableHttp" = "true" ]; then + protocol="https" + port="$https_port" +else + protocol="http" + port="$http_port" +fi + +# Perform health check +health_check_http_code=$(curl -k --max-time 5 -o /dev/null -w '%{http_code}' "$protocol://127.0.0.1:$port/sdc1/rest/healthCheck") + +# Output the health check result +echo "Health check http status: $health_check_http_code" + +# Check if the response code is 200 +if [ "$health_check_http_code" -eq 200 ]; then + exit 0 +else + exit 1 +fi diff --git a/kubernetes/sdc/components/sdc-fe/resources/config/startdConfig/http.ini b/kubernetes/sdc/components/sdc-fe/resources/config/startdConfig/http.ini new file mode 100644 index 0000000000..019c9b25d0 --- /dev/null +++ b/kubernetes/sdc/components/sdc-fe/resources/config/startdConfig/http.ini @@ -0,0 +1,29 @@ +# --------------------------------------- +# Module: http +#{{ .Values.http_option }} + +### HTTP Connector Configuration + +## Connector host/address to bind to +# jetty.http.host=0.0.0.0 + +## Connector port to listen on +jetty.http.port={{ .Values.fe_conf.http_port }} + +## Connector idle timeout in milliseconds +jetty.http.idleTimeout=30000 + +## Connector socket linger time in seconds (-1 to disable) +# jetty.http.soLingerTime=-1 + +## Number of acceptors (-1 picks default based on number of cores) +# jetty.http.acceptors=-1 + +## Number of selectors (-1 picks default based on number of cores) +# jetty.http.selectors=-1 + +## ServerSocketChannel backlog (0 picks platform default) +# jetty.http.acceptorQueueSize=0 + +## Thread priority delta to give to acceptor threads +# jetty.http.acceptorPriorityDelta=0 diff --git a/kubernetes/sdc/components/sdc-fe/resources/config/startdConfig/https.ini b/kubernetes/sdc/components/sdc-fe/resources/config/startdConfig/https.ini new file mode 100644 index 0000000000..debf27d5eb --- /dev/null +++ b/kubernetes/sdc/components/sdc-fe/resources/config/startdConfig/https.ini @@ -0,0 +1,29 @@ +# --------------------------------------- +# Module: https +--module=https + +### HTTPS Connector Configuration + +## Connector host/address to bind to +# jetty.https.host=0.0.0.0 + +## Connector port to listen on +jetty.https.port={{ .Values.fe_conf.https_port }} + +## Connector idle timeout in milliseconds +jetty.https.idleTimeout=30000 + +## Connector socket linger time in seconds (-1 to disable) +# jetty.https.soLingerTime=-1 + +## Number of acceptors (-1 picks default based on number of cores) +# jetty.https.acceptors=-1 + +## Number of selectors (-1 picks default based on number of cores) +# jetty.https.selectors=-1 + +## ServerSocketChannel backlog (0 picks platform default) +# jetty.https.acceptorQueueSize=0 + +## Thread priority delta to give to acceptor threads +# jetty.https.acceptorPriorityDelta=0 diff --git a/kubernetes/sdc/components/sdc-fe/resources/config/startdConfig/ssl.ini b/kubernetes/sdc/components/sdc-fe/resources/config/startdConfig/ssl.ini new file mode 100644 index 0000000000..bca1cd0aab --- /dev/null +++ b/kubernetes/sdc/components/sdc-fe/resources/config/startdConfig/ssl.ini @@ -0,0 +1,95 @@ +## TLS(SSL) Connector Configuration +# --------------------------------------- +# Module: ssl +--module=ssl + +### TLS(SSL) Connector Configuration + +## Connector host/address to bind to +# jetty.ssl.host=0.0.0.0 + +## Connector port to listen on +jetty.ssl.port={{ .Values.fe_conf.https_port }} + +## Connector idle timeout in milliseconds +# jetty.ssl.idleTimeout=30000 + +## Connector socket linger time in seconds (-1 to disable) +# jetty.ssl.soLingerTime=-1 + +## Number of acceptors (-1 picks default based on number of cores) +# jetty.ssl.acceptors=-1 + +## Number of selectors (-1 picks default based on number of cores) +# jetty.ssl.selectors=-1 + +## ServerSocketChannel backlog (0 picks platform default) +# jetty.ssl.acceptorQueueSize=0 + +## Thread priority delta to give to acceptor threads +# jetty.ssl.acceptorPriorityDelta=0 + +## Whether request host names are checked to match any SNI names +# jetty.ssl.sniHostCheck=true + +## max age in seconds for a Strict-Transport-Security response header (default -1) +# jetty.ssl.stsMaxAgeSeconds=31536000 + +## include subdomain property in any Strict-Transport-Security header (default false) +# jetty.ssl.stsIncludeSubdomains=true + +### SslContextFactory Configuration +## Note that OBF passwords are not secure, just protected from casual observation +## See http://www.eclipse.org/jetty/documentation/current/configuring-security-secure-passwords.html + +## Keystore file path (relative to $jetty.base) +{{- if .Values.keystore_path }} +jetty.sslContext.keyStorePath={{ .Values.keystore_path }} +{{- end }} + +## Truststore file path (relative to $jetty.base) +{{- if .Values.truststore_path }} +jetty.sslContext.trustStorePath={{ .Values.truststore_path }} +{{- end }} + +## Keystore password +{{- if .Values.keystore_password }} +jetty.sslContext.keyStorePassword={{ .Values.keystore_password }} +{{- end }} + +## Keystore type and provider +# jetty.sslContext.keyStoreType=JKS +# jetty.sslContext.keyStoreProvider= + +## KeyManager password +{{- if .Values.keystore_password }} +jetty.sslContext.keyManagerPassword={{ .Values.keystore_password }} +{{- end }} + +## Truststore password +{{- if .Values.truststore_password }} +jetty.sslContext.trustStorePassword={{ .Values.truststore_password }} +{{- end }} + +## Truststore type and provider +# jetty.sslContext.trustStoreType=JKS +# jetty.sslContext.trustStoreProvider= + +## Whether client certificate authentication is required +jetty.sslContext.needClientAuth={{ if .Values.truststore_password }}true{{ else }}false{{ end }} + +## Whether client certificate authentication is desired +# jetty.sslContext.wantClientAuth=false + +## Whether cipher order is significant (since java 8 only) +# jetty.sslContext.useCipherSuitesOrder=true + +## Set the size of the SslSession cache +# jetty.sslContext.sslSessionCacheSize=-1 + +## Set the timeout (in seconds) of the SslSession cache timeout +# jetty.sslContext.sslSessionTimeout=-1 + +## Allow SSL renegotiation +# jetty.sslContext.renegotiationAllowed=true +# jetty.sslContext.renegotiationLimit=5 diff --git a/kubernetes/sdc/components/sdc-fe/templates/configmap.yaml b/kubernetes/sdc/components/sdc-fe/templates/configmap.yaml index 1d4243e6fa..65c6acd731 100644 --- a/kubernetes/sdc/components/sdc-fe/templates/configmap.yaml +++ b/kubernetes/sdc/components/sdc-fe/templates/configmap.yaml @@ -18,7 +18,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "common.fullname" . }}-logging-configmap + name: {{ include "common.fullname" . }}-plugins-configmap namespace: {{ include "common.namespace" . }} labels: app: {{ include "common.name" . }} @@ -26,12 +26,21 @@ metadata: release: {{ include "common.release" . }} heritage: {{ .Release.Service }} data: -{{ tpl (.Files.Glob "resources/config/logging/*").AsConfig . | indent 2 }} +{{ tpl (.Files.Glob "resources/config/plugins/*").AsConfig . | indent 2 }} --- apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "common.fullname" . }}-plugins-configmap + name: {{ include "common.fullname" . }}-readiness-liveness-probe + namespace: {{ include "common.namespace" . }} + labels: {{- include "common.labels" . | nindent 4 }} +data: +{{ tpl (.Files.Glob "resources/config/readyProbe/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.release" . }}-catalog-fe-config namespace: {{ include "common.namespace" . }} labels: app: {{ include "common.name" . }} @@ -39,13 +48,56 @@ metadata: release: {{ include "common.release" . }} heritage: {{ .Release.Service }} data: -{{ tpl (.Files.Glob "resources/config/plugins/*").AsConfig . | indent 2 }} +{{ tpl (.Files.Glob "resources/config/catalogfe/*").AsConfig . | indent 2 }} --- apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "common.fullname" . }}-readiness-liveness-probe + name: {{ include "common.release" . }}-onboarding-fe-config namespace: {{ include "common.namespace" . }} - labels: {{- include "common.labels" . | nindent 4 }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ include "common.release" . }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/config/onboardingfe/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.release" . }}-startd-config + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ include "common.release" . }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/config/startdConfig/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.release" . }}-fe-etc-config + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ include "common.release" . }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/config/feEtcConfig/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.release" . }}-ready-probe-script + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ include "common.release" . }} + heritage: {{ .Release.Service }} data: {{ tpl (.Files.Glob "resources/config/readyProbe/*").AsConfig . | indent 2 }} diff --git a/kubernetes/sdc/components/sdc-fe/templates/deployment.yaml b/kubernetes/sdc/components/sdc-fe/templates/deployment.yaml index bfdf547ac1..b03dd2eabe 100644 --- a/kubernetes/sdc/components/sdc-fe/templates/deployment.yaml +++ b/kubernetes/sdc/components/sdc-fe/templates/deployment.yaml @@ -21,7 +21,16 @@ kind: Deployment metadata: {{- include "common.resourceMetadata" . | nindent 2 }} spec: selector: {{- include "common.selectors" . | nindent 4 }} + {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} + {{- end }} + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} + minReadySeconds: {{ .Values.minReadySeconds }} + strategy: + type: {{ .Values.updateStrategy.type }} + rollingUpdate: + maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }} + maxSurge: {{ .Values.updateStrategy.maxSurge }} template: metadata: {{- include "common.templateMetadata" . | nindent 6 }} spec: @@ -53,11 +62,21 @@ spec: - name: {{ include "common.name" . }} image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: + - /bin/sh + - -c + - | + JAVA_OPTIONS="$JAVA_OPTIONS -Dconfig.home=$JETTY_BASE/config -Dlog.home=$JETTY_BASE/logs -Dlogback.configurationFile=$JETTY_BASE/config/catalog-fe/logback.xml -Dconfiguration.yaml=$JETTY_BASE/config/catalog-fe/configuration.yaml -Donboarding_configuration.yaml=$JETTY_BASE/config/onboarding-fe/onboarding_configuration.yaml -Djavax.net.ssl.trustStore=$JETTY_BASE/etc/org.onap.sdc.trust.jks -Djavax.net.ssl.trustStorePassword=z+KEj;t+,KN^iimSiS89e#p0" + cd /app/jetty + sh -x /app/jetty/ready-probe.sh + java $JAVA_OPTIONS -jar "${JETTY_HOME}/start.jar" ports: {{ include "common.containerPorts" . | nindent 12 }} {{ if eq .Values.liveness.enabled true }} livenessProbe: - tcpSocket: - port: {{ .Values.service.internalPort }} + exec: + command: + - /bin/sh + - /opt/scripts/combined-liveness.sh initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.liveness.periodSeconds }} timeoutSeconds: {{ .Values.liveness.timeoutSeconds }} @@ -65,8 +84,10 @@ spec: failureThreshold: {{ .Values.liveness.failureThreshold }} {{ end }} readinessProbe: - tcpSocket: - port: {{ .Values.service.internalPort }} + exec: + command: + - /bin/sh + - /opt/scripts/combined-liveness.sh initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.readiness.periodSeconds }} timeoutSeconds: {{ .Values.readiness.timeoutSeconds }} @@ -91,16 +112,47 @@ spec: - name: JAVA_OPTIONS value: {{ .Values.config.javaOptions }} volumeMounts: - - name: sdc-environments - mountPath: /app/jetty/chef-solo/environments/ - name: logs mountPath: /var/log/onap - name: configs mountPath: /app/jetty/config/catalog-fe/plugins-configuration.yaml subPath: plugins-configuration.yaml - - name: logback - mountPath: /tmp/logback.xml + - name: {{ include "common.fullname" . }}-ready-probe-script + mountPath: /app/jetty/ready-probe.sh + subPath: ready-probe.sh + - name: {{ include "common.fullname" . }}-fe-etc-config + mountPath: /app/jetty/etc/rewrite-root-to-sdc1.xml + subPath: rewrite-root-to-sdc1.xml + - name: {{ include "common.fullname" . }}-startd-config + mountPath: /app/jetty/start.d/http.ini + subPath: http.ini + - name: {{ include "common.fullname" . }}-startd-config + mountPath: /app/jetty/start.d/https.ini + subPath: https.ini + - name: {{ include "common.fullname" . }}-startd-config + mountPath: /app/jetty/start.d/ssl.ini + subPath: ssl.ini + - name: {{ include "common.fullname" . }}-onboarding-fe-config + mountPath: /app/jetty/config/onboarding-fe/onboarding_configuration.yaml + subPath: onboarding_configuration.yaml + - name: {{ include "common.fullname" . }}-catalog-fe-config + mountPath: /app/jetty/config/catalog-fe/configuration.yaml + subPath: configuration.yaml + - name: {{ include "common.fullname" . }}-catalog-fe-config + mountPath: /app/jetty/config/catalog-fe/workspace-configuration.yaml + subPath: workspace-configuration.yaml + - name: {{ include "common.fullname" . }}-catalog-fe-config + mountPath: /app/jetty/config/catalog-fe/ecomp-error-configuration.yaml + subPath: ecomp-error-configuration.yaml + - name: {{ include "common.fullname" . }}-catalog-fe-config + mountPath: /app/jetty/config/catalog-fe/logback.xml subPath: logback.xml + - name: {{ include "common.fullname" . }}-catalog-fe-config + mountPath: /app/jetty/config/catalog-fe/rest-configuration-info.yaml + subPath: rest-configuration-info.yaml + - name: {{ include "common.fullname" . }}-readiness-liveness-probe + mountPath: /opt/scripts/combined-liveness.sh + subPath: combined-liveness.sh lifecycle: postStart: exec: @@ -114,9 +166,6 @@ spec: configMap: name : {{ include "common.fullname" . }}-plugins-configmap defaultMode: 0777 - - name: logback - configMap: - name : {{ include "common.fullname" . }}-logging-configmap - name: sdc-environments {{- if .Values.global.aafEnabled }} emptyDir: { medium: "Memory" } @@ -127,4 +176,28 @@ spec: defaultMode: 0755 - name: logs emptyDir: {} + - name: {{ include "common.fullname" . }}-ready-probe-script + configMap: + name: {{ include "common.release" . }}-ready-probe-script + defaultMode: 0755 + - name: {{ include "common.fullname" . }}-fe-etc-config + configMap: + name: {{ include "common.release" . }}-fe-etc-config + defaultMode: 0644 + - name: {{ include "common.fullname" . }}-startd-config + configMap: + name: {{ include "common.release" . }}-startd-config + defaultMode: 0755 + - name: {{ include "common.fullname" . }}-onboarding-fe-config + configMap: + name: {{ include "common.release" . }}-onboarding-fe-config + defaultMode: 0755 + - name: {{ include "common.fullname" . }}-catalog-fe-config + configMap: + name: {{ include "common.release" . }}-catalog-fe-config + defaultMode: 0755 + - name: {{ include "common.fullname" . }}-readiness-liveness-probe + configMap: + name: {{ include "common.fullname" . }}-readiness-liveness-probe + defaultMode: 0755 {{- include "common.imagePullSecrets" . | nindent 6 }} diff --git a/kubernetes/sdc/components/sdc-fe/values.yaml b/kubernetes/sdc/components/sdc-fe/values.yaml index 72c048cd48..e9cac845b3 100644 --- a/kubernetes/sdc/components/sdc-fe/values.yaml +++ b/kubernetes/sdc/components/sdc-fe/values.yaml @@ -23,7 +23,7 @@ global: # Application configuration defaults. ################################################################# # application image -image: onap/sdc-frontend:1.13.9 +image: onap/sdc-frontend:1.14.1 pullPolicy: Always config: @@ -164,3 +164,37 @@ updateStrategy: maxUnavailable: 0 # The number of pods that can be created above the desired amount of pods during an update maxSurge: 1 + +# Script parameters +be_http_port: 8080 + +fe_conf: + http_port: 8181 + https_port: 9443 + domain_name: "sdc" + basic_auth: "true" + user_name: "testName" + user_pass: "testPass" + http_port_pro: 8181 + +facade_vip: +facade_port: +user_name: "testName" +user_pass: "testPass" +access_restriction_key: +permittedAncestors: +disableHttp: false + +onboarding_be: + https_port: 8445 + http_port: 8081 + +http_option : http_option +https_port: 8443 +keystore_path: +truststore_path: +keystore_password: +truststore_password: + +logback: + rootLogLevel: INFO diff --git a/kubernetes/sdc/components/sdc-helm-validator/values.yaml b/kubernetes/sdc/components/sdc-helm-validator/values.yaml index 3470770ac6..ec947dc2d5 100644 --- a/kubernetes/sdc/components/sdc-helm-validator/values.yaml +++ b/kubernetes/sdc/components/sdc-helm-validator/values.yaml @@ -59,10 +59,10 @@ resources: small: limits: cpu: "1" - memory: "500Mi" + memory: "1Gi" requests: cpu: "0.5" - memory: "500Mi" + memory: "1Gi" large: limits: cpu: "2" diff --git a/kubernetes/sdc/components/sdc-onboarding-be/resources/config/logging/logback.xml b/kubernetes/sdc/components/sdc-onboarding-be/resources/config/logging/logback.xml index dad7ce5e85..30409b877f 100644 --- a/kubernetes/sdc/components/sdc-onboarding-be/resources/config/logging/logback.xml +++ b/kubernetes/sdc/components/sdc-onboarding-be/resources/config/logging/logback.xml @@ -206,8 +206,8 @@ <queueSize>${queueSize}</queueSize> <appender-ref ref="AUDIT_ROLLING"/> </appender> - <root level="INFO"> - <appender-ref ref="ASYNC_ERROR"/> + <root level="{{ .Values.logback.rootLogLevel }}"> + <!--<appender-ref ref="ASYNC_ERROR"/> <appender-ref ref="ASYNC_DEBUG"/> <appender-ref ref="ASYNC_AUDIT"/> <appender-ref ref="ASYNC_TRANSACTION"/> @@ -215,7 +215,7 @@ <then> <appender-ref ref="ALL_ROLLING"/> </then> - </if> + </if>--> <appender-ref ref="STDOUT"/> <appender-ref ref="STDERR"/> </root> diff --git a/kubernetes/sdc/components/sdc-onboarding-be/values.yaml b/kubernetes/sdc/components/sdc-onboarding-be/values.yaml index e2aeccbf27..566267aa9d 100644 --- a/kubernetes/sdc/components/sdc-onboarding-be/values.yaml +++ b/kubernetes/sdc/components/sdc-onboarding-be/values.yaml @@ -35,8 +35,8 @@ global: # Application configuration defaults. ################################################################# # application image -image: onap/sdc-onboard-backend:1.13.9 -onboardingInitImage: onap/sdc-onboard-cassandra-init:1.13.9 +image: onap/sdc-onboard-backend:1.14.1 +onboardingInitImage: onap/sdc-onboard-cassandra-init:1.14.1 pullPolicy: Always # flag to enable debugging - application support required @@ -131,8 +131,8 @@ flavor: small resources: small: limits: - cpu: "1" - memory: "1.5Gi" + cpu: "2" + memory: "2Gi" requests: cpu: "0.5" memory: "1.5Gi" @@ -236,6 +236,9 @@ metrics: basicAuth: enabled: false +logback: + rootLogLevel: INFO + # Annotations to control the execution and deletion of the job # Can be used to delete a job before an Upgrade # diff --git a/kubernetes/sdc/components/sdc-wfd-be/values.yaml b/kubernetes/sdc/components/sdc-wfd-be/values.yaml index 5e0b7623ae..6097d0bb3f 100644 --- a/kubernetes/sdc/components/sdc-wfd-be/values.yaml +++ b/kubernetes/sdc/components/sdc-wfd-be/values.yaml @@ -131,7 +131,7 @@ resources: small: limits: cpu: "1" - memory: "1Gi" + memory: "1.5Gi" requests: cpu: "0.5" memory: "1Gi" diff --git a/kubernetes/sdc/values.yaml b/kubernetes/sdc/values.yaml index fb6da37cec..88cd12654a 100644 --- a/kubernetes/sdc/values.yaml +++ b/kubernetes/sdc/values.yaml @@ -29,6 +29,9 @@ global: #This flag allows SDC to instantiate its own cluster, serviceName #should be "sdc-cs" if this flag is enabled localCluster: false + #Cassandra login details + username: cassandra + password: cassandra #The cassandra service name to connect to (default: shared cassandra service) #in case of using k8ssandra-operator in the common cassandra installation #the service name is: @@ -38,13 +41,14 @@ global: #Shared cassandra cluster replicaCount, should be changed if localCluster is enabled #to match with its own cluster replica #see "cassandra: replicaCount" in file sdc-cs/values.yaml - replicaCount: 3 dbCache: true readConsistencyLevel: ONE writeConsistencyLevel: ALL clusterName: cassandra #datacenter name (use "dc1" in case of k8ssandra-operator, otherwise "Pod") + replicaCount: 3 dataCenter: dc1 + rc1: 1 #cqlVersion for cassandra 3.11.* must be "3.4.4" and cassandra 4.0.* must be "3.4.5" #and cassandra 4.1.* must be "3.4.6" cqlVersion: "3.4.6" |