Skip to content

Commit e186ec6

Browse files
authored
Oracle SOASuite scripts and documentation for release 25.3.2 (#256)
1 parent 484748c commit e186ec6

File tree

386 files changed

+109278
-212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

386 files changed

+109278
-212
lines changed

OracleSOASuite/kubernetes/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ The operator has several key features to assist you with deploying and managing
2323
Refer the following documentation links for detailed information about deploying Oracle SOA Suite domains on Kubernetes.
2424

2525
- [14.1.2.0.0](https://docs.oracle.com/en/middleware/soa-suite/soa/14.1.2/soakn/index.html)
26-
- [12.2.1.4.0](https://oracle.github.io/fmw-kubernetes/soa-domains/)
27-
26+
- [12.2.1.4.0](https://oracle.github.io/fmw-kubernetes/soa-domains/)

OracleSOASuite/kubernetes/create-oracle-db-service/common/checkDbState.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Copyright (c) 2025, Oracle and/or its affiliates.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
apiVersion: v1
5+
kind: Service
6+
metadata:
7+
name: oracle-db
8+
namespace: default
9+
spec:
10+
ports:
11+
- name: tns
12+
port: 1521
13+
protocol: TCP
14+
targetPort: 1521
15+
nodePort: 30011
16+
selector:
17+
app.kubernetes.io/instance: dev
18+
app.kubernetes.io/name: oracle-db
19+
sessionAffinity: None
20+
type: LoadBalancer
21+
---
22+
apiVersion: apps/v1
23+
kind: Deployment
24+
metadata:
25+
name: oracle-db
26+
namespace: default
27+
spec:
28+
replicas: 1
29+
selector:
30+
matchLabels:
31+
app.kubernetes.io/instance: dev
32+
app.kubernetes.io/name: oracle-db
33+
strategy:
34+
rollingUpdate:
35+
maxSurge: 1
36+
maxUnavailable: 1
37+
type: RollingUpdate
38+
template:
39+
metadata:
40+
labels:
41+
app.kubernetes.io/instance: dev
42+
app.kubernetes.io/name: oracle-db
43+
spec:
44+
containers:
45+
- env:
46+
- name: ORACLE_SID
47+
value: ORCLCDB
48+
- name: ORACLE_PDB
49+
value: ORCLPDB1
50+
- name: DB_DOMAIN
51+
value: k8s
52+
- name: DB_BUNDLE
53+
value: basic
54+
- name: ORACLE_PWD
55+
valueFrom:
56+
secretKeyRef:
57+
name: oracle-db-secret
58+
key: password
59+
image: container-registry.oracle.com/database/enterprise:19.3.0.0
60+
imagePullPolicy: IfNotPresent
61+
name: oracle-db
62+
ports:
63+
- containerPort: 1521
64+
name: tns
65+
protocol: TCP
66+
resources:
67+
requests:
68+
cpu: "2"
69+
memory: "24Gi"
70+
limits:
71+
cpu: "4"
72+
memory: "40Gi"
73+
terminationMessagePath: /dev/termination-log
74+
terminationMessagePolicy: File
75+
dnsPolicy: ClusterFirst
76+
restartPolicy: Always
77+
schedulerName: default-scheduler
78+
securityContext: {}
79+
terminationGracePeriodSeconds: 30
80+
imagePullSecrets:
81+
- name: docker-store

OracleSOASuite/kubernetes/create-oracle-db-service/start-db-service.sh

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) 2020, 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2020, 2025, Oracle and/or its affiliates.
33
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44

55
# Bring up Oracle DB Instance in [default] NameSpace with a NodePort Service
@@ -9,7 +9,7 @@ scriptDir="$( cd "$( dirname "${script}" )" && pwd )"
99
source ${scriptDir}/../common/utility.sh
1010

1111
usage() {
12-
echo "usage: ${script} [-a <dbasecret>] [-p <nodeport>] [-i <image>] [-s <pullsecret>] [-n <namespace>] [-h]"
12+
echo "usage: ${script} [-a <dbasecret>] [-p <nodeport>] [-i <image>] [-s <pullsecret>] [-n <namespace>] [-l <pdb_id>] [-h]"
1313
echo " -a DB Sys Account Password Secret Name (optional)"
1414
echo " (default: oracle-db-secret, secret must include a key named 'password')"
1515
echo " If this secret is not deployed, then the database will not successfully deploy."
@@ -22,6 +22,7 @@ usage() {
2222
echo " If this secret is not deployed, then Kubernetes will try pull anonymously."
2323
echo " -n Configurable Kubernetes NameSpace for Oracle DB Service (optional)"
2424
echo " (default: default) "
25+
echo " -l db pdb id for Oracle DB service (optional, default: devpdb.k8s)"
2526
echo " -h Help"
2627
exit $1
2728
}
@@ -31,8 +32,9 @@ nodeport=30011
3132
dbimage="container-registry.oracle.com/database/enterprise:12.2.0.1-slim"
3233
pullsecret="docker-store"
3334
namespace="default"
35+
pdbid="devpdb.k8s"
3436

35-
while getopts ":a:p:i:s:n:h:" opt; do
37+
while getopts ":a:p:i:s:n:h:l:" opt; do
3638
case $opt in
3739
a) syssecret="${OPTARG}"
3840
;;
@@ -44,6 +46,8 @@ while getopts ":a:p:i:s:n:h:" opt; do
4446
;;
4547
n) namespace="${OPTARG}"
4648
;;
49+
l) pdbid="${OPTARG}"
50+
;;
4751
h) usage 0
4852
;;
4953
*) usage 1
@@ -67,7 +71,13 @@ echo "NodePort[$nodeport] ImagePullSecret[$pullsecret] Image[${dbimage}] NameSpa
6771
dbYaml=${scriptDir}/common/oracle.db.${namespace}.yaml
6872
if [ ! -f "$dbYaml" ]; then
6973
echo "$dbYaml does not exist."
70-
cp ${scriptDir}/common/oracle.db.yaml ${dbYaml}
74+
if echo "$dbimage" | grep -q "12\."; then
75+
templateYaml="${scriptDir}/common/oracle.db.yaml"
76+
else
77+
templateYaml="${scriptDir}/common/oracle.db.19plus.yaml"
78+
fi
79+
echo "Using template: $templateYaml"
80+
cp "${templateYaml}" "${dbYaml}"
7181
fi
7282

7383
# Modify ImagePullSecret and DatabaseImage based on input
@@ -107,14 +117,29 @@ checkService oracle-db ${namespace}
107117
${KUBERNETES_CLI:-kubectl} get po -n ${namespace}
108118
${KUBERNETES_CLI:-kubectl} get service -n ${namespace}
109119

110-
${KUBERNETES_CLI:-kubectl} cp ${scriptDir}/common/checkDbState.sh -n ${namespace} ${dbpod}:/home/oracle/
120+
logfile="/tmp/setupDB.log"
121+
max=60
122+
counter=0
123+
while [ $counter -le ${max} ]
124+
do
125+
${KUBERNETES_CLI:-kubectl} logs ${dbpod} -n ${namespace} > $logfile
126+
grep -i "DATABASE IS READY" $logfile
127+
[[ $? == 0 ]] && break;
128+
((counter++))
129+
echo "[$counter/${max}] Retrying for Oracle Database Availability..."
130+
sleep 60
131+
done
111132

112-
${KUBERNETES_CLI:-kubectl} exec -it ${dbpod} -n ${namespace} -- /bin/bash /home/oracle/checkDbState.sh
113133
if [ $? != 0 ]; then
114-
echo "######################";
115-
echo "[ERROR] Could not create Oracle DB Service, check the pod log for pod ${dbpod} in namespace ${namespace}";
116-
echo "######################";
117-
exit -3;
134+
echo "######################";
135+
echo "[ERROR] Could not create Oracle DB Service, check the pod log for pod ${dbpod} in namespace ${namespace}";
136+
echo "######################";
137+
exit -3;
138+
fi
139+
140+
if echo "$dbimage" | grep -q "19\."; then
141+
echo " set sys password "
142+
${KUBERNETES_CLI:-kubectl} exec -it ${dbpod} -n ${namespace} -- /bin/bash setPassword.sh Oradoc_db1
118143
fi
119144

120145
if [ ! "${nodeport}" = "none" ]; then
@@ -123,4 +148,3 @@ else
123148
echo "Oracle DB Service is RUNNING and does not specify a public NodePort"
124149
fi
125150
echo "Oracle DB Service URL [oracle-db.${namespace}.svc.cluster.local:1521/devpdb.k8s]"
126-

OracleSOASuite/kubernetes/create-soa-domain/domain-home-on-pv/wlst/create-domain-script.sh

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -43,36 +43,3 @@ wlst.sh -skipWLSModuleScanning \
4343
-osbManagedServerSSLPort ${OSB_MANAGED_SERVER_SSL_PORT} \
4444
-persistentStore ${PERSISTENCE_STORE}
4545

46-
wlstCmdVal=$?
47-
48-
if [ $wlstCmdVal -ne 0 ]; then
49-
echo "ERROR: Domain creation failed. Please check the logs"
50-
exit 1
51-
else
52-
#For BUG-37807693
53-
export OH=/u01/oracle
54-
JAR_FILE="$OH/oracle_common/modules/oracle.adf.share/adf-share-support.jar"
55-
SCRIPT_TO_CHECK="DomainConfigGraalLibUpdate.sh"
56-
if [ -f $JAR_FILE ]; then
57-
echo "adf-share-support.jar is available, Checking availability of script DomainConfigGraalLibUpdate.sh"
58-
FILE_PATH=$(jar tf "$JAR_FILE" | grep "$SCRIPT_TO_CHECK")
59-
if [ -n "$FILE_PATH" ]; then
60-
echo "File path of DomainConfigGraalLibUpdate.sh - $FILE_PATH"
61-
cd /tmp
62-
jar xvf $JAR_FILE $FILE_PATH
63-
chmod +x $FILE_PATH
64-
echo $OH | /tmp/$FILE_PATH
65-
retVal=$?
66-
if [ $retVal -ne 0 ]; then
67-
echo "ERROR: DomainConfigGraalLibUpdate.sh execution failed. Please check the logs"
68-
exit 1
69-
else
70-
echo "DomainConfigGraalLibUpdate.sh script execution completed"
71-
fi
72-
else
73-
echo "Script DomainConfigGraalLibUpdate.sh not available"
74-
fi
75-
else
76-
echo "$JAR_FILE not available"
77-
fi
78-
fi

OracleSOASuite/kubernetes/domain-upgrade/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ Refer to the configuration parameters below to understand the information that y
2424
#### Configuration parameters
2525

2626
* If SSL is disabled in the source environment, then you can not enable secure mode directly during upgrade process. Hence do not set `secureEnabled` to true as this will result in unexpected behaviour. You can perform below steps to enable secure domain:
27-
- First upgrade to non-secure 14.1.2 domain using the domain upgrade scripts.
28-
- Post upgrade, once the servers are up and running, refer to [Enable Secure domain post upgrade](#enable-secure-domain-post-upgrade) to enable the secure domain.
27+
- First upgrade to non-secure 14.1.2 domain using the domain upgrade scripts.
28+
- Post upgrade, once the servers are up and running, refer to [Enable Secure domain post upgrade](#enable-secure-domain-post-upgrade) to enable the secure domain.
29+
30+
* If SSL is enabled in the source environment then you can set `secureEnabled` to `true` to enable secure domain during the upgrade process.
2931

30-
* If SSL is enabled in the source environment then you can set `secureEnabled` to `true` to enable secure domain during the upgrade process.
31-
3232
The following parameters can be provided in the inputs file.
3333

3434
| Parameter | Definition | Default |
@@ -84,12 +84,10 @@ $ cd $WORKDIR
8484
$ helm upgrade REPLACE-WITH-INGRESS-PER-DOMAIN-RELEASE-NAME charts/ingress-per-domain \
8585
--reuse-values --set wlsDomain.secureEnabled=true
8686
```
87-
8887
#### Enable secure domain post upgrade
8988

9089
Perform the below steps to enable the secure domain in a non-SSL OracleSOASuite 14.1.2 domain:
9190

92-
9391
* Connect to an Administration Server using WebLogic Remote console.
9492
* In the **Edit Tree**, go to **Environment**, then **Domain** and enable the `Secured Production Mode` toggle on Domain screen.
9593
* Click **Save**.
@@ -105,3 +103,5 @@ Perform the below steps to enable the secure domain in a non-SSL OracleSOASuite
105103
* Perform domain full shutdown and restart. Refer [Full domain restarts](https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/domain-lifecycle/startup/#full-domain-restarts) for details.
106104

107105
> **Note** : Once you have enabled "Secured Production Mode", existing ingress to access the domain URLs will not work. Refer to [Upgrade ingress](#upgrade-ingress) for details.
106+
107+

OracleSOASuite/kubernetes/domain-upgrade/scripts/domainHomeUpgrade.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def usage(status=0):
3131
print 'Preparing to update domain '+ domainName
3232
updateDomain()
3333
print 'Domain upgrade completed ....'
34+
closeDomain()
3435
except Exception, e:
3536
if 'The domain is already at the current version' in str(e):
3637
print "Domain " + domainName + " already upgraded to current version."

OracleSOASuite/kubernetes/domain-upgrade/scripts/postUpgrade.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def usage(status=0):
5656
print 'Preparing to update domain...'
5757
cd('/')
5858
updateDomain()
59+
closeDomain()
5960
except:
6061
dumpStack()
6162
print 'Updating the JDBC data source for schema ' + wlsRuntimeUser + ' failed'

OracleSOASuite/kubernetes/domain-upgrade/scripts/secureDomain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
create('NO_NAME_0', 'SecureMode')
2525
cd('SecureMode/NO_NAME_0')
2626
set('SecureModeEnabled', true)
27-
updateDomain()
2827
except:
2928
dumpStack()
3029
print 'Preparing to update domain...'
3130
cd('/')
3231
updateDomain()
32+
closeDomain()
3333
sys.exit(0)
3434

File renamed without changes.

0 commit comments

Comments
 (0)