Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 6a54692d authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

Pull request #10: add weblogic 14c (jdk11 ) plan

Merge in EDELIVERY/smp from EDELIVERY-10493-create-docker-image-deployment-for-weblogic-14c to development

* commit '20331398':
  PR updates
  add weblogic 14c (jdk11 ) plan
parents 5ea8e245 20331398
No related branches found
No related tags found
No related merge requests found
Showing
with 293 additions and 0 deletions
......@@ -5,6 +5,7 @@ eDelivery SMP 5.0
document.restriction.allowed.certificate.types: Allowed key algorithms for certificates to be used in service metadata.Empty value means no restrictions, for other values see the java KeyFactory Algorithms for example: RSA|EC|Ed25519|Ed448.
smp.certificate.validation.allowed.certificate.type: Allowed user certificate JCE types. Empty value means no restrictions, for other values see the java KeyFactory Algorithms for example: RSA|EC|Ed25519|Ed448.
identifiersBehaviour.splitPattern: Regular expression with groups scheme and identifier for splitting the URN identifiers to scheme and identifier part.
- the default keystore type is now PKCS12. Set the keystore type to JKS if properties smp.truststore.type and smp.keystore.type are missing!
eDelivery SMP 4.2
- added new properties:
......
# WebLogic oracle docker plan
WebLogic Oracle database plan starts up clustered WebLogic 14c environment with the Oracle 11xe or oracle 19c database.
The cluster is consisted from two nodes and the admin served. DB Connection pool and the SMP application is deployed to all
servers.
# start environment
execute bash script
./compose/weblogic-oracle/runCompose.sh
**Note**: if the Nodes are not starting (Caused By: com.rsa.jsafe.JSAFE_PaddingException: Invalid padding.). Please make sure
the notes are using the same ./smp-docker/compose/weblogic-oracle/data/smp-cluster-4.2-RC2-SNAPSHOT.jar generated from the admin server!
Restart clean node-01
docker-compose -f ./compose/weblogic-oracle/docker-compose.yml -p smp-wls-orcl up --force-recreate --no-deps smp-node-01
\ No newline at end of file
.gitignore is excluded when sharing artifacts on bamboo
http://ant.apache.org/manual/dirtasks.html
And we want this folder to be shared in order to keep the project structure.
\ No newline at end of file
# Ignore everything in this directory
..
# Except the following
!.gitignore
!.disable_default_excludes
\ No newline at end of file
.gitignore is excluded when sharing artifacts on bamboo
http://ant.apache.org/manual/dirtasks.html
And we want this folder to be shared in order to keep the project structure.
\ No newline at end of file
# Ignore everything in this directory
..
# Except the following
!.gitignore
!.disable_default_excludes
\ No newline at end of file
.gitignore is excluded when sharing artifacts on bamboo
http://ant.apache.org/manual/dirtasks.html
And we want this folder to be shared in order to keep the project structure.
\ No newline at end of file
# Ignore everything in this directory
..
# Except the following
!.gitignore
!.disable_default_excludes
\ No newline at end of file
.gitignore is excluded when sharing artifacts on bamboo
http://ant.apache.org/manual/dirtasks.html
And we want this folder to be shared in order to keep the project structure.
\ No newline at end of file
# Ignore everything in this directory
..
# Except the following
!.gitignore
!.disable_default_excludes
\ No newline at end of file
version: "3.0"
services:
smp-oracle-db:
image: smp-oradb-${ORA_VERSION}-${ORA_EDITION}:${SMP_VERSION:-5.0-SNAPSHOT}
hostname: smp-database.local
environment:
- ORACLE_CHARACTERSET=AL32UTF8 # set database encoding
- NLS_LANG=.AL32UTF8 # set sqlplus encoding for starting up scripts
volumes:
- ./properties/db-scripts:/docker-entrypoint-initdb.d/startup # init script.
- ./status-folder:/u01/status/
ports:
- 1821:1521
shm_size: '1gb'
smp-wls-admin:
depends_on:
- smp-oracle-db
command: [bash, -c, "rm -rf /u01/status/wls-admin.started;for i in `seq 150`; do timeout 1 bash -c 'echo \" $$(ls /u01/status/)\"'; if [ -f '/u01/status/database.status' ] && [ \"$$( cat /u01/status/database.status )\" == 'DATABASE IS READY TO USE!' ] ; then break;fi; echo \"$$i. Wait for database!\"; sleep 10; done; /u01/oracle/startAdminServer.sh"]
image: smp-weblogic-141:${SMP_VERSION:-5.0-SNAPSHOT}
hostname: smp-wls-admin
environment:
- JAVA_OPTIONS="-Dweblogic.webservice.i18n.charset=utf-8"
- WL_PRODUCTION_MODE_ENABLED=true # to enable production deployment
- WL_DEPLOYMENT_TARGET=smp-cluster
ports:
- 7801:7001
volumes:
- ./properties/weblogic-init:/u01/init/
- ./data:/data
- ./status-folder:/u01/status/
smp-node-01:
# depend of the startup of the db
depends_on:
- smp-wls-admin
command: [bash, -c, "for i in `seq 200`; do timeout 1 bash -c 'echo \" $$(ls /u01/status/)\"'; if [ -f '/u01/status/wls-admin.started' ] ; then break;fi; echo \"$$i. Wait for admin server!\"; sleep 10; done; /u01/oracle/startManagedServer.sh"]
environment:
- WL_ADMIN_HOST=smp-wls-admin
- WL_MANAGED_SERV_NAME=smp-node-1
image: smp-weblogic-141:${SMP_VERSION:-5.0-SNAPSHOT}
# ports:
# - "18453:8453"
# - "18001:8001"
volumes:
- ./data:/data
- ./status-folder:/u01/status/
smp-node-02:
# depend of the startup of the db
depends_on:
- smp-wls-admin
command: [bash, -c, "for i in `seq 200`; do timeout 1 bash -c 'echo \" $$(ls /u01/status/)\"'; if [ -f '/u01/status/wls-admin.started' ] ; then break;fi; echo \"$$i. Wait for admin server!\"; sleep 10; done; /u01/oracle/startManagedServer.sh"]
environment:
- WL_ADMIN_HOST=smp-wls-admin
- WL_MANAGED_SERV_NAME=smp-node-2
- WL_DELAY_STARTUP_IN_S=20 # delay startup to allow node 01 to initialize the database, truststore and keystore
image: smp-weblogic-141:${SMP_VERSION:-5.0-SNAPSHOT}
# ports:
# - "18453:8453"
# - "18001:8001"
volumes:
- ./data:/data
- ./status-folder:/u01/status/
smp-httpd:
depends_on:
- smp-node-01
- smp-node-02
image: smp-httpd:${SMP_VERSION:-5.0-SNAPSHOT}
environment:
- VHOST_CORNER_HOSTNAME=smp.edelivery.eu
- NODES_COUNT=2
- NODE_HOSTNAMES=smp-node-01,smp-node-02
- NODE_PORT_NUMBERS=8001,8001
- AllowEncodedSlashes=NoDecode
ports:
- "7880:80"
restart: always
.gitignore is excluded when sharing artifacts on bamboo
http://ant.apache.org/manual/dirtasks.html
And we want this folder to be shared in order to keep the project structure.
\ No newline at end of file
# Ignore everything in this directory
..
# Except the following
!.gitignore
!.disable_default_excludes
\ No newline at end of file
dsname=eDeliverySmpDs
dsdbname=eDeliverySmpDs
dsjndiname=jdbc/eDeliverySmpDs
dsdriver=oracle.jdbc.OracleDriver
dsurl=jdbc:oracle:thin:@//smp-oracle-db:1521/xe
dsusername=smp
dspassword=test
dstestquery=SQL SELECT 1 FROM DUAL
CLUSTER_TYPE=DYNAMIC
JAVA_OPTIONS=-Dweblogic.StdoutDebugEnabled=false
T3_CHANNEL_PORT=30012
T3_PUBLIC_ADDRESS=kubernetes
\ No newline at end of file
username=wls-smp
password=wls-pass-01
\ No newline at end of file
configuration.dir=/data/smp/security
hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
datasource.jndi=jdbc/eDeliverySmpDs
authentication.blueCoat.enabled=true
smp.truststore.password={DEC}{test123}
smp.keystore.password={DEC}{test123}
log.folder=./logs/
#!/bin/bash
#WORKING_DIR="$(dirname $0)"
WORKING_DIR="$(cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
SMP_INIT_DATABASE="../../../smp-webapp/src/main/smp-setup/database-scripts/oracle10g.ddl"
#SMP_INIT_DATABASE_DATA="../../../smp-webapp/src/main/smp-setup/database-scripts/oracle10g-data.sql"
SMP_INIT_DATABASE_DATA="../../../smp-soapui-tests/groovy/oracle-4.1_integration_test_data.sql"
# soap ui data
PREFIX="smp-wls-orcl"
SMP_VERSION=5.0-SNAPSHOT
#ORA_VERSION="19.3.0"
#ORA_EDITION="se2"
#ORA_SERVICE="ORCLPDB1"
#ORACLE_PDB="ORCLPDB1"
ORA_VERSION="11.2.0.2"
ORA_EDITION="xe"
ORA_SERVICE="xe"
SMP_DB_USERNAME=smp;
SMP_DB_PASSWORD=test;
SMP_DB_SCRIPTS=./properties/db-scripts
# READ arguments
while getopts i:v: option
do
case "${option}"
in
i) SMP_INIT_DATABASE_DATA=${OPTARG};;
v) SMP_VERSION=${OPTARG};;
esac
done
if [ -z "${SMP_VERSION}" ]
then
# get version from POM file
SMP_VERSION="$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout)"
fi
echo "*************************************************************************"
echo "SMP version: $SMP_VERSION"
echo "Init sql data: ${SMP_INIT_DATABASE_DATA}"
echo "Working Directory: ${WORKING_DIR}"
echo "*************************************************************************"
cd "$WORKING_DIR"
echo "Create folder (if not exist) for database scripts ${SMP_DB_SCRIPTS}"
[ -d ${SMP_DB_SCRIPTS} ] || mkdir -p "${SMP_DB_SCRIPTS}"
function createDatabaseSchemaForUser() {
echo "Clear file [$3] to recreate schema for user creation!"
echo "" > "$3"
echo "Create database schema/user: $1"
if [ -n "$ORACLE_PDB" ]; then
echo "ALTER SESSION SET CONTAINER=$ORACLE_PDB;" >>"$3"
fi
{
# magic with double quotes - first end " then put '"' and then add variable to "$Var" and repeat the stuff :)
echo "CREATE USER $1 IDENTIFIED BY "'"'"$2"'"'" DEFAULT TABLESPACE users QUOTA UNLIMITED ON users; "
echo "GRANT CREATE SESSION TO $1;"
echo "GRANT CREATE TABLE TO $1;"
echo "GRANT CREATE VIEW TO $1;"
echo "GRANT CREATE SEQUENCE TO $1;"
echo "GRANT SELECT ON PENDING_TRANS$ TO $1;"
echo ""
} >>"$3"
}
function clearOldContainers {
echo "Clear containers and volumes"
docker-compose -p "${PREFIX}" rm -s -f -v
echo "Clear container data ${WORKING_DIR}/data/"
rm -rf ${WORKING_DIR}/data/upload/*.*
rm -rf ${WORKING_DIR}/data/smp/config/*.*
rm -rf ${WORKING_DIR}/data/smp/security/*.*
rm -rf ${WORKING_DIR}/data/weblogic/keystores/*.*
rm -rf ${WORKING_DIR}/data/weblogic/security.properties
rm -rf ${WORKING_DIR}/data/*.*
}
createDatabaseSchemaForUser $SMP_DB_USERNAME $SMP_DB_PASSWORD "${SMP_DB_SCRIPTS}/01_create_user.sql"
# create database init script from
echo "CONNECT ${SMP_DB_USERNAME}/${SMP_DB_PASSWORD}@//localhost:1521/${ORA_SERVICE};" > "${SMP_DB_SCRIPTS}/02_oracle10g.sql"
cat "${SMP_INIT_DATABASE}" >> "${SMP_DB_SCRIPTS}/02_oracle10g.sql"
# copy init database data for SMP
if [ ! -f "${SMP_INIT_DATABASE_DATA}" ]
then
echo "SMP sql init data '${SMP_INIT_DATABASE_DATA} not found!!"
exit 1;
else
# copy artefact to docker build folder
echo "CONNECT ${SMP_DB_USERNAME}/${SMP_DB_PASSWORD}@//localhost:1521/${ORA_SERVICE};" > "${SMP_DB_SCRIPTS}/03_oracle10g-data.sql"
cat "${SMP_INIT_DATABASE_DATA}" >> "${SMP_DB_SCRIPTS}/03_oracle10g-data.sql"
fi
# Because statuses are synchronized through folder: ./status-folder it could contain a state from a previous start.
# Set content of the file database.status to "Database starting"!
echo "Database starting" > ./status-folder/database.status
clearOldContainers
# start
export SMP_VERSION
export ORA_VERSION
export ORA_EDITION
docker-compose -p ${PREFIX} up -d --force-recreate
# wait until service is up
for i in `seq 200`; do timeout 10 bash -c ' curl --silent --fail http://localhost:7880/smp/'; if [ $? -eq 0 ] ; then break;fi; echo "$i. Wait for weblogic to start!"; sleep 10; done;
.gitignore is excluded when sharing artifacts on bamboo
http://ant.apache.org/manual/dirtasks.html
And we want this folder to be shared in order to keep the project structure.
\ No newline at end of file
# Ignore everything in this directory
*
# Except the following
!.gitignore
!.disable_default_excludes
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment