Skip to content

Commit e201862

Browse files
authored
Oracle SOA Suite 23.1.2 - Scripts and Documentations (#157)
1 parent b5751b1 commit e201862

File tree

480 files changed

+113423
-2040
lines changed

Some content is hidden

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

480 files changed

+113423
-2040
lines changed

FMWKubernetesMAA/OracleEnterpriseDeploymentAutomation/OracleSOASuite/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Update the values in the `maak8master.env`, `maak8worker.env` and `maak8soa.env`
3333
| `share_dir` | Kubernetes PV shared storage that will host the Oracle SOA Suite domain. | `/k8nfs` |
3434
| `script_dir` | Directory for deployment scripts | `/scripts` |
3535
| `output_dir` | Location to generate the output log and deployment files | `/soak8edg/output$dt` |
36+
| `log_dir` | Location to generate output log | `/scratch/k8logs` |
3637
| `user` | User with passwordless sudo access to the master node| `myuser` |
3738
| `ssh_key` | ssh key for master node access | `/home/myuser/KeySOAMAA.ppk` |
3839
| `mnode1` | Kubernetes control plane node1 hostname | `olk8-m1` |
@@ -41,7 +42,7 @@ Update the values in the `maak8master.env`, `maak8worker.env` and `maak8soa.env`
4142
| `wnode1` | Worker node1 hostname | `olk8-w1` |
4243
| `wnode2` | Worker node2 hostname | `olk8-w2` |
4344
| `wnode3` | Worker node3 hostname | `olk8-w3` |
44-
| `helm_version` | Helm version to be used | `3.5.4` |
45+
| `helm_version` | Helm version to be used | `3.10.2` |
4546
| `wlsoperator_version` | WebLogic Kubernetes Operator version to be used | `3.4.4` |
4647
| `soak8branch` | fmw-kubernetes release version | `22.4.2` |
4748
| `soaimage` | Oracle SOA Suite Docker image | `soasuite:12.2.1.4` |

FMWKubernetesMAA/OracleEnterpriseDeploymentAutomation/OracleSOASuite/common/utils.sh

Lines changed: 42 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# Copyright (c) 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2022, 2023, 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
# Utility functions that are shared by multiple scripts
@@ -18,6 +18,20 @@ printError() {
1818
echo [ERROR] $*
1919
}
2020

21+
setupProxy(){
22+
23+
if [[ "$proxy" != "false" ]]; then
24+
cat <<EOF > /tmp/setup_proxy.env
25+
export http_proxy=$http_proxy
26+
export https_proxy=$https_proxy
27+
export no_proxy=$no_proxy
28+
export HTTP_PROXY=$http_proxy
29+
export HTTPS_PROXY=$https_proxy
30+
export NO_PROXY=$no_proxy
31+
EOF
32+
fi
33+
34+
}
2135

2236
# Function to create scripts for Docker and Kubernetes setup
2337
createSetupScripts() {
@@ -31,9 +45,8 @@ name=Kubernetes
3145
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
3246
enabled=1
3347
gpgcheck=1
34-
repo_gpgcheck=1
3548
gpgkey=https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
36-
exclude=kube*
49+
exclude=kubelet kubeadm kubectl
3750
EOF
3851

3952
# sysctl params required by setup, params persist across reboots
@@ -66,9 +79,9 @@ echo "Configuring OS..."
6679
sysctl net.ipv4.conf.${vnic}.forwarding=1
6780
sysctl net.ipv4.conf.lo.forwarding=1
6881
sysctl net.ipv4.ip_nonlocal_bind=1
69-
'net.ipv4.conf.${vnic}.forwarding=1' | sudo tee -a /etc/sysctl.conf
70-
"net.ipv4.conf.lo.forwarding=1" | sudo tee -a /etc/sysctl.conf
71-
"net.ipv4.ip_nonlocal_bind=1" | sudo tee -a /etc/sysctl.conf
82+
echo 'net.ipv4.conf.${vnic}.forwarding=1' | sudo tee -a /etc/sysctl.conf
83+
echo "net.ipv4.conf.lo.forwarding=1" | sudo tee -a /etc/sysctl.conf
84+
echo "net.ipv4.ip_nonlocal_bind=1" | sudo tee -a /etc/sysctl.conf
7285
iptables -P FORWARD ACCEPT
7386
firewall-cmd --add-masquerade --permanent
7487
firewall-cmd --add-port=2379-2380/tcp --permanent
@@ -122,29 +135,6 @@ EOF
122135
}
123136
EOF
124137

125-
cat <<EOF > ${setupScriptsDir}/docker_configure_$host.sh
126-
if [[ -f /tmp/maa/proxy.env ]]; then
127-
source /tmp/maa/proxy.env
128-
fi
129-
mkdir -p /etc/docker/
130-
cp /tmp/maa/daemon.json /etc/docker/
131-
if [[ -f /tmp/maa/http-proxy.conf ]]; then
132-
mkdir -p /etc/systemd/system/docker.service.d
133-
cp /tmp/maa/http-proxy.conf /etc/systemd/system/docker.service.d/
134-
fi
135-
systemctl daemon-reload
136-
systemctl enable docker
137-
systemctl start docker
138-
systemctl restart docker
139-
systemctl status docker
140-
echo "Sleeping for possible break..."
141-
sleep 30
142-
sysctl net.ipv4.conf.docker0.forwarding=1
143-
systemctl daemon-reload
144-
systemctl restart docker
145-
echo "Docker restarted."
146-
EOF
147-
148138
cat <<EOF > ${setupScriptsDir}/k8s_install_$host.sh
149139
if [[ -f /tmp/maa/proxy.env ]]; then
150140
source /tmp/maa/proxy.env
@@ -167,5 +157,28 @@ systemctl restart kubelet
167157
wget https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml -O /tmp/maa/kube-flannel.yml
168158
wget https://get.helm.sh/helm-v${helm_version}-linux-amd64.tar.gz -O /tmp/maa/helm-v${helm_version}-linux-amd64.tar.gz
169159
echo "kube* packages installed and started."
160+
EOF
161+
162+
cat <<EOF > ${setupScriptsDir}/docker_configure_$host.sh
163+
if [[ -f /tmp/maa/proxy.env ]]; then
164+
source /tmp/maa/proxy.env
165+
fi
166+
mkdir -p /etc/docker/
167+
cp /tmp/maa/daemon.json /etc/docker/
168+
if [[ -f /tmp/maa/http-proxy.conf ]]; then
169+
mkdir -p /etc/systemd/system/docker.service.d
170+
cp /tmp/maa/http-proxy.conf /etc/systemd/system/docker.service.d/
171+
fi
172+
systemctl daemon-reload
173+
systemctl enable docker
174+
systemctl start docker
175+
systemctl restart docker
176+
systemctl status docker
177+
echo "Sleeping for possible break..."
178+
sleep 30
179+
sysctl net.ipv4.conf.docker0.forwarding=1
180+
systemctl daemon-reload
181+
systemctl restart docker
182+
170183
EOF
171184
}

FMWKubernetesMAA/OracleEnterpriseDeploymentAutomation/OracleSOASuite/maak8master.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
2-
# Copyright (c) 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2022, 2023, 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
# Script to set the environment for Kubernetes Master set up and Oracle SOA Suite deployment on WebLogic Kubernetes Operator
66

77
export dt=`date "+%F%T"`
88

99
# Location to generate output log
10-
export log_dir=/scratch/docker/k8logs
10+
export log_dir=/scratch/k8logs
1111

1212
# Network interface to be used by docker.
1313
# Sample command to the value

FMWKubernetesMAA/OracleEnterpriseDeploymentAutomation/OracleSOASuite/maak8master.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2022, 2023, 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
# Script for Kubernetes Master High Availablility set up
@@ -38,7 +38,7 @@ do
3838
echo "TOKEN_CA=$token_ca"
3939
export cp_ca=`ssh -i $ssh_key $user@$host "sudo grep '\-\-certificate-key' $log_dir/kubeadm-exec_$host_$dt.log" | awk '{print $3}'`
4040
ssh -i $ssh_key $user@$host "mkdir -p $HOME/.kube";
41-
ssh -i $ssh_key $user@$host "sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config";
41+
ssh -i $ssh_key $user@$host "sudo cp -f /etc/kubernetes/admin.conf $HOME/.kube/config";
4242
ssh -i $ssh_key $user@$host "sudo chown $(id -u):$(id -g) $HOME/.kube/config";
4343
echo "Giving some time for first node..."
4444
sleep 20

FMWKubernetesMAA/OracleEnterpriseDeploymentAutomation/OracleSOASuite/maak8soa.env

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# Copyright (c) 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2022, 2023, 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
# Description:
@@ -33,7 +33,7 @@ export wnode2=olk8-w2
3333
export wnode3=olk8-w3
3434

3535
# Helm version
36-
export helm_version=3.5.4
36+
export helm_version=3.10.2
3737

3838
# WebLogic Kubernetes Operator version
3939
export wlsoperator_version=3.4.4
@@ -48,6 +48,15 @@ export soaedgdomain=soaedgdomain
4848
export domain_type=soaosb
4949
export LBR_HN=k8lbr.paasmaaexample.com
5050

51+
# Proxy server
52+
export proxy=false
53+
export http_proxy=
54+
export https_proxy=
55+
export no_proxy=
56+
57+
# Log Directory
58+
export log_dir=/scratch/k8logs
59+
5160
# Timeout settings for retries on Kubernetes SOA pod status
5261
export max_trycountpod=90
5362
export sleeplapsepod=20

FMWKubernetesMAA/OracleEnterpriseDeploymentAutomation/OracleSOASuite/maak8soa.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# Copyright (c) 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2022, 2023, 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
# Description
@@ -10,6 +10,7 @@
1010
script="${BASH_SOURCE[0]}"
1111
scriptDir="$( cd "$( dirname "${script}" )" && pwd )"
1212
source ${scriptDir}/maak8soa.env
13+
source ${scriptDir}/common/utils.sh
1314

1415
read -s -p "Enter WebLogic password: " wlpswd
1516
echo
@@ -22,8 +23,13 @@ export wlpswd syspwd schemapwd
2223

2324
echo "Sleeping 10 seconds in case you want to break..."
2425
sleep 10
26+
27+
ssh -i $ssh_key $user@$mnode1 "mkdir -p /tmp/maa; mkdir -p $log_dir"
28+
setupProxy
29+
[[ -e /tmp/setup_proxy.env ]] && scp -i $ssh_key /tmp/setup_proxy.env $user@$mnode1:/tmp/maa
2530
# Labeling nodes for the Oracle SOA Suite domain (may need to parameterize this for larger clusters)
2631
echo "Labeling nodes..."
32+
ssh -i $ssh_key $user@$mnode1 "kubectl get nodes"
2733
ssh -i $ssh_key $user@$mnode1 "kubectl label node $wnode1 name=admin"
2834
ssh -i $ssh_key $user@$mnode1 "kubectl label node $wnode2 name=wls1"
2935
ssh -i $ssh_key $user@$mnode1 "kubectl label node $wnode3 name=wls2"
@@ -32,11 +38,11 @@ echo "Nodes labeled."
3238
# Steps specific to Oracle SOA Suite
3339
echo "Git cloning fmw-kubernetes repository..."
3440
ssh -i $ssh_key $user@$mnode1 "sudo mkdir -p $soaopdir && sudo chown $user:$user $soaopdir"
35-
ssh -i $ssh_key $user@$mnode1 "sudo yum install -y git-all";
41+
ssh -i $ssh_key $user@$mnode1 "sudo bash -c '[[ -e /tmp/maa/setup_proxy.env ]] && source /tmp/maa/setup_proxy.env; yum install -y git-all'";
3642
sleep 5
3743

3844

39-
ssh -i $ssh_key $user@$mnode1 "cd $soaopdir && git clone https://github.com/oracle/fmw-kubernetes.git --branch release/$soak8branch"
45+
ssh -i $ssh_key $user@$mnode1 "[[ -e /tmp/maa/setup_proxy.env ]] && source /tmp/maa/setup_proxy.env ; env; cd $soaopdir && git clone https://github.com/oracle/fmw-kubernetes.git --branch release/$soak8branch"
4046
echo "Set up code repository to deploy Oracle SOA Suite domains done"
4147

4248
echo "Sleeping 10 seconds in case you want to break..."
@@ -95,7 +101,7 @@ echo "Sleeping 10 seconds in case you want to break..."
95101
sleep 10
96102

97103
echo "Creating RCU schemas..."
98-
ssh -i $ssh_key $user@$mnode1 "cd $soaopdir/fmw-kubernetes/OracleSOASuite/kubernetes/create-rcu-schema && $soaopdir/fmw-kubernetes/OracleSOASuite/kubernetes/create-rcu-schema/create-rcu-schema.sh -s $soaedgprefix -t $domain_type -d $db_url -i $soaimage -q $syspwd -r $schemapwd -l LARGE"
104+
ssh -i $ssh_key $user@$mnode1 "cd $soaopdir/fmw-kubernetes/OracleSOASuite/kubernetes/create-rcu-schema && $soaopdir/fmw-kubernetes/OracleSOASuite/kubernetes/create-rcu-schema/create-rcu-schema.sh -s $soaedgprefix -t $domain_type -d $db_url -i $soaimage -q $syspwd -r $schemapwd -c SOA_PROFILE_TYPE=LARGE,HEALTHCARE_INTEGRATION=NO"
99105
echo "RCU schemas created!"
100106
echo "Sleeping 10 seconds in case you want to break..."
101107
sleep 10
@@ -249,8 +255,8 @@ EOF
249255
echo "OSB CLUSTER PORT: $osbport"
250256
fi
251257

252-
export adminport=`ssh -i $ssh_key $user@$mnode1 "kubectl get -o jsonpath="{.spec.ports[0].nodePort}" services ${soaedgdomain}-adminserver-node-port -n soans"`
258+
export adminport=30701
253259
echo "ADMINISTRATION SERVER PORT: $adminport"
254260
echo "Node port services created!"
255-
261+
echo "Note: Administration server node port service will be available once the server is up and running"
256262
echo "ALL DONE!"

FMWKubernetesMAA/OracleEnterpriseDeploymentAutomation/OracleSOASuite/maak8worker.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
2-
# Copyright (c) 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2022, 2023, 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
# Script to set the environment for Kubernetes Worker set up
66

77
export dt=`date "+%F%T"`
88

99
# Location to generate output log
10-
export log_dir=/scratch/docker/k8logs
10+
export log_dir=/scratch/k8logs
1111

1212
# Network interface to be used by docker.
1313
# Sample command to get the value

FMWKubernetesMAA/OracleEnterpriseDeploymentAutomation/OracleSOASuite/maak8worker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2022, 2023, 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
# Script for Kubernetes Worker node set up

OracleSOASuite/kubernetes/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ The WebLogic Kubernetes operator (the “operator”) supports deployment of Ora
77
* `soaosb`: Deploys a domain with SOA, Oracle Enterprise Scheduler (ESS), and Oracle Service Bus
88

99
***
10-
The current supported production release is [22.4.2](https://github.com/oracle/fmw-kubernetes/releases).
10+
The current supported production release is [23.1.2](https://github.com/oracle/fmw-kubernetes/releases).
1111
***
1212

1313
In this release, Oracle SOA Suite domains are supported using the “domain on a persistent volume”
14-
[model](https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/choosing-a-model/) only, where the domain home is located in a persistent volume (PV).
14+
[model](https://oracle.github.io/weblogic-kubernetes-operator/userguide/managing-domains/choosing-a-model/) only, where the domain home is located in a persistent volume (PV).
1515

1616
The operator has several key features to assist you with deploying and managing Oracle SOA Suite domains in a Kubernetes environment. You can:
1717

OracleSOASuite/kubernetes/charts/apache-webtier/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# Apache webtier docker image
55
image: "oracle/apache:12.2.1.3"
66

7-
# imagePullPolicy specifies the image pull policy for the apache webiter docker image
8-
imagePullPolicy: "IfNotPresent"
7+
# imagePullPolicy specifies the image pull policy for the Apache webtier container image
8+
imagePullPolicy: IfNotPresent
99

1010
# imagePullSecrets contains an optional list of Kubernetes secrets, that are needed
1111
# to access the registry containing the apache webtier image.

0 commit comments

Comments
 (0)