From ba635b3dc4d520e4be28dc82c40b049567ff2c88 Mon Sep 17 00:00:00 2001 From: Pramod Date: Wed, 17 Jan 2018 12:05:14 +0000 Subject: Config seg sdc deployment Issue-ID: OOM-550 Signed-off-by: Pramod Change-Id: Ibad8a16fb289ddd4260be5cce0c787e4de212a97 --- .../docker/init/src/config/log/sdc/be/logback.xml | 187 --------------------- .../docker/init/src/config/log/sdc/fe/logback.xml | 187 --------------------- .../init/src/config/sdc/environments/AUTO.json | 74 -------- .../init/src/config/sdc/environments/Template.json | 75 --------- .../config/sdc/sdc-fe/FE_2_setup_configuration.rb | 27 --- .../sdc/resources/config/environments/AUTO.json | 74 ++++++++ .../resources/config/environments/Template.json | 75 +++++++++ kubernetes/sdc/resources/config/log/be/logback.xml | 187 +++++++++++++++++++++ kubernetes/sdc/resources/config/log/fe/logback.xml | 187 +++++++++++++++++++++ .../sdc/resources/config/log/filebeat/filebeat.yml | 41 +++++ .../config/sdc-fe/FE_2_setup_configuration.rb | 27 +++ kubernetes/sdc/templates/sdc-be.yaml | 14 +- kubernetes/sdc/templates/sdc-cs.yaml | 5 +- .../sdc/templates/sdc-environments-configmap.yaml | 9 + kubernetes/sdc/templates/sdc-es.yaml | 21 ++- kubernetes/sdc/templates/sdc-fe-configmap.yaml | 9 + kubernetes/sdc/templates/sdc-fe.yaml | 20 ++- kubernetes/sdc/templates/sdc-kb.yaml | 5 +- kubernetes/sdc/templates/sdc-log-configmap.yaml | 27 +++ kubernetes/sdc/values.yaml | 3 +- 20 files changed, 683 insertions(+), 571 deletions(-) delete mode 100644 kubernetes/config/docker/init/src/config/log/sdc/be/logback.xml delete mode 100644 kubernetes/config/docker/init/src/config/log/sdc/fe/logback.xml delete mode 100755 kubernetes/config/docker/init/src/config/sdc/environments/AUTO.json delete mode 100755 kubernetes/config/docker/init/src/config/sdc/environments/Template.json delete mode 100755 kubernetes/config/docker/init/src/config/sdc/sdc-fe/FE_2_setup_configuration.rb create mode 100755 kubernetes/sdc/resources/config/environments/AUTO.json create mode 100755 kubernetes/sdc/resources/config/environments/Template.json create mode 100644 kubernetes/sdc/resources/config/log/be/logback.xml create mode 100644 kubernetes/sdc/resources/config/log/fe/logback.xml create mode 100644 kubernetes/sdc/resources/config/log/filebeat/filebeat.yml create mode 100755 kubernetes/sdc/resources/config/sdc-fe/FE_2_setup_configuration.rb create mode 100644 kubernetes/sdc/templates/sdc-environments-configmap.yaml create mode 100644 kubernetes/sdc/templates/sdc-fe-configmap.yaml create mode 100644 kubernetes/sdc/templates/sdc-log-configmap.yaml (limited to 'kubernetes') diff --git a/kubernetes/config/docker/init/src/config/log/sdc/be/logback.xml b/kubernetes/config/docker/init/src/config/log/sdc/be/logback.xml deleted file mode 100644 index 4d508e3047..0000000000 --- a/kubernetes/config/docker/init/src/config/log/sdc/be/logback.xml +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - ${logDirectory}/${allLogName}.log - - ${logDirectory}/${allLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - - - - - - ${logDirectory}/${errorLogName}.log - - - - AUDIT_MARKER - - NEUTRAL - DENY - - - - - TRANSACTION_MARKER - - NEUTRAL - DENY - - - - INFO - - - ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - ${logDirectory}/${debugLogName}.log - - - - - TRANSACTION_MARKER - - NEUTRAL - DENY - - - - - e.level.toInt() <= DEBUG.toInt() - - DENY - NEUTRAL - - - ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - ${logDirectory}/${auditLogName}.log - - - - AUDIT_MARKER - - DENY - ACCEPT - - - ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - ${logDirectory}/${transactionLogName}.log - - - - TRANSACTION_MARKER - - DENY - ACCEPT - - - ${logDirectory}/${transactionLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - ${queueSize} - - - - ${queueSize} - - - - ${queueSize} - - - - ${queueSize} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/log/sdc/fe/logback.xml b/kubernetes/config/docker/init/src/config/log/sdc/fe/logback.xml deleted file mode 100644 index a8e9ed7264..0000000000 --- a/kubernetes/config/docker/init/src/config/log/sdc/fe/logback.xml +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - ${logDirectory}/${allLogName}.log - - ${logDirectory}/${allLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - - - - - - ${logDirectory}/${errorLogName}.log - - - - AUDIT_MARKER - - NEUTRAL - DENY - - - - - TRANSACTION_MARKER - - NEUTRAL - DENY - - - - INFO - - - ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - ${logDirectory}/${debugLogName}.log - - - - - TRANSACTION_MARKER - - NEUTRAL - DENY - - - - - e.level.toInt() <= DEBUG.toInt() - - DENY - NEUTRAL - - - ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - ${logDirectory}/${auditLogName}.log - - - - AUDIT_MARKER - - DENY - ACCEPT - - - ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - ${logDirectory}/${transactionLogName}.log - - - - TRANSACTION_MARKER - - DENY - ACCEPT - - - ${logDirectory}/${transactionLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - ${queueSize} - - - - ${queueSize} - - - - ${queueSize} - - - - ${queueSize} - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/kubernetes/config/docker/init/src/config/sdc/environments/AUTO.json b/kubernetes/config/docker/init/src/config/sdc/environments/AUTO.json deleted file mode 100755 index 5d6eaef94e..0000000000 --- a/kubernetes/config/docker/init/src/config/sdc/environments/AUTO.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "name": "AUTO", - "description": "OpenSource-AUTO", - "cookbook_versions": { - "Deploy-SDandC": "= 1.0.0" - }, - "json_class": "Chef::Environment", - "chef_type": "environment", - - "default_attributes": { - "CS_VIP": "sdc-cs.onap-sdc", - "BE_VIP": "sdc-be.onap-sdc", - "FE_VIP": "sdc-fe.onap-sdc", - "ES_VIP": "sdc-es.onap-sdc", - "interfaces": { - "application": "eth0", - "private": "eth0" - }, - "ECompP": { - "ecomp_rest_url": "http://portalapps.onap-portal:8989/ONAPPORTAL/auxapi", - "ueb_url_list": "dmaap.onap-message-router, dmaap.onap-message-router", - "app_secret": "XftIATw9Jr3VzAcPqt3NnJOu", - "app_key": "x9UfO7JsDn8BESVX", - "inbox_name": "ECOMP-PORTAL-INBOX", - "ecomp_redirect_url": "http://portalapps.onap-portal:8989/ONAPPORTAL/login.htm", - "app_topic_name": "ECOMP-PORTAL-OUTBOX-SDC1", - "decryption_key": "AGLDdG4D04BKm2IxIWEr8o==" - }, - "UEB": { - "PublicKey": "iPIxkpAMI8qTcQj8", - "SecretKey": "Ehq3WyT4bkif4zwgEbvshGal", - "fqdn": ["dmaap.onap-message-router", "dmaap.onap-message-router"] - }, - "Nodes": { - "CS": "sdc-cs.onap-sdc", - "BE": "sdc-be.onap-sdc", - "FE": "sdc-fe.onap-sdc", - "ES": "sdc-es.onap-sdc" - } - }, - "override_attributes": { - "FE": { - "http_port": "8181", - "https_port": "9443" - }, - "BE": { - "http_port": "8080", - "https_port": "8443" - }, - "elasticsearch": { - "cluster_name": "SDC-ES-", - "ES_path_home": "/usr/share/elasticsearch", - "ES_path_data": "/usr/share/elasticsearch/data", - "num_of_replicas": "0", - "num_of_shards": "1" - }, - - "cassandra": { - "concurrent_reads": "32", - "num_tokens": "256", - "data_dir": "/var/lib/cassandra/data", - "hinted_handoff_enabled": "true", - "cassandra_user": "asdc_user", - "cassandra_password": "Aa1234%^!", - "concurrent_writes": "32", - "cluster_name": "SDC-CS-", - "multithreaded_compaction": "false", - "cache_dir": "/var/lib/cassandra/saved_caches", - "log_file": "/var/lib/cassandra/log/system.log", - "phi_convict_threshold": "8", - "commitlog_dir": "/var/lib/cassandra/commitlog" - } - } -} diff --git a/kubernetes/config/docker/init/src/config/sdc/environments/Template.json b/kubernetes/config/docker/init/src/config/sdc/environments/Template.json deleted file mode 100755 index ddddc78e2b..0000000000 --- a/kubernetes/config/docker/init/src/config/sdc/environments/Template.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "xxx", - "description": "OpenSource-xxx", - "cookbook_versions": { - "Deploy-SDandC": "= 1.0.0" - }, - "json_class": "Chef::Environment", - "chef_type": "environment", - - "default_attributes": { - "CS_VIP": "yyy", - "BE_VIP": "yyy", - "FE_VIP": "yyy", - "ES_VIP": "yyy", - "interfaces": { - "application": "eth0", - "private": "eth1" - }, - "ECompP": { - "ecomp_rest_url": "http://portalapps.onap-portal:8989/ONAPPORTAL/auxapi", - "ueb_url_list": "dmaap.onap-message-router,dmaap.onap-message-router", - "app_secret": "XftIATw9Jr3VzAcPqt3NnJOu", - "app_key": "x9UfO7JsDn8BESVX", - "inbox_name": "ECOMP-PORTAL-INBOX", - "ecomp_redirect_url": "http://portalapps.onap-portal:8989/ONAPPORTAL/login.htm", - "app_topic_name": "ECOMP-PORTAL-OUTBOX-SDC1", - "decryption_key": "AGLDdG4D04BKm2IxIWEr8o==" - }, - "UEB": { - "PublicKey": "iPIxkpAMI8qTcQj8", - "SecretKey": "Ehq3WyT4bkif4zwgEbvshGal", - "fqdn": ["dmaap.onap-message-router", "dmaap.onap-message-router"] - }, - "Nodes": { - "CS": "yyy", - "BE": "yyy", - "FE": "yyy", - "ES": "yyy" - } - }, - "override_attributes": { - "FE": { - "http_port": "8181", - "https_port": "9443" - }, - "BE": { - "http_port": "8080", - "https_port": "8443" - }, - "elasticsearch": { - "cluster_name": "SDC-ES-", - "ES_path_home": "/usr/share/elasticsearch", - "ES_path_data": "/usr/share/elasticsearch/data", - "num_of_replicas": "0", - "num_of_shards": "1" - }, - - "cassandra": { - "concurrent_reads": "32", - "num_tokens": "256", - "data_dir": "/var/lib/cassandra/data", - "hinted_handoff_enabled": "true", - "cassandra_user": "asdc_user", - "cassandra_password": "Aa1234%^!", - "concurrent_writes": "32", - "cluster_name": "SDC-CS-", - "multithreaded_compaction": "false", - "cache_dir": "/var/lib/cassandra/saved_caches", - "log_file": "/var/lib/cassandra/log/system.log", - "phi_convict_threshold": "8", - "commitlog_dir": "/var/lib/cassandra/commitlog" - } - } -} - diff --git a/kubernetes/config/docker/init/src/config/sdc/sdc-fe/FE_2_setup_configuration.rb b/kubernetes/config/docker/init/src/config/sdc/sdc-fe/FE_2_setup_configuration.rb deleted file mode 100755 index 9fc662ee0a..0000000000 --- a/kubernetes/config/docker/init/src/config/sdc/sdc-fe/FE_2_setup_configuration.rb +++ /dev/null @@ -1,27 +0,0 @@ -jetty_base="/var/lib/jetty" -template "catalog-fe-config" do - path "#{jetty_base}/config/catalog-fe/configuration.yaml" - source "FE-configuration.yaml.erb" - owner "jetty" - group "jetty" - mode "0755" - variables({ - :fe_host_ip => node['HOST_IP'], - :be_host_ip => "sdc-be.onap-sdc", - :catalog_port => node['BE'][:http_port], - :ssl_port => node['BE'][:https_port] - }) -end - -template "onboarding-fe-config" do - path "#{jetty_base}/config/onboarding-fe/onboarding_configuration.yaml" - source "FE-onboarding-configuration.yaml.erb" - owner "jetty" - group "jetty" - mode "0755" - variables({ - :catalog_ip => node['HOST_IP'], - :catalog_port => node['BE'][:http_port], - :ssl_port => node['BE'][:https_port] -}) -end diff --git a/kubernetes/sdc/resources/config/environments/AUTO.json b/kubernetes/sdc/resources/config/environments/AUTO.json new file mode 100755 index 0000000000..5d6eaef94e --- /dev/null +++ b/kubernetes/sdc/resources/config/environments/AUTO.json @@ -0,0 +1,74 @@ +{ + "name": "AUTO", + "description": "OpenSource-AUTO", + "cookbook_versions": { + "Deploy-SDandC": "= 1.0.0" + }, + "json_class": "Chef::Environment", + "chef_type": "environment", + + "default_attributes": { + "CS_VIP": "sdc-cs.onap-sdc", + "BE_VIP": "sdc-be.onap-sdc", + "FE_VIP": "sdc-fe.onap-sdc", + "ES_VIP": "sdc-es.onap-sdc", + "interfaces": { + "application": "eth0", + "private": "eth0" + }, + "ECompP": { + "ecomp_rest_url": "http://portalapps.onap-portal:8989/ONAPPORTAL/auxapi", + "ueb_url_list": "dmaap.onap-message-router, dmaap.onap-message-router", + "app_secret": "XftIATw9Jr3VzAcPqt3NnJOu", + "app_key": "x9UfO7JsDn8BESVX", + "inbox_name": "ECOMP-PORTAL-INBOX", + "ecomp_redirect_url": "http://portalapps.onap-portal:8989/ONAPPORTAL/login.htm", + "app_topic_name": "ECOMP-PORTAL-OUTBOX-SDC1", + "decryption_key": "AGLDdG4D04BKm2IxIWEr8o==" + }, + "UEB": { + "PublicKey": "iPIxkpAMI8qTcQj8", + "SecretKey": "Ehq3WyT4bkif4zwgEbvshGal", + "fqdn": ["dmaap.onap-message-router", "dmaap.onap-message-router"] + }, + "Nodes": { + "CS": "sdc-cs.onap-sdc", + "BE": "sdc-be.onap-sdc", + "FE": "sdc-fe.onap-sdc", + "ES": "sdc-es.onap-sdc" + } + }, + "override_attributes": { + "FE": { + "http_port": "8181", + "https_port": "9443" + }, + "BE": { + "http_port": "8080", + "https_port": "8443" + }, + "elasticsearch": { + "cluster_name": "SDC-ES-", + "ES_path_home": "/usr/share/elasticsearch", + "ES_path_data": "/usr/share/elasticsearch/data", + "num_of_replicas": "0", + "num_of_shards": "1" + }, + + "cassandra": { + "concurrent_reads": "32", + "num_tokens": "256", + "data_dir": "/var/lib/cassandra/data", + "hinted_handoff_enabled": "true", + "cassandra_user": "asdc_user", + "cassandra_password": "Aa1234%^!", + "concurrent_writes": "32", + "cluster_name": "SDC-CS-", + "multithreaded_compaction": "false", + "cache_dir": "/var/lib/cassandra/saved_caches", + "log_file": "/var/lib/cassandra/log/system.log", + "phi_convict_threshold": "8", + "commitlog_dir": "/var/lib/cassandra/commitlog" + } + } +} diff --git a/kubernetes/sdc/resources/config/environments/Template.json b/kubernetes/sdc/resources/config/environments/Template.json new file mode 100755 index 0000000000..ddddc78e2b --- /dev/null +++ b/kubernetes/sdc/resources/config/environments/Template.json @@ -0,0 +1,75 @@ +{ + "name": "xxx", + "description": "OpenSource-xxx", + "cookbook_versions": { + "Deploy-SDandC": "= 1.0.0" + }, + "json_class": "Chef::Environment", + "chef_type": "environment", + + "default_attributes": { + "CS_VIP": "yyy", + "BE_VIP": "yyy", + "FE_VIP": "yyy", + "ES_VIP": "yyy", + "interfaces": { + "application": "eth0", + "private": "eth1" + }, + "ECompP": { + "ecomp_rest_url": "http://portalapps.onap-portal:8989/ONAPPORTAL/auxapi", + "ueb_url_list": "dmaap.onap-message-router,dmaap.onap-message-router", + "app_secret": "XftIATw9Jr3VzAcPqt3NnJOu", + "app_key": "x9UfO7JsDn8BESVX", + "inbox_name": "ECOMP-PORTAL-INBOX", + "ecomp_redirect_url": "http://portalapps.onap-portal:8989/ONAPPORTAL/login.htm", + "app_topic_name": "ECOMP-PORTAL-OUTBOX-SDC1", + "decryption_key": "AGLDdG4D04BKm2IxIWEr8o==" + }, + "UEB": { + "PublicKey": "iPIxkpAMI8qTcQj8", + "SecretKey": "Ehq3WyT4bkif4zwgEbvshGal", + "fqdn": ["dmaap.onap-message-router", "dmaap.onap-message-router"] + }, + "Nodes": { + "CS": "yyy", + "BE": "yyy", + "FE": "yyy", + "ES": "yyy" + } + }, + "override_attributes": { + "FE": { + "http_port": "8181", + "https_port": "9443" + }, + "BE": { + "http_port": "8080", + "https_port": "8443" + }, + "elasticsearch": { + "cluster_name": "SDC-ES-", + "ES_path_home": "/usr/share/elasticsearch", + "ES_path_data": "/usr/share/elasticsearch/data", + "num_of_replicas": "0", + "num_of_shards": "1" + }, + + "cassandra": { + "concurrent_reads": "32", + "num_tokens": "256", + "data_dir": "/var/lib/cassandra/data", + "hinted_handoff_enabled": "true", + "cassandra_user": "asdc_user", + "cassandra_password": "Aa1234%^!", + "concurrent_writes": "32", + "cluster_name": "SDC-CS-", + "multithreaded_compaction": "false", + "cache_dir": "/var/lib/cassandra/saved_caches", + "log_file": "/var/lib/cassandra/log/system.log", + "phi_convict_threshold": "8", + "commitlog_dir": "/var/lib/cassandra/commitlog" + } + } +} + diff --git a/kubernetes/sdc/resources/config/log/be/logback.xml b/kubernetes/sdc/resources/config/log/be/logback.xml new file mode 100644 index 0000000000..4d508e3047 --- /dev/null +++ b/kubernetes/sdc/resources/config/log/be/logback.xml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + ${logDirectory}/${allLogName}.log + + ${logDirectory}/${allLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + + + + + + ${logDirectory}/${errorLogName}.log + + + + AUDIT_MARKER + + NEUTRAL + DENY + + + + + TRANSACTION_MARKER + + NEUTRAL + DENY + + + + INFO + + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${debugLogName}.log + + + + + TRANSACTION_MARKER + + NEUTRAL + DENY + + + + + e.level.toInt() <= DEBUG.toInt() + + DENY + NEUTRAL + + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${auditLogName}.log + + + + AUDIT_MARKER + + DENY + ACCEPT + + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${transactionLogName}.log + + + + TRANSACTION_MARKER + + DENY + ACCEPT + + + ${logDirectory}/${transactionLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${queueSize} + + + + ${queueSize} + + + + ${queueSize} + + + + ${queueSize} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/sdc/resources/config/log/fe/logback.xml b/kubernetes/sdc/resources/config/log/fe/logback.xml new file mode 100644 index 0000000000..a8e9ed7264 --- /dev/null +++ b/kubernetes/sdc/resources/config/log/fe/logback.xml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + ${logDirectory}/${allLogName}.log + + ${logDirectory}/${allLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + + + + + + ${logDirectory}/${errorLogName}.log + + + + AUDIT_MARKER + + NEUTRAL + DENY + + + + + TRANSACTION_MARKER + + NEUTRAL + DENY + + + + INFO + + + ${logDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${debugLogName}.log + + + + + TRANSACTION_MARKER + + NEUTRAL + DENY + + + + + e.level.toInt() <= DEBUG.toInt() + + DENY + NEUTRAL + + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${auditLogName}.log + + + + AUDIT_MARKER + + DENY + ACCEPT + + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${logDirectory}/${transactionLogName}.log + + + + TRANSACTION_MARKER + + DENY + ACCEPT + + + ${logDirectory}/${transactionLogName}.%d{yyyy-MM-dd}.%i.log + + ${maxFileSize} + + ${maxHistory} + ${totalSizeCap} + + + ${pattern} + + + + + ${queueSize} + + + + ${queueSize} + + + + ${queueSize} + + + + ${queueSize} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/kubernetes/sdc/resources/config/log/filebeat/filebeat.yml b/kubernetes/sdc/resources/config/log/filebeat/filebeat.yml new file mode 100644 index 0000000000..f316b866af --- /dev/null +++ b/kubernetes/sdc/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/sdc/resources/config/sdc-fe/FE_2_setup_configuration.rb b/kubernetes/sdc/resources/config/sdc-fe/FE_2_setup_configuration.rb new file mode 100755 index 0000000000..9fc662ee0a --- /dev/null +++ b/kubernetes/sdc/resources/config/sdc-fe/FE_2_setup_configuration.rb @@ -0,0 +1,27 @@ +jetty_base="/var/lib/jetty" +template "catalog-fe-config" do + path "#{jetty_base}/config/catalog-fe/configuration.yaml" + source "FE-configuration.yaml.erb" + owner "jetty" + group "jetty" + mode "0755" + variables({ + :fe_host_ip => node['HOST_IP'], + :be_host_ip => "sdc-be.onap-sdc", + :catalog_port => node['BE'][:http_port], + :ssl_port => node['BE'][:https_port] + }) +end + +template "onboarding-fe-config" do + path "#{jetty_base}/config/onboarding-fe/onboarding_configuration.yaml" + source "FE-onboarding-configuration.yaml.erb" + owner "jetty" + group "jetty" + mode "0755" + variables({ + :catalog_ip => node['HOST_IP'], + :catalog_port => node['BE'][:http_port], + :ssl_port => node['BE'][:https_port] +}) +end diff --git a/kubernetes/sdc/templates/sdc-be.yaml b/kubernetes/sdc/templates/sdc-be.yaml index 41560525e1..6485aa1983 100644 --- a/kubernetes/sdc/templates/sdc-be.yaml +++ b/kubernetes/sdc/templates/sdc-be.yaml @@ -89,27 +89,29 @@ spec: volumeMounts: - mountPath: /usr/share/filebeat/filebeat.yml name: filebeat-conf + subPath: filebeat.yml - mountPath: /var/log/onap name: sdc-logs-2 - mountPath: /usr/share/filebeat/data name: sdc-data-filebeat volumes: - name: filebeat-conf - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml + configMap: + name: sdc-filebeat-configmap - name: sdc-logs-2 emptyDir: {} - name: sdc-data-filebeat emptyDir: {} - name: sdc-logback - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/sdc/be/logback.xml + configMap: + name : sdc-log-be-configmap - name: sdc-sdc-es-es hostPath: path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/sdc-es/ES - name: sdc-environments - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/environments + configMap: + name: sdc-environments-configmap + defaultMode: 0755 - name: sdc-localtime hostPath: path: /etc/localtime diff --git a/kubernetes/sdc/templates/sdc-cs.yaml b/kubernetes/sdc/templates/sdc-cs.yaml index a81d4ae826..d70ead4407 100644 --- a/kubernetes/sdc/templates/sdc-cs.yaml +++ b/kubernetes/sdc/templates/sdc-cs.yaml @@ -67,8 +67,9 @@ spec: persistentVolumeClaim: claimName: sdc-cs-db - name: sdc-environments - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/environments + configMap: + name : sdc-environments-configmap + defaultMode: 0755 - name: sdc-localtime hostPath: path: /etc/localtime diff --git a/kubernetes/sdc/templates/sdc-environments-configmap.yaml b/kubernetes/sdc/templates/sdc-environments-configmap.yaml new file mode 100644 index 0000000000..f8456b0efe --- /dev/null +++ b/kubernetes/sdc/templates/sdc-environments-configmap.yaml @@ -0,0 +1,9 @@ +#{{ if not .Values.disableSdcSdcBe }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: sdc-environments-configmap + namespace: {{ .Values.nsPrefix }}-sdc +data: +{{ tpl (.Files.Glob "resources/config/environments/*").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/sdc/templates/sdc-es.yaml b/kubernetes/sdc/templates/sdc-es.yaml index 1d2ba4805b..3f2ef332b1 100644 --- a/kubernetes/sdc/templates/sdc-es.yaml +++ b/kubernetes/sdc/templates/sdc-es.yaml @@ -16,6 +16,20 @@ spec: app: sdc-es name: sdc-es spec: + initContainers: + - name: sdc-logs-init + image: {{ .Values.image.ubuntuInit }} + imagePullPolicy: {{ .Values.pullPolicy }} + command: + - /bin/bash + - "-c" + - | + mkdir -p /ubuntu-init/ASDC/ASDC-ES/ + mkdir -p /ubuntu-init/ASDC/ASDC-CS/ + mkdir -p /ubuntu-init/ASDC/ASDC-KB/ + mkdir -p /ubuntu-init/ASDC/ASDC-BE/ + mkdir -p /ubuntu-init/ASDC/ASDC-FE/ + chmod -R 777 /ubuntu-init/ containers: - image: {{ .Values.image.sdcElasticsearch }} imagePullPolicy: {{ .Values.pullPolicy }} @@ -30,6 +44,8 @@ spec: - name: ES_HEAP_SIZE value: "1024M" volumeMounts: + - name: sdc-logs + mountPath: /ubuntu-init/ - mountPath: /root/chef-solo/environments/ name: sdc-environments - mountPath: /etc/localtime @@ -47,8 +63,9 @@ spec: periodSeconds: 10 volumes: - name: sdc-environments - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/environments + configMap : + name : sdc-environments-configmap + defaultMode: 0755 - name: sdc-localtime hostPath: path: /etc/localtime diff --git a/kubernetes/sdc/templates/sdc-fe-configmap.yaml b/kubernetes/sdc/templates/sdc-fe-configmap.yaml new file mode 100644 index 0000000000..2f60ef88e3 --- /dev/null +++ b/kubernetes/sdc/templates/sdc-fe-configmap.yaml @@ -0,0 +1,9 @@ +#{{ if not .Values.disableSdcSdcFe }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: sdc-fe-configmap + namespace: {{ .Values.nsPrefix }}-sdc +data: +{{ tpl (.Files.Glob "resources/config/sdc-fe/*").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/sdc/templates/sdc-fe.yaml b/kubernetes/sdc/templates/sdc-fe.yaml index bc1777f3ab..b4205ed653 100644 --- a/kubernetes/sdc/templates/sdc-fe.yaml +++ b/kubernetes/sdc/templates/sdc-fe.yaml @@ -62,6 +62,7 @@ spec: name: sdc-logs-2 - mountPath: /root/chef-solo/cookbooks/sdc-catalog-fe/recipes/FE_2_setup_configuration.rb name: sdc-fe-config + subPath: FE_2_setup_configuration.rb - mountPath: /tmp/logback.xml name: sdc-logback lifecycle: @@ -82,27 +83,29 @@ spec: volumeMounts: - mountPath: /usr/share/filebeat/filebeat.yml name: filebeat-conf + subPath: filebeat.yml - mountPath: /var/log/onap name: sdc-logs-2 - mountPath: /usr/share/filebeat/data name: sdc-data-filebeat volumes: - name: filebeat-conf - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml + configMap: + name : sdc-filebeat-configmap - name: sdc-logs-2 emptyDir: {} - name: sdc-data-filebeat emptyDir: {} - name: sdc-logback - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/sdc/fe/logback.xml + configMap: + name : sdc-log-fe-configmap - name: sdc-sdc-es-es hostPath: path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/sdc-es/ES - name: sdc-environments - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/environments + configMap: + name: sdc-environments-configmap + defaultMode: 0755 - name: sdc-localtime hostPath: path: /etc/localtime @@ -110,8 +113,9 @@ spec: hostPath: path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/logs - name: sdc-fe-config - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/sdc-fe/FE_2_setup_configuration.rb + configMap: + name: sdc-fe-configmap + defaultMode: 0755 imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" #{{ end }} diff --git a/kubernetes/sdc/templates/sdc-kb.yaml b/kubernetes/sdc/templates/sdc-kb.yaml index a7334d4d08..658f6c1a03 100644 --- a/kubernetes/sdc/templates/sdc-kb.yaml +++ b/kubernetes/sdc/templates/sdc-kb.yaml @@ -59,8 +59,9 @@ spec: periodSeconds: 10 volumes: - name: sdc-environments - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/environments + configMap: + name: sdc-environments-configmap + defaultMode: 0755 - name: sdc-localtime hostPath: path: /etc/localtime diff --git a/kubernetes/sdc/templates/sdc-log-configmap.yaml b/kubernetes/sdc/templates/sdc-log-configmap.yaml new file mode 100644 index 0000000000..c79f9e064c --- /dev/null +++ b/kubernetes/sdc/templates/sdc-log-configmap.yaml @@ -0,0 +1,27 @@ +#{{ if not .Values.disableSdcSdcBe }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: sdc-log-be-configmap + namespace: {{ .Values.nsPrefix }}-sdc +data: +{{ tpl (.Files.Glob "resources/config/log/be/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: sdc-filebeat-configmap + namespace: {{ .Values.nsPrefix }}-sdc +data: +{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }} +#{{ end }} +--- +#{{ if not .Values.disableSdcSdcFe }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: sdc-log-fe-configmap + namespace: {{ .Values.nsPrefix }}-sdc +data: +{{ tpl (.Files.Glob "resources/config/log/fe/*").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/sdc/values.yaml b/kubernetes/sdc/values.yaml index 67f2810deb..1cc5dd0076 100644 --- a/kubernetes/sdc/values.yaml +++ b/kubernetes/sdc/values.yaml @@ -8,4 +8,5 @@ image: sdcElasticsearch: nexus3.onap.org:10001/openecomp/sdc-elasticsearch:v1.1.0 sdcCassandra: nexus3.onap.org:10001/openecomp/sdc-cassandra:v1.1.0 sdcBackend: nexus3.onap.org:10001/openecomp/sdc-backend:v1.1.0 - filebeat: docker.elastic.co/beats/filebeat:5.5.0 \ No newline at end of file + filebeat: docker.elastic.co/beats/filebeat:5.5.0 + ubuntuInit: oomk8s/ubuntu-init:1.0.0 -- cgit 1.2.3-korg