Skip to content

Commit af62125

Browse files
brahankvvivek-sam
andauthored
Add OID support in WebLogic Imagetool (#308)
* Adding support for OID (executable installer) * Fix extraction of bin file from zip * Moved unzip of jar/bin installer in to a single block * Removing optional parameters -printtime -printmemory -printdiskusage for bin installer. Co-authored-by: Vivek Raj <[email protected]>
1 parent 7a975bc commit af62125

File tree

9 files changed

+22
-5
lines changed

9 files changed

+22
-5
lines changed

documentation/1.9/content/userguide/tools/create-image.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Usage: imagetool create [OPTIONS]
4141
| `--resourceTemplates` | One or more files containing placeholders that need to be resolved by the Image Tool. See [Resource Template Files](#resource-template-files). | |
4242
| `--strictPatchOrdering` | Instruct OPatch to apply patches one at a time (uses `apply` instead of `napply`). | |
4343
| `--tag` | (Required) Tag for the final build image. Example: `store/oracle/weblogic:12.2.1.3.0` | |
44-
| `--type` | Installer type. Supported values: `WLS`, `WLSDEV`, `WLSSLIM`, `FMW`, `IDM`, `OSB`, `OUD_WLS`, `SOA_OSB`, `SOA_OSB_B2B`, `MFT`, `WCP`, `OAM`, `OIG`, `OUD`, `SOA`, `WCC`, `WCS`, `WCP` | `WLS` |
44+
| `--type` | Installer type. Supported values: `WLS`, `WLSDEV`, `WLSSLIM`, `FMW`, `IDM`, `OSB`, `OUD_WLS`, `SOA_OSB`, `SOA_OSB_B2B`, `MFT`, `WCP`, `OAM`, `OIG`, `OUD`, `OID`, `SOA`, `WCC`, `WCS`, `WCP` | `WLS` |
4545
| `--user` | Oracle support email ID. | |
4646
| `--version` | Installer version. | `12.2.1.3.0` |
4747
| `--wdtArchive` | Path to the WDT archive file used by the WDT model. | |

documentation/1.9/content/userguide/tools/rebase-image.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Usage: imagetool rebase [OPTIONS]
4444
| `--strictPatchOrdering` | Instruct OPatch to apply patches one at a time (uses `apply` instead of `napply`). | |
4545
| `--tag` | (Required) Tag for the final build image. Example: `store/oracle/weblogic:12.2.1.3.0` | |
4646
| `--targetImage` | Docker image to extend for the domain's new image. | |
47-
| `--type` | Installer type. Supported values: `WLS`, `WLSDEV`, `WLSSLIM`, `FMW`, `IDM`, `OSB`, `OUD_WLS`, `SOA_OSB`, `SOA_OSB_B2B`, `MFT`, `WCP`, `OAM`, `OIG`, `OUD`, `SOA`, `WCC`, `WCS`, `WCP` | `WLS` |
47+
| `--type` | Installer type. Supported values: `WLS`, `WLSDEV`, `WLSSLIM`, `FMW`, `IDM`, `OSB`, `OUD_WLS`, `SOA_OSB`, `SOA_OSB_B2B`, `MFT`, `WCP`, `OAM`, `OIG`, `OUD`, `OID`, `SOA`, `WCC`, `WCS`, `WCP` | `WLS` |
4848
| `--user` | Your Oracle support email ID. | |
4949
| `--version` | Installer version. | `12.2.1.3.0` |
5050

imagetool/src/main/java/com/oracle/weblogic/imagetool/aru/AruProduct.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public enum AruProduct {
1919
IDM("18391", "Oracle Identity Manager"),
2020
OAM("18388", "Oracle Access Manager"),
2121
OUD("19748", "Oracle Unified Directory"),
22+
OID("10040", "Oracle Internet Directory"),
2223
WCC("13946", "Oracle WebCenter Content"),
2324
WCP("15224", "Oracle WebCenter Portal"),
2425
WCS("20995", "Oracle WebCenter Sites"),

imagetool/src/main/java/com/oracle/weblogic/imagetool/installer/DefaultResponseFile.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public class DefaultResponseFile implements ResponseFile {
2929
private static final String R_OAM =
3030
"Collocated Oracle Identity and Access Manager (Managed through WebLogic server)";
3131
private static final String R_OUD = "Installation for Oracle Unified Directory";
32+
private static final String R_OID = "Collocated Oracle Internet Directory Server (Managed through WebLogic server)";
3233
private static final String R_WCC = "WebCenter Content";
3334
private static final String R_WCP = "WebCenter Portal";
3435
private static final String R_WCS = "WebCenter Sites";
@@ -77,6 +78,9 @@ private static String getInstallTypeResponse(InstallerType installerType, FmwIns
7778
case OUD:
7879
response = R_OUD;
7980
break;
81+
case OID:
82+
response = R_OID;
83+
break;
8084
case WCC:
8185
response = R_WCC;
8286
break;

imagetool/src/main/java/com/oracle/weblogic/imagetool/installer/FmwInstallerType.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ public enum FmwInstallerType {
6767
// Oracle Unified Directory
6868
OUD_WLS(Utils.toSet(FMW.products, AruProduct.OUD),
6969
InstallerType.FMW, InstallerType.OUD),
70+
// Oracle Internet Directory
71+
OID(Utils.toSet(FMW.products, AruProduct.OID),
72+
InstallerType.FMW, InstallerType.OID),
7073
// Oracle WebCenter Content
7174
WCC(Utils.toSet(FMW.products, AruProduct.WCC),
7275
InstallerType.FMW, InstallerType.WCC),

imagetool/src/main/java/com/oracle/weblogic/imagetool/installer/InstallerType.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public enum InstallerType {
2020
IDM("idm"),
2121
OAM("oam"),
2222
OUD("oud"),
23+
OID("oid"),
2324
WCC("wcc"),
2425
WCP("wcp"),
2526
WCS("wcs"),

imagetool/src/main/java/com/oracle/weblogic/imagetool/installer/MiddlewareInstall.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ private static String getJarNameFromInstaller(Path installerFile) throws IOExcep
6464
if (entryName.endsWith(".jar")) {
6565
filename = entryName;
6666
break;
67+
} else if (entryName.endsWith(".bin")) {
68+
filename = entryName;
69+
break;
6770
}
6871
}
6972
}
@@ -85,6 +88,7 @@ public void copyFiles(CacheStore cacheStore, String buildContextDir) throws IOEx
8588
installPackage.installerFilename = filePath.getFileName().toString();
8689
installPackage.jarName = getJarNameFromInstaller(filePath);
8790
installPackage.isZip = installPackage.installerFilename.endsWith(".zip");
91+
installPackage.isBin = installPackage.jarName.endsWith(".bin");
8892
installPackage.responseFile.copyFile(buildContextDir);
8993
}
9094
logger.exiting();

imagetool/src/main/java/com/oracle/weblogic/imagetool/installer/MiddlewareInstallPackage.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ public class MiddlewareInstallPackage {
1212
String installerFilename;
1313
String jarName;
1414
boolean isZip = true;
15+
boolean isBin = false;
1516
}

imagetool/src/main/resources/docker-files/install-middleware.mustache

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ USER {{userid}}
3535
RUN echo "INSTALLING MIDDLEWARE" \
3636
{{#installPackages}}
3737
&& echo "INSTALLING {{type}}" \
38-
&& {{#isZip}}unzip -q {{{tempDir}}}/{{installerFilename}} "*.jar" -d {{{tempDir}}} &&{{/isZip}} \
39-
{{{java_home}}}/bin/java -Xmx1024m -jar {{{tempDir}}}/{{jarName}} -silent ORACLE_HOME={{{oracle_home}}} \
40-
-responseFile {{{tempDir}}}/{{responseFile.name}} -invPtrLoc {{inv_loc}}/oraInst.loc -ignoreSysPrereqs -force -novalidation \
38+
&& {{#isZip}}unzip -q {{{tempDir}}}/{{installerFilename}} "*.[jb][ai][rn]" -d {{{tempDir}}} &&{{/isZip}} \
39+
{{^isBin}}{{{java_home}}}/bin/java -Xmx1024m -jar {{{tempDir}}}/{{jarName}} -silent ORACLE_HOME={{{oracle_home}}} \
40+
-responseFile {{{tempDir}}}/{{responseFile.name}} -invPtrLoc {{inv_loc}}/oraInst.loc -ignoreSysPrereqs -force -novalidation {{/isBin}} \
41+
{{#isBin}}chmod +x {{{tempDir}}}/{{jarName}} && \
42+
{{{tempDir}}}/{{jarName}} -force -ignoreSysPrereqs -silent -responseFile {{{tempDir}}}/{{responseFile.name}} \
43+
-invPtrLoc {{inv_loc}}/oraInst.loc ORACLE_HOME={{{oracle_home}}} -jreLoc {{{java_home}}} {{/isBin}} \
4144
{{/installPackages}}
4245
&& test $? -eq 0 \
4346
&& chmod -R g+r {{{oracle_home}}} \

0 commit comments

Comments
 (0)