From 1db6a0af43ef8a9f0097e7e1d734d638155df615 Mon Sep 17 00:00:00 2001 From: Monica Riccelli Date: Thu, 3 Jan 2019 18:05:44 -0500 Subject: [PATCH] Remove configuration of DERBY DB from sample --- .../12213-domain-home-in-image/README.md | 2 +- .../container-scripts/create-wls-domain.py | 82 +++++++++---------- .../container-scripts/startAdminServer.sh | 9 -- .../container-scripts/startManagedServer.sh | 8 -- .../properties/docker-build/domain.properties | 12 --- .../properties/docker-run/security.properties | 1 - 6 files changed, 42 insertions(+), 72 deletions(-) diff --git a/OracleWebLogic/samples/12213-domain-home-in-image/README.md b/OracleWebLogic/samples/12213-domain-home-in-image/README.md index 15ad104359..da42eddc3a 100644 --- a/OracleWebLogic/samples/12213-domain-home-in-image/README.md +++ b/OracleWebLogic/samples/12213-domain-home-in-image/README.md @@ -2,7 +2,7 @@ Example Image with a WebLogic Server Domain ============================================= This Dockerfile extends the Oracle WebLogic image by creating a sample WebLogic Server 12.2.1.3 domain and cluster into a Docker image. -A domain is created inside the image and utility scripts are copied into the image, enabling users to start an Administration Server and a Managed Server, each running in separate containers. As part of the domain configuration, there is a data source that connects to a Derby database started in the Admin Server container. The data source in the Managed servers connect to the Derby database in the Administration Server container. +A domain is created inside the image and utility scripts are copied into the image, enabling users to start an Administration Server and a Managed Server, each running in separate containers. **Note:** In this sample, the WebLogic Servers are configured with a blank listen address; when running JTA transactions, you must use a DNS server to configure the listen addresses to use DNS names. diff --git a/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/create-wls-domain.py b/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/create-wls-domain.py index 016c5f40dd..999add154e 100644 --- a/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/create-wls-domain.py +++ b/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/create-wls-domain.py @@ -54,7 +54,7 @@ def getEnvVar(var): print('cluster_type : [%s]' % cluster_type); print('managed_server_name_base : [%s]' % managed_server_name_base); print('production_mode_enabled : [%s]' % production_mode_enabled); -print('dsname : [%s]' % dsname); +#print('dsname : [%s]' % dsname); print('t3_channel_port : [%s]' % t3_channel_port); print('t3_public_address : [%s]' % t3_public_address); @@ -159,46 +159,46 @@ def getEnvVar(var): # Create a Data Source # ====================== -cd('/') -print('Configuring a Data Source: %s' % dsname); -create(dsname, 'JDBCSystemResource') -cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname) -cmo.setName(dsname) - -cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname) -create('myJdbcDataSourceParams','JDBCDataSourceParams') -cd('JDBCDataSourceParams/NO_NAME_0') -set('JNDIName', java.lang.String(dsjndiname)) -set('GlobalTransactionsProtocol', java.lang.String('None')) - -cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname) -create('myJdbcDriverParams','JDBCDriverParams') -cd('JDBCDriverParams/NO_NAME_0') -set('DriverName', dsdriver) -set('URL', dsurl) -set('PasswordEncrypted', dspassword) -set('UseXADataSourceInterface', 'false') - -print 'create JDBCDriverParams Properties' -create('myProperties','Properties') -cd('Properties/NO_NAME_0') -create('user','Property') -cd('Property/user') -set('Value', dsusername) - -cd('../../') -create('databaseName','Property') -cd('Property/databaseName') -set('Value', dsdbname) - -print 'create JDBCConnectionPoolParams' -cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname) -create('myJdbcConnectionPoolParams','JDBCConnectionPoolParams') -cd('JDBCConnectionPoolParams/NO_NAME_0') -set('TestTableName','SQL SELECT 1 FROM DUAL') -set('InitialCapacity',int(dsinitalcapacity)) - -print('Done setting attributes for Data Source: %s' % dsname); +#cd('/') +#print('Configuring a Data Source: %s' % dsname); +#create(dsname, 'JDBCSystemResource') +#cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname) +#cmo.setName(dsname) + +#cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname) +#create('myJdbcDataSourceParams','JDBCDataSourceParams') +#cd('JDBCDataSourceParams/NO_NAME_0') +#set('JNDIName', java.lang.String(dsjndiname)) +#set('GlobalTransactionsProtocol', java.lang.String('None')) + +#cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname) +#create('myJdbcDriverParams','JDBCDriverParams') +#cd('JDBCDriverParams/NO_NAME_0') +#set('DriverName', dsdriver) +#set('URL', dsurl) +#set('PasswordEncrypted', dspassword) +#set('UseXADataSourceInterface', 'false') + +#print 'create JDBCDriverParams Properties' +#create('myProperties','Properties') +#cd('Properties/NO_NAME_0') +#create('user','Property') +#cd('Property/user') +#set('Value', dsusername) + +#cd('../../') +#create('databaseName','Property') +#cd('Property/databaseName') +#set('Value', dsdbname) + +#print 'create JDBCConnectionPoolParams' +#cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname) +#create('myJdbcConnectionPoolParams','JDBCConnectionPoolParams') +#cd('JDBCConnectionPoolParams/NO_NAME_0') +#set('TestTableName','SQL SELECT 1 FROM DUAL') +#set('InitialCapacity',int(dsinitalcapacity)) + +#print('Done setting attributes for Data Source: %s' % dsname); # Assign # ====== diff --git a/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/startAdminServer.sh b/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/startAdminServer.sh index 63021f27c8..3960f76007 100755 --- a/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/startAdminServer.sh +++ b/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/startAdminServer.sh @@ -94,15 +94,6 @@ if [ -z "${JAVA_OPTIONS}" ]; then fi export JAVA_OPTIONS=${JAVA_OPTIONS} -#Define start of Derby Database -#echo "Java Options: ${JAVA_OPTIONS}" -#DERBY_FLAG=`awk '{print $1}' ${SEC_PROPERTIES_FILE} | grep ^DERBY_FLAG= | cut -d "=" -f2` -#if [ -z "${DERBY_FLAG}" ]; then -# DERBY_FLAG="true" -#fi -#export DERBY_FLAG=${DERBY_FLAG} -#echo "Start Derby: ${DERBY_FLAG}" - # Create domain mkdir -p ${AS_SECURITY} echo "username=${USER}" >> ${AS_SECURITY}/boot.properties diff --git a/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/startManagedServer.sh b/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/startManagedServer.sh index 3ffef7b6fa..c6335cffe5 100755 --- a/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/startManagedServer.sh +++ b/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/startManagedServer.sh @@ -46,14 +46,6 @@ fi export JAVA_OPTIONS=${JAVA_OPTIONS} echo "Java Options: ${JAVA_OPTIONS}" -#Set env to Start Derby DB -#DERBY_FLAG=`awk '{print $1}' ${SEC_PROPERTIES_FILE} | grep ^DERBY_FLAG= | cut -d "=" -f2` -#if [ -z "${DERBY_FLAG}" ]; then -# DERBY_FLAG="true" -#fi -#export DERBY_FLAG=${DERBY_FLAG} -#echo "Start Derby: ${DERBY_FLAG}" - # Create Managed Server mkdir -p ${MS_SECURITY} echo "username=${USER}" >> ${MS_SECURITY}/boot.properties diff --git a/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker-build/domain.properties b/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker-build/domain.properties index 0f22622de9..aefe841c4f 100644 --- a/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker-build/domain.properties +++ b/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker-build/domain.properties @@ -9,23 +9,11 @@ CLUSTER_NAME=cluster-1 DEBUG_PORT=8453 DB_PORT=1527 DEBUG_FLAG=true -DERBY_FLAG=true PRODUCTION_MODE_ENABLED=true CLUSTER_TYPE=DYNAMIC JAVA_OPTIONS=-Dweblogic.StdoutDebugEnabled=false T3_CHANNEL_PORT=30012 T3_PUBLIC_ADDRESS=kubernetes -#Derby Data Source parameters -dsname=DockerDS -dsdbname=DerbyDB;create=true -dsjndiname=/DockerDS -dsdriver=org.apache.derby.jdbc.ClientXADataSource -dsurl=jdbc:derby://localhost:1527/DerbyDB;ServerName=localhost;databaseName=DerbyDB;create=true -dsusername=dbuser -dspassword=dbpassword -dstestquery=SQL SELECT 1 FROM SYS.SYSTABLES -dsinitalcapacity=0 -dsmaxcapacity=15 #Oracle database settings #dsname=DockerDS2 #dsdbname=default;create=true diff --git a/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker-run/security.properties b/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker-run/security.properties index fd16d73bda..bd5269b9e9 100644 --- a/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker-run/security.properties +++ b/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker-run/security.properties @@ -1,5 +1,4 @@ username=myuser password=mypassword1 JAVA_OPTIONS=-Dweblogic.StdoutDebugEnabled=false -DERBY_FLAG=true