HHH-17736 Improve Atlas for atps
This commit is contained in:
parent
603f7ff2d2
commit
4d920d114a
|
@ -21,13 +21,20 @@ elif [ "$RDBMS" == "oracle" ]; then
|
|||
elif [ "$RDBMS" == "oracle_xe" ]; then
|
||||
# I have no idea why, but these tests don't seem to work on CI...
|
||||
goal="-Pdb=oracle_xe_ci"
|
||||
elif [ "$RDBMS" == "oracle_atps" ]; then
|
||||
elif [ "$RDBMS" == "oracle_atps_tls" ]; then
|
||||
echo "Managing Oracle Autonomous Database..."
|
||||
export INFO=$(curl -s -k -L -X GET "https://api.atlas-controller.oraclecloud.com/ords/atlas/admin/database?type=autonomous&hostname=`hostname`" -H 'accept: application/json')
|
||||
export HOST=$(echo $INFO | jq -r '.database' | jq -r '.host')
|
||||
export SERVICE=$(echo $INFO | jq -r '.database' | jq -r '.service')
|
||||
# I have no idea why, but these tests don't seem to work on CI...
|
||||
goal="-Pdb=oracle_cloud_autonomous_tls -DrunID=$RUNID -DdbHost=$HOST -DdbService=$SERVICE"
|
||||
elif [ "$RDBMS" == "oracle_atps" ]; then
|
||||
echo "Managing Oracle Autonomous Database..."
|
||||
export INFO=$(curl -s -k -L -X GET "https://api.atlas-controller.oraclecloud.com/ords/atlas/admin/database?type=autonomous&hostname=`hostname`" -H 'accept: application/json')
|
||||
export HOST=$(echo $INFO | jq -r '.database' | jq -r '.host')
|
||||
export SERVICE=$(echo $INFO | jq -r '.database' | jq -r '.service')
|
||||
# I have no idea why, but these tests don't seem to work on CI...
|
||||
goal="-Pdb=oracle_cloud_autonomous -DrunID=$RUNID -DdbHost=$HOST -DdbService=$SERVICE"
|
||||
elif [ "$RDBMS" == "oracle_db19c" ]; then
|
||||
echo "Managing Oracle Database 19c..."
|
||||
export INFO=$(curl -s -k -L -X GET "https://api.atlas-controller.oraclecloud.com/ords/atlas/admin/database?type=db19c&hostname=`hostname`" -H 'accept: application/json')
|
||||
|
|
|
@ -14,6 +14,8 @@ elif [ "$RDBMS" == 'db2' ]; then
|
|||
bash $DIR/../docker_db.sh db2
|
||||
elif [ "$RDBMS" == 'oracle' ]; then
|
||||
bash $DIR/../docker_db.sh oracle
|
||||
elif [ "$RDBMS" == 'oracle_atps_tls' ]; then
|
||||
bash $DIR/../docker_db.sh oracle_atps_tls
|
||||
elif [ "$RDBMS" == 'oracle_atps' ]; then
|
||||
bash $DIR/../docker_db.sh oracle_atps
|
||||
elif [ "$RDBMS" == 'oracle_db19c' ]; then
|
||||
|
|
10
docker_db.sh
10
docker_db.sh
|
@ -714,6 +714,16 @@ oracle_atps() {
|
|||
export SERVICE=$(echo $INFO | jq -r '.database' | jq -r '.service')
|
||||
export PASSWORD=$(echo $INFO | jq -r '.database' | jq -r '.password')
|
||||
|
||||
curl -k -s -X POST "https://${HOST}.oraclevcn.com:8443/ords/admin/_/sql" -H 'content-type: application/sql' -H 'accept: application/json' -basic -u admin:${PASSWORD} --data-ascii "create user hibernate_orm_test_$RUNID identified by \"Oracle_19_Password\" DEFAULT TABLESPACE DATA TEMPORARY TABLESPACE TEMP;alter user hibernate_orm_test_$RUNID quota unlimited on data;grant CREATE SESSION, RESOURCE, CREATE VIEW, CREATE SYNONYM, CREATE ANY INDEX, EXECUTE ANY TYPE to hibernate_orm_test_$RUNID;"
|
||||
}
|
||||
|
||||
oracle_atps_tls() {
|
||||
echo "Managing Oracle Autonomous Database..."
|
||||
export INFO=$(curl -s -k -L -X GET "https://api.atlas-controller.oraclecloud.com/ords/atlas/admin/database?type=autonomous&hostname=`hostname`" -H 'accept: application/json')
|
||||
export HOST=$(echo $INFO | jq -r '.database' | jq -r '.host')
|
||||
export SERVICE=$(echo $INFO | jq -r '.database' | jq -r '.service')
|
||||
export PASSWORD=$(echo $INFO | jq -r '.database' | jq -r '.password')
|
||||
|
||||
curl -s -X POST "https://${HOST}.oraclecloudapps.com/ords/admin/_/sql" -H 'content-type: application/sql' -H 'accept: application/json' -basic -u admin:${PASSWORD} --data-ascii "create user hibernate_orm_test_$RUNID identified by \"Oracle_19_Password\" DEFAULT TABLESPACE DATA TEMPORARY TABLESPACE TEMP;alter user hibernate_orm_test_$RUNID quota unlimited on data;grant CREATE SESSION, RESOURCE, CREATE VIEW, CREATE SYNONYM, CREATE ANY INDEX, EXECUTE ANY TYPE to hibernate_orm_test_$RUNID;"
|
||||
}
|
||||
|
||||
|
|
|
@ -212,6 +212,20 @@ ext {
|
|||
// https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/autonomous-oracle-java.html
|
||||
'jdbc.url' : 'jdbc:oracle:thin:@(description=(retry_count=5)(retry_delay=1)(address=(protocol=tcps)(port=1521)(host=' + dbHost + '.oraclecloud.com))(connect_data=(service_name=' + dbService + '_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))?oracle.jdbc.enableQueryResultCache=false&oracle.jdbc.thinForceDNSLoadBalancing=true&tcp.nodelay=yes',
|
||||
'jdbc.datasource' : 'oracle.jdbc.OracleDriver',
|
||||
// 'jdbc.datasource' : 'oracle.jdbc.datasource.impl.OracleDataSource',
|
||||
'connection.init_sql' : ''
|
||||
],
|
||||
oracle_cloud_autonomous : [
|
||||
'db.dialect' : 'org.hibernate.dialect.OracleDialect',
|
||||
'jdbc.driver': 'oracle.jdbc.OracleDriver',
|
||||
'jdbc.user' : 'hibernate_orm_test_' + runID,
|
||||
'jdbc.pass' : 'Oracle_19_Password',
|
||||
// Requires dbHost (pointing to the right cloud region) AND dbService (unique database name).
|
||||
//
|
||||
// To avoid hibernate-spatial tests failure, JVM must be enabled as stated in documentation:
|
||||
// https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/autonomous-oracle-java.html
|
||||
'jdbc.url' : 'jdbc:oracle:thin:@(description=(retry_count=5)(retry_delay=1)(address=(protocol=tcp)(port=1521)(host=' + dbHost + '.oraclevcn.com))(connect_data=(service_name=' + dbService + '_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))?oracle.jdbc.enableQueryResultCache=false&oracle.jdbc.thinForceDNSLoadBalancing=true&tcp.nodelay=yes',
|
||||
'jdbc.datasource' : 'oracle.jdbc.OracleDriver',
|
||||
// 'jdbc.datasource' : 'oracle.jdbc.datasource.impl.OracleDataSource',
|
||||
'connection.init_sql' : ''
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue