Skip to content

Commit f661b99

Browse files
authored
Merge pull request #1 from oracle/refactor
refactor and rename artifact
2 parents 70dc843 + 760cb0e commit f661b99

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+215
-251
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
# Oracle WebLogic Image Builder Tool
1+
# Oracle WebLogic Image Tool
22

33
Containerization is taking over the software world. In this modern age of software development, Docker and Kubernetes
44
have become the gold standard. To help customers stay at the forefront of this, Oracle has released the
55
[WebLogic Server Kubernetes Operator](https://github.com/oracle/weblogic-kubernetes-operator). The operator helps
66
customers move their workloads to the cloud via the Kubernetes (cloud neutral) route. Customers get to decide how
77
to create the Docker images and apply patches to these images deployed by the Kubernetes operator. To help them
8-
with this effort, we have created the [WebLogic Image Builder Tool](https://github.com/oracle/weblogic-imagebuilder-tool).
8+
with this effort, we have created the [WebLogic Image Tool](https://github.com/oracle/weblogic-image-tool).
99

1010
## Table of Contents
1111

12-
- [Features](#features-of-the-imagebuilder-tool)
12+
- [Features](#features-of-the-oracle-weblogic-image-tool)
1313
- [Prerequisites](#prerequisites)
1414
- [Setup](#setup)
1515
- [Create Image](site/create-image.md)
1616
- [Update Image](site/update-image.md)
1717
- [Cache](site/cache.md)
1818

19-
## Features of the Oracle WebLogic Image Builder Tool
19+
## Features of the Oracle WebLogic Image Tool
2020

2121
The Image Builder Tool can create a WebLogic Docker image from any base image (for example, Oracle Linux, Ubuntu), install a given version of
2222
WebLogic (for example, 12.2.1.3.0), install a given JDK (for example, 8u202), apply selected patches, and create a domain with a given
@@ -29,21 +29,21 @@ applying selected patches).
2929
- Active Internet connection. The tool needs to communicate with Oracle support system.
3030
- Oracle support credentials. These are used to validate and download patches.
3131
- WebLogic and JDK installers from OTN / e-delivery. These should be available on local disk.
32-
- Docker client and daemon on the build machine. Experimental features should be turned on to support the `docker build --squash` option. Refer to [Docker squash](https://docs.docker.com/engine/reference/commandline/build/#squash-an-images-layers---squash-experimental)
32+
- Docker client and daemon on the build machine.
3333
- Bash version 4.0 or higher to enable `<tab>` command complete feature
3434

3535
## Setup
3636

37-
- Build the project (`mvn clean package`) to generate artifacts `imagebuilder-0.1-SNAPSHOT.zip`.
37+
- Build the project (`mvn clean package`) to generate artifacts `imagetool-0.1-SNAPSHOT.zip`.
3838
- Unzip to a desired location. This action should create lib, bin directories and LICENSE.txt.
3939
- If running an OS with bash, run `cd your_unzipped_location/bin` and `source setup.sh`.
40-
- On Windows, set up with `imagebuilder.cmd` or the `imagebuilder.bat` script:
40+
- On Windows, set up with `imagetool.cmd` or the `imagetool.bat` script:
4141
```cmd
4242
@ECHO OFF
43-
java -cp "your_unzipped_folder/lib" com.oracle.weblogicx.imagebuilder.cli.CLIDriver %*
43+
java -cp "your_unzipped_folder/lib" com.oracle.weblogic.imagetool.cli.CLIDriver %*
4444
```
45-
- Then, execute `imagebuilder help` to get the help screen.
46-
- You can execute the JAR directly using the command `java -cp "your_unzipped_folder/lib" com.oracle.weblogicx.imagebuilder.cli.CLIDriver help`.
45+
- Then, execute `imagetool help` to get the help screen.
46+
- You can execute the JAR directly using the command `java -cp "your_unzipped_folder/lib" com.oracle.weblogic.imagetool.cli.CLIDriver help`.
4747
- After you are familiar with the commands, you will be able to create and update WebLogic Docker images.
4848
4949
## Copyright

pom.xml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55

66
<modelVersion>4.0.0</modelVersion>
7-
<groupId>com.oracle.weblogicx</groupId>
8-
<artifactId>imagebuilder</artifactId>
7+
<groupId>com.oracle.weblogic.lifecycle</groupId>
8+
<artifactId>imagetool</artifactId>
99
<version>0.1-SNAPSHOT</version>
1010

1111
<properties>
@@ -58,11 +58,6 @@
5858
</resource>
5959
</resources>
6060
<plugins>
61-
<!--<plugin>-->
62-
<!--<groupId>org.apache.maven.plugins</groupId>-->
63-
<!--<artifactId>maven-resources-plugin</artifactId>-->
64-
<!--<version>3.1.0</version>-->
65-
<!--</plugin>-->
6661
<plugin>
6762
<groupId>org.apache.maven.plugins</groupId>
6863
<artifactId>maven-jar-plugin</artifactId>
@@ -101,8 +96,8 @@
10196
<argument>picocli.AutoComplete</argument>
10297
<argument>--force</argument><!-- overwrite if exists -->
10398
<argument>--completionScript</argument>
104-
<argument>${project.build.directory}/imagebuilder_completion.sh</argument>
105-
<argument>com.oracle.weblogicx.imagebuilder.cli.CLIDriver</argument>
99+
<argument>${project.build.directory}/imagetool_completion.sh</argument>
100+
<argument>com.oracle.weblogic.imagetool.cli.CLIDriver</argument>
106101
</arguments>
107102
</configuration>
108103
</plugin>

site/cache.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Use the `cache` command to add or edit the required metadata for the tool. Cache
44
required installers (WLS, FMW, JDK) are located and where to download the patches. There are several subcommands:
55

66
```
7-
Usage: imagebuilder cache [COMMAND]
7+
Usage: imagetool cache [COMMAND]
88
List and set cache options
99
1010
Commands:
@@ -23,7 +23,7 @@ Commands:
2323

2424
- `listItems`: Display the contents of the cache. Displays key value pairs of the installers and patches.
2525
```
26-
imagebuilder cache listItems
26+
imagetool cache listItems
2727
2828
Cache contents
2929
jdk_8u202=/Users/xyz/Downloads/cache/server-jre-8u202-linux-x64.tar.gz
@@ -35,28 +35,28 @@ Commands:
3535
3636
- `addInstaller`: Add an installer to the cache, for example, JDK.
3737
```
38-
imagebuilder cache addInstaller --type jdk --version 8u202 --path /path/to/local/jdk.tar.gz
38+
imagetool cache addInstaller --type jdk --version 8u202 --path /path/to/local/jdk.tar.gz
3939
```
4040
4141
- `addPatch`: Add a patch to the cache. This command verifies if the path points to a valid patch by querying the Oracle support portal.
4242
```
43-
imagebuilder cache addPatch --type wls --version 12.2.1.3.0 --user [email protected] --passwordEnv MYVAR --patchId p12345678 --path /path/to/patch.zip
43+
imagetool cache addPatch --type wls --version 12.2.1.3.0 --user [email protected] --passwordEnv MYVAR --patchId p12345678 --path /path/to/patch.zip
4444
```
4545
4646
- `getCacheDir` and `setCacheDir`: Get or set the cache directory. Used to display or set the directory where patches will be downloaded.
4747
```
48-
imagebuilder cache getCacheDir
49-
imagebuilder cache setCacheDir /path/to/dir
48+
imagetool cache getCacheDir
49+
imagetool cache setCacheDir /path/to/dir
5050
```
5151
5252
- `addEntry`: Consider this an expert mode where you can add key value pairs to the cache without any validation.
5353
```
54-
imagebuilder cache addEntry --key xyz_123 --value /path/to/file
54+
imagetool cache addEntry --key xyz_123 --value /path/to/file
5555
```
5656
5757
- `deleteEntry`: Delete an entry from the cache for a given key. **Note**: This command does not delete files from the disk.
5858
```
59-
imagebuilder cache deleteEntry --key xyz_123
59+
imagetool cache deleteEntry --key xyz_123
6060
```
6161
6262
## Copyright

site/create-image.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ are marked with an asterisk (*). You can provide the password in one of the thre
88
* File containing the password
99

1010
```
11-
Usage: imagebuilder create [OPTIONS]
11+
Usage: imagetool create [OPTIONS]
1212
Build WebLogic docker image
1313
--docker=<dockerPath> path to docker executable. Default: docker
1414
--fromImage=<fromImage>
@@ -57,18 +57,18 @@ The commands below assume that all the required JDK, WLS or FMW (WebLogic infras
5757

5858
- Create an image named `sample:wls` with the WebLogic installer 12.2.1.3.0, server JDK 8u202, and latest PSU applied.
5959
```
60-
imagebuilder create --tag sample:wls --latestPSU --user [email protected] --password hello
60+
imagetool create --tag sample:wls --latestPSU --user [email protected] --password hello
6161
```
6262
6363
- Create an image named `sample:wdt` with the same options as above and create a domain with [WebLogic Deploy Tooling](https://github.com/oracle/weblogic-deploy-tooling).
6464
```
65-
imagebuilder create --tag sample:wdt --latestPSU --user [email protected] --password hello --wdtModel /path/to/model.json --wdtVariables /path/to/variables.json --wdtVersion 0.16
65+
imagetool create --tag sample:wdt --latestPSU --user [email protected] --password hello --wdtModel /path/to/model.json --wdtVariables /path/to/variables.json --wdtVersion 0.16
6666
```
6767
If `wdtVersion` is not provided, the tool uses the latest release.
6868
6969
- Create an image named `sample:patch` with the selected patches applied.
7070
```
71-
imagebuilder create --tag sample:patch --user [email protected] --password hello --patches 12345678,p87654321
71+
imagetool create --tag sample:patch --user [email protected] --password hello --patches 12345678,p87654321
7272
```
7373
The patch numbers may or may not start with '`p`'.
7474
@@ -79,7 +79,7 @@ The commands below assume that all the required JDK, WLS or FMW (WebLogic infras
7979
- This implies that the tool could not find the JDK installer in its cache.
8080
- Use the [cache](cache.md) command to fix it:
8181
```
82-
imagebuilder cache addInstaller --type jdk --version 8u202 --path /local/path/to/jdk.gz
82+
imagetool cache addInstaller --type jdk --version 8u202 --path /local/path/to/jdk.gz
8383
```
8484
## Copyright
8585
Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.

site/update-image.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ are marked with asterisk (*). The password can be provided in one of the three w
88
* File containing the password
99

1010
```
11-
Usage: imagebuilder update [OPTIONS]
11+
Usage: imagetool update [OPTIONS]
1212
Update WebLogic docker image with selected patches
1313
--docker=<dockerPath> path to docker executable. Default: docker
1414
* --fromImage=<fromImage>
@@ -40,12 +40,12 @@ Update WebLogic docker image with selected patches
4040

4141
- Update an image named `sample:1.0` by applying the latest PSU and tag it as `sample:1.1`:
4242
```
43-
imagebuilder update --fromImage sample:1.0 --tag sample:1.1 --latestPSU --user [email protected] --passwordEnv MYVAR
43+
imagetool update --fromImage sample:1.0 --tag sample:1.1 --latestPSU --user [email protected] --passwordEnv MYVAR
4444
```
4545
4646
- Update an image named `sample:1.0` with the selected patches applied.
4747
```
48-
imagebuilder update --fromImage sample:1.0 --tag sample:1.1 --user [email protected] --password hello --patches 12345678,p87654321
48+
imagetool update --fromImage sample:1.0 --tag sample:1.1 --user [email protected] --password hello --patches 12345678,p87654321
4949
```
5050
The patch numbers may or may not start with '`p`'.
5151

src/main/bin/setup.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ cd $PREV_DIR
4444
echo $RESULT_PATH
4545
}
4646

47-
unalias imagebuilder 2> /dev/null
47+
unalias imagetool 2> /dev/null
4848
script_dir=$( dirname "$( read_link "${BASH_SOURCE[0]}" )" )
49-
IMAGEBUILDER_HOME=`cd "${script_dir}/.." ; pwd`
50-
export IMAGEBUILDER_HOME
51-
alias imagebuilder="${JAVA_HOME}/bin/java -cp \"${IMAGEBUILDER_HOME}/lib/*\" com.oracle.weblogicx.imagebuilder.cli.CLIDriver"
52-
source ${IMAGEBUILDER_HOME}/lib/imagebuilder_completion.sh
49+
IMAGETOOL_HOME=`cd "${script_dir}/.." ; pwd`
50+
export IMAGETOOL_HOME
51+
alias imagetool="${JAVA_HOME}/bin/java -cp \"${IMAGETOOL_HOME}/lib/*\" com.oracle.weblogic.imagetool.cli.CLIDriver"
52+
source ${IMAGETOOL_HOME}/lib/imagetool_completion.sh

src/main/java/com/oracle/weblogicx/imagebuilder/api/FileResolver.java renamed to src/main/java/com/oracle/weblogic/imagetool/api/FileResolver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
44
*/
55

6-
package com.oracle.weblogicx.imagebuilder.api;
6+
package com.oracle.weblogic.imagetool.api;
77

8-
import com.oracle.weblogicx.imagebuilder.api.meta.CacheStore;
8+
import com.oracle.weblogic.imagetool.api.meta.CacheStore;
99

1010
public interface FileResolver {
1111

src/main/java/com/oracle/weblogicx/imagebuilder/api/meta/CacheStore.java renamed to src/main/java/com/oracle/weblogic/imagetool/api/meta/CacheStore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
44
*/
55

6-
package com.oracle.weblogicx.imagebuilder.api.meta;
6+
package com.oracle.weblogic.imagetool.api.meta;
77

88
import java.util.Map;
99

src/main/java/com/oracle/weblogicx/imagebuilder/api/model/AbstractFile.java renamed to src/main/java/com/oracle/weblogic/imagetool/api/model/AbstractFile.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
*
33
* Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
44
*/
5-
package com.oracle.weblogicx.imagebuilder.api.model;
5+
package com.oracle.weblogic.imagetool.api.model;
66

7-
import com.oracle.weblogicx.imagebuilder.api.FileResolver;
7+
import com.oracle.weblogic.imagetool.api.FileResolver;
88

99
import java.nio.file.Files;
1010
import java.nio.file.Paths;

src/main/java/com/oracle/weblogicx/imagebuilder/api/model/CachePolicy.java renamed to src/main/java/com/oracle/weblogic/imagetool/api/model/CachePolicy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
44
*/
55

6-
package com.oracle.weblogicx.imagebuilder.api.model;
6+
package com.oracle.weblogic.imagetool.api.model;
77

88
/**
99
* first - Use cache entries and download artifacts if required

0 commit comments

Comments
 (0)