Skip to content

Commit 72aed80

Browse files
committed
wip
1 parent 30da4b6 commit 72aed80

File tree

1 file changed

+13
-39
lines changed

1 file changed

+13
-39
lines changed

site/creating-domain.md

Lines changed: 13 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
**TODO** review and update
2-
31
# Creating a WebLogic domain
42

53
The WebLogic domain must be installed into the folder that will be mounted as `/shared/domain`. The recommended approach is to use the provided `create-weblogic-domain.sh` script; however, instructions are also provided for manually installing and configuring a WebLogic domain (see [Manually creating a domain](manually-creating-domain.md)).
@@ -21,7 +19,7 @@ Any namespaces that were listed in the `targetNamespaces` parameter in the opera
2119
To create an additional namespace, issue the following command:
2220

2321
```
24-
kubectl create namespace NAMESPACE
22+
$ kubectl create namespace NAMESPACE
2523
```
2624

2725
In this command, replace `NAMESPACE` with the desired namespace.
@@ -33,7 +31,7 @@ In this command, replace `NAMESPACE` with the desired namespace.
3331
In order to obtain the WebLogic Server Docker image from the Docker Store, which requires authentication, a Kubernetes secret containing the registry credentials must be created. To create a secret with Docker Store credentials, issue the following command:
3432

3533
```
36-
kubectl create secret docker-registry SECRET_NAME
34+
$ kubectl create secret docker-registry SECRET_NAME
3735
-n NAMESPACE
3836
--docker-server=index.docker.io/v1/
3937
--docker-username=YOUR_USERNAME
@@ -52,8 +50,8 @@ If you have never used the WebLogic Server image before, you will need to go to
5250
You can let Kubernetes pull the Docker image for you the first time you try to create a pod that uses the image, but we have found that you can generally avoid various common issues, like putting the secret in the wrong namespace or getting the credentials wrong, by just manually pulling the image by running these commands *on the Kubernetes nodes*:
5351

5452
```
55-
docker login
56-
docker pull store/oracle/weblogic:12.2.1.3
53+
$ docker login
54+
$ docker pull store/oracle/weblogic:12.2.1.3
5755
```
5856
## Setting up secrets for the Administration Server credentials
5957

@@ -62,7 +60,7 @@ The username and password credentials for access to the Administration Server mu
6260
Issue the following command to create the secret:
6361

6462
```
65-
kubectl -n NAMESPACE create secret generic SECRET_NAME
63+
$ kubectl -n NAMESPACE create secret generic SECRET_NAME
6664
--from-literal=username=ADMIN-USERNAME
6765
--from-literal=password=ADMIN-PASSWORD
6866
```
@@ -82,7 +80,7 @@ In a single-node Kubernetes cluster, such as may be used for testing or proof of
8280
The persistent volume for the domain must be created using the appropriate tools before running the script to create the domain. In the simplest case, namely the `HOST_PATH` provider, this means creating a directory on the Kubernetes master and ensuring that it has the correct permissions:
8381

8482
```
85-
mkdir –m 777 –p /path/to/domain1PersistentVolume
83+
$ mkdir –m 777 –p /path/to/domain1PersistentVolume
8684
```
8785

8886
For other providers, consult the provider documentation for instructions on how to create a persistent volume.
@@ -144,11 +142,14 @@ Next, choose and create a directory in which generated operator related files wi
144142
Finally, run the create script, pointing it at your inputs file and output directory:
145143

146144
```
147-
./create-weblogic-domain.sh \
145+
$ ./create-weblogic-domain.sh -e -v \
148146
–i create-weblogic-domain-inputs.yaml \
149147
-o /path/to/weblogic-operator-output-directory
150148
```
151149

150+
The `-e` option tells the script that it should not only create the YAML files but also apply them to the Kubernetes environment.
151+
If you omit this option, the YAML files will be generated in the output directory and you can inspect them and apply them manually.
152+
152153
## What the script does
153154

154155
The script will perform the following steps:
@@ -246,7 +247,7 @@ The script will verify that the domain was created, and will report failure if t
246247
To confirm that the domain resource was created, use this command:
247248

248249
```
249-
kubectl describe domain DOMAINUID -n NAMESPACE
250+
$ kubectl describe domain DOMAINUID -n NAMESPACE
250251
```
251252

252253
Replace `DOMAINUID` with the `domainUID`, and replace `NAMESPACE` with the namespace that the domain was created in. The output of this command will provide details of the domain, as shown in this example:
@@ -321,7 +322,7 @@ In the `Status` section of the output, the available servers and clusters are li
321322
Use the following command to see the pods running the servers:
322323

323324
```
324-
kubectl get pods -n NAMESPACE
325+
$ kubectl get pods -n NAMESPACE
325326
```
326327

327328
Here is an example of the output of this command:
@@ -339,7 +340,7 @@ domain1-managed-server2 1/1 Running 0 22h
339340
Use the following command to see the services for the domain:
340341

341342
```
342-
kubectl get services -n NAMESPACE
343+
$ kubectl get services -n NAMESPACE
343344
```
344345

345346
Here is an example of the output of this command:
@@ -353,33 +354,6 @@ domain1-managed-server1 ClusterIP 10.100.184.148 <none>
353354
domain1-managed-server2 ClusterIP 10.108.114.41 <none> 8001/TCP 22h
354355
```
355356

356-
### Verify the Ingresses
357-
358-
Use the following command to see the Ingresses for the domain:
359-
360-
```
361-
kubectl describe ing -n domain1
362-
```
363-
364-
Here is an example of the output of this command:
365-
366-
```
367-
$ kubectl describe ing -n domain1
368-
Name: domain1-cluster-1
369-
Namespace: domain1
370-
Address:
371-
Default backend: default-http-backend:80 (<none>)
372-
Rules:
373-
Host Path Backends
374-
---- ---- --------
375-
*
376-
/ domain1-managed-server1:8001 (<none>)
377-
/ domain1-managed-server2:8001 (<none>)
378-
Annotations:
379-
Events: <none>
380-
```
381-
382-
383357
## Configuring the domain readiness
384358

385359
Kubernetes has a concept of “readiness” that is used to determine when external requests should be routed to a particular pod. The domain creation job provided with the operator configures the readiness probe to use the WebLogic Server ReadyApp, which provides a mechanism to check when the server is actually ready to process work, as opposed to simply being in the `RUNNING` state. Often applications have some work to do after the server is `RUNNING` but before they are ready to process new requests.

0 commit comments

Comments
 (0)