Skip to content

Commit 23945e9

Browse files
committed
Merge branch 'main' into ssl-enhancement
2 parents 4022b7b + fc964e1 commit 23945e9

38 files changed

+950
-487
lines changed

documentation/staging/content/navigate/image.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ Auxiliary images are available for the "Model in Image" [domain location]({{< re
3030
- `Primary Image` - The image containing the Oracle Fusion Middleware software. It is used as the basis of all containers that run WebLogic Servers for the domain.
3131
- `Auxiliary Image` - The image that supplies the WebLogic Deploy Tooling software and the model files. At runtime, the auxiliary image's content is merged with the primary image's content.
3232

33-
One primary image can be reused for hundreds of domains whereas an auxiliary image is domain-specific. When using auxiliary images,
33+
The primary image is the one used for running the domain and the auxiliary contains the data that defines the domain. One primary image can be
34+
reused for hundreds of domains whereas an auxiliary image is domain-specific. When using auxiliary images,
3435
the primary image contains the OS, JDK, and FMW software installations; the auxiliary image supplies the specifics for a single domain.
3536

3637
Use the `Design View` page to create a new or use an existing (the default) `Primary Image` and,
@@ -113,6 +114,11 @@ other installers' version number fields, the best practice it to use the actual
113114
latest capabilities, many of which are exposed by this application. As such, using the latest version is strongly
114115
recommended.
115116

117+
{{% notice note %}} For "Model in Image" or "Domain in Image" [domain locations]({{< relref "/navigate/project-settings#choosing-a-domain-location" >}}),
118+
when building your primary or auxiliary image, we highly recommend using WDT 2.0 to take advantage of enhanced capabilities that reduce the chance of deploy-time errors created due to a bad model.
119+
{{% /notice %}}
120+
121+
116122
#### Patch Oracle Home
117123
**NOTE**: This pane is relevant for `Primary Images` only. Oracle strongly recommends patching all Oracle Fusion Middleware installations with the latest Patch Set Updates (PSUs)
118124
and other recommended patches to ensure that the latest security fixes are applied. This pane configures the WebLogic
@@ -194,8 +200,8 @@ the script itself. This change is left as an exercise for you because different
194200
existing standards for securely handling such credentials.
195201

196202
### Create Images
197-
The `Create Primary Image` and `Create Auxiliary Image` actions invoke the [WebLogic Image Tool](https://oracle.github.io/weblogic-image-tool/) to
198-
create a new container image for running a WebLogic domain in a Kubernetes environment. You can access these actions using
203+
`Create Primary Image` and `Create Auxiliary Image` invoke the [WebLogic Image Tool](https://oracle.github.io/weblogic-image-tool/) to
204+
create a new container image for running a WebLogic domain in a Kubernetes environment. You access these actions using
199205
the `Create Primary Image` or `Create Auxiliary Image` button on the `Image` page or from the `Go` menu.
200206

201207
At a high level, the action performs the following steps:
@@ -208,8 +214,8 @@ At a high level, the action performs the following steps:
208214
[Create](https://oracle.github.io/weblogic-image-tool/userguide/tools/create-image/) command.
209215

210216
### Push Images
211-
The `Push Primary Image` and `Push Auxiliary Image` actions use the specified Image Builder program to upload (that is, push) the newly-built image
212-
to the image registry specified by its image tag. You can access these actions by using the `Push Primary Image` or `Push Auxiliary Image` button on the `Image`
217+
`Push Primary Image` and `Push Auxiliary Image` use the specified Image Builder program to upload (that is, push) the newly-built image
218+
to the image registry specified by its image tag. You access these actions by using the `Push Primary Image` or `Push Auxiliary Image` button on the `Image`
213219
page or from the `Go` menu.
214220

215221
At a high level, the action performs the following steps:

documentation/staging/content/navigate/kubernetes/k8s-ingress-controller.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ description: "Install and configure an ingress controller."
1515
- [Code View](#code-view)
1616
- [Install Ingress Controller](#install-ingress-controller)
1717
- [Update Ingress Routes](#update-ingress-routes)
18+
- [Uninstall Ingress Controller](#uninstall-ingress-controller)
1819

1920
### Ingress Controller
2021
This section supports two distinct functions related to an ingress controller. First, it supports installing an ingress
@@ -105,10 +106,16 @@ existing standards for securely handling such credentials.
105106

106107
### Install Ingress Controller
107108
`Install Ingress Controller` creates any namespace and secret specified and runs the ingress controller's Helm
108-
chart to install the ingress controller. You can access it by using the `Install Ingress Controller` button on the
109-
`Ingress Controller` page or `Go` > `Install Ingress Controller`.
109+
chart to install the ingress controller. You access this action by using the `Install Ingress Controller` button on the
110+
`Ingress Controller` page or the `Go` > `Install Ingress Controller` menu item.
110111

111112
### Update Ingress Routes
112-
`Update Ingress Routes` creates the TLS secret, if needed, and adds or updates the specified ingress routes. You can access it
113+
`Update Ingress Routes` creates the TLS secret, if needed, and adds or updates the specified ingress routes. You access this action
113114
by using the `Update Ingress Routes` button on the `Ingress Controller` page or
114-
`Go` > `Update Ingress Routes to Domain`.
115+
the `Go` > `Update Ingress Routes to Domain` menu item.
116+
117+
### Uninstall Ingress Controller
118+
`Uninstall Ingress Controller` uses the `helm uninstall` command to remove all the ingress resources
119+
and uninstall the ingress controller. In addition, you can choose whether to also delete the corresponding namespace.
120+
You access these actions by using the `Uninstall Ingress Controller` button on the
121+
`Ingress Controller` page or the `Go` > `Uninstall Ingress Controller` menu item.

documentation/staging/content/navigate/kubernetes/k8s-weblogic-domain.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ description: "Create and deploy the Kubernetes custom resource for the WebLogic
2121
- [Prepare Model](#prepare-model)
2222
- [Deploy Domain](#deploy-domain)
2323
- [Get Domain Status](#get-domain-status)
24+
- [Undeploy Domain](#undeploy-domain)
2425

2526
### WebLogic Domain
2627
The `WebLogic Domain` section provides support for creating and deploying the Kubernetes custom resource for the WebLogic domain as
@@ -230,8 +231,8 @@ surfaced here because the `Clusters` pane of the `Design View` is populated only
230231

231232
### Deploy Domain
232233
`Deploy Domain` creates the Domain custom resource object and any of its dependent objects (for example,
233-
namespace, secrets, ConfigMap) in Kubernetes. You can access it by using the `Deploy Domain` button on the
234-
`WebLogic Domain` page or `Go` > `Deploy WebLogic Domain to Kubernetes`. As previously
234+
namespace, secrets, ConfigMap) in Kubernetes. You access this action by using the `Deploy Domain` button on the
235+
`WebLogic Domain` page or the `Go` > `Deploy WebLogic Domain to Kubernetes` menu item. As previously
235236
mentioned, this action also updates the operator configuration, if needed, and reruns the operator Helm chart to ensure
236237
that the new namespace is manageable by the WebLogic Kubernetes Operator configured for this project.
237238

@@ -244,3 +245,9 @@ provides the current status of the last `Deploy Domain` action.
244245
To view the current status of the last domain deployment, use the `Get Domain Status` button or the
245246
`Go` > `Get WebLogic Domain Status`. This action retrieves and displays the domain deployment
246247
status, as provided by the WebLogic Kubernetes Operator.
248+
249+
### Undeploy Domain
250+
`Undeploy Domain` removes the Kubernetes custom resource for the WebLogic domain and its
251+
dependent objects in Kubernetes. In addition, you can choose whether to also delete the corresponding namespace.
252+
You access these actions by using the `Undeploy Domain` button on the
253+
`WebLogic Domain` page or the `Go` > `Undeploy WebLogic Domain to Kubernetes` menu item.

documentation/staging/content/navigate/kubernetes/k8s-wko.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ description: "Install the WebLogic Kubernetes Operator in the target Kubernetes
2020
- [Java Logging](#java-logging)
2121
- [Code View](#code-view)
2222
- [Install Operator](#install-operator)
23+
- [Update Operator](#update-operator)
24+
- [Uninstall Operator](#uninstall-operator)
2325

2426
### WebLogic Kubernetes Operator
2527
This section provides support for installing the WebLogic Kubernetes Operator (the "operator") in the target Kubernetes cluster.
@@ -164,9 +166,9 @@ the script itself. This change is left as an exercise for you because different
164166
existing standards for securely handling such credentials.
165167

166168
### Install Operator
167-
The `Install Operator` action installs the WebLogic Kubernetes Operator in the target Kubernetes cluster.
168-
You can access it by using the `Install Operator` button on the
169-
`WebLogic Operator` page or `Go` > `Install WebLogic Kubernetes Operator`.
169+
`Install Operator` installs the WebLogic Kubernetes Operator in the target Kubernetes cluster.
170+
You access this action by using the `Install Operator` button on the
171+
`WebLogic Operator` page or the `Go` > `Install WebLogic Kubernetes Operator` menu item.
170172

171173
At a high level, `Install Operator` performs the following steps:
172174

@@ -177,3 +179,24 @@ At a high level, `Install Operator` performs the following steps:
177179
5. Creates the operator image pull secret, if needed.
178180
6. Adds the latest operator Helm chart to the local Helm repository.
179181
7. Runs Helm to install the operator using the specified configuration.
182+
183+
### Update Operator
184+
185+
`Update Operator` updates the settings on a running WebLogic Kubernetes Operator by using the `helm upgrade` command.
186+
You access this action by using the `Update Operator` button on the
187+
`WebLogic Operator` page or the `Go` > `Update WebLogic Kubernetes Operator` menu item.
188+
189+
`Update Operator` applies all the changes to the operator that you have specified on the page. For example,
190+
you can change the operator image version, the domain namespace selection strategy, Java logging level,
191+
or the value of any field in the WebLogic Kubernetes Operator section.
192+
193+
### Uninstall Operator
194+
195+
`Uninstall Operator` uses the `helm uninstall` command to remove the WebLogic Kubernetes Operator and its associated
196+
resources from the Kubernetes cluster. In addition, you can choose whether to also delete the corresponding namespace.
197+
You access these actions by using the `Uninstall Operator` button on the
198+
`WebLogic Operator` page or the `Go` > `Uninstall WebLogic Kubernetes Operator` menu item.
199+
200+
Note that if you uninstall an operator, then any domains that it is managing will continue running; however,
201+
any changes to a domain resource that was managed by the operator will not be detected or automatically handled,
202+
and, if you want to clean up such a domain, then you will need to manually delete all of the domain's resources (domain, pods, services, and such).

documentation/staging/content/release notes/_index.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ weight = 5
55
pre = "<b> </b>"
66
+++
77

8+
### Recent Changes
9+
10+
- For "Model in Image" domains, added the ability to configure and push an auxiliary image.
11+
- Added these capabilities:
12+
- Update and uninstall the WebLogic Kubernetes Operator
13+
- Uninstall the ingress controller
14+
- Undeploy the WebLogic domain
15+
816
### Known Issues
917

1018
- When running the WKT UI application on Windows, the image builder tool (docker or podman) also must be directly executable in Windows. For example, there is currently no support for running the WKT UI application in Windows and running podman under the Windows Subsystem for Linux (WSL2). However, running Docker Desktop for Windows with a WSL2 backend _is_ fully supported because the `docker` command is executable directly in Windows (without having to call WSL2). If you need to use podman on Windows, then refer to the podman blog entries at https://podman.io/blogs/2021/09/06/podman-on-macs.html and https://podman.io/blogs/2020/09/02/running_windows_or_mac.html for more information about downloading, installing, and configuring the Windows Remote Client.
@@ -16,7 +24,7 @@ pre = "<b> </b>"
1624

1725
- When trying to run the application on a Linux machine and display it on a Windows machine, do not use the Xming X server. There appears to be a bug (presumably with their OpenGL support) that prevents applications using Electron 13.x or later from working (for example, Microsoft VS Code doesn't work either).
1826

19-
- On Linux when running the application that was installed using the `rpm` or `deb` installers, the following error messages will appear in the log. These are expected and can safely be ignored. The errors are due to the fact that the electron-updater package being used to perform application updates only supports upgrading Linux applications when run using an `AppImage` binary.
27+
- On Linux, when running the application that was installed using the `rpm` or `deb` installers, the following error messages will appear in the log. These are expected and can safely be ignored. The errors are due to the fact that the electron-updater package being used to perform application updates supports only upgrading Linux applications when run using an `AppImage` binary.
2028
```
2129
info: Checking for update
2230
error: Error: Error: ENOENT: no such file or directory, open '/opt/WebLogic Kubernetes Toolkit UI/resources/app-update.yml'

electron/app/js/imageBuilderUtils.js

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,41 @@ async function doPushImage(currentWindow, stdoutChannel, stderrChannel, imageBui
137137

138138
function getDockerEnv(httpsProxyUrl, bypassProxyHosts) {
139139
let env = {
140-
DOCKER_BUILDKIT: '0'
140+
DOCKER_BUILDKIT: '0',
141+
// podman relies on the PATH including other executables (e.g., newuidmap)...
142+
PATH: process.env.PATH
141143
};
142144

145+
// Docker-specific environment variables that should be passed on
146+
if (process.env.DOCKER_HOST) {
147+
env['DOCKER_HOST'] = process.env.DOCKER_HOST;
148+
}
149+
if (process.env.DOCKER_TLS_VERIFY) {
150+
env['DOCKER_TLS_VERIFY'] = process.env.DOCKER_TLS_VERIFY;
151+
}
152+
if (process.env.DOCKER_CERT_PATH) {
153+
env['DOCKER_CERT_PATH'] = process.env.DOCKER_CERT_PATH;
154+
}
155+
156+
// podman-specific environment variables that should be passed on
157+
if(process.env.CONTAINER_HOST) {
158+
env['CONTAINER_HOST'] = process.env.CONTAINER_HOST;
159+
}
160+
if (process.env.STORAGE_DRIVER) {
161+
env['STORAGE_DRIVER'] = process.env.STORAGE_DRIVER;
162+
}
163+
if (process.env.STORAGE_OPTS) {
164+
env['STORAGE_OPTS'] = process.env.STORAGE_OPTS;
165+
}
166+
167+
// proxy-related environment variables
143168
if (httpsProxyUrl) {
144169
env['HTTPS_PROXY'] = httpsProxyUrl;
170+
env['https_proxy'] = httpsProxyUrl;
145171
}
146172
if (bypassProxyHosts) {
147173
env['NO_PROXY'] = bypassProxyHosts;
174+
env['no_proxy'] = bypassProxyHosts;
148175
}
149176

150177
if (!osUtils.isWindows()) {
@@ -159,6 +186,7 @@ function getDockerEnv(httpsProxyUrl, bypassProxyHosts) {
159186
module.exports = {
160187
doLogin,
161188
doPushImage,
189+
getDockerEnv,
162190
validateImageBuilderExecutable,
163191
validateImageExistsLocally
164192
};

electron/app/js/ipcRendererPreload.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ contextBridge.exposeInMainWorld(
145145
'verify-file-exists',
146146
'ok-or-cancel-prompt',
147147
'yes-or-no-prompt',
148+
'yes-no-or-cancel-prompt',
148149
'install-app-update',
149150
'get-latest-wdt-installer',
150151
'wit-cache-installers',
@@ -191,8 +192,7 @@ contextBridge.exposeInMainWorld(
191192
'k8s-delete-object',
192193
'openssl-generate-certs',
193194
'validate-k8s-namespaces-exist',
194-
'validate-wko-domain-exist',
195-
'domain-undeploy-scope-prompt'
195+
'validate-wko-domain-exist'
196196
];
197197
return new Promise((resolve, reject) => {
198198
if (validChannels.includes(channel)) {

electron/app/js/kubectlUtils.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,13 +601,14 @@ async function apply(kubectlExe, fileData, options) {
601601
}
602602

603603
function getKubectlEnvironment(options, httpsProxyUrl, bypassProxyHosts) {
604-
const env = {};
604+
const env = {
605+
PATH: process.env.PATH
606+
};
605607
if (options) {
606608
if (options.kubeConfig && Array.isArray(options.kubeConfig) && options.kubeConfig.length > 0) {
607609
env['KUBECONFIG'] = options.kubeConfig.join(path.delimiter);
608610
getLogger().debug('Set KUBECONFIG environment variable to %s', env['KUBECONFIG']);
609611
}
610-
env['PATH'] = process.env.PATH;
611612
if (options.extraPathDirectories && Array.isArray(options.extraPathDirectories) && options.extraPathDirectories.length > 0) {
612613
env['PATH'] = env['PATH'] + path.delimiter + options.extraPathDirectories.join(path.delimiter);
613614
}

electron/app/js/project.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,14 @@ async function _openProjectFile(targetWindow, projectFileName) {
356356
}
357357

358358
async function _saveProjectFile(targetWindow, projectFile, projectContents) {
359+
// Just in case the name or uuid were empty, make sure that they have a proper value.
360+
if (!projectContents.name) {
361+
projectContents.name = _generateProjectName(projectFile);
362+
}
363+
if (!projectContents.uuid) {
364+
projectContents.uuid = _generateProjectUuid();
365+
}
366+
359367
return new Promise((resolve, reject) => {
360368
_getCredentialManagerForSavingProject(targetWindow, projectContents)
361369
.then(credentialManager => {

electron/app/js/witCreate.js

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,15 @@ const { getLogger } = require('./wktLogging');
1111
const { getImagetoolShellScript } = require('./wktTools');
1212
const { getHttpsProxyUrl, getBypassProxyHosts } = require('./userSettings');
1313
const { executeChildShellScript } = require('./childProcessExecutor');
14+
const { getDockerEnv } = require('./imageBuilderUtils');
1415

1516
async function createImage(currentWindow, stdoutChannel, stderrChannel, createConfig) {
1617
const httpsProxyUrl = getHttpsProxyUrl();
1718
const bypassProxyHosts = getBypassProxyHosts();
1819

1920
const imageToolScript = getImagetoolShellScript();
2021
const [ args, argsContainCredentials ] = buildArgumentsListForCreate(createConfig, httpsProxyUrl);
21-
const env = {
22-
JAVA_HOME: createConfig.javaHome,
23-
DOCKER_BUILDKIT: '0',
24-
WLSIMG_BLDDIR: app.getPath('temp')
25-
};
26-
if (httpsProxyUrl) {
27-
env['HTTPS_PROXY'] = httpsProxyUrl;
28-
}
29-
if (bypassProxyHosts) {
30-
env['NO_PROXY'] = bypassProxyHosts;
31-
}
22+
const env = getCreateEnvironment(createConfig, httpsProxyUrl, bypassProxyHosts);
3223

3324
const result = {
3425
isSuccess: true
@@ -61,18 +52,7 @@ async function createAuxImage(currentWindow, stdoutChannel, stderrChannel, creat
6152

6253
const imageToolScript = getImagetoolShellScript();
6354
const args = buildArgumentsListForCreateAuxImage(createConfig, httpsProxyUrl);
64-
const env = {
65-
JAVA_HOME: createConfig.javaHome,
66-
DOCKER_BUILDKIT: '0',
67-
WLSIMG_BLDDIR: app.getPath('temp')
68-
};
69-
if (httpsProxyUrl) {
70-
env['HTTPS_PROXY'] = httpsProxyUrl;
71-
}
72-
if (bypassProxyHosts) {
73-
env['NO_PROXY'] = bypassProxyHosts;
74-
}
75-
55+
const env = getCreateEnvironment(createConfig, httpsProxyUrl, bypassProxyHosts);
7656
const result = {
7757
isSuccess: true
7858
};
@@ -95,6 +75,13 @@ async function createAuxImage(currentWindow, stdoutChannel, stderrChannel, creat
9575
});
9676
}
9777

78+
function getCreateEnvironment(createConfig, httpsProxyUrl, bypassProxyHosts) {
79+
const env = getDockerEnv(httpsProxyUrl, bypassProxyHosts);
80+
env['JAVA_HOME'] = createConfig.javaHome;
81+
env['WLSIMG_BLDDIR'] = app.getPath('temp');
82+
return env;
83+
}
84+
9885
function buildArgumentsListForCreate(createConfig, httpsProxyUrl) {
9986
const args = [ 'create' ];
10087

0 commit comments

Comments
 (0)