Skip to content

Commit 7bcdd2c

Browse files
committed
WebCenter 12.2.1.4.0 Scripts and Docs
0 parents  commit 7bcdd2c

File tree

227 files changed

+23053
-0
lines changed

Some content is hidden

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

227 files changed

+23053
-0
lines changed

CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# GitHub userids
2+
3+
# The last matching pattern has the most precedence.
4+
* @rupeshdas
5+
/OracleWebCenterSites/ @ashishchalak

CONTRIBUTING.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Contributing
2+
Oracle welcomes contributions to this repository from anyone.
3+
4+
If you want to submit a pull request to fix a bug or enhance an existing file, please first open an issue and link to that issue when you submit your pull request.
5+
6+
If you have any questions about a possible submission, feel free to open an issue too.
7+
8+
## Contributing to the Oracle Fusion Middleware Kubernetes repository
9+
10+
Pull requests can be made under [The Oracle Contributor Agreement](https://www.oracle.com/technetwork/community/oca-486395.html) (OCA).
11+
12+
For pull requests to be accepted, the bottom of your commit message must have the following line using your name and e-mail address as it appears in the OCA Signatories list.
13+
14+
```
15+
Signed-off-by: Your Name <you@example.org>
16+
```
17+
18+
This can be automatically added to pull requests by committing with:
19+
20+
```
21+
git commit --signoff
22+
```
23+
24+
Only pull requests from committers that can be verified as having signed the OCA can be accepted.
25+
26+
## Oracle Product Ownership and Responsibility
27+
28+
For any new product content, *you must obtain internal Oracle approvals for the distribution of this content prior to submitting a pull request*. If you are unfamiliar with the approval process to submit code to an existing GitHub repository, please contact the [Oracle Open Source team](mailto:opensource_ww_grp@oracle.com) for details.
29+
30+
The GitHub user who submits the initial pull request to add new Kubernetes scripts should add themselves to the [code owner](./CODEOWNERS) file in that same request. This will flag the user as the owner of the content and any future pull requests that affect the conten will need to be approved by this user.
31+
32+
The code owner will also be assigned to any issues relating to their content.
33+
34+
You must ensure that you check the [issues](https://github.com/oracle/fmw-kubernetes/issues) on at least a weekly basis, though daily is preferred.
35+
36+
If you wish to nominate additional or alternative users, they must be a visible member of the [Oracle GitHub Organisation](https://github.com/orgs/oracle/people/).
37+
38+
Contact [Rupesh Das](https://github.com/rdas0405) for more information.
39+
40+
### Pull request process
41+
42+
1. Fork this repository
43+
2. Create a branch in your fork to implement the changes. We recommend using the issue number as part of your branch name, e.g. `1234-fixes`
44+
3. Ensure that any documentation is updated with the changes that are required by your fix.
45+
4. Ensure that any dependancies are updated if any scripts are changed.
46+
5. Submit the pull request. *Do not leave the pull request blank*. Explain exactly what your changes are meant to do and provide simple steps on how to validate your changes. Ensure that you reference the issue you created as well.
47+
We will assign the pull request to 2-3 people for review before it is merged.
48+
49+
*Copyright (c) 2020 Oracle and/or its affiliates.*

LICENSE

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Copyright (c) 2020 Oracle and/or its affiliates.
2+
3+
The Universal Permissive License (UPL), Version 1.0
4+
5+
Subject to the condition set forth below, permission is hereby granted to any
6+
person obtaining a copy of this software, associated documentation and/or data
7+
(collectively the "Software"), free of charge and under any and all copyright
8+
rights in the Software, and any and all patent rights owned or freely
9+
licensable by each licensor hereunder covering either (i) the unmodified
10+
Software as contributed to or provided by such licensor, or (ii) the Larger
11+
Works (as defined below), to deal in both
12+
13+
(a) the Software, and
14+
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
15+
one is included with the Software (each a “Larger Work” to which the Software
16+
is contributed by such licensors),
17+
18+
without restriction, including without limitation the rights to copy, create
19+
derivative works of, display, perform, and distribute the Software and make,
20+
use, sell, offer for sale, import, export, have made, and have sold the
21+
Software and the Larger Work(s), and to sublicense the foregoing rights on
22+
either these or other terms.
23+
24+
This license is subject to the following condition:
25+
The above copyright notice and either this complete permission notice or at
26+
a minimum a reference to the UPL must be included in all copies or
27+
substantial portions of the Software.
28+
29+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35+
SOFTWARE.

OracleWebCenterSites/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Oracle WebCenter Sites on Kubernetes
2+
3+
This directory provides the open source samples which have several key features to assist you with deploying and managing WebCenter Sites in a Kubernetes environment. You can do the following:
4+
5+
* Create WebCenter Sites instances in a Kubernetes persistent volume. This persistent volume can reside in an NFS file system or other Kubernetes volume types.
6+
* Start servers based on declarative startup parameters and desired states.
7+
* Expose the WebCenter Sites Services and Composites for external access.
8+
* Scale WebCenter Sites by starting and stopping Managed Servers on demand, or by integrating with a REST API to initiate scaling based on WLDF, Prometheus, Grafana, or other rules.
9+
* Publish WebLogic Kubernetes Operator and WebLogic Server logs into Elasticsearch and interact with them in Kibana.
10+
* Monitor the instance using Prometheus and Grafana
11+
12+
The fastest way to experience WebCenter Sites on WebLogic Kubernetes Operator is to follow the [User guide](https://oracle.github.io/fmw-kubernetes/wcsites-domains/).
13+
14+
## Need more help? Have a suggestion? Come and say, "Hello!"
15+
We have a public Slack channel where you can get in touch with us to ask questions about using the WebLogic Kubernetes Operator or give us feedback or suggestions about what features and improvements you would like to see.
16+
We would love to hear from you. To join our channel, please [visit this site to get an invitation](https://weblogic-slack-inviter.herokuapp.com/).
17+
The invitation email will include details of how to access our Slack workspace. After you are logged in, please come to `#wc-k8s` and say, "hello!"
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Copyright (c) 2020 Oracle Corporation and/or its affiliates.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
apiVersion: v1
4+
kind: PersistentVolume
5+
metadata:
6+
name: oracle-db-pv
7+
namespace: wcsitesdb-ns
8+
spec:
9+
storageClassName: oracle-db-storage-class
10+
capacity:
11+
storage: 10Gi
12+
accessModes:
13+
- ReadWriteMany
14+
# Valid values are Retain, Delete or Recycle
15+
persistentVolumeReclaimPolicy: Retain
16+
hostPath:
17+
# nfs:
18+
# server: %SAMPLE_STORAGE_NFS_SERVER%
19+
path: "/scratch/K8SVolume/WCSitesDB"
20+
---
21+
kind: PersistentVolumeClaim
22+
apiVersion: v1
23+
metadata:
24+
name: oracle-db-pvc
25+
namespace: wcsitesdb-ns
26+
spec:
27+
storageClassName: oracle-db-storage-class
28+
accessModes:
29+
- ReadWriteMany
30+
resources:
31+
requests:
32+
storage: 10Gi
33+
---
34+
apiVersion: v1
35+
kind: Service
36+
metadata:
37+
name: oracle-db
38+
namespace: wcsitesdb-ns
39+
spec:
40+
ports:
41+
- name: tns
42+
port: 1521
43+
protocol: TCP
44+
targetPort: 1521
45+
nodePort: 30011
46+
selector:
47+
app.kubernetes.io/instance: dev
48+
app.kubernetes.io/name: oracle-db
49+
sessionAffinity: None
50+
type: LoadBalancer
51+
---
52+
apiVersion: extensions/v1beta1
53+
kind: Deployment
54+
metadata:
55+
name: oracle-db
56+
namespace: wcsitesdb-ns
57+
spec:
58+
replicas: 1
59+
selector:
60+
matchLabels:
61+
app.kubernetes.io/instance: dev
62+
app.kubernetes.io/name: oracle-db
63+
strategy:
64+
rollingUpdate:
65+
maxSurge: 1
66+
maxUnavailable: 1
67+
type: RollingUpdate
68+
template:
69+
metadata:
70+
labels:
71+
app.kubernetes.io/instance: dev
72+
app.kubernetes.io/name: oracle-db
73+
spec:
74+
containers:
75+
- env:
76+
- name: DB_SID
77+
value: devcdb
78+
- name: DB_PDB
79+
value: devpdb
80+
- name: DB_DOMAIN
81+
value: k8s
82+
- name: DB_BUNDLE
83+
value: basic
84+
image: container-registry.oracle.com/database/enterprise:12.2.0.1-slim
85+
imagePullPolicy: IfNotPresent
86+
name: oracle-db
87+
ports:
88+
- containerPort: 1521
89+
name: tns
90+
protocol: TCP
91+
# - containerPort: 5500
92+
# name: em-port
93+
# protocol: TCP
94+
# resources:
95+
# limits:
96+
# cpu: "2"
97+
# memory: "6Gi"
98+
# requests:
99+
# cpu: 500m
100+
terminationMessagePath: /dev/termination-log
101+
terminationMessagePolicy: File
102+
readinessProbe:
103+
exec:
104+
command:
105+
- grep
106+
- "Done ! The database is ready for use ."
107+
- "/home/oracle/setup/log/setupDB.log"
108+
initialDelaySeconds: 300
109+
periodSeconds: 5
110+
volumeMounts:
111+
- name: oracle-db-storage
112+
mountPath: /ORCL
113+
volumes:
114+
- name: oracle-db-storage
115+
persistentVolumeClaim:
116+
claimName: oracle-db-pvc
117+
dnsPolicy: ClusterFirst
118+
restartPolicy: Always
119+
schedulerName: default-scheduler
120+
securityContext: {}
121+
terminationGracePeriodSeconds: 30
122+
imagePullSecrets:
123+
- name: docker-store
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Copyright (c) 2020 Oracle Corporation and/or its affiliates.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
apiVersion: v1
4+
kind: Service
5+
metadata:
6+
name: wcsitesdb
7+
labels:
8+
app: wcsitesdb
9+
namespace: wcsitesdb-ns
10+
spec:
11+
type: NodePort
12+
ports:
13+
- port: 1521
14+
name: server-port
15+
protocol: TCP
16+
targetPort: 1521
17+
nodePort: 31521
18+
- port: 5500
19+
name: em-port
20+
protocol: TCP
21+
targetPort: 5500
22+
nodePort: 31500
23+
selector:
24+
app: wcsitesdb
25+
---
26+
apiVersion: apps/v1beta1
27+
kind: StatefulSet
28+
metadata:
29+
name: wcsitesdb
30+
namespace: wcsitesdb-ns
31+
spec:
32+
serviceName: "wcsitesdb"
33+
replicas: 1
34+
template:
35+
metadata:
36+
labels:
37+
app: wcsitesdb
38+
spec:
39+
terminationGracePeriodSeconds: 30
40+
containers:
41+
- name: wcsitesdb
42+
image: container-registry.oracle.com/database/enterprise:12.2.0.1-slim
43+
imagePullPolicy: IfNotPresent
44+
ports:
45+
- containerPort: 1521
46+
name: server-port
47+
- containerPort: 5500
48+
name: em-port
49+
env:
50+
- name: DB_SID
51+
value: devcdb
52+
- name: DB_PDB
53+
value: devpdb
54+
- name: DB_DOMAIN
55+
value: k8s
56+
readinessProbe:
57+
exec:
58+
command:
59+
- grep
60+
- "Done ! The database is ready for use ."
61+
- "/home/oracle/setup/log/setupDB.log"
62+
initialDelaySeconds: 300
63+
periodSeconds: 5
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/bin/bash
2+
# Copyright 2020, Oracle Corporation and/or its affiliates.
3+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
4+
#
5+
6+
function exitIfError {
7+
if [ "$1" != "0" ]; then
8+
echo "$2"
9+
exit $1
10+
fi
11+
}
12+
13+
# Include common utility functions
14+
source ${CREATE_DOMAIN_SCRIPT_DIR}/utility.sh
15+
16+
# Verify the script to create the domain exists
17+
script=${CREATE_DOMAIN_SCRIPT_DIR}/createSitesDomain.sh
18+
19+
checkCreateDomainScript $script
20+
21+
# Execute the script to create the domain
22+
source $script
23+
exitIfError $? "ERROR: $script failed."
24+
25+
# Verify the script to create the domain exists
26+
script=${CREATE_DOMAIN_SCRIPT_DIR}/create-domain-script.sh
27+
28+
checkCreateDomainScript $script
29+
checkDomainSecret
30+
prepareDomainHomeDir
31+
32+
# Execute the script to create the domain
33+
source $script
34+
exitIfError $? "ERROR: $script failed."
35+
36+
echo "Copying ${CREATE_DOMAIN_SCRIPT_DIR}/server-config-update.sh to PV ${DOMAIN_HOME_DIR}"
37+
cp ${CREATE_DOMAIN_SCRIPT_DIR}/server-config-update.sh ${DOMAIN_HOME_DIR}
38+
chmod +x ${DOMAIN_HOME_DIR}/server-config-update.sh
39+
40+
echo "Copying ${CREATE_DOMAIN_SCRIPT_DIR}/unicast.py to PV ${DOMAIN_HOME_DIR}"
41+
cp ${CREATE_DOMAIN_SCRIPT_DIR}/unicast.py ${DOMAIN_HOME_DIR}
42+
chmod +x ${DOMAIN_HOME_DIR}/unicast.py
43+
44+
echo "replacing tokens in ${DOMAIN_HOME_DIR}/server-config-update.sh"
45+
sed -i -e "s:%LOAD_BALANCER_HOSTNAME%:${LB_HOST}:g" ${DOMAIN_HOME_DIR}/server-config-update.sh
46+
sed -i -e "s:%LOAD_BALANCER_PORTNUMBER%:${LB_PORT}:g" ${DOMAIN_HOME_DIR}/server-config-update.sh
47+
sed -i -e "s:%LOAD_BALANCER_PROTOCOL%:${LB_PROTOCOL}:g" ${DOMAIN_HOME_DIR}/server-config-update.sh
48+
49+
sed -i -e "s:%SITES_SAMPLES%:${SITES_SAMPLES}:g" ${DOMAIN_HOME_DIR}/server-config-update.sh
50+
51+
sed -i -e "s:%SITES_CACHE_PORTS%:${SITES_CACHE_PORTS}:g" ${DOMAIN_HOME_DIR}/server-config-update.sh
52+
53+
sed -i -e "s:%MANAGED_SERVER_PORT%:${MANAGED_SERVER_PORT}:g" ${DOMAIN_HOME_DIR}/server-config-update.sh
54+
55+
sed -i -e "s:%SITES_ADMIN_USERNAME%:${SITES_ADMIN_USERNAME}:g" ${DOMAIN_HOME_DIR}/server-config-update.sh
56+
sed -i -e "s:%SITES_ADMIN_PASSWORD%:${SITES_ADMIN_PASSWORD}:g" ${DOMAIN_HOME_DIR}/server-config-update.sh
57+
sed -i -e "s:%SITES_APP_USERNAME%:${SITES_APP_USERNAME}:g" ${DOMAIN_HOME_DIR}/server-config-update.sh
58+
sed -i -e "s:%SITES_APP_PASSWORD%:${SITES_APP_PASSWORD}:g" ${DOMAIN_HOME_DIR}/server-config-update.sh
59+
sed -i -e "s:%SITES_SS_USERNAME%:${SITES_SS_USERNAME}:g" ${DOMAIN_HOME_DIR}/server-config-update.sh
60+
sed -i -e "s:%SITES_SS_PASSWORD%:${SITES_SS_PASSWORD}:g" ${DOMAIN_HOME_DIR}/server-config-update.sh
61+
62+
# DON'T REMOVE THIS
63+
# This script has to contain this log message.
64+
# It is used to determine if the job is really completed.
65+
echo "Successfully Completed"

0 commit comments

Comments
 (0)