Skip to content

Commit a69676f

Browse files
restore overwritten code changes from master
1 parent 5bebea7 commit a69676f

File tree

6 files changed

+42
-9
lines changed

6 files changed

+42
-9
lines changed

src/main/java/com/oracle/weblogicx/imagebuilder/cli/cache/SetCacheDir.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ public CommandResponse call() {
5555
index = "0"
5656
)
5757
private Path location;
58-
}
58+
}

src/main/java/com/oracle/weblogicx/imagebuilder/cli/menu/CreateImage.java

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package com.oracle.weblogicx.imagebuilder.cli.menu;
66

77
import com.oracle.weblogicx.imagebuilder.api.model.CommandResponse;
8+
import com.oracle.weblogicx.imagebuilder.api.model.DomainType;
89
import com.oracle.weblogicx.imagebuilder.api.model.InstallerType;
910
import com.oracle.weblogicx.imagebuilder.api.model.WLSInstallerType;
1011
import com.oracle.weblogicx.imagebuilder.impl.InstallerFile;
@@ -190,6 +191,17 @@ private List<String> handleWDTArgsIfRequired(Path tmpDir) throws IOException {
190191
String tmpDirPath = tmpDir.toAbsolutePath().toString();
191192
if (wdtModelPath != null) {
192193
if (Files.isRegularFile(wdtModelPath)) {
194+
if (domainType != DomainType.WLS) {
195+
if (installerType != WLSInstallerType.FMW) {
196+
throw new IOException("FMW installer is required for JRF domain");
197+
}
198+
retVal.add(BUILD_ARG);
199+
retVal.add("DOMAIN_TYPE=" + domainType);
200+
if (rcu_run_flag) {
201+
retVal.add(BUILD_ARG);
202+
retVal.add("RCU_RUN_FLAG=" + "-run_rcu");
203+
}
204+
}
193205
filterStartTags.add("WDT_");
194206
Path targetLink = Files.copy(wdtModelPath, Paths.get(tmpDirPath, wdtModelPath.getFileName().toString())
195207
);
@@ -259,7 +271,7 @@ private List<InstallerFile> gatherRequiredInstallers() throws Exception {
259271
if (wdtModelPath != null && Files.isRegularFile(wdtModelPath)) {
260272
InstallerFile wdtInstaller = new InstallerFile(useCache, InstallerType.WDT, wdtVersion, null, null);
261273
retVal.add(wdtInstaller);
262-
addWDTURL(wdtInstaller.getKey() + "_url");
274+
addWDTURL(wdtInstaller.getKey());
263275
}
264276
retVal.add(new InstallerFile(useCache, InstallerType.fromValue(installerType.toString()), installerVersion,
265277
userId, password));
@@ -270,11 +282,12 @@ private List<InstallerFile> gatherRequiredInstallers() throws Exception {
270282
/**
271283
* Parses wdtVersion and constructs the url to download WDT and adds the url to cache
272284
*
273-
* @param wdtURLKey key in the format wdt_0.17
285+
* @param wdtKey key in the format wdt_0.17
274286
* @throws Exception in case of error
275287
*/
276-
private void addWDTURL(String wdtURLKey) throws Exception {
277-
if (cacheStore.getValueFromCache(wdtURLKey) == null) {
288+
private void addWDTURL(String wdtKey) throws Exception {
289+
String wdtURLKey = wdtKey + "_url";
290+
if (cacheStore.getValueFromCache(wdtKey) == null) {
278291
if (useCache == ALWAYS) {
279292
throw new Exception("CachePolicy prohibits download. Add the required wdt installer to cache");
280293
}
@@ -355,4 +368,18 @@ private void copyResponseFilesToDir(String dirPath) throws IOException {
355368
defaultValue = "latest"
356369
)
357370
private String wdtVersion;
371+
372+
@Option(
373+
names = {"--domainType"},
374+
description = "type of domain to create. default: ${DEFAULT-VALUE}. supported values: ${COMPLETION-CANDIDATES}",
375+
defaultValue = "wls",
376+
required = true
377+
)
378+
private DomainType domainType;
379+
380+
@Option(
381+
names = "--run_rcu",
382+
description = "whether to run rcu to create the required database schemas"
383+
)
384+
private boolean rcu_run_flag = false;
358385
}

src/main/java/com/oracle/weblogicx/imagebuilder/util/XPathUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,4 @@ public static final void prettyPrint(Document xml) {
106106
}
107107

108108

109-
}
109+
}

src/main/resources/docker-files/Dockerfile.ph

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ARG ADMIN_PORT
2020
ARG MANAGED_SERVER_PORT
2121
ARG SCRIPTS_DIR
2222
ARG WDT_HOME
23+
ARG RCU_RUN_FLAG
2324
# END %%WDT_ARGS%% #
2425

2526
# START %%WDT_ENV%% #
@@ -30,15 +31,18 @@ ENV WDT_PKG=${WDT_PKG:-weblogic-deploy.zip} \
3031
MANAGED_SERVER_NAME=${MANAGED_SERVER_NAME:-} \
3132
MANAGED_SERVER_PORT=${MANAGED_SERVER_PORT:-8001} \
3233
WDT_MODEL=${WDT_MODEL:-} \
34+
WLSDEPLOY_PROPERTIES="-Djava.security.egd=file:/dev/./urandom" \
3335
DOMAIN_TYPE=${DOMAIN_TYPE:-WLS} \
3436
DOMAIN_PARENT=${DOMAIN_PARENT:-${ORACLE_HOME}/user_projects/domains} \
3537
DOMAIN_NAME=${DOMAIN_NAME:-base_domain} \
3638
WDT_ARCHIVE=${WDT_ARCHIVE:-} \
3739
WDT_VARIABLE=${WDT_VARIABLE:-} \
40+
LC_ALL=${DEFAULT_LOCALE:-en_US.UTF-8} \
3841
PROPERTIES_FILE_DIR=$ORACLE_HOME/properties \
3942
SCRIPT_HOME="${ORACLE_HOME}" \
4043
WDT_HOME=${WDT_HOME:-/u01/app/weblogic-deploy} \
41-
SCRIPTS_DIR=${SCRIPTS_DIR:-scripts}
44+
SCRIPTS_DIR=${SCRIPTS_DIR:-scripts} \
45+
RCU_RUN_FLAG=${RCU_RUN_FLAG:-}
4246

4347
# DO NOT COMBINE THESE BLOCKS. It won't work when formatting variables like DOMAIN_HOME
4448
ENV DOMAIN_HOME=${DOMAIN_PARENT}/${DOMAIN_NAME} \
@@ -59,12 +63,14 @@ RUN mkdir -p $(dirname ${DOMAIN_HOME}) \
5963
&& if [ -n "$WDT_MODEL" ]; then MODEL_OPT="-model_file ${OTMPDIR}/${WDT_MODEL##*/}"; fi \
6064
&& if [ -n "$WDT_ARCHIVE" ]; then ARCHIVE_OPT="-archive_file ${OTMPDIR}/${WDT_ARCHIVE##*/}"; fi \
6165
&& if [ -n "$WDT_VARIABLE" ]; then VARIABLE_OPT="-variable_file ${OTMPDIR}/${WDT_VARIABLE##*/}"; fi \
66+
&& if [ -n "${RCU_RUN_FLAG}" ]; then RCU_RUN_OPT="-run_rcu"; fi \
6267
&& cd ${WDT_HOME}/bin \
6368
&& ${WDT_HOME}/bin/createDomain.sh \
6469
-oracle_home ${ORACLE_HOME} \
6570
-java_home ${JAVA_HOME} \
6671
-domain_home ${DOMAIN_HOME} \
6772
-domain_type ${DOMAIN_TYPE} \
73+
$RCU_RUN_OPT \
6874
$VARIABLE_OPT \
6975
$MODEL_OPT \
7076
$ARCHIVE_OPT \

src/main/resources/docker-files/Dockerfile.update

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ USER oracle
3737

3838
# PLACEHOLDER FOR %%PATCH_CLEANUP%% #
3939

40-
RUN rm -rf $OTMPDIR
40+
RUN rm -rf $OTMPDIR

src/main/resources/probe-env/test-update-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ fi
5050
#echo OPATCH_VERSION=$($ORACLE_HOME/OPatch/opatch version 2> /dev/null | perl -n -e'/\s+([\d\.]+)\s+/ && print $1')
5151
#echo OS_ID=$(cat /etc/os-release 2> /dev/null | perl -ne '/^ID=\"(\S+)\"$/ && print $1')
5252
#echo OS_VERSION_ID=$(cat /etc/os-release 2> /dev/null | perl -ne '/^VERSION_ID=\"(\S+)\"$/ && print $1')
53-
#$ORACLE_HOME/OPatch/opatch lsinventory > /tmp_scripts/opatch-lsinventory.xml 2>&1
53+
#$ORACLE_HOME/OPatch/opatch lsinventory > /tmp_scripts/opatch-lsinventory.xml 2>&1

0 commit comments

Comments
 (0)