Skip to content

Commit

Permalink
Making JAVA_HOME generic and updating readme and copyright notice (or…
Browse files Browse the repository at this point in the history
…acle#1518)

* Making JAVA_HOME generic and updating readme and copyright notice
* Update README.md
  • Loading branch information
ashishchalak authored Feb 10, 2020
1 parent f93a7b7 commit 3cc00bb
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 14 deletions.
2 changes: 1 addition & 1 deletion OracleWebCenterSites/dockerfiles/12.2.1.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ RUN cd /u01 && \
$JAVA_HOME/bin/jar xf /u01/$SITES_PKG && \
cd - && \
$JAVA_HOME/bin/java -jar /u01/$SITES_JAR -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc -jreLoc $JAVA_HOME -ignoreSysPrereqs -force -novalidation ORACLE_HOME=$ORACLE_HOME INSTALL_TYPE="WebCenter Sites - With Examples" && \
rm -rf /u01/fmw_* /u01/oraInst.loc /u01/install.file
rm -rf /u01/$SITES_PKG /u01/$SITES_JAR /u01/oraInst.loc /u01/install.file

COPY sites-container-scripts/overrides/oui/* /u01/oracle/wcsites/common/templates/wls/
COPY sites-container-scripts/overrides/installer/* /u01/oracle/wcsites/webcentersites/sites-home/bootstrap/installer/install/
Expand Down
6 changes: 3 additions & 3 deletions OracleWebCenterSites/dockerfiles/12.2.1.4/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Oracle WebCenter Sites has been tested and is known to run on the following hard

| | Version | Command to verify version |
| :---: | :----------------------------: | :-----------------------: |
| OS | Oracle Linux 7.3 or higher | more /etc/oracle-release |
| Docker| Docker version 17.03 or higher | docker version |
| OS | Oracle Linux 7.5 or higher | more /etc/oracle-release |
| Docker| Docker version 18.09 or higher | docker version |

## 3. Prerequisites
Before you begin, ensure to do the following steps:
Expand Down Expand Up @@ -360,7 +360,7 @@ To view the Docker Container logs run:
$ docker logs --details <Admin-Container-Id>
```
##### 3. How to reset Oracle WebCenter Sites [Administrator,Application,SatelliteServer] passwords?
See [How to Reset a WebCenter Sites Password] (https://docs.oracle.com/middleware/1221/wcs/admin/GUID-BECECCFD-0EAF-4157-B23D-6CBD4F3BDEE9.htm#WBCSA8419)
See [How to Reset a WebCenter Sites Password](https://docs.oracle.com/middleware/1221/wcs/admin/GUID-BECECCFD-0EAF-4157-B23D-6CBD4F3BDEE9.htm#WBCSA8419)
##### 4. How to modify start/stop admin/managed server scripts?
You can find these scripts here: dockerfiles/12.2.1.4/sites-container-scripts) sites-container-scripts are located at `../docker-images/OracleWebCenterSites/dockerfiles/12.2.1.4/sites-container-scripts/*`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,19 @@ if [ -z ${DOMAIN_NAME} ]
then
DOMAIN_NAME=wcsites_domain
echo ""
echo " Setting DOMAIN_NAME to wcsites_domain"
echo " Setting DOMAIN_NAME to $DOMAIN_NAME"
echo ""
fi

if [ -z ${ADMIN_NAME} ]
then
ADMIN_NAME=AdminServer
echo ""
echo " Setting ADMIN_NAME to $ADMIN_NAME"
echo ""
fi


export DOMAIN_HOME="${DOMAIN_ROOT}/${DOMAIN_NAME}"

if [ ! -f ${DOMAIN_HOME}/servers/${ADMIN_NAME}/logs/${ADMIN_NAME}.log ]; then
Expand Down Expand Up @@ -281,7 +290,6 @@ then
export WCSITES_SSL_PORT=9002
ORACLE_HOME=/u01/oracle
WORK_DIR=/u01/oracle/user_projects/wcs-wls-docker-install/work
JAVA_PATH=/usr/java/default/bin/java

#Hostname Parameters
export WCSITES_ADMIN_HOSTNAME=$(sed -r 's/\./\\\./g' <<< $(hostname -I))
Expand All @@ -293,7 +301,7 @@ then
#find bootstrap.properties -type f -exec dos2unix {} {} \;

sed -i 's,^\(script.rcu.prefix=\).*,\1'$RCU_PREFIX',' bootstrap.properties
sed -i 's,^\(script.java.path=\).*,\1'$JAVA_PATH',' bootstrap.properties
sed -i 's,^\(script.java.path=\).*,\1'$JAVA_HOME',' bootstrap.properties
sed -i 's,^\(script.oracle.wcsites.hostname=\).*,\1'$WCSITES_ADMIN_HOSTNAME',' bootstrap.properties
sed -i 's,^\(script.oracle.wcsites.portnumber=\).*,\1'$WCSITES_MANAGED_PORT',' bootstrap.properties
sed -i 's,^\(script.db.user=\).*,\1'$DB_USER',' bootstrap.properties
Expand Down Expand Up @@ -409,4 +417,4 @@ ${DOMAIN_HOME}/startWebLogic.sh > ${DOMAIN_HOME}/servers/${ADMIN_NAME}/logs/webl
tail -900f ${DOMAIN_HOME}/servers/${ADMIN_NAME}/logs/weblogic.out &

childPID=$!
wait $childPID
wait $childPID
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def enable_admin_channel(self, admin_channel_address, admin_channel_port):
#oracleHome will be passed by command line parameter -oh.
oracleHome = '<ORACLE_HOME>'
#javaHome will be passed by command line parameter -jh.
javaHome = '/usr/java/default'
javaHome = '<JAVA_HOME>'
#domainParentDir will be passed by command line parameter -parent.
domainParentDir = '<DOMAIN_HOME>../../'
#domainName is hard-coded to wcsites_domain. You can change to other name of your choice. Command line parameter -name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class Utils {

// Validates java
echo("Validation -> Checking if full path to JAVA executable is correctly specified")
antBuilder.exec(executable : config.script.java.path, failifexecutionfails: true) {
antBuilder.exec(executable : config.script.java.path + "/bin/java", failifexecutionfails: true) {
arg(value: "-version")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ class Weblogic implements AppServer {
def jythonConfigFile = config.work + "/" + Utils.CONFIG_SCRIPT
antBuilder.replace(file:jythonConfigFile, token:"<DOMAIN_HOME>", value:"${domainHome}")
antBuilder.replace(file:jythonConfigFile, token:"<ORACLE_HOME>", value:"${config.script.oracle.home}")
antBuilder.replace(file:jythonConfigFile, token:"<JAVA_HOME>", value:"${config.script.java.path}")

antBuilder.replace(file:jythonConfigFile, token:"<DOMAIN_NAME>", value:"${config.script.oracle.domain}")
antBuilder.replace(file:jythonConfigFile, token:"<WL_USERNAME>", value:"${config.script.admin.server.username}")
Expand Down Expand Up @@ -347,7 +348,7 @@ class Weblogic implements AppServer {
writer.writeLine ""
writer.writeLine ". " + config.script.oracle.home + "/wlserver/server/bin/setWLSEnv.sh"
writer.writeLine "mkdir -p tmp"
writer.writeLine config.script.java.path + " -Djava.io.tmpdir=" + config.work + "/tmp weblogic.WLST " + jythonConfigFile + " >${configWizardLog}"
writer.writeLine config.script.java.path + "/bin/java" + " -Djava.io.tmpdir=" + config.work + "/tmp weblogic.WLST " + jythonConfigFile + " >${configWizardLog}"
}

Utils.echo("Weblogic Configuration Wizard -> command: " + config.work + "/runConfigWizard.sh")
Expand Down
6 changes: 3 additions & 3 deletions OracleWebCenterSites/dockerfiles/buildDockerImage.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
#
# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, 2020 Oracle and/or its affiliates.
#
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
#
# Description: script to build a Docker image for WebCenter Sites
#
Expand All @@ -19,7 +19,7 @@ Parameters:
-c: enables Docker image layer cache during build
-s: skips the MD5 check of packages
Copyright (c) 2019, 2020 Oracle and/or its affiliates.
Copyright (c) 2018, 2020 Oracle and/or its affiliates.
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
Expand Down

0 comments on commit 3cc00bb

Please sign in to comment.