diff options
author | 2025-01-29 11:43:27 +0530 | |
---|---|---|
committer | 2025-01-29 11:46:54 +0000 | |
commit | 92c86bb2b390a9d74f84d53b3edeccd239f3f0f5 (patch) | |
tree | 25f54a34fcc7098a83179acc75c3fdf5e3869662 /catalog-fe/sdc-frontend/artifacts | |
parent | bbcddaafb6667c51af97a0d19d43b91f01b4025c (diff) |
Chef removal changes from catalog-fe
- Removed chef from catalog-fe module with kubernetes resources.
Issue-ID: SDC-4699
Change-Id: If599ea2136bb8dd98a816a9961f25ef0a4c39e25
Signed-off-by: Anamika Khantwal <anamika.khantwal@accenture.com>
Diffstat (limited to 'catalog-fe/sdc-frontend/artifacts')
20 files changed, 1206 insertions, 0 deletions
diff --git a/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/configuration.yaml b/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/configuration.yaml new file mode 100644 index 0000000000..8a0f332c94 --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/configuration.yaml @@ -0,0 +1,115 @@ +# Needed for logging purposes. To be populated by DevOps - currently dummy +feFqdn: sdc-FE + +# catalog backend hostname +beHost: sdc-BE + +# catalog backend http port +beHttpPort: 8080 + +# catalog backend http context +beContext: /sdc2/rest/v1/catalog/upload/resources + +# catalog backend protocol +beProtocol: http + +# catalog backend ssl port +beSslPort: 8443 + +# 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: + 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: true + userName: testName + userPass: testPass + +onboarding: + hostFe: sdc-FE + protocolFe: http + portFe: 8181 + healthCheckUriFe: "/onboarding/v1.0/healthcheck" + hostBe: sdc-onboard-BE + protocolBe: http + portBe: 8081 + +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: + + +# 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: diff --git a/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/ecomp-error-configuration.yaml b/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/ecomp-error-configuration.yaml new file mode 100644 index 0000000000..8982b2424f --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/ecomp-error-configuration.yaml @@ -0,0 +1,48 @@ +########################################### +# 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 + }
\ No newline at end of file diff --git a/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/key.properties b/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/key.properties new file mode 100644 index 0000000000..0315075e53 --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/key.properties @@ -0,0 +1,41 @@ +### +# ============LICENSE_START========================================== +# ONAP Portal SDK +# =================================================================== +# Copyright © 2017 AT&T Intellectual Property. All rights reserved. +# =================================================================== +# +# Unless otherwise specified, all software contained herein is licensed +# under the Apache License, Version 2.0 (the “License”); +# you may not use this software 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. +# +# Unless otherwise specified, all documentation contained herein is licensed +# under the Creative Commons License, Attribution 4.0 Intl. (the “License”); +# you may not use this documentation except in compliance with the License. +# You may obtain a copy of the License at +# +# https://creativecommons.org/licenses/by/4.0/ +# +# Unless required by applicable law or agreed to in writing, documentation +# 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. +# +# ============LICENSE_END============================================ +# +# +### + +# Properties read by the ECOMP Framework library (epsdk-fw) + +cipher.enc.key = AGLDdG4D04BKm2IxIWEr8o==
\ No newline at end of file diff --git a/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/logback.xml b/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/logback.xml new file mode 100644 index 0000000000..7249e84b2a --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/logback.xml @@ -0,0 +1,283 @@ +<?xml version="1.0" encoding="UTF-8"?> +<configuration scan="true" scanPeriod="5 seconds"> + + <property scope="system" name="ECOMP-component-name" value="SDC" /> + <property scope="system" name="ECOMP-subcomponent-name" value="SDC-FE" /> + <property file="${config.home}/catalog-fe/configuration.yaml" /> + <property scope="context" name="enable-all-log" value="false" /> + + <!-- value used by pattern field list (| - is inter-field separator, || - unavailable or not applicable field value) (m - mandatory, o- optional)--> + <!--timestamp(m)| requestID(m)| serviceInstanceID(o)| threadID(m)| physicalServerName(o)| serviceName(m)| userID(m)| logLevel(m)| severity(o)| serverIpAddress(m)| serverName(m)| clientIpAddress(o)| className(m)| timer(o)| detailedMessage(o)--> + <property name="default-log-pattern" + value="%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}|%X{uuid}|%X{serviceInstanceID}|%thread||${ECOMP-subcomponent-name}|%X{userId}|%level|%X{alarmSeverity}|%X{localAddr}|${feFqdn}|%X{remoteAddr}|%logger{35}|%X{timer}|ActivityType=<%M>, Desc=<%msg>%n" /> + + <!-- All log --> + <if condition='property("enable-all-log").equalsIgnoreCase("true")'> + <then> + <appender name="ALL_ROLLING" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/all.log + </file> + + <rollingPolicy + class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/all.log.%i + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>10</maxIndex> + </rollingPolicy> + + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>20MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>${default-log-pattern}</pattern> + </encoder> + </appender> + + <appender name="ASYNC_ALL" class="ch.qos.logback.classic.AsyncAppender"> + <appender-ref ref="ALL_ROLLING" /> + </appender> + </then> + </if> + + <!-- Error log --> + <appender name="ERROR_ROLLING" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/error.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.FixedWindowRollingPolicy"> + <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/error.log.%i + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>10</maxIndex> + </rollingPolicy> + + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>20MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>${default-log-pattern}</pattern> + </encoder> + </appender> + + <appender name="ERROR_STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + + <!-- 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> + + <encoder> + <pattern>${default-log-pattern}</pattern> + </encoder> + </appender> + + <!-- Debug log --> + <appender name="DEBUG_ROLLING" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug.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> <!-- defaults to type ch.qos.logback.classic.boolex.JaninoEventEvaluator --> + <expression>return level <= DEBUG;</expression> + </evaluator> + <OnMismatch>DENY</OnMismatch> + <OnMatch>NEUTRAL</OnMatch> + </filter> + + <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> + <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/debug.log.%i + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>10</maxIndex> + </rollingPolicy> + + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>20MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>${default-log-pattern}</pattern> + </encoder> + </appender> + + <appender name="DEBUG_STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + + <!-- 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> <!-- defaults to type ch.qos.logback.classic.boolex.JaninoEventEvaluator --> + <expression>return level <= DEBUG;</expression> + </evaluator> + <OnMismatch>DENY</OnMismatch> + <OnMatch>NEUTRAL</OnMatch> + </filter> + + <encoder> + <pattern>${default-log-pattern}</pattern> + </encoder> + </appender> + + <!-- Audit log --> + <appender name="AUDIT_ROLLING" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + + <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/audit.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.FixedWindowRollingPolicy"> + <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/audit.log.%i + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>10</maxIndex> + </rollingPolicy> + + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>20MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>${default-log-pattern}</pattern> + </encoder> + </appender> + + <!-- SdncTransaction log --> + <appender name="TRANSACTION_ROLLING" + class="ch.qos.logback.core.rolling.RollingFileAppender"> + + <file>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/transaction.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.FixedWindowRollingPolicy"> + <fileNamePattern>${log.home}/${ECOMP-component-name}/${ECOMP-subcomponent-name}/transaction.log.%i + </fileNamePattern> + <minIndex>1</minIndex> + <maxIndex>10</maxIndex> + </rollingPolicy> + + <triggeringPolicy + class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> + <maxFileSize>20MB</maxFileSize> + </triggeringPolicy> + <encoder> + <pattern>${default-log-pattern}</pattern> + </encoder> + </appender> + + <!-- Asynchronicity Configurations --> + <appender name="ASYNC_DEBUG" class="ch.qos.logback.classic.AsyncAppender"> + <appender-ref ref="DEBUG_ROLLING" /> + </appender> + + <appender name="ASYNC_TRANSACTION" class="ch.qos.logback.classic.AsyncAppender"> + <appender-ref ref="TRANSACTION_ROLLING" /> + </appender> + + <appender name="ASYNC_ERROR" class="ch.qos.logback.classic.AsyncAppender"> + <appender-ref ref="ERROR_ROLLING" /> + </appender> + + + <root level="INFO"> + <appender-ref ref="ASYNC_ERROR" /> + <appender-ref ref="ASYNC_DEBUG" /> + <appender-ref ref="AUDIT_ROLLING" /> + <appender-ref ref="ASYNC_TRANSACTION" /> + <if condition='property("enable-all-log").equalsIgnoreCase("true")'> + <then> + <appender-ref ref="ALL_ROLLING" /> + </then> + </if> + </root> + + <logger name="org.openecomp.sdc" level="INFO" /> +</configuration> + diff --git a/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/plugins-configuration.yaml b/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/plugins-configuration.yaml new file mode 100644 index 0000000000..3dfa143b4f --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/plugins-configuration.yaml @@ -0,0 +1,32 @@ +pluginsList: + - pluginId: POLICY + pluginDiscoveryUrl: http://192.168.86.21:9090/policy/ + pluginSourceUrl: http://192.168.86.21:9090/policy/ + pluginStateUrl: "policy" + pluginDisplayOptions: + tab: + displayName: "POLICY" + displayRoles: ["DESIGNER"] + - pluginId: POLICY_LIST + pluginDiscoveryUrl: http://192.168.86.21:8095/artifact + pluginSourceUrl: http://192.168.86.21:8095/artifact + pluginStateUrl: "policy_list" + pluginDisplayOptions: + context: + displayName: "Apex policy" + displayContext: ["SERVICE"] + displayRoles: ["DESIGNER"] + - pluginId: WORKFLOW + pluginDiscoveryUrl: http://192.168.86.21:8184/workflows + pluginSourceUrl: http://192.168.86.21:8184/workflows + pluginStateUrl: "workflowDesigner" + pluginDisplayOptions: + tab: + displayName: "WORKFLOW" + displayRoles: ["DESIGNER", "TESTER"] + context: + displayName: "Workflow Designer" + displayContext: ["VF"] + displayRoles: ["DESIGNER", "TESTER"] + +connectionTimeout: 1000 diff --git a/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/rest-configuration.yaml b/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/rest-configuration.yaml new file mode 100644 index 0000000000..ecedafea56 --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/rest-configuration.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/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/workspace-configuration.yaml b/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/workspace-configuration.yaml new file mode 100644 index 0000000000..f05b28c58e --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/files/catalog-fe/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/catalog-fe/sdc-frontend/artifacts/files/fe_etc/rewrite-root-to-sdc1.xml b/catalog-fe/sdc-frontend/artifacts/files/fe_etc/rewrite-root-to-sdc1.xml new file mode 100644 index 0000000000..e0862a5bfd --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/files/fe_etc/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/catalog-fe/sdc-frontend/artifacts/files/logging/logback.xml b/catalog-fe/sdc-frontend/artifacts/files/logging/logback.xml new file mode 100644 index 0000000000..5ee7e23960 --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/files/logging/logback.xml @@ -0,0 +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> diff --git a/catalog-fe/sdc-frontend/artifacts/files/onboardingfe/onboarding_configuration.yaml b/catalog-fe/sdc-frontend/artifacts/files/onboardingfe/onboarding_configuration.yaml new file mode 100644 index 0000000000..b789e0b559 --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/files/onboardingfe/onboarding_configuration.yaml @@ -0,0 +1,6 @@ +notifications: + pollingIntervalMsec: 2000 + selectionSize: 100 + beHost: sdc-onboard-BE + beHttpPort: 8081 +
\ No newline at end of file diff --git a/catalog-fe/sdc-frontend/artifacts/files/org.onap.sdc.p12 b/catalog-fe/sdc-frontend/artifacts/files/org.onap.sdc.p12 Binary files differnew file mode 100644 index 0000000000..446856071b --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/files/org.onap.sdc.p12 diff --git a/catalog-fe/sdc-frontend/artifacts/files/org.onap.sdc.trust.jks b/catalog-fe/sdc-frontend/artifacts/files/org.onap.sdc.trust.jks Binary files differnew file mode 100644 index 0000000000..e6686cc08c --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/files/org.onap.sdc.trust.jks diff --git a/catalog-fe/sdc-frontend/artifacts/files/startdConfig/http.ini b/catalog-fe/sdc-frontend/artifacts/files/startdConfig/http.ini new file mode 100644 index 0000000000..5ee6ea8127 --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/files/startdConfig/http.ini @@ -0,0 +1,29 @@ +# --------------------------------------- +# Module: http +--module=http + +### HTTP Connector Configuration + +## Connector host/address to bind to +# jetty.http.host=0.0.0.0 + +## Connector port to listen on +jetty.http.port=8181 + +## 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/catalog-fe/sdc-frontend/artifacts/files/startdConfig/https.ini b/catalog-fe/sdc-frontend/artifacts/files/startdConfig/https.ini new file mode 100644 index 0000000000..b4505d4d86 --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/files/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=9443 + +## 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/catalog-fe/sdc-frontend/artifacts/files/startdConfig/ssl.ini b/catalog-fe/sdc-frontend/artifacts/files/startdConfig/ssl.ini new file mode 100644 index 0000000000..d9077201db --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/files/startdConfig/ssl.ini @@ -0,0 +1,84 @@ +# --------------------------------------- +# 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=9443 + +## 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) + +## Truststore file path (relative to $jetty.base) + +## Keystore password + +## Keystore type and provider +# jetty.sslContext.keyStoreType=JKS +# jetty.sslContext.keyStoreProvider= + +## KeyManager password + +## Truststore password +# tpend +# kpend + +## Truststore type and provider +# jetty.sslContext.trustStoreType=JKS +# jetty.sslContext.trustStoreProvider= + +## whether client certificate authentication is required +jetty.sslContext.needClientAuth=false + +## Whether client certificate authentication is desired +# jetty.sslContext.wantClientAuth=false + +## Whether cipher order is significant (since java 8 only) +# jetty.sslContext.useCipherSuitesOrder=true + +## To configure Includes / Excludes for Cipher Suites or Protocols see tweak-ssl.xml example at +## https://www.eclipse.org/jetty/documentation/current/configuring-ssl.html#configuring-sslcontextfactory-cipherSuites + +## 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/catalog-fe/sdc-frontend/artifacts/scripts/cleanup_jettydir.sh b/catalog-fe/sdc-frontend/artifacts/scripts/cleanup_jettydir.sh new file mode 100644 index 0000000000..7324de44ad --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/scripts/cleanup_jettydir.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +#Create temp directory +mkdir -p "$JETTY_BASE/temp" +chown "$JETTY_USER:$JETTY_GROUP" "$JETTY_BASE/temp" +chmod 0755 "$JETTY_BASE/temp" + +# Create config directory +mkdir -p "$JETTY_BASE/config" +chown "$JETTY_USER:$JETTY_GROUP" "$JETTY_BASE/config" +chmod 0755 "$JETTY_BASE/config" + +# Create onboarding-be directory +mkdir -p "$JETTY_BASE/config/onboarding-fe" +chown -R "$JETTY_USER:$JETTY_GROUP" "$JETTY_BASE/config/onboarding-fe" +chmod -R 0755 "$JETTY_BASE/config/onboarding-fe" + +# Create onboarding-be directory +mkdir -p "$JETTY_BASE/config/catalog-fe" +chown -R "$JETTY_USER:$JETTY_GROUP" "$JETTY_BASE/config/catalog-fe" +chmod -R 0755 "$JETTY_BASE/config/catalog-fe" diff --git a/catalog-fe/sdc-frontend/artifacts/scripts/env_variables.sh b/catalog-fe/sdc-frontend/artifacts/scripts/env_variables.sh new file mode 100644 index 0000000000..283bc5289b --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/scripts/env_variables.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +# Environment variables +export behttpport=8080 +export permittedAncestors= +export fe_conf_https_port=9443 +export fe_conf_onboard_http_port=8181 +export onboarding_be_http_port=8081 +export onboarding_be_https_port=8445 +export conf_http_port=8181 +export conf_https_port=9443 +export keystore_path= +export keystore_password= +export truststore_path= +export truststore_password= +export CATALOG_FACADE_HOST= +export CATALOG_FACADE_PORT= +export BASIC_AUTH_USERNAME=testName +export BASIC_AUTH_PASSWORD=testPass +export SECURITY_KEY= +########### Apply env variables to the existing files ########### + +# Apply environment variables to .yaml files in /app/jetty/config directory +for file in /app/jetty/config/*/*.yaml; do + envsubst < "$file" > "$file.tmp" && mv -f "$file.tmp" "$file" +done diff --git a/catalog-fe/sdc-frontend/artifacts/scripts/ready-probe.sh b/catalog-fe/sdc-frontend/artifacts/scripts/ready-probe.sh new file mode 100644 index 0000000000..65434716a1 --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/scripts/ready-probe.sh @@ -0,0 +1,8 @@ +#!/bin/sh +health_check_http_code=$(curl -k --max-time 5 -o /dev/null -w '%{http_code}' -X GET --header "Accept: application/json" "http://127.0.0.1:8181//sdc1/rest/healthCheck") +if [ "$health_check_http_code" -eq 200 ]; then + exit 0 +else + echo "Health check http status: $health_check_http_code" + exit 1 +fi
\ No newline at end of file diff --git a/catalog-fe/sdc-frontend/artifacts/scripts/set-http-module.sh b/catalog-fe/sdc-frontend/artifacts/scripts/set-http-module.sh new file mode 100644 index 0000000000..414bcab6e7 --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/scripts/set-http-module.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# Define environment variables +export JETTY_HOME="/app/jetty/" # Replace with your Jetty home directory +export JETTY_BASE="/app/jetty/" # Replace with your Jetty base directory + +# Navigate to the Jetty base directory +cd "$JETTY_BASE" + +# Run the Jetty start-up jar with deploy module added +java -jar $JETTY_HOME/start.jar --add-to-start=deploy + +# Create startd configuration and add http, https, setuid modules +java -jar $JETTY_HOME/start.jar --create-startd --add-to-start=http,https,setuid,rewrite diff --git a/catalog-fe/sdc-frontend/artifacts/scripts/setup-keystore-truststore.sh b/catalog-fe/sdc-frontend/artifacts/scripts/setup-keystore-truststore.sh new file mode 100644 index 0000000000..692fdbd11e --- /dev/null +++ b/catalog-fe/sdc-frontend/artifacts/scripts/setup-keystore-truststore.sh @@ -0,0 +1,10 @@ +#!/bin/sh +if [ -n "${FE_TLS_CERT}" ]; then + openssl pkcs12 -inkey ${FE_TLS_KEY} -in ${FE_TLS_CERT} -export -out /tmp/keystore.pkcs12 -passin pass:${FE_TLS_PASSWORD} -passout pass:${FE_TLS_PASSWORD} + keytool -importkeystore -srcstoretype PKCS12 -srckeystore /tmp/keystore.pkcs12 -srcstorepass ${FE_TLS_PASSWORD} -destkeystore ${JETTY_BASE}/${FE_KEYSTORE_PATH} -deststorepass ${FE_KEYSTORE_PASSWORD} -noprompt +fi + +if [ -n "${FE_CA_CERT}" ]; then + keytool -delete -alias sdc-be -storepass ${FE_TRUSTSTORE_PASSWORD} -keystore ${JETTY_BASE}/${FE_TRUSTSTORE_PATH} || true + keytool -import -alias sdc-be -file ${FE_CA_CERT} -storetype JKS -keystore ${JETTY_BASE}/${FE_TRUSTSTORE_PATH} -storepass ${FE_TRUSTSTORE_PASSWORD} -noprompt +fi |