Skip to content

Commit

Permalink
Oracle SOA Suite Kubernetes script updates for release 24.4.2 (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
ashageetha authored Dec 18, 2024
1 parent 2809754 commit ea177cb
Show file tree
Hide file tree
Showing 22 changed files with 228 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
32 changes: 16 additions & 16 deletions OracleSOASuite/kubernetes/charts/ingress-per-domain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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`.
Original file line number Diff line number Diff line change
@@ -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" }}
Expand Down
Original file line number Diff line number Diff line change
@@ -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" }}
Expand Down
14 changes: 7 additions & 7 deletions OracleSOASuite/kubernetes/charts/ingress-per-domain/values.yaml
Original file line number Diff line number Diff line change
@@ -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.
#
#
Expand All @@ -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:
Expand Down
1 change: 0 additions & 1 deletion OracleSOASuite/kubernetes/charts/traefik/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
class SOAProvisioner:

jrfDone = 0;
secureDomain = 'false';
domainVersion = '';
MACHINES = {
'machine1' : {
'NMType': 'SSL',
Expand Down Expand Up @@ -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":
Expand All @@ -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):
Expand Down Expand Up @@ -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('/')
Expand All @@ -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)
Expand All @@ -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:
Expand All @@ -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)
Expand All @@ -511,15 +523,15 @@ 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)
managedSSLPort = int(osbManagedServerSSLPort)
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
Expand All @@ -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
Expand Down Expand Up @@ -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 <oracle_home> -jh <java_home> -parent <domain_parent_dir> -name <domain-name> ' + \
'-user <domain-user> -password <domain-password> ' + \
'-rcuDb <rcu-database> -rcuPrefix <rcu-prefix> -rcuSchemaPwd <rcu-schema-password> ' \
Expand All @@ -840,18 +852,19 @@ def usage():
'-soaManagedServerSSLPort <soaManagedServerSSLPort> -osbManagedServerSSLPort <osbManagedServerSSLPort> ' \
'-prodMode <prodMode> -managedServerCount <managedCount> -secureMode <secureMode> ' \
'-soaClusterName <soaClusterName> -osbClusterName <osbClusterName> ' \
'-adminAdministrationPort <adminAdministrationPort> -soaAdministrationPort <soaAdministrationPort> -osbAdministrationPort <osbAdministrationPort> ' \
'-domainType <soa|osb|soaosb|soab2b|soaosbb2b> ' \
'-exposeAdminT3Channel <quoted true or false> -t3ChannelPublicAddress <address of the cluster> ' \
'-t3ChannelPort <t3 channel port> -persistentStore <jdbc|file>'
sys.exit(0)
sys.exit(status)

# Uncomment for Debug only
#print str(sys.argv[0]) + " called with the following sys.argv array:"
#for index, arg in enumerate(sys.argv):
# 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
Expand All @@ -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):
Expand Down Expand Up @@ -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)
Loading

0 comments on commit ea177cb

Please sign in to comment.