Skip to content

Commit d3be62a

Browse files
rosemarymaranoddsharpe
authored andcommitted
revise docs (#90)
* revise docs * Add important first step to procedure
1 parent f550b71 commit d3be62a

10 files changed

+336
-260
lines changed

README.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,45 @@ image.
1111
## Features
1212

1313
The Image Tool provides three functions within the main script:
14-
- [Create Image](site/create-image.md) - The `create` command creates a new Docker image and installs the requested
14+
- [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-
- [Update Image](site/update-image.md) - The `update` command creates a new Docker image by applying WebLogic patches
17-
to an existing image. Additionally, you can create a WebLogic domain if one did not exist previously, update an
16+
- [Update Image](site/update-image.md) - The `update` command creates a new Docker image by applying WebLogic patches
17+
to an existing image. Additionally, you can create a WebLogic domain if one did not exist previously, update an
1818
an existing domain, or deploy an application.
1919
- [Cache](site/cache.md) - The Image Tool maintains metadata on the local file system for patches and installers.
2020
The `cache` command can be used to manipulate the local metadata.
2121

2222
## Prerequisites
2323

24-
- Docker client and daemon on the build machine, with minimum Docker version Docker 18.03.1.ce.
25-
- Installers for WebLogic Server and JDK from OTN / Oracle e-Delivery.
26-
- (For patches) Oracle support credentials.
27-
- Bash version 4.0 or higher to enable the `<tab>` command complete feature.
24+
- Docker client and daemon on the build machine, with minimum Docker version 18.03.1.ce.
25+
- Installers for WebLogic Server and JDK from the [Oracle Software Delivery Cloud](https://edelivery.oracle.com).
26+
- For patches, [Oracle Support](https://www.oracle.com/technical-resources/) credentials.
27+
- Bash version 4.0 or later, to enable the `<tab>` command complete feature.
2828

2929
## Setup
3030

31-
- Build the project (`mvn clean package`), to create the ZIP installer in ./imagetool/target.
31+
- Build the project (`mvn clean package`) to create the ZIP installer in `./imagetool/target`.
3232
- Unzip the release ZIP file to a desired location.
33-
- For Linux environment `cd your_unzipped_location/bin` and `source setup.sh`.
34-
- For Windows environment `cd your_unzipped_location\bin` and `.\imagetool.cmd`.
35-
- Run `imagetool help` to show the help screen.
33+
- For Linux environment, `cd your_unzipped_location/bin` and `source setup.sh`.
34+
- For Windows environment, `cd your_unzipped_location\bin` and `.\imagetool.cmd`.
35+
- Run `imagetool help` to show the help text.
3636

3737
## Quick Start
3838

39-
[Image Tool Quick Start Guide](site/quickstart.md)
39+
Use the [Quick Start](site/quickstart.md) guide to create a Linux-based WebLogic Docker image.
40+
41+
## Samples
42+
43+
* [Create an image with full Internet access](site/create-image-with-internet.md)
44+
* [Create an image with no Internet access](site/create-image-no-internet.md)
45+
* [Patch an existing image](site/patching-image.md)
46+
* [Create an image with a WebLogic domain using the WebLogic Deploy Tool](site/create-image-wdt.md)
47+
48+
## Additional tasks
49+
50+
* [Cleanup](site/cleanup.md)
51+
* [Logging](site/logging.md)
52+
4053

4154
## Copyright
4255
Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.

site/argument-file.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Use an argument file
2+
3+
You can save all arguments passed for the Image Tool in a file, then use the file as a parameter.
4+
5+
For example, create a file called `build_args`:
6+
7+
```bash
8+
create
9+
--type wls
10+
--version 12.2.1.3.0
11+
--tag wls:122130
12+
13+
--httpProxyUrl http://mycompany-proxy:80
14+
--httpsProxyUrl http://mycompany-proxy:80
15+
--passwordEnv MYPWD
16+
17+
```
18+
19+
Use it on the command line, as follows:
20+
21+
```bash
22+
imagetool @/path/to/build_args
23+
```
24+
25+
### Copyright
26+
Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.

site/cache.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
# Cache
22

3-
The Image Tool maintains a local file cache store, this store is used to look up where the Java,
4-
WebLogic installers, and WebLogic patches reside in the local file system.
5-
6-
By default, it is stored in the user's ```$HOME/cache``` directory. Under this directory, the lookup information is
7-
stored in the file ```.metadata```. All automatically downloaded patches also reside in this directory.
8-
9-
This default cache store location can be changed by setting the environment variable WLSIMG_CACHEDIR
3+
The Image Tool maintains a local file cache store. This store is used to look up where the Java, WebLogic Server installers, and WebLogic Server patches reside in the local file system.
104

11-
The `cache` command can be used to manipulate the local file cache. There are several subcommands of the cache feature:
5+
By default, the cache store is located in the user's ```$HOME/cache``` directory. Under this directory, the lookup information is stored in the ```.metadata``` file. All automatically downloaded patches also reside in this directory.
126

7+
You can change the default cache store location by setting the environment variable `WLSIMG_CACHEDIR`:
8+
9+
```bash
10+
export WLSIMG_CACHEDIR="/path/to/cachedir"
1311
```
14-
Usage: imagetool cache [COMMAND]
15-
List and set cache options
1612

17-
Commands:
13+
You use the `cache` command to manipulate the local file cache. There are several subcommands for the cache feature.
1814

19-
listItems List cache contents
20-
addInstaller Add cache entry for wls, fmw, jdk or wdt installer
21-
addPatch Add cache entry for wls|fmw patch or psu
22-
addEntry Command to add a cache entry. Use caution
23-
deleteEntry Command to delete a cache entry
24-
help Displays help information about the specified command
2515
```
16+
Usage: imagetool cache [OPTIONS]
17+
List and set cache options
18+
```
19+
20+
| Option | Description |
21+
| --- | --- |
22+
|`listItems`| List cache contents. |
23+
|`addInstaller` | Add cache entry for `wls`, `fmw`, `jdk`, or `wdt` installer. |
24+
| `addPatch` | Add cache entry for `wls` or `fmw` patch, or `psu`. |
25+
| `addEntry` | Add a cache entry. Use with caution. |
26+
| `help` | Display help information for the specified command.|
27+
2628

2729
## Usage scenarios
2830

@@ -44,21 +46,21 @@ Commands:
4446
imagetool cache addInstaller --type jdk --version 8u202 --path /path/to/local/jdk.tar.gz
4547
```
4648
47-
- `addPatch`: Add a patch to the cache. This command verifies if the path points to a valid patch by querying the Oracle support portal.
49+
- `addPatch`: Add a patch to the cache. This command verifies if the path points to a valid patch by querying the Oracle Support portal.
4850
```
4951
imagetool cache addPatch --type wls --patchId 12345678_12.2.1.3.0 --path /path/to/patch.zip
5052
```
51-
Note: When adding a patch to the cache store. The patchId should be in the following format: 99999999_9.9.9.9.99999 The first 8 digits is the patch id, followed by an underscore and then release number. This is needed if you want to distinguish a patch that has different versions of the patch.
53+
**Note**: When adding a patch to the cache store, the `patchId` should be in the following format: `99999999_9.9.9.9.99999` The first 8 digits is the patch ID, followed by an underscore, and then the release number. This is needed if you want to distinguish a patch that has different patch versions.
5254
53-
For example, patch 29135930 has several different versions from Oracle support, one for each release where the bug is fixed.
55+
For example, patch `29135930` has several different versions in Oracle Support, one for each release in which the bug is fixed.
5456
5557
| Patch Name | Release |
5658
| ---------|---------|
57-
| 29135930 | 12.2.1.3.190416|
58-
| 29135930 | 12.2.1.3.0 |
59-
| 29135930 | 12.2.1.3.18106 |
59+
| `29135930` | `12.2.1.3.190416`|
60+
| `29135930` | `12.2.1.3.0` |
61+
| `29135930` | `12.2.1.3.18106` |
6062
61-
If you have downloaded the release version ```12.2.1.3.190416``` of the patch, then you should use the argument as ```--patchId 29135930_12.2.1.3.190416```
63+
If you downloaded the release version ```12.2.1.3.190416``` of the patch, then you should use the argument ```--patchId 29135930_12.2.1.3.190416```.
6264
6365
- `addEntry`: Consider this an expert mode where you can add key value pairs to the cache without any validation.
6466
```

site/cleanup.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Cleanup
2+
3+
The Image Tool creates a temporary directory, prefixed by ```wlsimgbuilder_temp```,
4+
every time it runs. Under normal circumstances, this directory will be deleted. However,
5+
if the process is aborted or the tool is unable to remove the directory, you can delete it manually.
6+
7+
By default, the temporary directory is created under the user's home directory. If you do not want it created under the home directory, set the environment variable:
8+
9+
```bash
10+
export WLSIMG_BLDDIR="/path/to/dir"
11+
```
12+
13+
14+
If you see dangling images after the build, use the following command to remove them:
15+
16+
```bash
17+
docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
18+
```
19+
20+
### Copyright
21+
Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.

site/create-image-no-internet.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Create an image without Internet access
2+
3+
4+
In this use case, because there is no Internet access, you will need to download all the installers and
5+
patches, plus set up the cache. Also, you must provide a base operating system image that has the following packages installed.
6+
7+
```bash
8+
gzip
9+
tar
10+
unzip
11+
```
12+
13+
## Steps
14+
15+
1. Download these Java and WebLogic installers from the [Oracle Software Delivery Cloud](https://edelivery.oracle.com)
16+
and save them in a directory of your choice, for example, `/home/acmeuser/wls-installers`:
17+
18+
`fmw_12.2.1.3.0_wls_Disk1_1of1.zip`\
19+
`jdk-8u202-linux-x64.tar.gz`
20+
21+
22+
2. Use the [Cache Tool](cache.md) to add the installers:
23+
24+
```bash
25+
imagetool cache addInstaller --type jdk --version 8u202 --path /home/acmeuser/wls-installers/jdk-8u202-linux-x64.tar.gz
26+
```
27+
28+
```bash
29+
imagetool cache addInstaller --type wls --version 12.2.1.3.0 --path /home/acmeuser/wls-installers/fmw_12.2.1.3.0_wls_Disk1_1of1.zip
30+
```
31+
32+
3. For each WebLogic patch, download it from [Oracle Support](https://support.oracle.com/keystone/) and set up the cache.
33+
34+
For example, if you download patch number `27342434` for WebLogic Server version 12.2.1.3.0:
35+
36+
```bash
37+
imagetool cache addPatch --patchId 27342434_12.2.1.3.0 --path /home/acmeuser/cache/p27342434_122130_Generic.zip
38+
```
39+
40+
**Note**: Refer to the [Cache](cache.md) commands for the format of ```patchId```.
41+
42+
4. Then, run the command to create the image:
43+
44+
```bash
45+
imagetool create --fromImage myosimg:latest --tag wls:12.2.1.3.0 --patches 27342434 --version 12.2.1.3.0
46+
```
47+
48+
5. Occasionally, a WebLogic Server patch will require patching the OPatch binaries before applying them. We recommend downloading the latest OPatch patch and setting up the cache.
49+
50+
For example, if the latest OPatch patch is `28186730`, `13.9.4.0.0`. After downloading it from Oracle Support, you can use this command to set up the cache:
51+
52+
```bash
53+
imagetool cache addPatch --patchId 28186730_13.9.4.0.0 --path /home/acmeuser/cache/p28186730_139400_Generic.zip
54+
```
55+
56+
## Copyright
57+
Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.

site/create-image-wdt.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Create an image with a WebLogic domain using the WebLogic Deploy Tool
2+
3+
The Image Tool lets you create a customized WebLogic domain in the image using the [WebLogic Deploy Tool](https://github.com/oracle/weblogic-deploy-tooling).
4+
5+
## Steps
6+
7+
1. Create the image, as directed in the [Quick Start](quickstart.md) guide.
8+
9+
2. Download the [WebLogic Deploy Tool](https://github.com/oracle/weblogic-deploy-tooling/releases), and then add it to the cache store:
10+
11+
```bash
12+
imagetool cache addInstaller --type wdt --version 0.22 --path /home/acmeuser/cache/weblogic-deploy.zip
13+
```
14+
15+
3. Provide the command-line options for the WebLogic Deploy Tool:
16+
17+
```bash
18+
imagetool create --fromImage myosimg:latest --tag wls:12.2.1.3.0 --version 12.2.1.3.0 --wdtVersion 1.4.0 --wdtArchive /home/acmeuser/wdt/domain1.zip --wdtDomainHome /u01/domains/simple_domain
19+
```
20+
21+
The parameter mappings between the Image Tool and the WebLogic Deploy Tool are:
22+
23+
| Image Tool | WebLogic Deploy Tool | Default |
24+
|--------------------|-------------------------|--------|
25+
| `--wdtArchive` | `-archive_file` | |
26+
| `--wdtModel` | `-model_file` | |
27+
| `--wdtVariables` | `-variable_file` | |
28+
| `--wdtRunRCU` | `-run_rcu` | `false` |
29+
| `--wdtDomainHome` | `-domain_home` | |
30+
| `--wdtDomainType` | `-domain_type` | `WLS` |
31+
32+
33+
If you do not specify ```--wdtDomainHome```, the domain will be created under ```/u01/domains/base_domain```.
34+
35+
**Note**: If you are creating a JRF domain and want WebLogic Deploy Tool to create the RCU schemas for you, you can
36+
specify the connection information in the model. See [Specifying RCU
37+
information in the model](https://github.com/oracle/weblogic-deploy-tooling/blob/master/site/rcuinfo.md).
38+
39+
## Copyright
40+
Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.

site/create-image-with-internet.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Create an image with full Internet access
2+
3+
The Image Tool supports creating Linux-based WebLogic Docker images, applying WebLogic patches, and creating WebLogic domains. It can be used with or without Internet access.
4+
5+
In this use case, the Image Tool will:
6+
7+
1. Start with a base-level operating system image (`oraclelinux:7-slim`).
8+
2. Update the image with the necessary packages for installing WebLogic Server.
9+
3. Install Java and WebLogic Server.
10+
11+
## Steps
12+
13+
1. Download these Java and WebLogic installers from the [Oracle Software Delivery Cloud](https://edelivery.oracle.com)
14+
and save them in a directory of your choice, for example, `/home/acmeuser/wls-installers`:
15+
16+
`fmw_12.2.1.3.0_wls_Disk1_1of1.zip`\
17+
`jdk-8u202-linux-x64.tar.gz`
18+
19+
20+
2. Use the [Cache Tool](cache.md) to add the installers:
21+
22+
```bash
23+
imagetool cache addInstaller --type jdk --version 8u202 --path /home/acmeuser/wls-installers/jdk-8u202-linux-x64.tar.gz
24+
```
25+
26+
```bash
27+
imagetool cache addInstaller --type wls --version 12.2.1.3.0 --path /home/acmeuser/wls-installers/fmw_12.2.1.3.0_wls_Disk1_1of1.zip
28+
```
29+
30+
**Note**: The value of the version must be a valid WebLogic Server version number. This version number is used to verify and find the correct patch file to download from Oracle Support. The format of the version is a 5 digits tuple, separated by period. For example, ```12.2.1.3.0``` ```12.1.3.0.0```
31+
32+
3. Create the image using the [Create Tool](create-image.md) commands. For example:
33+
34+
```bash
35+
imagetool create --tag wls:12.2.1.3.0 --latestPSU --version 12.2.1.3.0 --user [email protected] --passwordEnv MYPWD
36+
```
37+
38+
Where ```--user --passwordEnv``` provides the credentials for a user who is entitled to download patches from Oracle Support.
39+
40+
**NOTE**: You can provide the password in one of the three ways:
41+
42+
* Plain text
43+
* Environment variable
44+
* File containing the password
45+
46+
47+
You will see the Docker command output as the tool runs:
48+
49+
```bash
50+
[2019-05-28 10:37:02] [com.oracle.weblogic.imagetool.cli.menu.CreateImage] [INFO ] tmp directory used for build
51+
context: /home/acmeuser/wlsimgbuilder_temp8791654163579491583
52+
[2019-05-28 10:37:09] [com.oracle.weblogic.imagetool.cli.menu.CreateImage] [INFO ] docker cmd = docker build
53+
--force-rm --rm=true --no-cache --tag wls:12.2.1.3.0 --build-arg http_proxy=http://company-proxy.com:80 --build-arg
54+
https_proxy=http://company-proxy.com:80 --build-arg WLS_PKG=fmw_12.2.1.3.0_wls_Disk1_1of1.zip --build-arg
55+
JAVA_PKG=jdk-8u201-linux-x64.tar.gz --build-arg PATCHDIR=patches /home/acmeuser/wlsimgbuilder_temp8791654163579491583
56+
Sending build context to Docker daemon 1.08GB
57+
58+
Step 1/46 : ARG BASE_IMAGE=oraclelinux:7-slim
59+
...
60+
Removing intermediate container 57ccb9fff56b
61+
---> 18d366fc3da4
62+
Successfully built 18d366fc3da4
63+
Successfully tagged wls:12.2.1.3.0
64+
```
65+
66+
3. To verify that the image was created, use the `docker images` command:
67+
68+
```bash
69+
docker images
70+
71+
REPOSITORY TAG IMAGE ID CREATED SIZE
72+
wls 12.2.1.3.0 18d366fc3da4 About a minute ago 1.41GB
73+
oraclelinux 7-slim f7512ac13c1b 6 weeks ago 118MB
74+
75+
```
76+
## Copyright
77+
Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.

site/logging.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Logging
2+
3+
In some circumstances, it may be helpful to turn on debugging to reveal more information.
4+
5+
The Image Tool uses the standard `logging.properties` file under the tool's ```bin``` directory.
6+
7+
### Copyright
8+
Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.

site/patching-image.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Patch an existing image
2+
3+
This example shows you how to apply WebLogic Server patches to an existing image.
4+
You can download patches using the Image Tool or by manually downloading them.
5+
6+
## Steps
7+
8+
1. Create the image, as directed in the [Quick Start](quickstart.md) guide.
9+
10+
2. For each WebLogic patch, download it from [Oracle Support](https://support.oracle.com/keystone/) and set up the cache.
11+
12+
For example, to download patch number `27342434` for WebLogic Server version 12.2.1.3.0:
13+
14+
```bash
15+
imagetool cache addPatch --patchId 27342434_12.2.1.3.0 --path /home/acmeuser/cache/p27342434_122130_Generic.zip
16+
```
17+
18+
**Note**: Refer to the [Cache](cache.md) commands for the format of ```patchId```.
19+
20+
3. Use the [`imagetool update`](update-image.md) command to update the image:
21+
22+
```bash
23+
imagetool update --fromImage wls:12.2.1.3.0 --tag wls:12.2.1.3.4 --patches 27342434
24+
```
25+
26+
## Copyright
27+
Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.

0 commit comments

Comments
 (0)