From ea177cbde11b6988408502a56eec3ff2a39e989f Mon Sep 17 00:00:00 2001 From: Ashageetha Rao Date: Wed, 18 Dec 2024 12:19:11 +0530 Subject: [PATCH] Oracle SOA Suite Kubernetes script updates for release 24.4.2 (#234) --- .../apache-samples/custom-sample/README.md | 4 +- .../charts/ingress-per-domain/README.md | 32 ++++---- .../templates/nginx-ingress-nonssl.yaml | 2 +- .../templates/nginx-ingress-ssl.yaml | 2 +- .../charts/ingress-per-domain/values.yaml | 14 ++-- .../kubernetes/charts/traefik/values.yaml | 1 - .../common/createSOADomain.py | 77 ++++++++++++------- .../create-domain-inputs.yaml | 24 ++++-- .../create-domain-job-template.yaml | 8 +- .../deploy-artifacts-inputs.yaml | 25 ++++-- .../deploy-artifacts-job-template.yaml | 6 +- .../domain-home-on-pv/deploy-artifacts.sh | 23 +++++- .../deploy-docker-file/Dockerfile | 6 +- .../deploy-docker-file/build.sh | 9 ++- .../domain-home-on-pv/deploy/osb/deploy.sh | 12 ++- .../deploy/osb/import.properties.template | 4 +- .../domain-home-on-pv/deploy/soa/deploy.sh | 13 +++- .../wlst/create-domain-script.sh | 5 +- .../create-soa-domain/utils/utility.sh | 26 ++++++- .../create-soa-domain/utils/validate.sh | 20 ++++- ...eploy-weblogic-server-grafana-dashboard.sh | 2 +- .../monitoring-service/setup-monitoring.sh | 2 +- 22 files changed, 228 insertions(+), 89 deletions(-) diff --git a/OracleSOASuite/kubernetes/charts/apache-samples/custom-sample/README.md b/OracleSOASuite/kubernetes/charts/apache-samples/custom-sample/README.md index c35d2d700..238ca0aa7 100755 --- a/OracleSOASuite/kubernetes/charts/apache-samples/custom-sample/README.md +++ b/OracleSOASuite/kubernetes/charts/apache-samples/custom-sample/README.md @@ -24,9 +24,9 @@ The second domain uses the following custom configuration parameters: - domainUID: `domain2` - clusterName: `cluster-1` - adminServerName: `admin-server` -- adminPort: `7011` +- adminPort: `7001` - adminNodePort: `30702` -- managedServerPort: `8021` +- managedServerPort: `7003` After the domains are successfully created, deploy the sample web application, `testwebapp.war`, on each domain cluster using the WLS Administration Console. The sample web application is located in the `kubernetes/samples/charts/application` directory. diff --git a/OracleSOASuite/kubernetes/charts/ingress-per-domain/README.md b/OracleSOASuite/kubernetes/charts/ingress-per-domain/README.md index c5c2e6345..fee576a69 100755 --- a/OracleSOASuite/kubernetes/charts/ingress-per-domain/README.md +++ b/OracleSOASuite/kubernetes/charts/ingress-per-domain/README.md @@ -75,21 +75,21 @@ wlsDomain: domainUID: soainfra secureEnabled: false adminServerName: AdminServer - adminServerPort: 7011 - adminServerSSLPort: 7012 + adminServerPort: 7001 + adminServerSSLPort: 7002 adminSecurePort: 9002 soaClusterName: soa_cluster - soaManagedServerPort: 8011 - soaManagedServerSSLPort: 8012 + soaManagedServerPort: 7003 + soaManagedServerSSLPort: 7004 osbClusterName: osb_cluster - osbManagedServerPort: 9011 - osbManagedServerSSLPort: 9012 + osbManagedServerPort: 8002 + osbManagedServerSSLPort: 8003 # Host Specific Values hostName: - admin: admin.org - soa: soa.org - osb: osb.org + admin: admin.domain.org + soa: soa.domain.org + osb: osb.domain.org ``` ## Uninstalling the chart @@ -106,18 +106,18 @@ The following table lists the configurable parameters of this chart and their de | `sslType` | Type of Configuration. values are `NONSSL` , `SSL` and `E2ESSL`. | `NONSSL` | | `secureEnabled` | Secure Administration enabled in SOA domain | `false` | | `domainType` | Type of SOA Domain. values are `soa` or `osb` or`soaosb`. | `soa` | -| `hostName.admin` | Admin host name. | `admin.org` | -| `hostName.soa` | Soa host name. | `soa.org` | -| `hostName.osb` | Osb host name. | `osb.org` | +| `hostName.admin` | Admin host name. | `admin.domain.org` | +| `hostName.soa` | Soa host name. | `soa.domain.org` | +| `hostName.osb` | Osb host name. | `osb.domain.org` | | `wlsDomain.domainUID` | DomainUID of the Soa domain. | `soainfra` | | `wlsDomain.soaClusterName` | Cluster name in the SOA domain. | `soa_cluster` | | `wlsDomain.osbClusterName` | Cluster name in the OSB domain. | `osb_cluster` | | `wlsDomain.adminServerPort` | Port number of the Admin servers in the Soa domain cluster . | `7001` | | `wlsDomain.adminServerSSLPort` | Port number of the Admin servers in the Soa domain cluster . | `7002` | | `wlsDomain.adminSecurePort` | Port number of the Secure Administration servers in the Soa domain cluster and not configurable. | `9002` | -| `wlsDomain.soaManagedServerPort` | Port number of the managed servers in the Soa domain cluster. | `8001` | -| `wlsDomain.soaManagedServerSSLPort` | SSL Port number of the managed servers in the Soa domain cluster. | `8002` | -| `wlsDomain.osbManagedServerPort` | Port number of the managed servers in the Soa domain cluster. | `9001` | -| `wlsDomain.osbManagedServerSSLPort` | Port number of the managed servers in the Soa domain cluster. | `9002` | +| `wlsDomain.soaManagedServerPort` | Port number of the managed servers in the Soa domain cluster. | `7003` | +| `wlsDomain.soaManagedServerSSLPort` | SSL Port number of the managed servers in the Soa domain cluster. | `7004` | +| `wlsDomain.osbManagedServerPort` | Port number of the managed servers in the Soa domain cluster. | `8002` | +| `wlsDomain.osbManagedServerSSLPort` | Port number of the managed servers in the Soa domain cluster. | `8003` | >**NOTE:** The input values `domainUID` and `clusterName` will be used to generate the Kubernetes `serviceName` of the WLS cluster with the format `domainUID-cluster-clusterName`. diff --git a/OracleSOASuite/kubernetes/charts/ingress-per-domain/templates/nginx-ingress-nonssl.yaml b/OracleSOASuite/kubernetes/charts/ingress-per-domain/templates/nginx-ingress-nonssl.yaml index 2a089720b..16def3e43 100755 --- a/OracleSOASuite/kubernetes/charts/ingress-per-domain/templates/nginx-ingress-nonssl.yaml +++ b/OracleSOASuite/kubernetes/charts/ingress-per-domain/templates/nginx-ingress-nonssl.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # {{- if eq .Values.type "NGINX" }} diff --git a/OracleSOASuite/kubernetes/charts/ingress-per-domain/templates/nginx-ingress-ssl.yaml b/OracleSOASuite/kubernetes/charts/ingress-per-domain/templates/nginx-ingress-ssl.yaml index af74db3a5..04f281753 100755 --- a/OracleSOASuite/kubernetes/charts/ingress-per-domain/templates/nginx-ingress-ssl.yaml +++ b/OracleSOASuite/kubernetes/charts/ingress-per-domain/templates/nginx-ingress-ssl.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # {{- if eq .Values.type "NGINX" }} diff --git a/OracleSOASuite/kubernetes/charts/ingress-per-domain/values.yaml b/OracleSOASuite/kubernetes/charts/ingress-per-domain/values.yaml index 1613d8607..5ed97bf85 100755 --- a/OracleSOASuite/kubernetes/charts/ingress-per-domain/values.yaml +++ b/OracleSOASuite/kubernetes/charts/ingress-per-domain/values.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # # @@ -22,14 +22,14 @@ wlsDomain: secureEnabled: false adminServerName: AdminServer adminSecurePort: 9002 - adminServerPort: 7011 - adminServerSSLPort: 7012 + adminServerPort: 7001 + adminServerSSLPort: 7002 soaClusterName: soa_cluster - soaManagedServerPort: 8011 - soaManagedServerSSLPort: 8012 + soaManagedServerPort: 7003 + soaManagedServerSSLPort: 7004 osbClusterName: osb_cluster - osbManagedServerPort: 9011 - osbManagedServerSSLPort: 9012 + osbManagedServerPort: 8002 + osbManagedServerSSLPort: 8003 # Host specific values hostName: diff --git a/OracleSOASuite/kubernetes/charts/traefik/values.yaml b/OracleSOASuite/kubernetes/charts/traefik/values.yaml index 46db5b685..b005a0ed3 100755 --- a/OracleSOASuite/kubernetes/charts/traefik/values.yaml +++ b/OracleSOASuite/kubernetes/charts/traefik/values.yaml @@ -2,7 +2,6 @@ # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # image: - name: traefik pullPolicy: IfNotPresent ingressRoute: dashboard: diff --git a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/common/createSOADomain.py b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/common/createSOADomain.py index 77f39b0c0..0fe2ff991 100755 --- a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/common/createSOADomain.py +++ b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/common/createSOADomain.py @@ -9,6 +9,8 @@ class SOAProvisioner: jrfDone = 0; + secureDomain = 'false'; + domainVersion = ''; MACHINES = { 'machine1' : { 'NMType': 'SSL', @@ -60,16 +62,14 @@ class SOAProvisioner: 'serverGroupsToTarget' : [ 'OSB-MGD-SVRS-COMBINED' ] } - FLAG_1412 = 'false' - def __init__(self, oracleHome, javaHome, domainParentDir): self.oracleHome = self.validateDirectory(oracleHome) self.javaHome = self.validateDirectory(javaHome) self.domainParentDir = self.validateDirectory(domainParentDir, create=True) return - def createSOADomain(self, domainName, user, password, db, dbPrefix, dbPassword, adminListenPort, adminServerSSLPort, adminName, soaManagedNameBase, osbManagedNameBase, soaManagedServerPort, osbManagedServerPort, soaManagedServerSSLPort, osbManagedServerSSLPort, prodMode, secureMode, managedCount, soaClusterName, osbClusterName, sslEnabled, domainType, exposeAdminT3Channel=None, t3ChannelPublicAddress=None, t3ChannelPort=None): - domainHome = self.createBaseDomain(domainName, user, password, adminListenPort, adminServerSSLPort, adminName, soaManagedNameBase, osbManagedNameBase, soaManagedServerPort, osbManagedServerPort, soaManagedServerSSLPort, osbManagedServerSSLPort, prodMode, secureMode, managedCount, sslEnabled, soaClusterName, osbClusterName, domainType) + def createSOADomain(self, domainName, user, password, db, dbPrefix, dbPassword, adminListenPort, adminServerSSLPort, adminName, soaManagedNameBase, osbManagedNameBase, soaManagedServerPort, osbManagedServerPort, soaManagedServerSSLPort, osbManagedServerSSLPort, prodMode, secureMode, managedCount, soaClusterName, osbClusterName, sslEnabled, domainType, adminAdministrationPort, soaAdministrationPort, osbAdministrationPort, exposeAdminT3Channel=None, t3ChannelPublicAddress=None, t3ChannelPort=None): + domainHome = self.createBaseDomain(domainName, user, password, adminListenPort, adminServerSSLPort, adminName, soaManagedNameBase, osbManagedNameBase, soaManagedServerPort, osbManagedServerPort, soaManagedServerSSLPort, osbManagedServerSSLPort, prodMode, secureMode, managedCount, sslEnabled, soaClusterName, osbClusterName, domainType, adminAdministrationPort, soaAdministrationPort, osbAdministrationPort) if domainType == "soa" or domainType == "soaosb": @@ -89,15 +89,29 @@ def createSOADomain(self, domainName, user, password, db, dbPrefix, dbPassword, else: print 'persistentStore = '+persistentStore+'...skipping JDBC reconfig' - # Fix for bug 36654711 until changes comes with WSM template + readDomain(domainHome) + # Update the default port values for default servers for 14.1.2.0.0 + if ( self.domainVersion == "14.1.2.0.0" and self.secureDomain == 'false' ): + if ("soa" in domainType and 'soa_server1' in self.SOA_MANAGED_SERVERS ): + self.updateDefaultServerParameters(domainHome, sslEnabled, "soa_server1") + if "osb" in domainType and 'osb_server1' in self.OSB_MANAGED_SERVERS: + self.updateDefaultServerParameters(domainHome, sslEnabled, "osb_server1") + + # Fix for bug 36654711 self.updateAppTarget(domainHome,"wsm-pm",adminName) + updateDomain() + + def updateDefaultServerParameters(self, domainHome, sslEnabled, serverName): + print 'Removing administrationPort and SSL entries for default server ' + serverName + cd('/Servers/'+ serverName) + set('administrationPort', 0) + if (sslEnabled == 'false'): + delete(serverName, 'SSL') def updateAppTarget(self, domainHome, appName, targetName): print 'Adding target: '+ targetName+' for '+appName - readDomain(domainHome) assign("AppDeployment", appName, "Target", targetName) - updateDomain() def configureTlogJDBCStore(self, domainHome, domainType): @@ -431,7 +445,7 @@ def getDSMBean(self, jdbcDS): return - def createManagedServers(self, ms_count, managedNameBase, ms_port, cluster_name, ms_servers, managedServerSSLPort, sslEnabled): + def createManagedServers(self, ms_count, managedNameBase, ms_port, cluster_name, ms_servers, managedServerSSLPort, sslEnabled, ms_admin_port): # Create managed servers for index in range(0, ms_count): cd('/') @@ -441,9 +455,9 @@ def createManagedServers(self, ms_count, managedNameBase, ms_port, cluster_name, create(name, 'Server') cd('/Servers/%s/' % name ) print('Creating managed server: %s' % name); + if ( self.secureDomain == 'true'): + set('administrationPort', ms_admin_port) set('ListenPort', ms_port) - if (self.FLAG_1412 == 'true'): - set('ListenPortEnabled', true) set('NumOfRetriesBeforeMSIMode', 0) set('RetryIntervalBeforeMSIMode', 1) set('Cluster', cluster_name) @@ -458,19 +472,17 @@ def createManagedServers(self, ms_count, managedNameBase, ms_port, cluster_name, print ms_servers return ms_servers - def createBaseDomain(self, domainName, user, password, adminListenPort, adminServerSSLPort, adminName, soaManagedNameBase, osbManagedNameBase,soaManagedServerPort, osbManagedServerPort, soaManagedServerSSLPort, osbManagedServerSSLPort, prodMode, secureMode, managedCount, sslEnabled, soaClusterName, osbClusterName, domainType): + def createBaseDomain(self, domainName, user, password, adminListenPort, adminServerSSLPort, adminName, soaManagedNameBase, osbManagedNameBase,soaManagedServerPort, osbManagedServerPort, soaManagedServerSSLPort, osbManagedServerSSLPort, prodMode, secureMode, managedCount, sslEnabled, soaClusterName, osbClusterName, domainType, adminAdministrationPort, soaAdministrationPort, osbAdministrationPort): baseTemplate = self.replaceTokens(self.JRF_TEMPLATES['baseTemplate']) readTemplate(baseTemplate) setOption('DomainName', domainName) setOption('JavaHome', self.javaHome) - domainVersion = cmo.getDomainVersion() + self.domainVersion = cmo.getDomainVersion() if prodMode == 'true': - if (domainVersion == "14.1.2.0.0" and secureMode == 'true'): + if (self.domainVersion == "14.1.2.0.0" and secureMode == 'true'): setOption('ServerStartMode', 'secure') - elif (domainVersion == "14.1.2.0.0" and secureMode == 'false'): - setOption('ServerStartMode', 'prod') - self.FLAG_1412 = 'true' + self.secureDomain = 'true' else: setOption('ServerStartMode', 'prod') else: @@ -486,8 +498,8 @@ def createBaseDomain(self, domainName, user, password, adminListenPort, adminSer print 'Creating Admin Server...' cd('/Servers/AdminServer') set('ListenPort', admin_port) - if ( self.FLAG_1412 == 'true'): - set('ListenPortEnabled', true) + if ( self.secureDomain == 'true'): + set('administrationPort', int(adminAdministrationPort)) set('Name', adminName) self.ADMIN_SERVER_NAME = adminName cmo.setWeblogicPluginEnabled(true) @@ -511,7 +523,7 @@ def createBaseDomain(self, domainName, user, password, adminListenPort, adminSer print '\nCreating cluster...' + soaClusterName cd('/') cl=create(soaClusterName, 'Cluster') - self.SOA_MANAGED_SERVERS = self.createManagedServers(ms_count, soaManagedNameBase, ms_port, soaClusterName, self.SOA_MANAGED_SERVERS, managedSSLPort, sslEnabled) + self.SOA_MANAGED_SERVERS = self.createManagedServers(ms_count, soaManagedNameBase, ms_port, soaClusterName, self.SOA_MANAGED_SERVERS, managedSSLPort, sslEnabled, int(soaAdministrationPort)) print 'Created managed Servers for cluster..... ' + soaClusterName elif domainType == "osb": ms_port = int(osbManagedServerPort) @@ -519,7 +531,7 @@ def createBaseDomain(self, domainName, user, password, adminListenPort, adminSer print '\nCreating cluster...' + osbClusterName cd('/') cl=create(osbClusterName, 'Cluster') - self.OSB_MANAGED_SERVERS = self.createManagedServers(ms_count, osbManagedNameBase, ms_port, osbClusterName, self.OSB_MANAGED_SERVERS, managedSSLPort, sslEnabled) + self.OSB_MANAGED_SERVERS = self.createManagedServers(ms_count, osbManagedNameBase, ms_port, osbClusterName, self.OSB_MANAGED_SERVERS, managedSSLPort, sslEnabled, int(osbAdministrationPort)) print 'Created managed Servers for cluster..... ' + osbClusterName # Creating additional cluster and managed servers @@ -528,7 +540,7 @@ def createBaseDomain(self, domainName, user, password, adminListenPort, adminSer cd('/') cl=create(osbClusterName, 'Cluster') # Creating managed servers for additional cluster - self.OSB_MANAGED_SERVERS = self.createManagedServers(ms_count, osbManagedNameBase, int(osbManagedServerPort), osbClusterName, self.OSB_MANAGED_SERVERS, int(osbManagedServerSSLPort), sslEnabled) + self.OSB_MANAGED_SERVERS = self.createManagedServers(ms_count, osbManagedNameBase, int(osbManagedServerPort), osbClusterName, self.OSB_MANAGED_SERVERS, int(osbManagedServerSSLPort), sslEnabled, int(osbAdministrationPort)) print 'Created managed Servers for additional cluster..... ' + osbClusterName # Create Node Manager @@ -830,7 +842,7 @@ def enable_admin_channel(self, admin_channel_address, admin_channel_port): # Entry point to the script # ############################# -def usage(): +def usage(status=0): print sys.argv[0] + ' -oh -jh -parent -name ' + \ '-user -password ' + \ '-rcuDb -rcuPrefix -rcuSchemaPwd ' \ @@ -840,10 +852,11 @@ def usage(): '-soaManagedServerSSLPort -osbManagedServerSSLPort ' \ '-prodMode -managedServerCount -secureMode ' \ '-soaClusterName -osbClusterName ' \ + '-adminAdministrationPort -soaAdministrationPort -osbAdministrationPort ' \ '-domainType ' \ '-exposeAdminT3Channel -t3ChannelPublicAddress
' \ '-t3ChannelPort -persistentStore ' - sys.exit(0) + sys.exit(status) # Uncomment for Debug only #print str(sys.argv[0]) + " called with the following sys.argv array:" @@ -851,7 +864,7 @@ def usage(): # print "sys.argv[" + str(index) + "] = " + str(sys.argv[index]) if len(sys.argv) < 17: - usage() + usage(1) #oracleHome will be passed by command line parameter -oh. oracleHome = None @@ -873,6 +886,9 @@ def usage(): t3ChannelPort = None t3ChannelPublicAddress = None persistentStore = 'jdbc' +adminAdministrationPort = '9002' +soaAdministrationPort = '9004' +osbAdministrationPort = '9007' i = 1 while i < len(sys.argv): @@ -963,10 +979,19 @@ def usage(): elif sys.argv[i] == '-persistentStore': persistentStore = sys.argv[i + 1] i += 2 + elif sys.argv[i] == '-adminAdministrationPort': + adminAdministrationPort = sys.argv[i + 1] + i += 2 + elif sys.argv[i] == '-soaAdministrationPort': + soaAdministrationPort = sys.argv[i + 1] + i += 2 + elif sys.argv[i] == '-osbAdministrationPort': + osbAdministrationPort = sys.argv[i + 1] + i += 2 else: print 'Unexpected argument switch at position ' + str(i) + ': ' + str(sys.argv[i]) - usage() + usage(1) sys.exit(1) provisioner = SOAProvisioner(oracleHome, javaHome, domainParentDir) -provisioner.createSOADomain(domainName, domainUser, domainPassword, rcuDb, rcuSchemaPrefix, rcuSchemaPassword, adminListenPort, adminServerSSLPort, adminName, soaManagedNameBase, osbManagedNameBase, soaManagedServerPort, osbManagedServerPort, soaManagedServerSSLPort, osbManagedServerSSLPort, prodMode,secureMode, managedCount, soaClusterName, osbClusterName, sslEnabled, domainType, exposeAdminT3Channel, t3ChannelPublicAddress, t3ChannelPort) +provisioner.createSOADomain(domainName, domainUser, domainPassword, rcuDb, rcuSchemaPrefix, rcuSchemaPassword, adminListenPort, adminServerSSLPort, adminName, soaManagedNameBase, osbManagedNameBase, soaManagedServerPort, osbManagedServerPort, soaManagedServerSSLPort, osbManagedServerSSLPort, prodMode,secureMode, managedCount, soaClusterName, osbClusterName, sslEnabled, domainType, adminAdministrationPort, soaAdministrationPort, osbAdministrationPort, exposeAdminT3Channel, t3ChannelPublicAddress, t3ChannelPort) diff --git a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/create-domain-inputs.yaml b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/create-domain-inputs.yaml index c5687583e..677898401 100755 --- a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/create-domain-inputs.yaml +++ b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/create-domain-inputs.yaml @@ -8,10 +8,13 @@ version: create-weblogic-sample-domain-inputs-v1 sslEnabled: false # Port number for admin server -adminPort: 7011 +adminPort: 7001 # SSL Port number for admin server -adminServerSSLPort: 7012 +adminServerSSLPort: 7002 + +# Administation Port number for admin server +adminAdministrationPort: 9002 # Name of the Admin Server adminServerName: AdminServer @@ -51,10 +54,14 @@ soaClusterName: soa_cluster soaManagedServerNameBase: soa_server # Port number for each SOA managed server -soaManagedServerPort: 8011 +soaManagedServerPort: 7003 # SSL Port number for each SOA managed server -soaManagedServerSSLPort: 8012 +soaManagedServerSSLPort: 7004 + +# Administation Port number for SOA managed server +soaAdministrationPort: 9004 + # END: Configuration for SOA cluster # BEGIN: Configuration for OSB cluster @@ -66,15 +73,18 @@ osbClusterName: osb_cluster osbManagedServerNameBase: osb_server # Port number for each OSB managed server -osbManagedServerPort: 9011 +osbManagedServerPort: 8002 # SSL Port number for each OSB managed server -osbManagedServerSSLPort: 9012 +osbManagedServerSSLPort: 8003 + +# Administation Port number for OSB managed server +osbAdministrationPort: 9007 + # END: Configuration for OSB cluster # SOA Suite image. # The operator requires SOA Suite image. -# Refer to https://oracle.github.io/fmw-kubernetes/soa-domains/userguide/prepare-your-environment/#obtaining-the-soa-suite-docker-image/ for details on how to obtain or create the image. image: soasuite:release-version # Image pull policy diff --git a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/create-domain-job-template.yaml b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/create-domain-job-template.yaml index acb1dd63d..8e81365cf 100755 --- a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/create-domain-job-template.yaml +++ b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/create-domain-job-template.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. apiVersion: batch/v1 kind: Job @@ -80,6 +80,12 @@ spec: value: "%PRODUCTION_MODE_ENABLED%" - name: CUSTOM_SECURE_MODE value: "%SECURE_ENABLED%" + - name: CUSTOM_ADMIN_ADMINISTRATION_PORT + value: "%ADMIN_ADMINISTRATION_PORT%" + - name: CUSTOM_SOA_ADMINISTRATION_PORT + value: "%SOA_ADMINISTRATION_PORT%" + - name: CUSTOM_OSB_ADMINISTRATION_PORT + value: "%OSB_ADMINISTRATION_PORT%" - name: CUSTOM_CONNECTION_STRING value: "%CUSTOM_CONNECTION_STRING%" - name: EXPOSE_T3_CHANNEL_PREFIX diff --git a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-artifacts-inputs.yaml b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-artifacts-inputs.yaml index f22dca851..3edd10cc1 100755 --- a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-artifacts-inputs.yaml +++ b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-artifacts-inputs.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2021, 2023, Oracle and/or its affiliates. +# Copyright (c) 2021, 2024, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # The version of this inputs file. Do not modify. @@ -7,6 +7,9 @@ version: deploy-artifacts-inputs-v1 # Port number for admin server adminPort: 7001 +# Administation Port number for admin server +adminAdministrationPort: 9002 + # Name of the Admin Server adminServerName: AdminServer @@ -24,18 +27,26 @@ domainType: soa # SOA Cluster name soaClusterName: soa_cluster -# Port number for each SOA managed server -soaManagedServerPort: 8001 +# Port number of SOA managed server +soaManagedServerPort: 7003 + +# SSL Port number of SOA managed server +soaManagedServerSSLPort: 7004 # SOA Suite image. -# Artifacts deployment requires SOA Suite 12.2.1.4.0. -# Refer to https://oracle.github.io/fmw-kubernetes/soa-domains/userguide/prepare-your-environment/#obtaining-the-soa-suite-docker-image/ for details on how to obtain or create the image. -image: soasuite:12.2.1.4 +# Artifacts deployment requires SOA Suite image +image: soasuite:release-version # Image pull policy # Legal values are "IfNotPresent", "Always", or "Never" imagePullPolicy: IfNotPresent +# Boolean indicating if SSL is enabled for the domain. +sslEnabled: false + +# Boolean indicating if secure is enabled for the domain. +secureEnabled: false + # Name of the Kubernetes secret to access the container registry to pull the SOA Suite image # The presence of the secret will be validated when this parameter is enabled. #imagePullSecretName: @@ -58,7 +69,7 @@ artifactsSourceType: Image # Deploy artifacts image # Required if ArtifactsSourceType is Image -artifactsImage: artifacts:12.2.1.4 +artifactsImage: artifacts:release-version # Image pull policy # Legal values are "IfNotPresent", "Always", or "Never" diff --git a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-artifacts-job-template.yaml b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-artifacts-job-template.yaml index 478e3bbcd..c4db6bf7b 100755 --- a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-artifacts-job-template.yaml +++ b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-artifacts-job-template.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2021, 2022, Oracle and/or its affiliates. +# Copyright (c) 2021, 2024, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. apiVersion: batch/v1 kind: Job @@ -42,6 +42,8 @@ spec: %OSB_DEPLOY_PREFIX% env: %OSB_DEPLOY_PREFIX% - name: DOMAIN_UID %OSB_DEPLOY_PREFIX% value: "%DOMAIN_UID%" + %OSB_DEPLOY_PREFIX% - name: PROTOCOL + %OSB_DEPLOY_PREFIX% value: "%ADMIN_PROTOCOL%" %OSB_DEPLOY_PREFIX% - name: ADMIN_SERVER_NAME_SVC %OSB_DEPLOY_PREFIX% value: "%ADMIN_SERVER_NAME_SVC%" %OSB_DEPLOY_PREFIX% - name: ADMIN_LISTEN_PORT @@ -62,6 +64,8 @@ spec: %SOA_DEPLOY_PREFIX% env: %SOA_DEPLOY_PREFIX% - name: DOMAIN_UID %SOA_DEPLOY_PREFIX% value: "%DOMAIN_UID%" + %SOA_DEPLOY_PREFIX% - name: PROTOCOL + %SOA_DEPLOY_PREFIX% value: "%SOA_PROTOCOL%" %SOA_DEPLOY_PREFIX% - name: SOA_MANAGED_SERVER_PORT %SOA_DEPLOY_PREFIX% value: "%SOA_MANAGED_SERVER_PORT%" %SOA_DEPLOY_PREFIX% - name: SOA_CLUSTER_NAME diff --git a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-artifacts.sh b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-artifacts.sh index 51f3ce6f3..a5af14c80 100755 --- a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-artifacts.sh +++ b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-artifacts.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2021, 2023, Oracle and/or its affiliates. +# Copyright (c) 2021, 2024, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # # Description @@ -191,6 +191,21 @@ function createFiles { weblogicImagePullSecretPrefix=${enabledPrefix} imagePullSecretPrefix=${enabledPrefix} fi + if [[ $secureEnabled == "true" ]]; then + adminDeployPort=${adminAdministrationPort} + adminProtocol="t3s" + else + adminDeployPort=${adminPort} + adminProtocol="t3" + fi + if [[ $sslEnabled == "true" ]]; then + soaDeployPort=${soaManagedServerSSLPort} + soaProtocol="https" + else + soaDeployPort=${soaManagedServerPort} + soaProtocol="http" + fi + # Must escape the ':' value in image for sed to properly parse and replace image=$(echo ${image} | sed -e "s/\:/\\\:/g") @@ -208,10 +223,12 @@ function createFiles { sed -i -e "s:%WEBLOGIC_IMAGE_PULL_SECRET_PREFIX%:${weblogicImagePullSecretPrefix}:g" ${createJobOutput} sed -i -e "s:%DOMAIN_UID%:${domainUID}:g" ${createJobOutput} sed -i -e "s:%DOMAIN_NAME%:${domainName}:g" ${createJobOutput} + sed -i -e "s:%ADMIN_PROTOCOL%:${adminProtocol}:g" ${createJobOutput} + sed -i -e "s:%SOA_PROTOCOL%:${soaProtocol}:g" ${createJobOutput} sed -i -e "s:%ADMIN_SERVER_NAME_SVC%:${adminServerNameSVC}:g" ${createJobOutput} - sed -i -e "s:%ADMIN_PORT%:${adminPort}:g" ${createJobOutput} + sed -i -e "s:%ADMIN_PORT%:${adminDeployPort}:g" ${createJobOutput} sed -i -e "s:%SOA_DEPLOY_PREFIX%:${soaDeployPrefix}:g" ${createJobOutput} - sed -i -e "s:%SOA_MANAGED_SERVER_PORT%:${soaManagedServerPort}:g" ${createJobOutput} + sed -i -e "s:%SOA_MANAGED_SERVER_PORT%:${soaDeployPort}:g" ${createJobOutput} sed -i -e "s:%OSB_DEPLOY_PREFIX%:${osbDeployPrefix}:g" ${createJobOutput} sed -i -e "s:%SOA_CLUSTER_NAME%:${soaClusterNameSVC}:g" ${createJobOutput} sed -i -e "s:%OSB_CLUSTER_NAME%:${osbClusterName}:g" ${createJobOutput} diff --git a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-docker-file/Dockerfile b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-docker-file/Dockerfile index 0d76d491a..cbf890ee2 100755 --- a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-docker-file/Dockerfile +++ b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-docker-file/Dockerfile @@ -1,9 +1,9 @@ -# Copyright (c) 2021, Oracle and/or its affiliates. +# Copyright (c) 2021, 2024, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # This is a sample Dockerfile for supplying deployment artifacts in image -FROM busybox +FROM ghcr.io/oracle/oraclelinux:8-slim ARG SOA_ARTIFACTS_ARCHIVE_PATH=/u01/sarchives ARG OSB_ARTIFACTS_ARCHIVE_PATH=/u01/sbarchives ARG USER=oracle @@ -11,7 +11,7 @@ ARG USERID=1000 ARG GROUP=root ENV SOA_ARTIFACTS_ARCHIVE_PATH=${SOA_ARTIFACTS_ARCHIVE_PATH} ENV OSB_ARTIFACTS_ARCHIVE_PATH=${OSB_ARTIFACTS_ARCHIVE_PATH} -RUN adduser -D -u ${USERID} -G $GROUP $USER +RUN adduser -u ${USERID} -G $GROUP $USER COPY soa/ ${SOA_ARTIFACTS_ARCHIVE_PATH}/ COPY osb/ ${OSB_ARTIFACTS_ARCHIVE_PATH}/ RUN chown -R $USER:$GROUP ${SOA_ARTIFACTS_ARCHIVE_PATH}/ ${OSB_ARTIFACTS_ARCHIVE_PATH}/ diff --git a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-docker-file/build.sh b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-docker-file/build.sh index 2d7e1fee8..83fd73d18 100755 --- a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-docker-file/build.sh +++ b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy-docker-file/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2021, Oracle and/or its affiliates. +# Copyright (c) 2021, 2024, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl # # Script to build a Docker image for Oracle SOA suite artifacts. @@ -11,14 +11,14 @@ Usage: build.sh -t [tag] Builds a Docker Image with Oracle SOA/OSB artifacts Parameters: -h: view usage - -t: tag for image, default is 12.2.1.4 + -t: tag for image, default is release-version EOF exit $1 } #============================================================= #== MAIN starts here... #============================================================= -TAG="12.2.1.4" +TAG="release-version" while getopts "ht:" optname; do case "$optname" in "h") @@ -53,6 +53,9 @@ fi # ################## # # BUILDING THE IMAGE # # ################## # + +echo "Creating directories soa or osb for completeness of image to be used for deploy artifacts...." +mkdir -p soa osb buildCmd="docker build $BUILD_OPTS --force-rm=true $PROXY_SETTINGS -t $IMAGE_NAME -f $DOCKERFILE_NAME ." # BUILD THE IMAGE (replace all environment variables) diff --git a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy/osb/deploy.sh b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy/osb/deploy.sh index c5407504a..cfc2f8145 100755 --- a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy/osb/deploy.sh +++ b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy/osb/deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2021, Oracle and/or its affiliates. +# Copyright (c) 2021, 2024, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. script="${BASH_SOURCE[0]}" @@ -20,6 +20,7 @@ function deploy { tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX) cp $scriptDir/import.properties.template $tmp_dir/import.properties sed -i -e "s:%DOMAIN_UID%:${DOMAIN_UID}:g" $tmp_dir/import.properties + sed -i -e "s:%PROTOCOL%:${PROTOCOL}:g" $tmp_dir/import.properties sed -i -e "s:%ADMIN_SERVER_NAME_SVC%:${ADMIN_SERVER_NAME_SVC}:g" $tmp_dir/import.properties sed -i -e "s:%ADMIN_LISTEN_PORT%:${ADMIN_LISTEN_PORT}:g" $tmp_dir/import.properties sed -i -e "s:%USERNAME%:$(cat /weblogic-operator/secrets/username):g" $tmp_dir/import.properties @@ -31,6 +32,15 @@ function deploy { } # Reads the available Oracle Service Bus archives and deploys +if [[ $PROTOCOL == "t3s" ]]; then + echo | openssl s_client -showcerts -connect ${DOMAIN_UID}-${ADMIN_SERVER_NAME_SVC}:${ADMIN_LISTEN_PORT} 2>/dev/null | openssl x509 -trustout > /tmp/ssl_cert.crt + if [[ -f $JAVA_HOME/lib/security/cacerts ]]; then + echo yes | keytool -import -v -trustcacerts -alias osb -file /tmp/ssl_cert.crt -keystore $JAVA_HOME/lib/security/cacerts -keypass changeit -storepass changeit + else + echo yes | keytool -import -v -trustcacerts -alias osb -file /tmp/ssl_cert.crt -keystore $JAVA_HOME/jre/lib/security/cacerts -keypass changeit -storepass changeit + fi +fi + cd /u01/sbarchives/ sbars=$(ls *) for sbar in $sbars diff --git a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy/osb/import.properties.template b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy/osb/import.properties.template index 24a70d724..8e84f588f 100755 --- a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy/osb/import.properties.template +++ b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy/osb/import.properties.template @@ -1,10 +1,10 @@ -# Copyright (c) 2021, Oracle and/or its affiliates. +# Copyright (c) 2021, 2024, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # ################################################################## # OSB Admin Security Configuration # ################################################################## -adminUrl=t3://%DOMAIN_UID%-%ADMIN_SERVER_NAME_SVC%:%ADMIN_LISTEN_PORT% +adminUrl=%PROTOCOL%://%DOMAIN_UID%-%ADMIN_SERVER_NAME_SVC%:%ADMIN_LISTEN_PORT% importUser=%USERNAME% importPassword=%PASSWORD% diff --git a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy/soa/deploy.sh b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy/soa/deploy.sh index e0f0f72eb..60442feca 100755 --- a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy/soa/deploy.sh +++ b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/deploy/soa/deploy.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2021, Oracle and/or its affiliates. +# Copyright (c) 2021, 2024, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. script="${BASH_SOURCE[0]}" @@ -17,12 +17,21 @@ function exitIfError { function deploy { cd /u01/oracle/soa/bin ant -f ant-sca-deploy.xml \ - -DserverURL=http://${DOMAIN_UID}-cluster-${SOA_CLUSTER_NAME}:${SOA_MANAGED_SERVER_PORT} \ + -DserverURL=${PROTOCOL}://${DOMAIN_UID}-cluster-${SOA_CLUSTER_NAME}:${SOA_MANAGED_SERVER_PORT} \ -DsarLocation=/u01/sarchives/$1 \ -Doverwrite=true \ -Duser=$(cat /weblogic-operator/secrets/username) -Dpassword=$(cat /weblogic-operator/secrets/password) } +if [[ $PROTOCOL == "https" ]]; then + echo | openssl s_client -showcerts -connect ${DOMAIN_UID}-cluster-${SOA_CLUSTER_NAME}:${SOA_MANAGED_SERVER_PORT} 2>/dev/null | openssl x509 -trustout > /tmp/ssl_cert.crt + if [[ -f $JAVA_HOME/lib/security/cacerts ]]; then + echo yes | keytool -import -v -trustcacerts -alias soadomain -file /tmp/ssl_cert.crt -keystore $JAVA_HOME/lib/security/cacerts -keypass changeit -storepass changeit + else + echo yes | keytool -import -v -trustcacerts -alias soadomain -file /tmp/ssl_cert.crt -keystore $JAVA_HOME/jre/lib/security/cacerts -keypass changeit -storepass changeit + fi +fi + cd /u01/sarchives/ sars=$(ls *) for sar in $sars diff --git a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/wlst/create-domain-script.sh b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/wlst/create-domain-script.sh index dc7aeb7ce..65baf79fc 100755 --- a/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/wlst/create-domain-script.sh +++ b/OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/wlst/create-domain-script.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. export DOMAIN_HOME=${DOMAIN_HOME_DIR} @@ -27,6 +27,9 @@ wlst.sh -skipWLSModuleScanning \ -osbManagedServerPort ${CUSTOM_OSB_MANAGEDSERVER_PORT} \ -prodMode ${CUSTOM_PRODUCTION_MODE} \ -secureMode ${CUSTOM_SECURE_MODE} \ + -adminAdministrationPort ${CUSTOM_ADMIN_ADMINISTRATION_PORT} \ + -soaAdministrationPort ${CUSTOM_SOA_ADMINISTRATION_PORT} \ + -osbAdministrationPort ${CUSTOM_OSB_ADMINISTRATION_PORT} \ -managedServerCount ${CUSTOM_MANAGED_SERVER_COUNT} \ -soaClusterName ${CUSTOM_SOA_CLUSTER_NAME} \ -osbClusterName ${CUSTOM_OSB_CLUSTER_NAME} \ diff --git a/OracleSOASuite/kubernetes/create-soa-domain/utils/utility.sh b/OracleSOASuite/kubernetes/create-soa-domain/utils/utility.sh index 620fc3bf1..a1f2a566e 100755 --- a/OracleSOASuite/kubernetes/create-soa-domain/utils/utility.sh +++ b/OracleSOASuite/kubernetes/create-soa-domain/utils/utility.sh @@ -55,10 +55,28 @@ function createFiles_SOA { exposeAdminNodePortPrefix="${disabledPrefix}" fi - if [ -z "${secureEnabled}" ]; then + # Setting default values + if [ -z "${sslEnabled}" ]; then sslEnabled="false" fi + if [ -z "${secureEnabled}" ]; then + secureEnabled="false" + fi + + if [ -z "${adminAdministrationPort}" ]; then + adminAdministrationPort="9002" + fi + + if [ -z "${soaAdministrationPort}" ]; then + soaAdministrationPort="9004" + fi + + if [ -z "${osbAdministrationPort}" ]; then + osbAdministrationPort="9007" + fi + + if [ "${secureEnabled}" == "true" ] && [ "${productionEnabled}" == "true" ]; then sslEnabled="true" fi @@ -137,6 +155,9 @@ function createFiles_SOA { sed -i -e "s:%SSL_ENABLED%:${sslEnabled}:g" ${domainPropertiesOutput} sed -i -e "s:%PRODUCTION_MODE_ENABLED%:${productionModeEnabled}:g" ${domainPropertiesOutput} sed -i -e "s:%SECURE_ENABLED%:${secureEnabled}:g" ${domainPropertiesOutput} + sed -i -e "s:%ADMIN_ADMINISTRATION_PORT%:${adminAdministrationPort}:g" ${domainPropertiesOutput} + sed -i -e "s:%SOA_ADMINISTRATION_PORT%:${soaAdministrationPort}:g" ${domainPropertiesOutput} + sed -i -e "s:%OSB_ADMINISTRATION_PORT%:${osbAdministrationPort}:g" ${domainPropertiesOutput} sed -i -e "s:%CLUSTER_TYPE%:${clusterType}:g" ${domainPropertiesOutput} sed -i -e "s:%JAVA_OPTIONS%:${javaOptions}:g" ${domainPropertiesOutput} sed -i -e "s:%T3_CHANNEL_PORT%:${t3ChannelPort}:g" ${domainPropertiesOutput} @@ -194,6 +215,9 @@ function createFiles_SOA { sed -i -e "s:%SSL_ENABLED%:${sslEnabled}:g" ${createJobOutput} sed -i -e "s:%PRODUCTION_MODE_ENABLED%:${productionModeEnabled}:g" ${createJobOutput} sed -i -e "s:%SECURE_ENABLED%:${secureEnabled}:g" ${createJobOutput} + sed -i -e "s:%ADMIN_ADMINISTRATION_PORT%:${adminAdministrationPort}:g" ${createJobOutput} + sed -i -e "s:%SOA_ADMINISTRATION_PORT%:${soaAdministrationPort}:g" ${createJobOutput} + sed -i -e "s:%OSB_ADMINISTRATION_PORT%:${osbAdministrationPort}:g" ${createJobOutput} sed -i -e "s:%ADMIN_SERVER_NAME%:${adminServerName}:g" ${createJobOutput} sed -i -e "s:%ADMIN_SERVER_NAME_SVC%:${adminServerNameSVC}:g" ${createJobOutput} sed -i -e "s:%ADMIN_PORT%:${adminPort}:g" ${createJobOutput} diff --git a/OracleSOASuite/kubernetes/create-soa-domain/utils/validate.sh b/OracleSOASuite/kubernetes/create-soa-domain/utils/validate.sh index 7dc1015a6..c50cf3c20 100755 --- a/OracleSOASuite/kubernetes/create-soa-domain/utils/validate.sh +++ b/OracleSOASuite/kubernetes/create-soa-domain/utils/validate.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2020, 2023, Oracle and/or its affiliates. +# Copyright (c) 2020, 2024, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. # # Description @@ -78,6 +78,15 @@ function validateSSLPortsSpecified { fi } +# +# Validate SSL port value is specified ? +# +function validateAdministrationPortsSpecified { + if [ "${secureEnabled}" = "true" ]; then + validateInputParamsSpecified \ + ${1} + fi +} # # Validate ConfiguredManagedServerCount is non zero value @@ -143,6 +152,9 @@ function validateCommonInputs_SOA { validateSSLPortsSpecified \ adminServerSSLPort + validateAdministrationPortsSpecified \ + adminAdministrationPort + validateSOASuiteDomainType validatePersistentStoreType @@ -157,6 +169,9 @@ function validateCommonInputs_SOA { validateSSLPortsSpecified \ soaManagedServerSSLPort + validateAdministrationPortsSpecified \ + soaAdministrationPort + validateClusterName_SOA \ soaClusterName \ ${soaClusterName} @@ -176,6 +191,9 @@ function validateCommonInputs_SOA { validateSSLPortsSpecified \ osbManagedServerSSLPort + validateAdministrationPortsSpecified \ + osbAdministrationPort + validateClusterName_SOA \ osbClusterName \ ${osbClusterName} diff --git a/OracleSOASuite/kubernetes/monitoring-service/scripts/deploy-weblogic-server-grafana-dashboard.sh b/OracleSOASuite/kubernetes/monitoring-service/scripts/deploy-weblogic-server-grafana-dashboard.sh index d91782034..91cd1f968 100755 --- a/OracleSOASuite/kubernetes/monitoring-service/scripts/deploy-weblogic-server-grafana-dashboard.sh +++ b/OracleSOASuite/kubernetes/monitoring-service/scripts/deploy-weblogic-server-grafana-dashboard.sh @@ -23,7 +23,7 @@ adminServerPodName="${domainUID}-$(toDNS1123Legal ${adminServerName})" grafanaEndpointIP=$(${KUBERNETES_CLI:-kubectl} get endpoints ${monitoringHelmReleaseName}-grafana -n ${monitoringNamespace} -o=jsonpath="{.subsets[].addresses[].ip}") grafanaEndpointPort=$(${KUBERNETES_CLI:-kubectl} get endpoints ${monitoringHelmReleaseName}-grafana -n ${monitoringNamespace} -o=jsonpath="{.subsets[].ports[].port}") grafanaEndpoint="${grafanaEndpointIP}:${grafanaEndpointPort}" -${KUBERNETES_CLI:-kubectl} cp $scriptDir/../config/weblogic-server-dashboard.json ${domainNamespace}/${adminServerPodName}:/tmp/weblogic-server-dashboard.json +${KUBERNETES_CLI:-kubectl} cp $scriptDir/../config/weblogic-server-dashboard.json ${domainNamespace}/${adminServerPodName}:/tmp/weblogic-server-dashboard.json -c weblogic-server EXEC_DEPLOY="${KUBERNETES_CLI:-kubectl} exec -it -c weblogic-server -n ${domainNamespace} ${adminServerPodName} -- curl --noproxy \"*\" -X POST -H \"Content-Type: application/json\" -d @/tmp/weblogic-server-dashboard.json http://admin:admin@${grafanaEndpoint}/api/dashboards/db" echo "Deploying WebLogic Server Grafana Dashboard in progress...." eval ${EXEC_DEPLOY} diff --git a/OracleSOASuite/kubernetes/monitoring-service/setup-monitoring.sh b/OracleSOASuite/kubernetes/monitoring-service/setup-monitoring.sh index d5dc8e980..10e6e5753 100755 --- a/OracleSOASuite/kubernetes/monitoring-service/setup-monitoring.sh +++ b/OracleSOASuite/kubernetes/monitoring-service/setup-monitoring.sh @@ -97,7 +97,7 @@ function WebLogicMonitoringExporter { echo "!!! WARNING !!! This will be triggering the Domain restart...." ${KUBERNETES_CLI:-kubectl} patch domain ${domainUID} -n ${domainNamespace} --patch-file ${scriptDir}/config/config.yaml --type=merge sleep 10 - sh ${scriptDir}/scripts/waitForDomain.sh -d ${domainUID} -n ${domainNamespace} -p "Completed" + sh ${scriptDir}/scripts/waitForDomain.sh -d ${domainUID} -n ${domainNamespace} -p "Completed" -i }