Skip to content

Commit b5751b1

Browse files
authored
Publishing recent fixes WCC (#155)
1 parent 00fe2b1 commit b5751b1

File tree

8 files changed

+211
-13
lines changed

8 files changed

+211
-13
lines changed

OracleWebCenterContent/kubernetes/create-wcc-domain/domain-home-on-pv/autoinstall.cfg.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2021, 2022, Oracle and/or its affiliates.
1+
# Copyright (c) 2021, 2023, Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
33
#
44

@@ -14,6 +14,7 @@
1414
InstanceMenuLabel=@INSTALL_HOST_NAME@@UCM_PORT@
1515
InstanceDescription=Instance @INSTALL_HOST_NAME@@UCM_PORT@
1616
HttpServerAddress=@INSTALL_HOST_FQDN@:@UCM_PORT@
17+
UseSSL=@SSL_ENABLED@
1718
MailServer=mail.oracle.com
1819
SysAdminAddress=first.last@oracle.com
1920

OracleWebCenterContent/kubernetes/create-wcc-domain/domain-home-on-pv/autoinstall.cfg.ibr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2021, Oracle and/or its affiliates.
1+
# Copyright (c) 2021, 2023, Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
33
#
44

@@ -15,6 +15,7 @@ InstanceMenuLabel=@INSTALL_HOST_NAME@@IBR_PORT@
1515
InstanceDescription=Instance @INSTALL_HOST_NAME@@IBR_PORT@
1616
SocketHostAddressSecurityFilter=127.0.0.1|0:0:0:0:0:0:0:1|*.*.*.*
1717
HttpServerAddress=@INSTALL_HOST_FQDN@:@IBR_PORT@
18+
UseSSL=@SSL_ENABLED@
1819

1920
# Intradoc port
2021
IntradocServerPort.ibr_server1=@IBR_INTRADOC_PORT@

OracleWebCenterContent/kubernetes/create-wcc-domain/domain-home-on-pv/oke-start-managed-servers-wrapper.sh

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
#!/bin/bash
2-
# Copyright (c) 2021, 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2021, 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

66
function usage {
7-
echo usage: ${script} -o path_to_output_dir -l load_balancer_external_ip -p load_balancer_port [-u ucm_intradocport] [-i ibr_intradocport] [-h]
7+
echo usage: ${script} -o path_to_output_dir -l load_balancer_external_ip -p load_balancer_port [-u ucm_intradocport] [-i ibr_intradocport] [-s ssl_termination] [-h]
88
echo " -o output directory which was used during domain creation to generate yaml files, must be specified."
99
echo " -l load balancer external ip, must be specified."
1010
echo " -p load balancer port, must be specified."
1111
echo " -u ucm intradocport, optional"
1212
echo " -i ibr intradocport, optional"
13+
echo " -s provide if ssl termination at loadbalancer is used (acceptable value is either true or false) - optional"
1314
echo " -h Help"
1415
exit $1
1516
}
1617

17-
while getopts "ho:l:p:u:i:" opt; do
18+
while getopts "ho:l:p:u:i:s:" opt; do
1819
case $opt in
1920
o) outputDir="${OPTARG}"
2021
;;
@@ -26,6 +27,8 @@ while getopts "ho:l:p:u:i:" opt; do
2627
;;
2728
i) IBRIntradocPort="${OPTARG}"
2829
;;
30+
s) SSLTermination="${OPTARG}"
31+
;;
2932
h) usage 0
3033
;;
3134
*) usage 1
@@ -56,6 +59,10 @@ if [ -z ${IBRIntradocPort} ]; then
5659
IBRIntradocPort=5555
5760
fi
5861

62+
if [ -z ${SSLTermination} ]; then
63+
SSLTermination=false
64+
fi
65+
5966
function wait_admin_pod {
6067
echo "Waiting for $adminPod Pod startup to kick in."
6168
sleep 50s
@@ -114,6 +121,12 @@ adminServerName=${adminServerName//*adminServerName: /};
114121
managedServerNameBase=$(grep 'managedServerNameBase:' create-domain-inputs.yaml);
115122
managedServerNameBase=${managedServerNameBase//*managedServerNameBase: /};
116123

124+
sslEnabled=$(grep 'sslEnabled:' create-domain-inputs.yaml);
125+
sslEnabled=${sslEnabled//*sslEnabled: /};
126+
127+
loadBalancerType=$(grep 'loadBalancerType:' create-domain-inputs.yaml);
128+
loadBalancerType=${loadBalancerType//*loadBalancerType: /};
129+
117130
adminPod=$domainUID-$adminServerName
118131
ucmPod=$domainUID-$managedServerNameBase
119132

@@ -140,18 +153,31 @@ then
140153
truncatedhostname=${truncatedhostname:0:14}
141154
fi
142155

143-
sed -i "s/@UCM_PORT@/$UCM_PORT/g" autoinstall.cfg.cs
156+
if [ $loadBalancerType == "nginx" ]; then
157+
sed -i "s/:@UCM_PORT@//g" autoinstall.cfg.cs
158+
sed -i "s/@UCM_PORT@/$UCM_PORT/g" autoinstall.cfg.cs
159+
else
160+
sed -i "s/@UCM_PORT@/$UCM_PORT/g" autoinstall.cfg.cs
161+
fi
162+
144163
sed -i "s/@INSTALL_HOST_FQDN@/$hostname/g" autoinstall.cfg.cs
145164
sed -i "s/@INSTALL_HOST_NAME@/$hostalias/g" autoinstall.cfg.cs
146165
sed -i "s/@HOST_NAME_PREFIX@/$truncatedhostname/g" autoinstall.cfg.cs
147166
sed -i "s/@UCM_INTRADOC_PORT@/$UCM_INTRADOC_PORT/g" autoinstall.cfg.cs
148167

168+
if [ "${SSLTermination}" == "true" ]; then
169+
sed -i "s/@SSL_ENABLED@/$SSLTermination/g" autoinstall.cfg.cs
170+
else
171+
sed -i "s/@SSL_ENABLED@/$sslEnabled/g" autoinstall.cfg.cs
172+
fi
173+
149174
kubectl cp autoinstall.cfg.cs $domainNS/$domainUID-ucm-server1:/u01/oracle/user_projects/domains/$domainUID/ucm/cs/bin/autoinstall.cfg
150175

151176
sed -i "s/@IBR_PORT@/$IBR_PORT/g" autoinstall.cfg.ibr
152177
sed -i "s/@INSTALL_HOST_FQDN@/$hostname/g" autoinstall.cfg.ibr
153178
sed -i "s/@INSTALL_HOST_NAME@/$hostalias/g" autoinstall.cfg.ibr
154179
sed -i "s/@IBR_INTRADOC_PORT@/$IBR_INTRADOC_PORT/g" autoinstall.cfg.ibr
180+
sed -i "s/@SSL_ENABLED@/$sslEnabled/g" autoinstall.cfg.ibr
155181

156182
kubectl cp autoinstall.cfg.ibr $domainNS/$domainUID-ibr-server1:/u01/oracle/user_projects/domains/$domainUID/ucm/ibr/bin/autoinstall.cfg
157183

OracleWebCenterContent/kubernetes/create-wcc-domain/domain-home-on-pv/start-managed-servers-wrapper.sh

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
#!/bin/bash
2-
# Copyright (c) 2021, 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2021, 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

66
function usage {
7-
echo usage: ${script} -o path_to_output_dir -p load_balancer_port -n node_port [-m ucm_node_port] [-u ucm_intradocport] [-i ibr_intradocport] [-h]
7+
echo usage: ${script} -o path_to_output_dir -p load_balancer_port -n node_port [-m ucm_node_port] [-u ucm_intradocport] [-i ibr_intradocport] [-s ssl_termination] [-h]
88
echo " -o output directory which was used during domain creation to generate yaml files, must be specified."
99
echo " -p load balancer port, must be specified."
1010
echo " -n node port, to be used for exposing IBR intradoc-port (suggested value should be within a range of 30000-32767) - must be specified."
1111
echo " -m ucm node port, to be used for exposing UCM intradoc-port (suggested value should be within a range of 30000-32767) - optional."
1212
echo " -u ucm intradocport, optional"
1313
echo " -i ibr intradocport, optional"
14+
echo " -s provide if ssl termination at loadbalancer is used (acceptable value is either true or false) - optional"
1415
echo " -h Help"
1516
exit $1
1617
}
1718

18-
while getopts "ho:p:n:m:u:i:" opt; do
19+
while getopts "ho:p:n:m:u:i:s:" opt; do
1920
case $opt in
2021
o) outputDir="${OPTARG}"
2122
;;
@@ -29,6 +30,8 @@ while getopts "ho:p:n:m:u:i:" opt; do
2930
;;
3031
i) IBRIntradocPort="${OPTARG}"
3132
;;
33+
s) SSLTermination="${OPTARG}"
34+
;;
3235
h) usage 0
3336
;;
3437
*) usage 1
@@ -59,6 +62,11 @@ if [ -z ${IBRIntradocPort} ]; then
5962
IBRIntradocPort=5555
6063
fi
6164

65+
if [ -z ${SSLTermination} ]; then
66+
SSLTermination=false
67+
fi
68+
69+
6270
function wait_admin_pod {
6371
echo "Waiting for $adminPod Pod startup to kick in."
6472
sleep 50s
@@ -119,6 +127,9 @@ adminServerName=${adminServerName//*adminServerName: /};
119127
managedServerNameBase=$(grep 'managedServerNameBase:' create-domain-inputs.yaml);
120128
managedServerNameBase=${managedServerNameBase//*managedServerNameBase: /};
121129

130+
sslEnabled=$(grep 'sslEnabled:' create-domain-inputs.yaml);
131+
sslEnabled=${sslEnabled//*sslEnabled: /};
132+
122133
adminPod=$domainUID-$adminServerName
123134
ucmPod=$domainUID-$managedServerNameBase
124135

@@ -151,12 +162,20 @@ sed -i "s/@INSTALL_HOST_NAME@/$hostalias/g" autoinstall.cfg.cs
151162
sed -i "s/@HOST_NAME_PREFIX@/$truncatedhostname/g" autoinstall.cfg.cs
152163
sed -i "s/@UCM_INTRADOC_PORT@/$UCM_INTRADOC_PORT/g" autoinstall.cfg.cs
153164

165+
if [ "${SSLTermination}" == "true" ]; then
166+
sed -i "s/@SSL_ENABLED@/$SSLTermination/g" autoinstall.cfg.cs
167+
else
168+
sed -i "s/@SSL_ENABLED@/$sslEnabled/g" autoinstall.cfg.cs
169+
fi
170+
171+
154172
kubectl cp autoinstall.cfg.cs $domainNS/$domainUID-ucm-server1:/u01/oracle/user_projects/domains/$domainUID/ucm/cs/bin/autoinstall.cfg
155173

156174
sed -i "s/@IBR_PORT@/$IBR_PORT/g" autoinstall.cfg.ibr
157175
sed -i "s/@INSTALL_HOST_FQDN@/$hostname/g" autoinstall.cfg.ibr
158176
sed -i "s/@INSTALL_HOST_NAME@/$hostalias/g" autoinstall.cfg.ibr
159177
sed -i "s/@IBR_INTRADOC_PORT@/$IBR_INTRADOC_PORT/g" autoinstall.cfg.ibr
178+
sed -i "s/@SSL_ENABLED@/$sslEnabled/g" autoinstall.cfg.ibr
160179

161180
kubectl cp autoinstall.cfg.ibr $domainNS/$domainUID-ibr-server1:/u01/oracle/user_projects/domains/$domainUID/ucm/ibr/bin/autoinstall.cfg
162181

docs-source/content/wccontent-domains/installguide/additional-steps-to-launch-native-binaries/_index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ This section provides the steps required to use product native binaries with use
1010

1111
### Issue with Launching Headful User Interfaces for Oracle WebCenter Content Native Binaries
1212

13-
Oracle WebCenter Content (UCM) provide a set of native binaries with headful UIs, which are located inside the persistent volume, as part of the domain.
14-
WebCenter Content container images are, by default, created with Oracle slim linux image, which doesn't come with all the packages pre-installed to support headful applications with UIs to be launched. With current Oracle WebCenter Content container images, running native applications fails, being unable to launch UIs.
13+
Oracle WebCenter Content (UCM) provide a set of native binaries with headful UIs, which are delivered as part of the product container image.
14+
WebCenter Content container images are, by default, created with Oracle slim linux image, which doesn't come with all the packages pre-installed to support headful applications with UIs to be launched. UCM provides many such native binaries which uses JAVA AWT for UI support.
15+
With current Oracle WebCenter Content container images, running native applications fails, being unable to launch UIs.
1516

1617
The following sections document the solution, by providing a set of instructions, enabling users to run UCM native applications with UIs.
1718

docs-source/content/wccontent-domains/installguide/create-wccontent-domains/_index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,14 @@ Run `managed-server-wrapper` script, which internally applies the domain YAML. T
138138
```
139139
$ cd ${WORKDIR}/create-wcc-domain/domain-home-on-pv/
140140
141-
$ ./start-managed-servers-wrapper.sh -o <path_to_output_directory> -p <load_balancer_port> -n <ibr_node_port> -m <ucm_node_port>
141+
$ ./start-managed-servers-wrapper.sh -o <path_to_output_directory> -p <load_balancer_port> -n <ibr_node_port> -m <ucm_node_port> -s <ssl_termination>
142142
```
143143

144144
> Note: In the above command, parameters `-n` and `-m` refers to the node-ports to be used for exposing `IBR intradoc port` and `UCM intradoc port` respectively.
145145
Suggested values for both these node-ports should be within a range of 30000-32767.
146146
Please keep in mind that `<ibr_node_port>` value must be specified at all time, whereas `<ucm_node_port>` value is only required when IPM and ADFUI Managed Servers are enabled.
147+
A value for parameter `-s` needs to be provided only if SSL termination at loadbalancer is being used - acceptable value is either `true` or `false`.
148+
If this parameter value is not supplied, the script assumes that ssl termination at loadbalancer is not being used and by default the value will be taken as `false`.
147149

148150
#### Run the startup configuration scripts for IPM and WCCADF applications as applicable
149151

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
---
2+
title: "Launch Oracle Webcenter Content Native Applications in Containers deployed in Oracle Cloud Infrastructure"
3+
date: 2020-12-3T07:32:31-05:00
4+
weight: 7
5+
pre : "<b>7. </b>"
6+
description: "How to launch Oracle WebCenter Content native binaries from inside containerized environment in OCI."
7+
---
8+
9+
This section provides the steps required to use Oracle WebCenter Content native binaries with user interfaces, from containerized Managed Servers deployed in OCI.
10+
11+
### Issue with Launching Headful User Interfaces for Oracle WebCenter Content Native Binaries
12+
13+
Oracle WebCenter Content (UCM) provide a set of native binaries with headful UIs, which are delivered as part of the product container image.
14+
WebCenter Content container images are, by default, created with Oracle slim linux image, which doesn't come with all the packages pre-installed to support headful applications with UIs to be launched. UCM provides many such native binaries which uses JAVA AWT for UI support.
15+
With current Oracle WebCenter Content container images, native applications fails to run, being unable to launch UIs.
16+
17+
The following sections document the solution, by providing a set of instructions, enabling users to run UCM native applications with UIs.
18+
19+
20+
These instructions are divided in two parts -
21+
1. [Steps to update the existing container image](#steps-to-update-out-of-the-box-oracle-webcenter-content-container-image-using-weblogic-image-tool)
22+
1. [Steps to launch native apps using VNC sessions](#steps-to-launch-oracle-webcenter-content-native-applications-using-vnc-sessions)
23+
24+
25+
### Steps to Update out-of-the-box Oracle WebCenter Content Container Image Using WebLogic Image Tool
26+
27+
This section describes the method to update image with a OS package using WebLogic Image Tool. Please refer [this](https://oracle.github.io/weblogic-image-tool/) for setting up the WebLogic Image Tool.
28+
#### Additional Build Commands
29+
30+
The installation of required OS packages in the image, can be done using yum command in additional build command option available in WebLogic Image Tool. Here is the sample `additionalBuildCmds.txt` file, to be used, to install required Linux packages (libXext.x86_64, libXrender.x86_64 and libXtst.x86_64).
31+
32+
```
33+
[final-build-commands]
34+
USER root
35+
RUN yum -y --downloaddir=/tmp/imagetool install libXext libXrender libXtst \
36+
&& yum -y --downloaddir=/tmp/imagetool clean all \
37+
&& rm -rf /var/cache/yum/* \
38+
&& rm -rf /tmp/imagetool
39+
USER oracle
40+
41+
```
42+
43+
>Note: It is important to change the user to `oracle`, otherwise the user during the container execution will be `root`.
44+
#### Build arguments
45+
46+
The arguments required for updating the image can be passed as file to the WebLogic Image Tool.
47+
48+
'update' is the sub command to Image Tool for updating an existing docker image.
49+
'--fromImage' option provides the existing docker image that has to be updated.
50+
'--tag' option should be provided with the new tag for the updated image.
51+
'--additionalBuildCommands' option should be provided with the above created additional build commands file.
52+
'--chown oracle:root' option should be provided to update file permissions.
53+
54+
Below is a sample build argument (buildArgs) file, to be used for updating the image,
55+
56+
57+
```
58+
update
59+
--fromImage <existing_WCContent_image_without_dependent_packages>
60+
--tag <name_of_updated_WCContent_image_to_be_built>
61+
--additionalBuildCommands ./additionalBuildCmds.txt
62+
--chown oracle:root
63+
```
64+
65+
#### Update Oracle WebCenter Content Container Image
66+
67+
Now we can execute the WebLogic Image Tool to update the out-of-the-box image, using the build-argument file described above -
68+
69+
```
70+
$ imagetool @buildArgs
71+
```
72+
73+
74+
WebLogic Image Tool provides multiple options for updating the image. For detailed information on the update options, please refer to [this](https://oracle.github.io/weblogic-image-tool/userguide/tools/update-image/) document.
75+
76+
Updating the image does not modify the 'CMD' from the source image unless it is modified in the additional build commands.
77+
78+
```
79+
$ docker inspect -f '{{.Config.Cmd}}' <name_of_updated_Wccontent_image>
80+
[/u01/oracle/container-scripts/createDomainandStartAdmin.sh]
81+
```
82+
83+
### Steps to launch Oracle WebCenter Content native applications using VNC sessions.
84+
85+
Once updated image is successfully built and available on all required nodes, do the following:
86+
87+
a. Update the domain.yaml file with updated image name and apply the domain.yaml file.
88+
```
89+
$ kubectl apply -f domain.yaml
90+
```
91+
92+
b. After applying the modified domain.yaml, pods will get restarted and start running with updated image with required packages.
93+
94+
```
95+
$ kubectl get pods -n <namespace_being_used_for_wccontent_domain>
96+
```
97+
c. Install VNC SERVER on any one worker node, on which there is an UCM server pod deployed.
98+
99+
d. After starting vncserver systemctl daemon in the Worker Node, execute the following command from Bastion Host to the Private Subnet Instance (Worker Node).
100+
101+
```
102+
# The default VNC port is 5900, but that number is incremented according to the configured display number. Thus, display 1 corresponds to 5901, display 2 to 5902, and so on.
103+
$ ssh -i <Workernode_private.key> -L 590<display_number>:localhost:590<display_number> -p 22 -L 590<display number>:localhost:590<display number> -N -f <user>@<Workernode_privateIPAddress>
104+
105+
# Sample command
106+
$ ssh -i <Workernode_private.key> -L 5901:localhost:5901 -p 22 -L 5901:localhost:5901 -N -f opc@10.0.10.xx
107+
```
108+
109+
e. From personal client execute the below command with the above session opened.
110+
111+
```
112+
# Use any Linux emulator (like, Windows Power Shell for Windows) to run the following command
113+
$ ssh -i <Bastionnode_private.key> -L 590<display_number>:localhost:590<display_number> -p 22 -L 590<display_number>:localhost:590<display_number> -N -f <user>@<BastionHost_publicIPAddress>
114+
115+
# Sample command
116+
$ ssh -i <Bastionnode_private.key> -L 5901:localhost:5901 -p 22 -L 5901:localhost:5901 -N -f opc@129.xxx.249.xxx
117+
```
118+
119+
f. Open VNC Client software in personal client and connect to Worker Node VNC Server using `localhost:590<display_number>`.
120+
121+
g. Open a terminal once the VNC session to the Worker Node is connected -
122+
123+
```
124+
$ xhost +
125+
```
126+
h. Run the following commands from Bastion Host terminal –
127+
128+
```
129+
# Get into the pod's (for example, wccinfra-ucm-server1) shell:
130+
$ kubectl exec -n wccns -it wccinfra-ucm-server1 -- /bin/bash
131+
132+
# Traverse to the Native Binaries' location
133+
$ cd /u01/oracle/user_projects/domains/wccinfra/ucm/cs/bin
134+
135+
# Set DISPLAY variable within the container
136+
$ export DISPLAY=<Workernode_privateIPAddress, where VNC session was created>:<dispay_number>
137+
# Sample command
138+
$ export DISPLAY=10.0.10.xx:1
139+
140+
# Launch any native UCM application, from within the container, like this:
141+
$ ./SystemProperties
142+
```
143+
i. If the application has an UI, it'll get launched now in the VNC session connected from personal client.
144+
145+

docs-source/content/wccontent-domains/oracle-cloud/create-wccontent-domains/_index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ Run `oke-start-managed-server-wrapper.sh` script, which intrenally applies the d
4444
```
4545
$ cd ${WORKDIR}/create-wcc-domain/domain-home-on-pv/
4646
47-
$ ./oke-start-managed-servers-wrapper.sh -o <path_to_output_directory> -l <load_balancer_external_ip> -p <load_balancer_port>
47+
$ ./oke-start-managed-servers-wrapper.sh -o <path_to_output_directory> -l <load_balancer_external_ip> -p <load_balancer_port> -s <ssl_termination>
4848
```
49+
> Note: A value for parameter `-s` needs to be provided only if SSL termination at loadbalancer is being used - acceptable value is either `true` or `false`.
50+
If this parameter value is not supplied, the script assumes that ssl termination at loadbalancer is not being used and by default the value will be taken as `false`.
51+
4952
#### Run the startup configuration scripts for IPM and WCCADF applications as applicable
5053

5154
Run the script `configure-ipm-connection.sh` to do startup configurations if IPM is enabled.

0 commit comments

Comments
 (0)