From c8f632c052751e4ec61c6f9841010d1a8b1e869d Mon Sep 17 00:00:00 2001 From: mayank Date: Sun, 21 Jan 2018 10:08:25 +0000 Subject: portal config seg Issue-ID: OOM-557 Change-Id: I79f73ce84102caae5fdd4570cf1acb26cb3eeb4c Signed-off-by: mayank --- .../resources/config/log/filebeat/filebeat.yml | 41 +++ .../config/log/portal/onapportal/logback.xml | 303 +++++++++++++++++ .../config/log/portal/onapportalsdk/logback.xml | 371 +++++++++++++++++++++ .../resources/config/mariadb/oom_updates.sql | 8 + .../webapps/etc/ONAPPORTAL/fusion.properties | 46 +++ .../etc/ONAPPORTAL/openid-connect.properties | 3 + .../webapps/etc/ONAPPORTAL/portal.properties | 24 ++ .../webapps/etc/ONAPPORTAL/system.properties | 100 ++++++ .../webapps/etc/ONAPPORTALSDK/fusion.properties | 35 ++ .../webapps/etc/ONAPPORTALSDK/portal.properties | 45 +++ .../webapps/etc/ONAPPORTALSDK/system.properties | 64 ++++ .../etc/ONAPWIDGETMS/application.properties | 35 ++ .../portal/templates/portal-apps-configmap.yaml | 35 ++ .../portal/templates/portal-apps-deployment.yaml | 77 +++-- .../portal/templates/portal-logs-configmap.yaml | 26 ++ .../templates/portal-widgets-deployment.yaml | 7 +- kubernetes/portal/values.yaml | 1 + 17 files changed, 1182 insertions(+), 39 deletions(-) create mode 100644 kubernetes/portal/resources/config/log/filebeat/filebeat.yml create mode 100644 kubernetes/portal/resources/config/log/portal/onapportal/logback.xml create mode 100644 kubernetes/portal/resources/config/log/portal/onapportalsdk/logback.xml create mode 100644 kubernetes/portal/resources/config/mariadb/oom_updates.sql create mode 100755 kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/fusion.properties create mode 100755 kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/openid-connect.properties create mode 100755 kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/portal.properties create mode 100755 kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/system.properties create mode 100644 kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTALSDK/fusion.properties create mode 100755 kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTALSDK/portal.properties create mode 100755 kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTALSDK/system.properties create mode 100644 kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPWIDGETMS/application.properties create mode 100644 kubernetes/portal/templates/portal-apps-configmap.yaml create mode 100644 kubernetes/portal/templates/portal-logs-configmap.yaml (limited to 'kubernetes/portal') diff --git a/kubernetes/portal/resources/config/log/filebeat/filebeat.yml b/kubernetes/portal/resources/config/log/filebeat/filebeat.yml new file mode 100644 index 0000000000..f316b866af --- /dev/null +++ b/kubernetes/portal/resources/config/log/filebeat/filebeat.yml @@ -0,0 +1,41 @@ +filebeat.prospectors: +#it is mandatory, in our case it's log +- input_type: log + #This is the canolical path as mentioned in logback.xml, *.* means it will monitor all files in the directory. + paths: + - /var/log/onap/*/*/*/*.log + - /var/log/onap/*/*/*.log + - /var/log/onap/*/*.log + #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive + ignore_older: 48h + # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit + clean_inactive: 96h + + +# Name of the registry file. If a relative path is used, it is considered relative to the +# data path. Else full qualified file name. +#filebeat.registry_file: ${path.data}/registry + + +output.logstash: + #List of logstash server ip addresses with port number. + #But, in our case, this will be the loadbalancer IP address. + #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately. + hosts: ["logstash.onap-log:5044"] + #If enable will do load balancing among availabe Logstash, automatically. + loadbalance: true + + #The list of root certificates for server verifications. + #If certificate_authorities is empty or not set, the trusted + #certificate authorities of the host system are used. + #ssl.certificate_authorities: $ssl.certificate_authorities + + #The path to the certificate for SSL client authentication. If the certificate is not specified, + #client authentication is not available. + #ssl.certificate: $ssl.certificate + + #The client certificate key used for client authentication. + #ssl.key: $ssl.key + + #The passphrase used to decrypt an encrypted key stored in the configured key file + #ssl.key_passphrase: $ssl.key_passphrase diff --git a/kubernetes/portal/resources/config/log/portal/onapportal/logback.xml b/kubernetes/portal/resources/config/log/portal/onapportal/logback.xml new file mode 100644 index 0000000000..be55dc9cff --- /dev/null +++ b/kubernetes/portal/resources/config/log/portal/onapportal/logback.xml @@ -0,0 +1,303 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${applicationLoggerPattern} + + + + + + + + + + + + ${logDirectory}/${generalLogName}.log + + + ${logDirectory}/${generalLogName}.log.%d{yyyy-MM-dd}.zip + + 30 + + + ${applicationLoggerPattern} + + + + + + 256 + + true + + + + + + + + + + + + + + + + + + + ${logDirectory}/${auditLogName}.log + + + ${logDirectory}/${auditLogName}.log.%d{yyyy-MM-dd}.zip + + 30 + + + ${auditLoggerPattern} + + + + 256 + + + + + ${logDirectory}/${metricsLogName}.log + + + ${logDirectory}/${metricsLogName}.log.%d{yyyy-MM-dd}.zip + + 30 + + + ${metricsLoggerPattern} + + + + + + 256 + + + + + ${logDirectory}/${errorLogName}.log + + + ${logDirectory}/${errorLogName}.log.%d{yyyy-MM-dd}.zip + + 30 + + + ${errorLoggerPattern} + + + + + 256 + + + + + ${debugLogDirectory}/${debugLogName}.log + + + ${logDirectory}/${debugLogName}.log.%d{yyyy-MM-dd}.zip + + 30 + + + ${defaultLoggerPattern} + + + + + 256 + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kubernetes/portal/resources/config/log/portal/onapportalsdk/logback.xml b/kubernetes/portal/resources/config/log/portal/onapportalsdk/logback.xml new file mode 100644 index 0000000000..32a790c6a3 --- /dev/null +++ b/kubernetes/portal/resources/config/log/portal/onapportalsdk/logback.xml @@ -0,0 +1,371 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${defaultLoggerPattern} + + + + + + + + + + + + ${logDirectory}/${generalLogName}.log + + + ${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.log.zip + + + 30 + 3GB + + + + ${applicationLoggerPattern} + + + + + + 256 + + true + + + + + + + + + + + + + + + + + + + ${logDirectory}/${auditLogName}.log + + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.log.zip + + + 30 + 3GB + + + + ${auditLoggerPattern} + + + + 256 + + + + + ${logDirectory}/${metricsLogName}.log + + + ${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip + + + 30 + 3GB + + + + ${metricsLoggerPattern} + + + + + + 256 + + + + + ${logDirectory}/${errorLogName}.log + + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.log.zip + + + 30 + 3GB + + + + ${errorLoggerPattern} + + + + + 256 + + + + + ${debugLogDirectory}/${debugLogName}.log + + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip + + + 30 + 3GB + + + + ${defaultLoggerPattern} + + + + + 256 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kubernetes/portal/resources/config/mariadb/oom_updates.sql b/kubernetes/portal/resources/config/mariadb/oom_updates.sql new file mode 100644 index 0000000000..781b04626c --- /dev/null +++ b/kubernetes/portal/resources/config/mariadb/oom_updates.sql @@ -0,0 +1,8 @@ +USE portal; +/* +Any updates required by OOM to the portaldb are made here. +1. split up SDC-FE and SDC-BE. Originally both FE and BE point to the same IP +while the OOM K8s version has these service split up. +*/ +UPDATE fn_app SET app_rest_endpoint = 'http://sdc.api.be.simpledemo.onap.org:8080/api/v2' where app_name = 'SDC'; +UPDATE fn_app SET app_url = 'http://cli.api.simpledemo.onap.org:8080', app_type = 1 where app_name='CLI'; diff --git a/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/fusion.properties b/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/fusion.properties new file mode 100755 index 0000000000..876c5c7b9a --- /dev/null +++ b/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/fusion.properties @@ -0,0 +1,46 @@ +# domain settings +#domain_class_location = + +# validator settings +#default_error_message = Default error message + +login_url_no_ret_val = http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm + +user_attribute_name = user + +# User Session settings +roles_attribute_name = roles +role_functions_attribute_name = role_functions + +# menu settings +menu_query_name = menuData +application_menu_set_name = APP +application_menu_attribute_name = applicationMenuData +business_direct_menu_set_name = BD +business_direct_menu_attribute_name = businessDirectMenuData + +# ECOMP settings +ecomp_app_id = 1 +# Role settings +sys_admin_role_id = 1 +account_admin_role_id = 999 +restricted_app_role_id = 900 + +# Home Page index html +home_page = /index.html + +authentication_mechanism =DBAUTH + +login.error.hrid.empty = Login failed, please contact system administrator. +login.error.hrid.not-found = User not found, please contact system administrator. +login.error.user.inactive = Account is disabled, please contact system administrator. + +# +# Number of seconds to poll health (database operational, etc.) +# +health_poll_interval_seconds = 5 +# +# If a component is down a log entry will be written that triggers an alert. This parameter specifies how often this alert should be triggered +# if the component remains down. For example a value of 30, would translate to 30 * 60 seconds = 1800 seconds, or every 30 minutes +# +health_fail_alert_every_x_intervals = 30 diff --git a/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/openid-connect.properties b/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/openid-connect.properties new file mode 100755 index 0000000000..2a33551933 --- /dev/null +++ b/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/openid-connect.properties @@ -0,0 +1,3 @@ +authentication_server_url = http://portal.api.simpledemo.onap.org:8383/openid-connect-server-webapp/ +ecomp_openid_connect_client = http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/openid_connect_login +ecomp_redirect_uri = http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/welcome.htm diff --git a/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/portal.properties b/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/portal.properties new file mode 100755 index 0000000000..4871b42288 --- /dev/null +++ b/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/portal.properties @@ -0,0 +1,24 @@ +# Not used by portal +portal.api.impl.class = org.onap.portalsdk.core.onboarding.client.OnBoardingApiServiceImpl.not.used.by.portal +portal.api.prefix = /api +max.idle.time = 5 +user.attribute.name = user_attribute + +# for single sign on +ecomp_redirect_url = http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm + +# URL of the ECOMP Portal REST API +ecomp_rest_url = http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/auxapi + +ueb_listeners_enable = true + +ueb_app_key = 7GkVcrO6sIDb3ngW +ueb_app_secret = uCYgKjWKK5IxPGNNZzYSSWo9 +ueb_app_mailbox_name = ECOMP-PORTAL-INBOX + +ueb_url_list = dmaap.onap-message-router +ecomp_portal_inbox_name = ECOMP-PORTAL-INBOX + +# Consumer group name for UEB topic. +# Use the special tag to generate a unique one for each sdk-app server. +ueb_app_consumer_group_name = {UUID} diff --git a/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/system.properties b/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/system.properties new file mode 100755 index 0000000000..9085cee47f --- /dev/null +++ b/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/system.properties @@ -0,0 +1,100 @@ +#mysql +db.driver = org.mariadb.jdbc.Driver +db.connectionURL = jdbc:mariadb:failover://portaldb.onap-portal:3306/portal +db.userName =root +db.password =Aa123456 +db.hib.dialect = org.hibernate.dialect.MySQLDialect +db.min_pool_size = 5 +db.max_pool_size = 10 +hb.dialect = org.hibernate.dialect.MySQLDialect +hb.show_sql = false +hb.db_reconnect = true +hb.idle_connection_test_period = 3600 + +app_display_name = Portal +files_path = /tmp +context_root = ECOMPPORTAL +# menu settings +menu_query_name = menuData +menu_properties_file_location = /WEB-INF/fusion/menu/ +application_menu_set_name = APP +application_menu_attribute_name = applicationMenuData +application_menu_properties_name = menu.properties +business_direct_menu_set_name = BD +business_direct_menu_properties_name = bd.menu.properties +business_direct_menu_attribute_name = businessDirectMenuData + +application_user_id = 30000 +post_default_role_id = 1 + +#Enable Fusion Mobile capabilities for the application +mobile_enable = false + +cache_config_file_path = /WEB-INF/conf/cache.ccf +cache_switch = 1 +cache_load_on_startup = false + +user_name = fullName +decryption_key = AGLDdG4D04BKm2IxIWEr8o== + + +#Cron Schedules +cron_site_name = one +log_cron = 0 * * * * ? * +sessiontimeout_feed_cron = 0 0/5 * * * ? * + +#Front end URL +frontend_url = http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/applicationsHome + +#cookie domain +cookie_domain = onap.org + +# An Unqiue 128-bit value defined to indentify a specific version of +# ECOMP Portal deployed on a specific virtual machine. +# This value must be generated and updated at the time of +# the deployment. +# Online Unique UUID generator - https://www.uuidgenerator.net/ +instance_uuid = 90bc9497-10e6-49fe-916b-dcdfaa972383 + +elastic_search_url = http:// +contact_us_link = http:// +user_guide_link = http:// + +# Contact Us page properties +ush_ticket_url = http:// +feedback_email_address = portal@lists.onap.org +portal_info_url = https:// + +#Online user bar refresh interval, in seconds +online_user_update_rate = 30 + +#Online user bar refresh total duration, in seconds +online_user_update_duration = 300 + +#authenticate user server +authenticate_user_server=http://portal.api.simpledemo.onap.org:8383/openid-connect-server-webapp/allUsers + +#window width threshold to collapse left/right menu when page onload +window_width_threshold_left_menu = 1400 +window_width_threshold_right_menu = 1350 + +# User notification refresh interval and duration, in seconds +notification_update_rate = 90 +notification_update_duration = 900 + +#Microservices Related Properties for Portal +microservices.widget.protocol = http +microservices.widget.hostname = portalwidgets.onap-portal +microservices.widget.username = widget_user +microservices.widget.password = KpuqIB08YHg+btG+pjX+sA== +#This property won't be needed after consul is functional on VMs - +microservices.widget.local.port = 8082 +microservices.m-learn.local.port = 8083 +#HALO API enable flag +external_access_enable = false + +#delete auditlog from number of days ago +auditlog_del_day_from = 365 + +#External system notification URL +external_system_notification_url= https://jira.onap.org/browse/ diff --git a/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTALSDK/fusion.properties b/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTALSDK/fusion.properties new file mode 100644 index 0000000000..8ee0a95f74 --- /dev/null +++ b/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTALSDK/fusion.properties @@ -0,0 +1,35 @@ +# login settings +login_method_backdoor = backdoor +login_method_attribute_name = login_method + +# These properties will be removed after SingleSignOnController is cleaned +authentication_mechanism = BOTH +login_method_csp = csp +login_method_web_junction = web_junction + +#login message +login.error.hrid.empty = Login failed, please contact system administrator. +login.error.hrid.not-found = User not found, please contact system administrator. +login.error.user.inactive = Account is disabled, please contact system administrator. + +# User Session settings +user_attribute_name = user +roles_attribute_name = roles +role_function_list = role_function_list +role_functions_attribute_name = role_functions + +# Import-user LDAP settings +post_initial_context_factory = com.sun.jndi.ldap.LdapCtxFactory +post_provider_url = ldap://ldap.mycompany.com:389 +post_security_principal = ou=people,o=mycompany,c=us +post_max_result_size = 499 + +# menu settings +menu_query_name = menuData +application_menu_set_name = APP +application_menu_attribute_name = applicationMenuData +business_direct_menu_set_name = BD +business_direct_menu_attribute_name = businessDirectMenuData + +# Role settings +sys_admin_role_id = 1 diff --git a/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTALSDK/portal.properties b/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTALSDK/portal.properties new file mode 100755 index 0000000000..e77a701798 --- /dev/null +++ b/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTALSDK/portal.properties @@ -0,0 +1,45 @@ +# Properties read by ECOMP Framework library, ecompFW.jar + +########################################################################## +# The following properties should NOT be changed by partner applications. +########################################################################## + +portal.api.prefix = /api +max.idle.time = 5 +user.attribute.name = user_attribute + +#Use REST API instead of UEB to fetch the functional menu data +use_rest_for_functional_menu=true + +########################################################################## +# The following properties MUST be changed by partner applications. +########################################################################## + +# Name of java class that implements the OnBoardingApiService interface. +# epsdk 1.3 uses org.onap prefix +portal.api.impl.class = org.onap.portalapp.service.OnBoardingApiServiceImpl + +# CSP Global Log On for single sign on +ecomp_redirect_url = http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm + +# URL of the ECOMP Portal REST API + +ecomp_rest_url = http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/auxapi + +# Applications do not need to run a UEB listener in 1610. +ueb_listeners_enable = false + +# UEB Configuration +ueb_url_list = dmaap.onap-message-router +# ECOMP Portal listens on this UEB topic +ecomp_portal_inbox_name = ECOMP-PORTAL-INBOX +# Replace these 3 default values with the ones for your specific App, +# as shown on the on-boarding page on the ECOMP Portal web application. +ueb_app_key = jQd4a9zVNi4ePyBp +ueb_app_secret = P0HpqEBhKJvxjRYdw2sCTUll +ueb_app_mailbox_name = ECOMP-PORTAL-OUTBOX-APP1 +# Consumer group name for UEB topic. +# Use the special tag '{UUID}' to generate a unique one for each sdk-app server. +ueb_app_consumer_group_name = {UUID} + +decryption_key = AGLDdG4D04BKm2IxIWEr8o== diff --git a/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTALSDK/system.properties b/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTALSDK/system.properties new file mode 100755 index 0000000000..d638abcca3 --- /dev/null +++ b/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTALSDK/system.properties @@ -0,0 +1,64 @@ +# Properties read by ECOMP Core library, ecompSDK-core.jar + +########################################################################## +# The following properties should NOT be changed by partner applications. +########################################################################## + +application_user_id = 30000 +post_default_role_id = 16 +clustered = true + +#Enable Fusion Mobile capabilities for the application +mobile_enable = false + +# Cache config file is needed on the classpath +cache_config_file_path = /WEB-INF/classes/cache.ccf +cache_switch = 199 +cache_load_on_startup = false + +user_name = fullName +decryption_key = AGLDdG4D04BKm2IxIWEr8o== + +########################################################################## +# The following properties MAY require changes by partner applications. +########################################################################## + +db.driver = org.mariadb.jdbc.Driver +db.connectionURL = jdbc:mariadb://portaldb.onap-portal:3306/ecomp_sdk +db.userName = root +db.password = Aa123456 +db.min_pool_size = 5 +db.max_pool_size = 10 +hb.dialect = org.hibernate.dialect.MySQLDialect +# SQL statements are logged to stdout +hb.show_sql = true +hb.idle_connection_test_period = 3600 + +app_display_name = Demo App +files_path = /tmp + +#element map files +element_map_file_path = /tmp +element_map_icon_path = app/fusionapp/icons/ + +#Cron Schedules +log_cron = 0 0/1 * * * ?; +mylogins_feed_cron = 0 0/60 * * * ?; +#sessiontimeout_feed_cron = 0 * * * * ? * +my_login_feed_output_dir = /tmp/MyLogins + +# Link shown in Help menu +contact_us_link = https://todo_contact_us_link.com + +# An Unique 128-bit value defined to identify a specific version +# of an application deployed on a specific virtual machine. +# This value must be generated and updated by the application +# which is using the ECOMP SDK at the time of its deployment. +# Online Unique UUID generator - https://www.uuidgenerator.net/ +instance_uuid=8da691c9-987d-43ed-a358-00ac2f35685d + +# R Cloud feature - configure this property to enable notebook feature - for more details on RCloud please visit https://rcloud.social/index.html +guard_notebook_url= + +#authenticate user server +authenticate_user_server=http://portalapps.onap-portal:8383/openid-connect-server-webapp/allUsers diff --git a/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPWIDGETMS/application.properties b/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPWIDGETMS/application.properties new file mode 100644 index 0000000000..a5e55dc6d8 --- /dev/null +++ b/kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPWIDGETMS/application.properties @@ -0,0 +1,35 @@ +## General App Properties +server.contextPath=/widget +server.port=8082 +spring.http.multipart.max-file-size=128MB +spring.http.multipart.max-request-size=128MB +microservice.widget.location=/tmp + +## App DB Properties +spring.datasource.url=jdbc:mysql://portaldb.onap-portal:3306/portal +spring.datasource.username=root +spring.datasource.password=Aa123456 +spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect +spring.database.driver.classname=org.mariadb.jdbc.Driver +spring.jpa.show-sql=false +spring.jpa.properties.hibernate.format_sql=false + +## Basic Authentication Properties +security.user.name=widget_user +security.user.password=ENC(IjywcRnI9+nuVEh9+OFFiRWAjBT1n718) + +initialization.default.widgets=true +initialization.widgetData.url=http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/commonWidgets + +## Account Basic Authentication Properties +account.user.name=portal +account.user.password=6APqvG4AU2rfLgCvMdySwQ== + +## Certificate Properties +#server.ssl.key-store=classpath:widget-keystore.p12 +#server.ssl.key-store-password=ENC(DiIYnAMab4u7rEW2yKhF9zBL00uU55q8) +#server.ssl.keyStoreType=PKCS12 +#server.ssl.keyAlias=widget-microservice + +## Jasypt Properties +jasypt.encryptor.password=EncryptionKey diff --git a/kubernetes/portal/templates/portal-apps-configmap.yaml b/kubernetes/portal/templates/portal-apps-configmap.yaml new file mode 100644 index 0000000000..044e0d8a4d --- /dev/null +++ b/kubernetes/portal/templates/portal-apps-configmap.yaml @@ -0,0 +1,35 @@ +#{{ if not .Values.disablePortalPortalapps }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: portal-onap-portal-sdk-configmap + namespace: {{ .Values.nsPrefix }}-portal +data: +{{ tpl (.Files.Glob "resources/config/portal-fe/webapps/etc/ONAPPORTALSDK/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: portal-onap-portal-configmap + namespace: {{ .Values.nsPrefix }}-portal +data: +{{ tpl (.Files.Glob "resources/config/portal-fe/webapps/etc/ONAPPORTAL/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: portal-mariadb-configmap + namespace: {{ .Values.nsPrefix }}-portal +data: +{{ tpl (.Files.Glob "resources/config/mariadb/oom_updates.sql").AsConfig . | indent 2 }} +#{{ end }} +--- +#{{ if not .Values.disablePortalPortalwidgets }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: portal-onapwidgetms-configmap + namespace: {{ .Values.nsPrefix }}-portal +data: +{{ tpl (.Files.Glob "resources/config/portal-fe/webapps/etc/ONAPWIDGETMS/application.properties").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/portal/templates/portal-apps-deployment.yaml b/kubernetes/portal/templates/portal-apps-deployment.yaml index 761441acc3..b45cec4946 100755 --- a/kubernetes/portal/templates/portal-apps-deployment.yaml +++ b/kubernetes/portal/templates/portal-apps-deployment.yaml @@ -33,11 +33,19 @@ spec: volumeMounts: - mountPath: /portal-mysql/oom_updates.sql name: portal-mariadb-onboarding-sql + subPath: oom_updates.sql - mountPath: /portal_root/ name: portal-root image: {{ .Values.image.mariadbClient }} imagePullPolicy: {{ .Values.pullPolicy }} name: provision-portaldb-users + - command: ["/bin/bash", "-c", "mkdir -p /ubuntu-init/ && chmod -R 777 /ubuntu-init/"] + volumeMounts: + - name: portal-logs + mountPath: /ubuntu-init/ + image: {{ .Values.image.ubuntuInit }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: portal-app-logs-init containers: - image: {{ .Values.image.portalapps }} imagePullPolicy: {{ .Values.pullPolicy }} @@ -51,23 +59,32 @@ spec: name: localtime readOnly: true - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/fusion/conf/fusion.properties" - name: portal-fusion-properties + name: onap-portal-properties + subPath: fusion.properties - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/openid-connect.properties" - name: portal-openid-connect-properties + name: onap-portal-properties + subPath: openid-connect.properties - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/conf/system.properties" - name: portal-system-properties + name: onap-portal-properties + subPath: system.properties - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/portal.properties" - name: portal-portal-properties + name: onap-portal-properties + subPath: portal.properties - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/logback.xml" name: portal-logback + subPath: logback.xml - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/conf/system.properties" - name: sdkapp-system-properties + name: portal-sdkapp-properties + subPath: system.properties - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/portal.properties" - name: sdkapp-portal-properties + name: portal-sdkapp-properties + subPath: portal.properties - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/fusion/conf/fusion.properties" - name: sdkapp-fusion-properties + name: portal-sdkapp-properties + subPath: fusion.properties - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/logback.xml" name: sdkapp-logback + subPath: logback.xml - mountPath: /portal_root/ name: portal-root - mountPath: "{{ .Values.onapPortal.webappsDir }}/logs" @@ -89,6 +106,7 @@ spec: volumeMounts: - mountPath: /usr/share/filebeat/filebeat.yml name: filebeat-conf + subPath: filebeat.yml - mountPath: /var/log/onap name: portal-logs2 - mountPath: /usr/share/filebeat/data @@ -98,42 +116,29 @@ spec: hostPath: path: /etc/localtime - name: filebeat-conf - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml + configMap: + name: portal-filebeat-configmap - name: portal-logs2 emptyDir: {} - name: portal-data-filebeat emptyDir: {} - - name: portal-fusion-properties - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTAL/fusion.properties - - name: portal-openid-connect-properties - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTAL/openid-connect.properties - - name: portal-system-properties - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTAL/system.properties - - name: portal-portal-properties - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTAL/portal.properties + - name: onap-portal-properties + configMap: + defaultMode: 0755 + name: portal-onap-portal-configmap + - name: portal-sdkapp-properties + configMap: + defaultMode: 0755 + name: portal-onap-portal-sdk-configmap - name: portal-logback - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/portal/onapportal/logback.xml - - name: sdkapp-system-properties - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTALSDK/system.properties - - name: sdkapp-portal-properties - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTALSDK/portal.properties - - name: sdkapp-fusion-properties - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTALSDK/fusion.properties + configMap: + name: portal-onapportal-log-configmap - name: sdkapp-logback - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/portal/onapportalsdk/logback.xml + configMap: + name: portal-onapportalsdk-log-configmap - name: portal-mariadb-onboarding-sql - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/mariadb/oom_updates.sql + configMap: + name: portal-mariadb-configmap - name: portal-root hostPath: path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal diff --git a/kubernetes/portal/templates/portal-logs-configmap.yaml b/kubernetes/portal/templates/portal-logs-configmap.yaml new file mode 100644 index 0000000000..c5735ba722 --- /dev/null +++ b/kubernetes/portal/templates/portal-logs-configmap.yaml @@ -0,0 +1,26 @@ +#{{ if not .Values.disablePortalPortalapps }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: portal-filebeat-configmap + namespace: {{ .Values.nsPrefix }}-portal +data: +{{ tpl (.Files.Glob "resources/config/log/filebeat/filebeat.yml").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: portal-onapportal-log-configmap + namespace: {{ .Values.nsPrefix }}-portal +data: +{{ tpl (.Files.Glob "resources/config/log/portal/onapportal/logback.xml").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: portal-onapportalsdk-log-configmap + namespace: {{ .Values.nsPrefix }}-portal +data: +{{ tpl (.Files.Glob "resources/config/log/portal/onapportalsdk/logback.xml").AsConfig . | indent 2 }} +#{{ end }} + diff --git a/kubernetes/portal/templates/portal-widgets-deployment.yaml b/kubernetes/portal/templates/portal-widgets-deployment.yaml index 600419399e..0dd92027df 100644 --- a/kubernetes/portal/templates/portal-widgets-deployment.yaml +++ b/kubernetes/portal/templates/portal-widgets-deployment.yaml @@ -31,7 +31,7 @@ spec: name: portalapps-readiness containers: - image: {{ .Values.image.portalwms }} - imagePullPolicy: {{ .Values.pullPolicy }} + imagePullPolicy: {{ .Values.pullPolicy }} name: portalwidgets volumeMounts: - mountPath: /etc/localtime @@ -39,6 +39,7 @@ spec: readOnly: true - mountPath: /application.properties name: portalwidgets-application-properties + subPath: application.properties ports: - containerPort: 8082 readinessProbe: @@ -51,8 +52,8 @@ spec: hostPath: path: /etc/localtime - name: portalwidgets-application-properties - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPWIDGETMS/application.properties + configMap: + name: portal-onapwidgetms-configmap imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" #{{ end }} diff --git a/kubernetes/portal/values.yaml b/kubernetes/portal/values.yaml index 6e2e83d215..34f5cc444b 100644 --- a/kubernetes/portal/values.yaml +++ b/kubernetes/portal/values.yaml @@ -9,5 +9,6 @@ image: portalwms: nexus3.onap.org:10001/onap/portal-wms:v1.3.0 ubuntuDesktop: dorowu/ubuntu-desktop-lxde-vnc filebeat: docker.elastic.co/beats/filebeat:5.5.0 + ubuntuInit: oomk8s/ubuntu-init:1.0.0 onapPortal: webappsDir: "/opt/apache-tomcat-8.0.37/webapps" -- cgit 1.2.3-korg