Skip to content

Commit aff6d03

Browse files
committed
wip
1 parent f5d7a62 commit aff6d03

File tree

3 files changed

+118
-1
lines changed

3 files changed

+118
-1
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Manually creating the domain
2+
3+
In some circumstances you may wish to manually create your domain custom resource. If you have created your own
4+
Docker image containing your domain and the specific patches that you require, then this approach will probably
5+
be most suitable for your needs.
6+
7+
To create the domain custom resource, just make a copy of the sample [domain.yaml](./domain.yaml) provided in
8+
this sample, and then edit it as per the instructions below. When it is ready, you can create the domain in your
9+
Kubernetes cluster using the command:
10+
11+
```
12+
kubectl apply -f domain.yaml
13+
```
14+
15+
You can verify the domain custom resource was created using this command:
16+
17+
```
18+
kubectl -n YOUR_NAMESPACE get domains
19+
```
20+
21+
You can view details of the domain using this command:
22+
23+
```
24+
kubectl -n YOUR_NAMESPACE describe domain YOUR_DOMAIN
25+
```
26+
27+
In both of these commands, replace `YOUR_NAMESPACE` with the namespace that you created the domain in, and
28+
replace `YOUR_DOMAIN` with the `domainUID` you chose.
29+
30+
## Details of the domain custom resource YAML file
31+
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Copyright 2017, 2019, Oracle Corporation and/or its affiliates. All rights reserved.
2+
3+
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
4+
#
5+
# This is an example of how to define a Domain resource.
6+
#
7+
apiVersion: "weblogic.oracle/v2"
8+
kind: Domain
9+
metadata:
10+
name: domain1
11+
namespace: weblogic
12+
labels:
13+
weblogic.resourceVersion: domain-v2
14+
weblogic.domainUID: domain1
15+
spec:
16+
# The WebLogic Domain Home
17+
domainHome: /u01/oracle/user_projects/domains/domain1
18+
# If the domain home is in the image
19+
domainHomeInImage: true
20+
# The Docker image name
21+
image: "my-domain1-image:1.0"
22+
# imagePullPolicy defaults to "Always" if image version is :latest
23+
imagePullPolicy: "IfNotPresent"
24+
# Identify which Secret contains the credentials for pulling an image
25+
#imagePullSecrets:
26+
#- name:
27+
# Identify which Secret contains the WebLogic Admin credentials (note that there is an example of
28+
# how to create that Secret at the end of this file)
29+
webLogicCredentialsSecret:
30+
name: domain1-weblogic-credentials
31+
# Whether to include the server out file into the pod's stdout, default is true
32+
includeServerOutInPodLog: true
33+
# Whether to enable log home
34+
# logHomeEnabled: false
35+
# The in-pod name of the directory to store the domain, node manager, server logs, and server .out
36+
# files in.
37+
# If not specified or empty, domain log file, server logs, server out, and node manager log files
38+
# will be stored in the default logHome location of /shared/logs/<domainUID>/.
39+
# logHome: /shared/logs/domain1
40+
# serverStartPolicy legal values are "NEVER", "IF_NEEDED", or "ADMIN_ONLY"
41+
# This determines which WebLogic Servers the Operator will start up when it discovers this Domain
42+
# - "NEVER" will not start any server in the domain
43+
# - "ADMIN_ONLY" will start up only the administration server (no managed servers will be started)
44+
# - "IF_NEEDED" will start all non-clustered servers, including the administration server and clustered servers up to the replica count
45+
serverStartPolicy: "IF_NEEDED"
46+
serverPod:
47+
# an (optional) list of environment variable to be set on the servers
48+
env:
49+
- name: JAVA_OPTIONS
50+
value: "-Dweblogic.StdoutDebugEnabled=false"
51+
- name: USER_MEM_ARGS
52+
value: "-Xms64m -Xmx256m "
53+
# volumes:
54+
# - name: weblogic-domain-storage-volume
55+
# persistentVolumeClaim:
56+
# claimName: domain1-weblogic-sample-pvc
57+
# volumeMounts:
58+
# - mountPath: /shared
59+
# name: weblogic-domain-storage-volume
60+
# adminServer is used to configure the desired behavior for starting the administration server.
61+
adminServer:
62+
# serverStartState legal values are "RUNNING" or "ADMIN"
63+
# "RUNNING" means the listed server will be started up to "RUNNING" mode
64+
# "ADMIN" means the listed server will be start up to "ADMIN" mode
65+
serverStartState: "RUNNING"
66+
adminService:
67+
channels:
68+
# The Admin Server's NodePort
69+
- channelName: default
70+
nodePort: 30701
71+
# Uncomment to export the T3Channel as a service
72+
- channelName: T3Channel
73+
# clusters is used to configure the desired behavior for starting member servers of a cluster.
74+
# If you use this entry, then the rules will be applied to ALL servers that are members of the named clusters.
75+
clusters:
76+
- clusterName: cluster-1
77+
serverStartState: "RUNNING"
78+
replicas: 2
79+
# The number of managed servers to start for unlisted clusters
80+
# replicas: 1

site/domains.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,13 @@ Please consult My Oracle Support Doc ID 2349228.1 for up-to-date information abo
100100

101101
### Creating and managing WebLogic domains
102102

103-
In this version of the operator, a WebLogic domain can be located either in a persistent volume (PV) or in a Docker image. For examples of each, see the [WebLogic operator samples](../kubernetes/samples/README.md).
103+
In this version of the operator, a WebLogic domain can be located either in a persistent volume (PV) or in a Docker image.
104+
For examples of each, see the [WebLogic operator samples](../kubernetes/samples/README.md).
105+
106+
If you wish to create your own Docker images, for example to choose a specific set of patches, or to create a domain
107+
with a specific configuration and/or applications deployed, then you can create the domain custom resource
108+
manually to deploy your domain. This process is documented in [this
109+
sample](../kubernetes/samples/scripts/create-weblogic-domain/manually-create-domain/README.md).
104110

105111
### Modifying domain configurations
106112

0 commit comments

Comments
 (0)