Skip to content

Commit 8a3ec80

Browse files
authored
wcsites operator 4.0.6 support (#167)
1 parent 7b69869 commit 8a3ec80

File tree

117 files changed

+3797
-2769
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+3797
-2769
lines changed

FMWKubernetesMAA/OracleEnterpriseDeploymentAutomation/OracleWebCenterSites/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ This terraform deployment requires the prior installation of the following:
2525

2626
[tfswitch](https://tfswitch.warrensbox.com/Install/) can be used for flexibility of working with multiple versions of terraform, but it is only available on Linux and Mac OS X, for Windows or if you prefer to install the base software, see [https://learn.hashicorp.com/tutorials/terraform/install-cli](https://learn.hashicorp.com/tutorials/terraform/install-cli) for basic installation instructions.
2727

28-
- **kubectl >= 1.18.10 (the Kubernetes cli)**
28+
- **kubectl >= 1.24 (the Kubernetes cli)**
2929

3030
See [https://kubernetes.io/docs/tasks/tools/install-kubectl/](https://kubernetes.io/docs/tasks/tools/install-kubectl/) for installation instructions, although kubectl is usually installed as part of Docker Desktop, so if you use Docker it is likely already installed.
3131

32-
- **helm >= 3.5.4**
32+
- **helm >= 3.10**
3333

3434
Helm is a kubernetes deployment package manager. The OCI Service Broker is packaged in a Helm chart, and so is the etcd cluster deployment.
3535
See [https://helm.sh/docs/intro/install/](https://helm.sh/docs/intro/install/) to install helm locally.
@@ -65,7 +65,7 @@ This terraform deployment requires the prior installation of the following:
6565
Create a `terraform.tfvars` file from the `terraform.tfvars.template` file and populate the following mandatory information:
6666

6767
```
68-
## Copyright (c) 2022, Oracle and/or its affiliates.
68+
## Copyright (c) 2022, 2023, Oracle and/or its affiliates.
6969
## Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
7070
7171
tenancy_ocid = "ocid1.tenancy.oc1..."
@@ -166,7 +166,7 @@ ssh_authorized_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDtmEF/NbYdBMiF1XjTPg
166166
# Cluster config
167167
oke_cluster = {
168168
name = "OKE_Cluster"
169-
k8s_version = "v1.20.8"
169+
k8s_version = "v1.24.1"
170170
pods_cidr = "10.1.0.0/16"
171171
services_cidr = "10.2.0.0/16"
172172
cluster_options_add_ons_is_kubernetes_dashboard_enabled = true
@@ -207,17 +207,17 @@ secrets_encryption_key_ocid = null
207207

208208
- **Push wcsites docker image to OCIR**
209209

210-
- Download latest sites docker image from [here](https://support.oracle.com/epmos/faces/ui/patch/PatchDetail.jspx?patchId=33579457).
210+
- Download latest sites docker image from [here](https://support.oracle.com/epmos/faces/ui/patch/PatchDetail.jspx?patchId=35370108).
211211
- Unzip the downloaded zip file.
212212

213213
```bash
214-
$ unzip p33579457_122140_Linux-x86-64.zip
214+
$ unzip p35370108_122140_Linux-x86-64.zip
215215
```
216216

217217
Load the image archive using the docker load command.
218218

219219
```bash
220-
$ docker load < wcsites-20210422.tar.gz
220+
$ docker load < wcsites-230418.tar.gz
221221
```
222222

223223
- **Create an "Auth token" which will be used as docker password to push/pull images from OCIR**
@@ -385,13 +385,13 @@ Login to OCI console and go to the Load Balancer created be terraform script in
385385
To stop Managed Servers:
386386

387387
```bash
388-
$ kubectl patch domain wcsitesinfra -n wcsites-ns --type='json' -p='[{"op": "replace", "path": "/spec/clusters/0/replicas", "value": 0 }]'
388+
$ kubectl patch cluster wcsitesinfra-wcsites-cluster -n wcsites-ns --type=merge -p '{"spec":{"replicas":0}}'
389389
```
390390

391391
To start all configured Managed Servers:
392392

393393
```bash
394-
$ kubectl patch domain wcsitesinfra -n wcsites-ns --type='json' -p='[{"op": "replace", "path": "/spec/clusters/0/replicas", "value": 3 }]'
394+
$ kubectl patch cluster wcsitesinfra-wcsites-cluster -n wcsites-ns --type=merge -p '{"spec":{"replicas":3}}'
395395
```
396396

397397
* You can check running pods with:

FMWKubernetesMAA/OracleEnterpriseDeploymentAutomation/OracleWebCenterSites/charts/wc-sites/templates/domain.Domain.yaml

Lines changed: 37 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Copyright (c) 2022, Oracle and/or its affiliates.
1+
# Copyright (c) 2022, 2023, Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33
#
44
# This is an example of how to define a Domain resource.
55
#
6-
apiVersion: "weblogic.oracle/v8"
6+
apiVersion: "weblogic.oracle/v9"
77
kind: Domain
88
metadata:
99
name: {{ .Values.domain.domainName }}
@@ -14,17 +14,17 @@ spec:
1414
managedServers:
1515
{{- if gt (.Values.domain.wcsCluster.managedServers.count | int) 0}}
1616
- serverName: wcsites-server1
17-
serverStartPolicy: "IF_NEEDED"
17+
serverStartPolicy: "IfNeeded"
1818
{{- end }}
1919
{{- if gt (.Values.domain.wcsCluster.managedServers.count | int) 1}}
2020
- serverName: wcsites-server2
21-
serverStartPolicy: "IF_NEEDED"
21+
serverStartPolicy: "IfNeeded"
2222
{{- end }}
2323
{{- if gt (.Values.domain.wcsCluster.managedServers.count | int) 2}}
2424
- serverName: wcsites-server3
25-
serverStartPolicy: "IF_NEEDED"
25+
serverStartPolicy: "IfNeeded"
2626
{{- end }}
27-
27+
2828
# The WebLogic Domain Home
2929
domainHome: {{ .Values.domain.rootDir }}/domains/{{ .Values.domain.domainName }}
3030

@@ -50,7 +50,7 @@ spec:
5050

5151
# Identify which Secret contains the WebLogic Admin credentials (note that there is an example of
5252
# how to create that Secret at the end of this file)
53-
webLogicCredentialsSecret:
53+
webLogicCredentialsSecret:
5454
name: {{ .Values.domain.domainName }}-domain-credentials
5555

5656
configuration:
@@ -73,14 +73,14 @@ spec:
7373
dataHome: ""
7474

7575

76-
# serverStartPolicy legal values are "NEVER", "IF_NEEDED", or "ADMIN_ONLY"
76+
# serverStartPolicy legal values are "Never", "IfNeeded", or "AdminOnly"
7777
# This determines which WebLogic Servers the Operator will start up when it discovers this Domain
78-
# - "NEVER" will not start any server in the domain
79-
# - "ADMIN_ONLY" will start up only the administration server (no managed servers will be started)
80-
# - "IF_NEEDED" will start all non-clustered servers, including the administration server and clustered servers up to the replica count
81-
serverStartPolicy: "IF_NEEDED"
78+
# - "Never" will not start any server in the domain
79+
# - "AdminOnly" will start up only the administration server (no managed servers will be started)
80+
# - "IfNeeded" will start all non-clustered servers, including the administration server and clustered servers up to the replica count
81+
serverStartPolicy: "IfNeeded"
8282

83-
serverPod:
83+
serverPod:
8484
initContainers:
8585
- name: server-config-update
8686
{{- if .Values.image.name }}
@@ -97,18 +97,18 @@ spec:
9797
volumeMounts:
9898
- name: weblogic-domain-storage-volume
9999
mountPath: {{ .Values.domain.rootDir }}
100-
100+
101101
# an (optional) list of environment variable to be set on the servers
102102
env:
103103
- name: JAVA_OPTIONS
104104
value: "{{ .Values.domain.javaOptions }}"
105105
- name: USER_MEM_ARGS
106106
value: "-Djava.security.egd=file:/dev/./urandom -Xms256m -Xmx1024m "
107107
resources:
108-
requests:
108+
requests:
109109
memory: "12G"
110110
cpu: "1000m"
111-
limits:
111+
limits:
112112
memory: "16G"
113113
cpu: "2000m"
114114
volumes:
@@ -124,39 +124,27 @@ spec:
124124
# serverStartState legal values are "RUNNING" or "ADMIN"
125125
# "RUNNING" means the listed server will be started up to "RUNNING" mode
126126
# "ADMIN" means the listed server will be start up to "ADMIN" mode
127-
serverStartState: "RUNNING"
128-
129-
# clusters is used to configure the desired behavior for starting member servers of a cluster.
127+
# serverStartState: "RUNNING"
128+
129+
# clusters is used to configure the desired behavior for starting member servers of a cluster.
130130
# If you use this entry, then the rules will be applied to ALL servers that are members of the named clusters.
131131
clusters:
132-
- clusterName: {{ .Values.domain.wcsCluster.name }}
133-
clusterService:
134-
annotations:
135-
traefik.ingress.kubernetes.io/affinity: "true"
136-
traefik.ingress.kubernetes.io/session-cookie-name: sticky
137-
serverStartState: "RUNNING"
138-
serverPod:
139-
# Instructs Kubernetes scheduler to prefer nodes for new cluster members where there are not
140-
# already members of the same cluster.
141-
affinity:
142-
podAntiAffinity:
143-
preferredDuringSchedulingIgnoredDuringExecution:
144-
- weight: 100
145-
podAffinityTerm:
146-
labelSelector:
147-
matchExpressions:
148-
- key: "weblogic.clusterName"
149-
operator: In
150-
values:
151-
- $(CLUSTER_NAME)
152-
topologyKey: "kubernetes.io/hostname"
153-
replicas: 1
154-
# The number of managed servers to start for unlisted clusters
155-
# replicas: 1
156-
157-
# Istio
158-
# configuration:
159-
# istio:
160-
# enabled:
161-
# readinessPort:
132+
- name: { { .Values.domain.domainName } }-{{ .Values.domain.wcsCluster.name }}
162133

134+
# The number of managed servers to start for unlisted clusters
135+
# replicas: 1
136+
137+
---
138+
# This is an example of how to define a Cluster resource.
139+
apiVersion: weblogic.oracle/v1
140+
kind: Cluster
141+
metadata:
142+
name: { { .Values.domain.domainName } }-{{ .Values.domain.wcsCluster.name }}
143+
namespace: { { .Values.domain.namespace } }
144+
spec:
145+
clusterName: { { .Values.domain.wcsCluster.name } }
146+
clusterService:
147+
annotations:
148+
traefik.ingress.kubernetes.io/affinity: "true"
149+
traefik.ingress.kubernetes.io/session-cookie-name: sticky
150+
replicas: 1
Lines changed: 49 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,62 @@
1-
# Copyright (c) 2022, Oracle and/or its affiliates.
1+
# Copyright (c) 2022, 2023, Oracle and/or its affiliates.
22
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33

4-
apiVersion: networking.k8s.io/v1beta1
4+
apiVersion: networking.k8s.io/v1
55
kind: Ingress
66
metadata:
77
name: {{ .Values.domain.domainName }}-traefik
88
labels:
99
weblogic.resourceVersion: domain-v2
1010
annotations:
1111
kubernetes.io/ingress.class: traefik
12-
{{- if .Values.ingress.tls }}
13-
traefik.ingress.kubernetes.io/router.entrypoints: websecure
14-
traefik.ingress.kubernetes.io/router.tls: "true"
15-
traefik.ingress.kubernetes.io/router.middlewares: wcsites-ns-wls-proxy-ssl@kubernetescrd
16-
{{- end }}
12+
{{- if .Values.ingress.tls }}
13+
traefik.ingress.kubernetes.io/router.entrypoints: websecure
14+
traefik.ingress.kubernetes.io/router.tls: "true"
15+
traefik.ingress.kubernetes.io/router.middlewares: wcsites-ns-wls-proxy-ssl@kubernetescrd
16+
{{- end }}
1717
spec:
1818
rules:
19-
- host: ''
20-
http:
21-
paths:
22-
- path: /console
23-
backend:
24-
serviceName: '{{ .Values.domain.domainName }}-{{ .Values.domain.admin.name | lower | replace "_" "-" }}'
25-
servicePort: {{ .Values.domain.admin.listenPort }}
26-
- path: /em
27-
backend:
28-
serviceName: '{{ .Values.domain.domainName }}-{{ .Values.domain.admin.name | lower | replace "_" "-" }}'
29-
servicePort: {{ .Values.domain.admin.listenPort }}
30-
- path: /weblogic/ready
31-
backend:
32-
serviceName: '{{ .Values.domain.domainName }}-{{ .Values.domain.admin.name | lower | replace "_" "-" }}'
33-
servicePort: {{ .Values.domain.admin.listenPort }}
34-
- path: /sites
35-
backend:
36-
serviceName: '{{ .Values.domain.domainName }}-cluster-{{ .Values.domain.wcsCluster.name | lower | replace "_" "-" }}'
37-
servicePort: {{ .Values.domain.wcsCluster.managedServers.listenPort }}
38-
- path: /cas
39-
backend:
40-
serviceName: '{{ .Values.domain.domainName }}-cluster-{{ .Values.domain.wcsCluster.name | lower | replace "_" "-" }}'
41-
servicePort: {{ .Values.domain.wcsCluster.managedServers.listenPort }}
42-
{{- if .Values.ingress.tls }}
43-
tls:
19+
- host: ''
20+
http:
21+
paths:
22+
- path: /console
23+
pathType: Prefix
24+
backend:
25+
service:
26+
name: '{{ .Values.domain.domainName }}-{{ .Values.domain.admin.name | lower | replace "_" "-" }}'
27+
port:
28+
number: {{ .Values.domain.admin.listenPort }}
29+
- path: /em
30+
pathType: Prefix
31+
backend:
32+
service:
33+
name: '{{ .Values.domain.domainName }}-{{ .Values.domain.admin.name | lower | replace "_" "-" }}'
34+
port:
35+
number: {{ .Values.domain.admin.listenPort }}
36+
- path: /weblogic/ready
37+
pathType: Prefix
38+
backend:
39+
service:
40+
name: '{{ .Values.domain.domainName }}-{{ .Values.domain.admin.name | lower | replace "_" "-" }}'
41+
port:
42+
number: {{ .Values.domain.admin.listenPort }}
43+
- path: /sites
44+
pathType: Prefix
45+
backend:
46+
service:
47+
name: '{{ .Values.domain.domainName }}-cluster-{{ .Values.domain.wcsCluster.name | lower | replace "_" "-" }}'
48+
port:
49+
number: {{ .Values.domain.wcsCluster.managedServers.listenPort }}
50+
- path: /cas
51+
pathType: Prefix
52+
backend:
53+
service:
54+
name: '{{ .Values.domain.domainName }}-cluster-{{ .Values.domain.wcsCluster.name | lower | replace "_" "-" }}'
55+
port:
56+
number: {{ .Values.domain.wcsCluster.managedServers.listenPort }}
57+
{{- if .Values.ingress.tls }}
58+
tls:
4459
- hosts:
45-
- '{{ .Values.ingress.dnsname }}'
60+
- '{{ .Values.ingress.dnsname }}'
4661
secretName: {{ .Values.domain.domainName }}-tls-cert
47-
{{- end }}
48-
62+
{{- end }}

FMWKubernetesMAA/OracleEnterpriseDeploymentAutomation/OracleWebCenterSites/charts/wc-sites/values.schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"properties": {
6060
"kubernetesVersion": {
6161
"type": "string",
62-
"enum": ["1.20", "1.19"]
62+
"enum": ["1.23", "1.24"]
6363
},
6464
"image": {
6565
"type": "object",
@@ -234,7 +234,7 @@
234234
},
235235
"serverStartPolicy": {
236236
"type": "string",
237-
"enum": ["NEVER", "ADMIN_ONLY", "IF_NEEDED"]
237+
"enum": ["Never", "AdminOnly", "IfNeeded"]
238238
},
239239
"javaOptions": {
240240
"type": "string",

FMWKubernetesMAA/OracleEnterpriseDeploymentAutomation/OracleWebCenterSites/charts/wc-sites/values.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Copyright (c) 2022, Oracle and/or its affiliates.
1+
## Copyright (c) 2022, 2023, Oracle and/or its affiliates.
22
## Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
33

44
# Default values for wcsites.
@@ -8,7 +8,7 @@
88
nameOverride: ""
99
fullnameOverride: ""
1010

11-
kubernetesVersion: "1.20"
11+
kubernetesVersion: "1.24"
1212

1313
image:
1414
repository: "oracle/wcsites"
@@ -74,12 +74,12 @@ domain:
7474
includeServerOutInPodLog: true
7575
httpAccessLogInLogHome: true
7676

77-
# serverStartPolicy legal values are "NEVER", "IF_NEEDED", or "ADMIN_ONLY"
77+
# serverStartPolicy legal values are "Never", "IfNeeded", or "AdminOnly"
7878
# This determines which WebLogic Servers the Operator will start up when it discovers this Domain
79-
# - "NEVER" will not start any server in the domain
80-
# - "ADMIN_ONLY" will start up only the administration server (no managed servers will be started)
81-
# - "IF_NEEDED" will start all non-clustered servers, including the administration server and clustered servers up to the replica count
82-
serverStartPolicy: IF_NEEDED
79+
# - "Never" will not start any server in the domain
80+
# - "AdminOnly" will start up only the administration server (no managed servers will be started)
81+
# - "IfNeeded" will start all non-clustered servers, including the administration server and clustered servers up to the replica count
82+
serverStartPolicy: IfNeeded
8383
javaOptions: "-Dweblogic.StdoutDebugEnabled=false"
8484
maxManagedServerCount: 5
8585

@@ -91,7 +91,7 @@ domain:
9191
nodePort: 30701
9292

9393
wcsCluster:
94-
name: wcsites_cluster
94+
name: wcsites-cluster
9595
managedServers:
9696
count: 3
9797
name: wcsites-server

FMWKubernetesMAA/OracleEnterpriseDeploymentAutomation/OracleWebCenterSites/modules/k8s/inputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Copyright (c) 2022, Oracle and/or its affiliates.
1+
## Copyright (c) 2022, 2023, Oracle and/or its affiliates.
22
## Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
33

44
variable "tenancy_ocid" {}
@@ -10,7 +10,7 @@ variable "provision_cluster" {}
1010

1111
variable "oke_cluster" {
1212
default = {
13-
k8s_version = "v1.20.8"
13+
k8s_version = "v1.24.1"
1414
pods_cidr = "10.1.0.0/16"
1515
services_cidr = "10.2.0.0/16"
1616
}

0 commit comments

Comments
 (0)