1
1
# Quick Start
2
2
3
- The Image Tool supports creating WebLogic Docker image , applying WebLogic patches, and creating WebLogic domains. It
3
+ The Image Tool supports creating WebLogic Docker images , applying WebLogic patches, and creating WebLogic domains. It
4
4
can be used with or without Internet access.
5
5
6
- Before you use the tool, you can customize the tool's cache store. The cache store is used to look up where the Java,
6
+ Before you use the tool, you can customize the tool's cache store. The cache store is used to look up where the Java,
7
7
WebLogic installers, and WebLogic patches reside in the local file system.
8
8
9
- By default, it is stored in the user's ``` $HOME/cache ``` directory. Under this directory, the look up information is
9
+ By default, it is stored in the user's ``` $HOME/cache ``` directory. Under this directory, the lookup information is
10
10
stored in the file ``` .metadata ``` . All automatically downloaded patches also reside in this directory.
11
11
12
12
This default cache store location can be changed by setting the environment variable WLSIMG_CACHEDIR
@@ -19,17 +19,17 @@ The high level steps for creating an image are:
19
19
20
20
1 . Download the Java and WebLogic installers from Oracle Software Delivery Cloud.
21
21
2 . Add the installers to the cache store.
22
- 3 . Optionally download any WebLogic patches and add them to the cache store.
22
+ 3 . Optionally, download any WebLogic patches and add them to the cache store.
23
23
4 . Run the ``` imagetool ``` command to create or update an image.
24
24
25
-
26
- For example, you have saved the installers in /home/acmeuser/wls-installers as
25
+
26
+ For example, if you have saved the installers in /home/acmeuser/wls-installers as:
27
27
28
28
fmw_12.2.1.3.0_wls_Disk1_1of1.zip\
29
29
jdk-8u202-linux-x64.tar.gz
30
-
31
30
32
- Using the Cache Tool to add the installers:
31
+
32
+ Use the Cache Tool to add the installers:
33
33
34
34
``` bash
35
35
imagetool cache addInstaller --type jdk --version 8u202 --path /home/acmeuser/wls-installers/jdk-8u202-linux-x64.tar.gz
@@ -41,7 +41,7 @@ imagetool cache addInstaller --type wls --version 12.2.1.3.0 --path /home/acmeus
41
41
42
42
```
43
43
44
- ** Note** : The value of the version must be a valid WebLogic version number. This version number is used to verify and
44
+ ** Note** : The value of the version must be a valid WebLogic version number. This version number is used to verify and
45
45
find the correct patch file to download from Oracle Support. The format of the version is a 5 digits tuple, separated
46
46
by period. For example, ``` 12.2.1.3.0 ``` ``` 12.1.3.0.0 ```
47
47
@@ -58,13 +58,13 @@ wls_12.2.1.3.0=/home/acmeuser/wls-installers/fmw_12.2.1.3.0_wls_Disk1_1of1.zip
58
58
59
59
```
60
60
61
- During the image creation process, the tool creates a temporary directory prefixed by ``` wlsimgbuilder_temp ``` as
62
- the context root for the ``` docker build ``` command. This temporary directory will be deleted upon successful
61
+ During the image creation process, the tool creates a temporary directory prefixed by ``` wlsimgbuilder_temp ``` as
62
+ the context root for the ``` docker build ``` command. This temporary directory will be deleted upon successful
63
63
completion.
64
-
64
+
65
65
By default, it is created under the user's home directory. If you do not want to create the temporary directory under
66
66
the home directory, you can first set the environment variable by:
67
-
67
+
68
68
``` bash
69
69
export WLSIMG_BLDDIR=" /path/to/dir"
70
70
```
@@ -82,36 +82,36 @@ drwxr-xr-x 18 root root 4096 May 29 01:31 ..
82
82
```
83
83
84
84
85
- ## Creating image with full Internet access
85
+ ## Creating an image with full Internet access
86
86
87
- In this use case, the image tool will:
87
+ In this use case, the Image Tool will:
88
88
89
- 1 . Start with a base level operating system image (oracle-linux:7-slim).
89
+ 1 . Start with a base- level operating system image (oracle-linux:7-slim).
90
90
2 . Automatically update the image with the necessary packages for installing WebLogic.
91
91
3 . Install Java and WebLogic based on the provided installers.
92
- 4 . Optionally automatically download and apply patches specified.
93
- 5 . Optionally create a WebLogic domain with the WebLogic Deploy Tool.
92
+ 4 . Optionally, automatically download and apply the patches specified.
93
+ 5 . Optionally, create a WebLogic domain with the WebLogic Deploy Tool.
94
94
95
95
96
- After you have downloaded the Java and WebLogic installers described before , you can create the image using the [ Create
96
+ After you have downloaded the Java and WebLogic installers described previously , you can create the image using the [ Create
97
97
Tool commands] ( create-image.md ) . For example:
98
98
99
99
``` bash
100
100
imagetool create --tag wls:12.2.1.3.0 --latestPSU --version 12.2.1.3.0 --user
[email protected] --passwordEnv MYPWD [--httpProxyUrl http://company-proxy:80 --httpsProxyUrl http://company-proxy:80]
101
101
```
102
102
103
- where ``` --user --passwordEnv ``` provides the credentials for the user who is entitled to download patches from Oracle
104
- Support
103
+ where ``` --user --passwordEnv ``` provides the credentials for the user who is entitled to download patches from Oracle
104
+ Support.
105
105
106
106
You will see the Docker command output as the tool runs:
107
107
108
108
``` bash
109
- [2019-05-28 10:37:02] [com.oracle.weblogic.imagetool.cli.menu.CreateImage] [INFO ] tmp directory used for build
110
- context: /home/acmeuser/wlsimgbuilder_temp8791654163579491583
111
- [2019-05-28 10:37:09] [com.oracle.weblogic.imagetool.cli.menu.CreateImage] [INFO ] docker cmd = docker build
112
- --force-rm --rm=true --no-cache --tag wls:12.2.1.3.0 --build-arg http_proxy=http://company-proxy.com:80 --build-arg
113
- https_proxy=http://company-proxy.com:80 --build-arg WLS_PKG=fmw_12.2.1.3.0_wls_Disk1_1of1.zip --build-arg
114
- JAVA_PKG=jdk-8u201-linux-x64.tar.gz --build-arg PATCHDIR=patches /home/acmeuser/wlsimgbuilder_temp8791654163579491583
109
+ [2019-05-28 10:37:02] [com.oracle.weblogic.imagetool.cli.menu.CreateImage] [INFO ] tmp directory used for build
110
+ context: /home/acmeuser/wlsimgbuilder_temp8791654163579491583
111
+ [2019-05-28 10:37:09] [com.oracle.weblogic.imagetool.cli.menu.CreateImage] [INFO ] docker cmd = docker build
112
+ --force-rm --rm=true --no-cache --tag wls:12.2.1.3.0 --build-arg http_proxy=http://company-proxy.com:80 --build-arg
113
+ https_proxy=http://company-proxy.com:80 --build-arg WLS_PKG=fmw_12.2.1.3.0_wls_Disk1_1of1.zip --build-arg
114
+ JAVA_PKG=jdk-8u201-linux-x64.tar.gz --build-arg PATCHDIR=patches /home/acmeuser/wlsimgbuilder_temp8791654163579491583
115
115
Sending build context to Docker daemon 1.08GB
116
116
117
117
Step 1/46 : ARG BASE_IMAGE=oraclelinux:7-slim
@@ -133,38 +133,38 @@ oraclelinux 7-slim f7512ac13c1b 6 weeks ago
133
133
134
134
```
135
135
136
- ## Creating image with no Internet access
136
+ ## Creating an image with no Internet access
137
137
138
138
139
- In this use case, because there is no Internet access. You will be responsible for downloading all the installers and
140
- patches, plus setting up the cache. You also have to provide a base operating system image that has the following packages
139
+ In this use case, because there is no Internet access, you will be responsible for downloading all the installers and
140
+ patches, plus setting up the cache. You also have to provide a base operating system image that has the following packages
141
141
installed.
142
142
143
143
144
144
``` bash
145
- gzip
146
- tar
145
+ gzip
146
+ tar
147
147
unzip
148
148
```
149
149
150
- For each WebLogic patch, you will need to download it from Oracle Support and set up the cache. For example, if you downloaded patch number
150
+ For each WebLogic patch, you will need to download it from Oracle Support and set up the cache. For example, if you downloaded patch number
151
151
27342434 for WebLogic version 12.2.1.3.0:
152
-
152
+
153
153
``` bash
154
154
imagetool cache addPatch --patchId p27342434 --version 12.2.1.3.0 --path /home/acmeuser/cache/p27342434_122130_Generic .zip -user
[email protected] --passwordEnv MYPWD
155
155
```
156
156
157
- You need to provide the credentials in the command line. It verifies the MD5 on the file system against the meta data
158
- on Oracle Support for this patch number
157
+ You need to provide the credentials on the command line. It verifies the MD5 on the file system against the metadata
158
+ on Oracle Support for this patch number.
159
159
160
160
Then, you can run the command to create the image:
161
161
162
162
``` bash
163
163
imagetool create --fromImage myosimg:latest --tag wls:12.2.1.3.0 --patches 27342434 --version 12.2.1.3.0 --useCache always
164
164
```
165
165
166
- Sometimes, a WebLogic patch may require patching the OPatch binaries before applying them. We recommend
167
- downloading the latest OPatch patch and setup the cache. For example, the latest OPatch patch is 28186730, 13.9
166
+ Sometimes, a WebLogic patch may require patching the OPatch binaries before applying them. We recommend
167
+ downloading the latest OPatch patch and setting up the cache. For example, the latest OPatch patch is 28186730, 13.9
168
168
.4.0.0. You can use this command to set up the cache after downloading from Oracle Support.
169
169
170
170
``` bash
@@ -173,57 +173,56 @@ imagetool cache addPatch --patchId p28186730 --version 13.9.4.0.0 --path /home/a
173
173
174
174
## Patching an existing image
175
175
176
- This use case allows you apply WebLogic patches to an existing image. It works similarly to previous use cases, you
177
- have the option to automatically download using the tool or manual downloading the patches.
176
+ This use case allows you to apply WebLogic patches to an existing image. It works similarly to previous use cases; you
177
+ have the option to automatically download using the tool or manually downloading the patches.
178
178
179
- Once the cache is setup, you can use the following command to update an image:
179
+ After the cache is setup, you can use the following command to update an image:
180
180
181
181
``` bash
182
182
imagetool update --fromImage wls:12.2.1.3.0 --tag wls:12.2.1.3.4 --patches 27342434 --version 12.2.1.3.0 --useCache always
183
183
```
184
184
185
- ## Create an image with a WebLogic Domain using WebLogic Deploy Tool
185
+ ## Create an image with a WebLogic domain using the WebLogic Deploy Tool
186
186
187
- The Image Tool allows creating a customized WebLogic domain in the image using [ WebLogic Deploy Tool] (https://github
188
- .com/oracle/weblogic-deploy-tooling).
187
+ The Image Tool allows creating a customized WebLogic domain in the image using the [ WebLogic Deploy Tool] ( https://github.com/oracle/weblogic-deploy-tooling ) .
189
188
190
189
You can accomplish this by:
191
190
192
- Download the [ WebLogic Deploy Tool from ] ( https://github.com/oracle/weblogic-deploy-tooling/releases ) , then add it to the cache store
191
+ Download the [ WebLogic Deploy Tool] ( https://github.com/oracle/weblogic-deploy-tooling/releases ) , and then add it to the cache store:
193
192
194
193
``` bash
195
194
imagetool cache addInstaller --type wdt --version 2.2 --path /home/acmeuser/cache/weblogic-deploy.zip
196
195
```
197
196
198
- Provide the command line options for WebLogic Deploy Tool
197
+ Provide the command- line options for the WebLogic Deploy Tool:
199
198
200
199
``` bash
201
200
imagetool create --fromImage myosimg:latest --tag wls:12.2.1.3.0 --patches 27342434 --version 12.2.1.3.0 --useCache always --wdtVersion 2.2 --wdtArchive /home/acmeuser/wdt/domain1.zip --wdtDomainHome /u01/domains/simple_domain
202
201
```
203
202
204
- The parameters mapping between Image Tool and WebLogic Deploy Tool are:
203
+ The parameters mapping between the Image Tool and the WebLogic Deploy Tool are:
205
204
206
205
| Image Tool | WebLogic Deploy Tool |
207
206
| --------------------| -------------------------|
208
- | --wdtArchive | -archive_file |
209
- | --wdtModel | -model_file |
210
- | --wdtVariables | -variable_file |
211
- | --run_rcu | -run_rcu |
212
- | --wdtDomainHome | -domain_home |
207
+ | ` --wdtArchive ` | ` -archive_file ` |
208
+ | ` --wdtModel ` | ` -model_file ` |
209
+ | ` --wdtVariables ` | ` -variable_file ` |
210
+ | ` --run_rcu ` | ` -run_rcu ` |
211
+ | ` --wdtDomainHome ` | ` -domain_home ` |
213
212
214
213
215
214
The domain will be created under ``` /u01/domains/base_domain ``` if you do not specify ``` --wdtDomainHome ``` .
216
215
217
- ** Note** : If you are creating a JRF domain and want WebLogic Deploying Tool to create the RCU schemas for you, you can
218
- specify the connection info in the model [ Specifying RCU
219
- information in the model] ( https://github.com/oracle/weblogic-deploy-tooling/blob/master/site/rcuinfo.md )
216
+ ** Note** : If you are creating a JRF domain and want WebLogic Deploy Tool to create the RCU schemas for you, you can
217
+ specify the connection information in the model, see [ Specifying RCU
218
+ information in the model] ( https://github.com/oracle/weblogic-deploy-tooling/blob/master/site/rcuinfo.md ) .
220
219
221
220
222
221
## Using an argument file
223
222
224
223
All arguments passed for the Image Tool can be saved in a file and then you use the file as a parameter. For example:
225
224
226
- Create a file called build_args:
225
+ Create a file called ` build_args ` :
227
226
228
227
``` bash
229
228
create
@@ -237,7 +236,7 @@ create
237
236
238
237
```
239
238
240
- and use it in the command line as:
239
+ Use it on the command line as:
241
240
242
241
``` bash
243
242
imagetool @/path/to/build_args
@@ -246,10 +245,10 @@ imagetool @/path/to/build_args
246
245
247
246
## Cleanup
248
247
249
- As described in the beginning, the Image Tool creates a temporary directory prefixed by ``` wlsimgbuilder_temp ```
250
- every time it runs. This directory will be deleted under normal circumstances, however if the process is aborted,
248
+ As described in the beginning, the Image Tool creates a temporary directory prefixed by ``` wlsimgbuilder_temp ```
249
+ every time it runs. This directory will be deleted under normal circumstances, however, if the process is aborted,
251
250
the directory needs to be deleted manually.
252
-
251
+
253
252
If you see dangling images after the build, you can use the following commands to remove them:
254
253
255
254
``` bash
@@ -258,8 +257,8 @@ docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
258
257
259
258
## Logging
260
259
261
- In a rare circumstance , it may be helpful to turn on debugging to reveal more information. The tool uses the standard
262
- logging.properties file under the tool's ``` bin ``` directory.
260
+ In rare circumstances , it may be helpful to turn on debugging to reveal more information. The tool uses the standard
261
+ ` logging.properties ` file under the tool's ``` bin ``` directory.
263
262
264
263
265
264
## Copyright
0 commit comments