Skip to content

Commit 63d8460

Browse files
jshum2479ddsharpe
authored andcommitted
Domaincopy (#105)
* refactor and add support for rebasing image * Update documentation * with latestPSU argument, tool should not fail if no PSUs exist yet (like the latest release) * wls version and install type for UPDATE need to be set from base image * Remove CachePolicy and WDTOptions * fixed typo in recommended patch URL * upgrade to latest version of PicoCLI * move WDT options into options bean class instead of super class * allow Oracle Support password to be provided on STDIN
1 parent 156d744 commit 63d8460

27 files changed

+1507
-840
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ image.
1313
The Image Tool provides three functions within the main script:
1414
- [Create Image](site/create-image.md) - The `create` command creates a new Docker image and installs the requested
1515
Java and WebLogic software. Additionally, you can create a WebLogic domain in the image at the same time.
16+
- [Rebase Image](site/rebase-image.md) - The `rebase` command creates a new Docker image using an existing WebLogic
17+
domain from an existing image. The new Docker image can start from an existing image with a JDK and Oracle
18+
middleware installation, or can install the JDK and Oracle Home as part of moving the domain.
1619
- [Update Image](site/update-image.md) - The `update` command creates a new Docker image by applying WebLogic patches
1720
to an existing image. Additionally, you can create a WebLogic domain if one did not exist previously, update an
1821
an existing domain, or deploy an application.

imagetool/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
<groupId>com.github.spullara.mustache.java</groupId>
4949
<artifactId>compiler</artifactId>
5050
</dependency>
51+
<dependency>
52+
<groupId>org.jetbrains</groupId>
53+
<artifactId>annotations</artifactId>
54+
<scope>provided</scope>
55+
</dependency>
5156
</dependencies>
5257

5358
<build>

imagetool/src/main/java/com/oracle/weblogic/imagetool/api/model/AbstractFile.java

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,16 @@ public abstract class AbstractFile implements FileResolver {
1919
private static final LoggingFacade logger = LoggingFactory.getLogger(AbstractFile.class);
2020

2121
private String key;
22-
protected CachePolicy cachePolicy;
23-
protected String userId;
24-
protected String password;
25-
2622

2723
/**
2824
* Construct a new abstract file.
2925
*
3026
* @param id cache ID
3127
* @param version applicable product version.
32-
* @param cachePolicy applicable cache policy.
33-
* @param userId userid to use for ARU.
34-
* @param password password to use for ARU.
3528
*/
36-
public AbstractFile(String id, String version, CachePolicy cachePolicy, String userId, String password) {
29+
public AbstractFile(String id, String version) {
3730
this.key = generateKey(id, version);
38-
this.cachePolicy = cachePolicy;
39-
this.userId = userId;
40-
this.password = password;
31+
4132
}
4233

4334
public String generateKey(String id, String version) {

imagetool/src/main/java/com/oracle/weblogic/imagetool/api/model/CachePolicy.java

Lines changed: 0 additions & 31 deletions
This file was deleted.

imagetool/src/main/java/com/oracle/weblogic/imagetool/cli/CLIDriver.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.oracle.weblogic.imagetool.api.model.CommandResponse;
99
import com.oracle.weblogic.imagetool.cli.cache.CacheCLI;
1010
import com.oracle.weblogic.imagetool.cli.menu.CreateImage;
11+
import com.oracle.weblogic.imagetool.cli.menu.RebaseImage;
1112
import com.oracle.weblogic.imagetool.cli.menu.UpdateImage;
1213
import com.oracle.weblogic.imagetool.logging.LoggingFacade;
1314
import com.oracle.weblogic.imagetool.logging.LoggingFactory;
@@ -25,6 +26,7 @@
2526
CacheCLI.class,
2627
CreateImage.class,
2728
UpdateImage.class,
29+
RebaseImage.class,
2830
HelpCommand.class
2931
},
3032
requiredOptionMarker = '*',

imagetool/src/main/java/com/oracle/weblogic/imagetool/cli/WLSCommandLine.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ public static <C extends Callable<T>, T> T call(C callable, PrintStream out, Pri
3535
cmd.setCaseInsensitiveEnumValuesAllowed(ignoreCaseForEnums);
3636
cmd.setToggleBooleanFlags(false);
3737
cmd.setUnmatchedArgumentsAllowed(false);
38-
//cmd.registerConverter(CacheStore.class, x -> new CacheStoreFactory().getCacheStore(x));
3938
List<Object> results = cmd.parseWithHandlers(new CommandLine.RunLast().useOut(out).useAnsi(ansi),
4039
new CommandLine.DefaultExceptionHandler<List<Object>>().useErr(err).useAnsi(ansi), args);
4140
@SuppressWarnings("unchecked") T result = results == null || results.isEmpty() ? null : (T) results.get(0);

0 commit comments

Comments
 (0)