-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from ashishchalak/master
Adding NFS support to WCSites
- Loading branch information
Showing
14 changed files
with
3,582 additions
and
3,546 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
234 changes: 117 additions & 117 deletions
234
...WebCenterSites/kubernetes/2.4.0/create-wcsites-domain/domain-home-on-pv/common/unicast.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,117 +1,117 @@ | ||
# Copyright 2020, Oracle Corporation and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
import xml.dom.minidom | ||
import re | ||
import sys | ||
|
||
def getManagedServerCount(domainHome): | ||
# use the parse() function to load and parse an XML file | ||
doc = xml.dom.minidom.parse(domainHome + "/config/config.xml") | ||
servers = doc.getElementsByTagName("server") | ||
print "Total Configured Managed Servers: %d " % (servers.length - 1) | ||
return servers.length - 1; | ||
|
||
|
||
# Method to uncomment and comment the required tag and save back | ||
def replaceXml(domainHome, ms_server): | ||
f = open(domainHome + "/config/fmwconfig/servers/" + ms_server + "/config/ticket-cache.xml","r+w") | ||
filecontent = f.read() | ||
#Uncomment the one to be used | ||
filecontent = re.sub ( r'<!--<cacheManagerPeerProviderFactory','<cacheManagerPeerProviderFactory', filecontent,1) | ||
filecontent = re.sub ( r'cas_tgt" />-->','cas_tgt" />', filecontent,1) | ||
#Comment the one not used | ||
filecontent = re.sub ( r'<cacheManagerPeerProviderFactory','<!--cacheManagerPeerProviderFactory', filecontent,1) | ||
filecontent = re.sub ( r'propertySeparator="," />','propertySeparator="," -->', filecontent,1) | ||
f.seek(0) | ||
f.write(filecontent) | ||
f.write("\n\n\n") | ||
f.close() | ||
|
||
# Method to replace the properties | ||
def replaceRmiUrlsInCache(domainHome, prefix, n, ms_server, excludedServerNumber, filename, port): | ||
doc = xml.dom.minidom.parse(domainHome + "/config/fmwconfig/servers/" + ms_server + "/config/" + filename) | ||
abc = doc.getElementsByTagName("cacheManagerPeerProviderFactory") | ||
processString = "peerDiscovery=manual,rmiUrls=//localhost:<port>/notifier" | ||
|
||
for element in abc: | ||
element.setAttribute("properties", processString) | ||
|
||
for x in range (1,n-1): | ||
processString = processString + "|//localhost:<port>/notifier" | ||
|
||
# We should have got the properties attribute now tokenized with localhost and 41001. Exclude 1 add the rest | ||
for i in range (1,n+1): | ||
if i <> int(excludedServerNumber): | ||
processString = re.sub ( r'localhost',prefix + str(i), processString,1) | ||
processString = re.sub ( r'<port>',str(port), processString,1) | ||
|
||
element.setAttribute("properties", processString) | ||
print(processString) | ||
ghi = doc.getElementsByTagName("cacheManagerPeerListenerFactory") | ||
for element in ghi: | ||
processString = element.getAttribute("properties") | ||
processString = "hostName="+prefix+ str(excludedServerNumber) +",port=" + str(port) +",remoteObjectPort=" + str(int(port)+1) + ",socketTimeoutMillis=12000" | ||
element.setAttribute("properties", processString) | ||
myfile = open(domainHome + "/config/fmwconfig/servers/" + ms_server + "/config/" + filename , "w") | ||
myfile.write(doc.toxml()) | ||
myfile.close() | ||
print("Updated " + filename) | ||
|
||
# Method to replace the properties | ||
def replaceRmiUrls(domainHome, prefix, n, ms_server, excludedServerNumber, port): | ||
doc = xml.dom.minidom.parse(domainHome + "/config/fmwconfig/servers/" + ms_server + "/config/ticket-cache.xml") | ||
abc = doc.getElementsByTagName("cacheManagerPeerProviderFactory") | ||
processString = "" | ||
|
||
for element in abc: | ||
processString = element.getAttribute("properties") | ||
|
||
for x in range (1,n-1): | ||
processString = processString + "|//localhost:41001/cas_st|//localhost:41001/cas_tgt" | ||
|
||
# We should have got the properties attribute now tokenized with localhost and 41001. Exclude 1 add the rest | ||
for i in range (1,n+1): | ||
if i <> int(excludedServerNumber): | ||
processString = re.sub ( r'localhost',prefix + str(i), processString,1) | ||
processString = re.sub ( r'41001',str(port), processString,1) | ||
processString = re.sub ( r'localhost',prefix + str(i), processString,1) | ||
processString = re.sub ( r'41001',str(port), processString,1) | ||
|
||
element.setAttribute("properties", processString) | ||
print(processString) | ||
ghi = doc.getElementsByTagName("cacheManagerPeerListenerFactory") | ||
for element in ghi: | ||
processString = element.getAttribute("properties") | ||
processString = "hostName=" + prefix + str(excludedServerNumber) + ",port=" + str(port) + ",remoteObjectPort=" + str(int(port)+1) + ",socketTimeoutMillis=12000" | ||
element.setAttribute("properties", processString) | ||
myfile = open(domainHome + "/config/fmwconfig/servers/" + ms_server + "/config/ticket-cache.xml", "w") | ||
myfile.write(doc.toxml()) | ||
myfile.close() | ||
print("Updated " + "ticket-cache.xml") | ||
|
||
def main(): | ||
# count the arguments | ||
arguments = len(sys.argv) - 1 | ||
print ("The script is called with %i arguments" % (arguments)) | ||
domainHome = sys.argv[1] | ||
serverPrefix = sys.argv[2] | ||
ms_server = sys.argv[3] | ||
port = sys.argv[4] | ||
excludedServerNumber = ms_server[-1] | ||
print("Host prefix set to " + serverPrefix) | ||
print("Managed Server set to - " + ms_server) | ||
print("Excluded Server Number set to - " + excludedServerNumber) | ||
print("Starting port set to - " + port) | ||
replaceXml(domainHome, ms_server) | ||
servercount = getManagedServerCount(domainHome) | ||
replaceRmiUrls(domainHome, serverPrefix, servercount, ms_server, excludedServerNumber, port) | ||
replaceRmiUrlsInCache(domainHome, serverPrefix, servercount, ms_server, excludedServerNumber, "linked-cache.xml", int(port) + 2) | ||
replaceRmiUrlsInCache(domainHome, serverPrefix, servercount, ms_server, excludedServerNumber, "cs-cache.xml", int(port) + 4) | ||
replaceRmiUrlsInCache(domainHome, serverPrefix, servercount, ms_server, excludedServerNumber, "cas-cache.xml", int(port) + 6 ) | ||
replaceRmiUrlsInCache(domainHome, serverPrefix, servercount, ms_server, excludedServerNumber, "ss-cache.xml", int(port) + 8 ) | ||
|
||
|
||
if __name__ == "__main__": | ||
# calling main function | ||
main() | ||
|
||
# Copyright 2020, Oracle Corporation and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
import xml.dom.minidom | ||
import re | ||
import sys | ||
|
||
def getManagedServerCount(domainHome): | ||
# use the parse() function to load and parse an XML file | ||
doc = xml.dom.minidom.parse(domainHome + "/config/config.xml") | ||
servers = doc.getElementsByTagName("server") | ||
print "Total Configured Managed Servers: %d " % (servers.length - 1) | ||
return servers.length - 1; | ||
|
||
|
||
# Method to uncomment and comment the required tag and save back | ||
def replaceXml(domainHome, ms_server): | ||
f = open(domainHome + "/config/fmwconfig/servers/" + ms_server + "/config/ticket-cache.xml","r+w") | ||
filecontent = f.read() | ||
#Uncomment the one to be used | ||
filecontent = re.sub ( r'<!--<cacheManagerPeerProviderFactory','<cacheManagerPeerProviderFactory', filecontent,1) | ||
filecontent = re.sub ( r'cas_tgt" />-->','cas_tgt" />', filecontent,1) | ||
#Comment the one not used | ||
filecontent = re.sub ( r'<cacheManagerPeerProviderFactory','<!--cacheManagerPeerProviderFactory', filecontent,1) | ||
filecontent = re.sub ( r'propertySeparator="," />','propertySeparator="," -->', filecontent,1) | ||
f.seek(0) | ||
f.write(filecontent) | ||
f.write("\n\n\n") | ||
f.close() | ||
|
||
# Method to replace the properties | ||
def replaceRmiUrlsInCache(domainHome, prefix, n, ms_server, excludedServerNumber, filename, port): | ||
doc = xml.dom.minidom.parse(domainHome + "/config/fmwconfig/servers/" + ms_server + "/config/" + filename) | ||
abc = doc.getElementsByTagName("cacheManagerPeerProviderFactory") | ||
processString = "peerDiscovery=manual,rmiUrls=//localhost:<port>/notifier" | ||
|
||
for element in abc: | ||
element.setAttribute("properties", processString) | ||
|
||
for x in range (1,n-1): | ||
processString = processString + "|//localhost:<port>/notifier" | ||
|
||
# We should have got the properties attribute now tokenized with localhost and 41001. Exclude 1 add the rest | ||
for i in range (1,n+1): | ||
if i <> int(excludedServerNumber): | ||
processString = re.sub ( r'localhost',prefix + str(i), processString,1) | ||
processString = re.sub ( r'<port>',str(port), processString,1) | ||
|
||
element.setAttribute("properties", processString) | ||
print(processString) | ||
ghi = doc.getElementsByTagName("cacheManagerPeerListenerFactory") | ||
for element in ghi: | ||
processString = element.getAttribute("properties") | ||
processString = "hostName="+prefix+ str(excludedServerNumber) +",port=" + str(port) +",remoteObjectPort=" + str(int(port)+1) + ",socketTimeoutMillis=12000" | ||
element.setAttribute("properties", processString) | ||
myfile = open(domainHome + "/config/fmwconfig/servers/" + ms_server + "/config/" + filename , "w") | ||
myfile.write(doc.toxml()) | ||
myfile.close() | ||
print("Updated " + filename) | ||
|
||
# Method to replace the properties | ||
def replaceRmiUrls(domainHome, prefix, n, ms_server, excludedServerNumber, port): | ||
doc = xml.dom.minidom.parse(domainHome + "/config/fmwconfig/servers/" + ms_server + "/config/ticket-cache.xml") | ||
abc = doc.getElementsByTagName("cacheManagerPeerProviderFactory") | ||
processString = "" | ||
|
||
for element in abc: | ||
processString = element.getAttribute("properties") | ||
|
||
for x in range (1,n-1): | ||
processString = processString + "|//localhost:41001/cas_st|//localhost:41001/cas_tgt" | ||
|
||
# We should have got the properties attribute now tokenized with localhost and 41001. Exclude 1 add the rest | ||
for i in range (1,n+1): | ||
if i <> int(excludedServerNumber): | ||
processString = re.sub ( r'localhost',prefix + str(i), processString,1) | ||
processString = re.sub ( r'41001',str(port), processString,1) | ||
processString = re.sub ( r'localhost',prefix + str(i), processString,1) | ||
processString = re.sub ( r'41001',str(port), processString,1) | ||
|
||
element.setAttribute("properties", processString) | ||
print(processString) | ||
ghi = doc.getElementsByTagName("cacheManagerPeerListenerFactory") | ||
for element in ghi: | ||
processString = element.getAttribute("properties") | ||
processString = "hostName=" + prefix + str(excludedServerNumber) + ",port=" + str(port) + ",remoteObjectPort=" + str(int(port)+1) + ",socketTimeoutMillis=12000" | ||
element.setAttribute("properties", processString) | ||
myfile = open(domainHome + "/config/fmwconfig/servers/" + ms_server + "/config/ticket-cache.xml", "w") | ||
myfile.write(doc.toxml()) | ||
myfile.close() | ||
print("Updated " + "ticket-cache.xml") | ||
|
||
def main(): | ||
# count the arguments | ||
arguments = len(sys.argv) - 1 | ||
print ("The script is called with %i arguments" % (arguments)) | ||
domainHome = sys.argv[1] | ||
serverPrefix = sys.argv[2] | ||
ms_server = sys.argv[3] | ||
port = sys.argv[4] | ||
excludedServerNumber = ms_server[-1] | ||
print("Host prefix set to " + serverPrefix) | ||
print("Managed Server set to - " + ms_server) | ||
print("Excluded Server Number set to - " + excludedServerNumber) | ||
print("Starting port set to - " + port) | ||
replaceXml(domainHome, ms_server) | ||
servercount = getManagedServerCount(domainHome) | ||
replaceRmiUrls(domainHome, serverPrefix, servercount, ms_server, excludedServerNumber, port) | ||
replaceRmiUrlsInCache(domainHome, serverPrefix, servercount, ms_server, excludedServerNumber, "linked-cache.xml", int(port) + 2) | ||
replaceRmiUrlsInCache(domainHome, serverPrefix, servercount, ms_server, excludedServerNumber, "cs-cache.xml", int(port) + 4) | ||
replaceRmiUrlsInCache(domainHome, serverPrefix, servercount, ms_server, excludedServerNumber, "cas-cache.xml", int(port) + 6 ) | ||
replaceRmiUrlsInCache(domainHome, serverPrefix, servercount, ms_server, excludedServerNumber, "ss-cache.xml", int(port) + 8 ) | ||
|
||
|
||
if __name__ == "__main__": | ||
# calling main function | ||
main() | ||
|
50 changes: 25 additions & 25 deletions
50
OracleWebCenterSites/kubernetes/2.4.0/create-wcsites-domain/ingress-per-domain/values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
# Copyright 2020, Oracle Corporation and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
# Default values for ingress-per-domain. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
|
||
# Load balancer type. Supported values are: TRAEFIK, VOYAGER | ||
type: TRAEFIK | ||
#type: VOYAGER | ||
|
||
# WLS domain as backend to the load balancer | ||
wlsDomain: | ||
domainUID: wcsitesinfra | ||
adminServerName: adminserver | ||
adminServerPort: 7001 | ||
wcsitesClusterName: wcsites_cluster | ||
wcsitesManagedServerPort: 8001 | ||
|
||
# Voyager specific values | ||
voyager: | ||
# web port | ||
webPort: 30305 | ||
# stats port | ||
statsPort: 30317 | ||
# Copyright 2020, Oracle Corporation and/or its affiliates. | ||
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
|
||
# Default values for ingress-per-domain. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
|
||
# Load balancer type. Supported values are: TRAEFIK, VOYAGER | ||
type: TRAEFIK | ||
#type: VOYAGER | ||
|
||
# WLS domain as backend to the load balancer | ||
wlsDomain: | ||
domainUID: wcsitesinfra | ||
adminServerName: adminserver | ||
adminServerPort: 7001 | ||
wcsitesClusterName: wcsites_cluster | ||
wcsitesManagedServerPort: 8001 | ||
|
||
# Voyager specific values | ||
voyager: | ||
# web port | ||
webPort: 30305 | ||
# stats port | ||
statsPort: 30317 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file modified
0
...ains/manage-wcsites-domains/Loadbalancer-Traefik-setup-for-WCSites-domain-setup-on-K8S.md
100644 → 100755
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file modified
0
docs-source/content/wcsites-domains/manage-wcsites-domains/_index.md
100644 → 100755
Empty file.
Binary file added
BIN
+113 KB
...-integration-with-wls-operator-and-wls-server-logs/images/logstash-kibana-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+94.1 KB
...-integration-with-wls-operator-and-wls-server-logs/images/logstash-kibana-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.