diff --git a/.env b/.env index a1a33b4c..9809ea77 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ # ODM product version -ODMVERSION=8.10.4 +ODMVERSION=8.10.5.1 # ODM database schema version ODMDBVERSION=8.10.next @@ -14,7 +14,7 @@ REPOSITORY=ibmcom PREFIXIMAGE=odm # Liberty Version -FROMLIBERTY=ibmcom/websphere-liberty:20.0.0.6-kernel-java8-ibmjava-ubi +FROMLIBERTY=ibmcom/websphere-liberty:21.0.0.3-kernel-java8-ibmjava-ubi # Postgres Version FROMPOSTGRES=postgres:12 diff --git a/.travis.yml b/.travis.yml index c04e673f..c4d74116 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ env: secure: MR+cKxC7Big1DcXqbimRt4BLdUyIz7Bh8/gxtjmpJ+vr046jVec1mlnQyRtPAAAlS8W1OZrEuY9YzYl4Gq5s7dieEk/ERUwuQeUTXkg3jzFdC05JbcYWhDlsjLbZuLjVamH2wcXnf3VpJDZ/lqM1Tn2wTGkn5cqT8UdLC3qRDgRyKCT8mnKoIEkw2Bx8YyRZ2FR2xg8UjDXRnNf5El0jJCnK5d82YumOeMYN7PUBRkyypv/obluE1dcZ1gbFdj3ln7s752+Rjmh0R3+GvV67pApv0HlS6ceDETp+ynh2tDFCuLJtevJTfwTW2KOST9Mo53vuBSFpi+Ts8Yb08rYpK6eg4zbje3NSLsLPoKLlHSQSAWsuzrBGk4KlnjdzcUmB+RgDbRFrz3Vo+vhQfG+4qdmX4mNIE9/OP4s6BaLagt6iYmJDlXj7rOky9EbttxXYUJaw5wtkBafYG4bJjVaqJk0KJRrYIArTRTibKcH9U+hrJeLbepHMLtEAP930I7S+TAPQ70Zi0lnJrvAf/Cm7mT9Js+Uah3hijkrOu1NjHe2d8jF8kNmhHbIckhvNwkXqLbd58ypjDBVABGIHHUtmX3mVCrfkCyCFVJqCzPw1ZzlLWZ4qi90WhsAnGL0ySI3sp3vqVdZ3gqFs7QzIMPtLXUOgDji62W3qZopgK2NdWkI= before_install: - mkdir -p $HOME/.cache - +- echo "${REGISTRY_PASSWORD}" | docker login docker.io --username ${REGISTRY_USER} --password-stdin - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - sudo apt-get update diff --git a/common/config/authOidc/resAdministrators.xml b/common/config/authOidc/resAdministrators.xml index 9a1167f6..e3206bc1 100644 --- a/common/config/authOidc/resAdministrators.xml +++ b/common/config/authOidc/resAdministrators.xml @@ -1,6 +1,12 @@ + + + + + + diff --git a/common/config/authOidc/resDeployers.xml b/common/config/authOidc/resDeployers.xml index c818fa9d..703900be 100644 --- a/common/config/authOidc/resDeployers.xml +++ b/common/config/authOidc/resDeployers.xml @@ -1,6 +1,12 @@ + + + + + + diff --git a/common/config/authOidc/resExecutors.xml b/common/config/authOidc/resExecutors.xml index 6b958e9c..6da914d9 100644 --- a/common/config/authOidc/resExecutors.xml +++ b/common/config/authOidc/resExecutors.xml @@ -1,6 +1,12 @@ + + + + + + diff --git a/common/config/authOidc/resMonitors.xml b/common/config/authOidc/resMonitors.xml index 74682053..93d6dc1c 100644 --- a/common/config/authOidc/resMonitors.xml +++ b/common/config/authOidc/resMonitors.xml @@ -1,6 +1,12 @@ + + + + + + diff --git a/common/config/authOidc/rtsAdministrators.xml b/common/config/authOidc/rtsAdministrators.xml index 72a3284b..8428b4f6 100644 --- a/common/config/authOidc/rtsAdministrators.xml +++ b/common/config/authOidc/rtsAdministrators.xml @@ -1,6 +1,12 @@ + + + + + + diff --git a/common/config/authOidc/rtsConfigManagers.xml b/common/config/authOidc/rtsConfigManagers.xml index 78979e05..54ddb308 100644 --- a/common/config/authOidc/rtsConfigManagers.xml +++ b/common/config/authOidc/rtsConfigManagers.xml @@ -1,6 +1,12 @@ + + + + + + diff --git a/common/config/authOidc/rtsInstallers.xml b/common/config/authOidc/rtsInstallers.xml index 309817b2..55bcab9b 100644 --- a/common/config/authOidc/rtsInstallers.xml +++ b/common/config/authOidc/rtsInstallers.xml @@ -1,6 +1,12 @@ + + + + + + diff --git a/common/resources/ibm-docs.crt b/common/resources/ibm-docs.crt new file mode 100644 index 00000000..ca987e87 --- /dev/null +++ b/common/resources/ibm-docs.crt @@ -0,0 +1,36 @@ +-----BEGIN CERTIFICATE----- +MIIGRDCCBSygAwIBAgISBGekf/7rGwi26Xz73I6OvoTFMA0GCSqGSIb3DQEBCwUA +MDIxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQswCQYDVQQD +EwJSMzAeFw0yMTA0MjkwMjQ1MjBaFw0yMTA3MjgwMjQ1MjBaMEUxQzBBBgNVBAMT +OmlibWRvY3MtcHJvZHVjdGlvbi1kYWwudXMtc291dGguY29udGFpbmVycy5hcHBk +b21haW4uY2xvdWQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC90T79 +NWdfsNivV8aqu8CMvpIfIM2/LVjLk5HSNLy9fl6iPhmJ/QyY8V9yh7cWn1puTMuW +fretN2uY9s2+Xzd+XUyJ8sScOHI40lOmZo0NJ+4PBO9V+vM6kqd3s4rwsMHhWrZP +e8OxL9U/VrG/Xiujgld7IdbPVXq2Jlxm0GZGv+dsLNLmR4OLdyXYN7aWqTPBRbqR +QUR5kQ0/wCFUhMcur0ZDziIKTU6JOuYF1EfHbP0cm+zfHcCPVF78eOjgJHZQ49ke +xQUYbQLy5J80dTGTS3xZsT+g6g35LHfcqCeFrT6eoHmF3ovbSlCUcgfXF2npavJ7 +0Yh6trU6mHXK+w73AgMBAAGjggM/MIIDOzAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0l +BBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYE +FLQbWDFIvzFbkhXxuY596Fmi0CRlMB8GA1UdIwQYMBaAFBQusxe3WFbLrlAJQOYf +r52LFMLGMFUGCCsGAQUFBwEBBEk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zawR6/GM+CMBQ5cEj +xQuTPJWEYba9MmWimYwkazbNZGmlmFBbOIzyKoNjTfarzvIp+h+bYpK3HHHOJKQk +QojQRTZ7odJPJ3YJqfCsPHm+rz/wY0+TdBsrTonBDQDPxvrL7/q+I/Fu8qag5k5/ +pSwexj/PGwDQTZw/YcQ4QVDhL2StgntvCbSnAZuqfcvGsvtmne9M0s3pLIaZzRvl +hObPHoVTQvl4IEbAxmaPJKUmyo2p+3xz +-----END CERTIFICATE----- diff --git a/common/resources/ibm-public.crt b/common/resources/ibm-public.crt new file mode 100644 index 00000000..f5c09a55 --- /dev/null +++ b/common/resources/ibm-public.crt @@ -0,0 +1,52 @@ +-----BEGIN CERTIFICATE----- +MIIJRDCCCCygAwIBAgIQDmawg9RSDxVkfwCV86ESfTANBgkqhkiG9w0BAQsFADBe +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMR0wGwYDVQQDExRHZW9UcnVzdCBSU0EgQ0EgMjAxODAe +Fw0yMDExMDcwMDAwMDBaFw0yMTExMTEyMzU5NTlaMH0xCzAJBgNVBAYTAlVTMREw +DwYDVQQIEwhOZXcgWW9yazEPMA0GA1UEBxMGQXJtb25rMTQwMgYDVQQKEytJbnRl +cm5hdGlvbmFsIEJ1c2luZXNzIE1hY2hpbmVzIENvcnBvcmF0aW9uMRQwEgYDVQQD +Ewt3d3cuaWJtLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANVp +gR6uHrfyHNhwIK75bDC0BUqdz782n3rn33baJUaFlY3AqzNM4mf6zo5JxzmXW2ey +NQ4B+PN4lzIQal2ShZBm7m9se9ORfokdZS3EwU56FgaVlM5oEz14vU6lM3pAuSjY +HZw0zT5P1c0kmkpBjAg/apeCMvGDvlOguF7jaEl5NhJ7a48oAr2twad1zCO57BrK +lpHGDhh2+Frzf+yoXBPo0S0Z9HczH65VI7Uu8ZTHi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CkRvDzRsMA0GCSqGSIb3DQEB +CwUAA4IBAQBluNf+EPbwLJ6jheqTxzS0xsB10xEdeGSXzTkP8OYoitSZ0B5618vq +0JgS/nwjdM44z3quORwTnNrWNzeDWthLiP0Z7eRtLlm1BrctzY++lBzdVUXZXBUD +B+kj0iTFzVmzArU6JeORR61EnVtGYL6h1KIKAtVyJKQSVGTtOEd+x3l88dJBdJqs +/PjDaPgp8TNeUJjpSj+c18V9uOxJ5ITsYU1V5v8inPolTYEZLC0wxjYIIXrujiHq +LQfZ/QpUSkGQBU4ajtJ5Skb4T3YzTdtvROuGK/gxEMncThYGSAb6S7KdrS/8K+Wt +ALdvvM/SkBUVDpSrhOPEkCRIAJJM495Y +-----END CERTIFICATE----- diff --git a/common/script/configureSwidTag.sh b/common/script/configureSwidTag.sh index 04ccad42..9f3727c7 100755 --- a/common/script/configureSwidTag.sh +++ b/common/script/configureSwidTag.sh @@ -38,24 +38,7 @@ then echo "DEPLOY_FOR_PRODUCTION not set then ODM production configuration : remove ODM non production Swidtag" removeAllSwidTag ibm.com_IBM_ODM_Server_for_Non-Production-*.swidtag fi - echo "ODM configuration : remove all DBAMC Swidtag" - removeAllSwidTag ibm.com_Operational_Decision_Manager_Containers_-_CP4BA*.swidtag - removeAllSwidTag ibm.com_Operational_Decision_Manager_Containers_-_CP4BA_-_Non_Prod*.swidtag else - if [ -n "$DEPLOY_FOR_PRODUCTION" ] - then - if [[ "$DEPLOY_FOR_PRODUCTION" =~ "TRUE" ]] - then - echo "DEPLOY_FOR_PRODUCTION is true then DBAMC production configuration : remove DBAMC non production Swidtag" - removeAllSwidTag ibm.com_Operational_Decision_Manager_Containers_-_CP4BA_-_Non_Prod-*.swidtag - else - echo "DEPLOY_FOR_PRODUCTION is false then DBAMC non production configuration : remove DBAMC production Swidtag" - removeAllSwidTag ibm.com_Operational_Decision_Manager_Containers_-_CP4BA-*.swidtag - fi - else - echo "DEPLOY_FOR_PRODUCTION not set then DBAMC production configuration : remove DBAMC non production Swidtag" - removeAllSwidTag ibm.com_Operational_Decision_Manager_Containers_-_CP4BA_-_Non_Prod-*.swidtag - fi echo "DBAMC configuration : remove all ODM Swidtag" removeAllSwidTag ibm.com_IBM_ODM_Server*.swidtag removeAllSwidTag ibm.com_IBM_ODM_Server_for_Non-Production*.swidtag diff --git a/common/script/configureTlsSecurity.sh b/common/script/configureTlsSecurity.sh index f17cb28a..92688494 100755 --- a/common/script/configureTlsSecurity.sh +++ b/common/script/configureTlsSecurity.sh @@ -76,17 +76,27 @@ fi CERTDIR="/config/security/trusted-cert-volume/" if [ -d $CERTDIR ]; then cd $CERTDIR - for dir in *; do - echo "Importing trusted certificates $dir" - if [ -d $dir ]; then - if [ -f $dir/tls.crt ]; then - # Don't know if we need to delete the Alias. If don't delete it there is an error - keytool -delete -alias 0trust_$dir -storepass $DEFAULT_TRUSTSTORE_PASSWORD -keystore /config/security/truststore.jks > /dev/null - keytool -import -v -trustcacerts -alias 0trust_$dir -file $dir/tls.crt -keystore /config/security/truststore.jks -storepass $DEFAULT_TRUSTSTORE_PASSWORD -noprompt - else - echo "Couldn't find certificate $dir/tls.crt skipping this certificate " - fi - fi + TRUSTSTORE=/config/security/truststore.jks + i=0 + for file in $(find . -name "*.crt") + do + echo "Importing trusted certificates $file" + i=$((i+1)) + ALIASNAME="trust_$i_$file" + keytool -delete -alias 0$ALIASNAME -storepass $DEFAULT_TRUSTSTORE_PASSWORD -keystore $TRUSTSTORE > /dev/null + keytool -import -v -trustcacerts -alias 0$ALIASNAME -file $file -keystore $TRUSTSTORE -storepass $DEFAULT_TRUSTSTORE_PASSWORD -noprompt done echo "done" fi + +if [ -f "/config/resources/ibm-public.crt" ] +then + echo "Importing IBM Public certificate" + keytool -import -v -trustcacerts -alias IBM-PUBLIC -file /config/resources/ibm-public.crt -keystore /config/security/truststore.jks -storepass $DEFAULT_TRUSTSTORE_PASSWORD -noprompt +fi + +if [ -f "/config/resources/ibm-docs.crt" ] +then + echo "Importing IBM Docs certificate" + keytool -import -v -trustcacerts -alias IBM-DOCS -file /config/resources/ibm-docs.crt -keystore /config/security/truststore.jks -storepass $DEFAULT_TRUSTSTORE_PASSWORD -noprompt +fi diff --git a/common/script/initVariables.sh b/common/script/initVariables.sh index 8489c208..7ffbedd5 100644 --- a/common/script/initVariables.sh +++ b/common/script/initVariables.sh @@ -20,3 +20,10 @@ then echo "ODM_CONTEXT_ROOT unset : set blank" export ODM_CONTEXT_ROOT="" fi + +if [ -s "$SCRIPT/init/container.env" ] +then + set -o allexport + source $SCRIPT/init/container.env + set +o allexport +fi diff --git a/common/script/updateDatasource.sh b/common/script/updateDatasource.sh index 379994b4..4faa7f0b 100644 --- a/common/script/updateDatasource.sh +++ b/common/script/updateDatasource.sh @@ -10,16 +10,32 @@ fi if [ -n "$DB_PORT_NUMBER" ] then echo "Set database port number to $DB_PORT_NUMBER" - # Update port in case of PostgreSQL - sed -i 's|5432|'$DB_PORT_NUMBER'|g' /config/datasource.xml - # Update port in case of DB2 - sed -i 's|50000|'$DB_PORT_NUMBER'|g' /config/datasource.xml - # Update port in case of Derby - sed -i 's|1527|'$DB_PORT_NUMBER'|g' /config/datasource.xml - # Update port in case of MySQL - sed -i 's|3306|'$DB_PORT_NUMBER'|g' /config/datasource.xml - # Update port in case of SQL server - sed -i 's|1433|'$DB_PORT_NUMBER'|g' /config/datasource.xml + sed -i 's|DB_PORT_NUMBER|'$DB_PORT_NUMBER'|g' /config/datasource.xml +else + if [ -n "$DB_TYPE" ] + then + echo "No provided DB_PORT_NUMBER, set default database port according to $DB_TYPE" + case $DB_TYPE in + *derby* ) + sed -i 's|DB_PORT_NUMBER|1527|g' /config/datasource.xml + ;; + *mysql* ) + sed -i 's|DB_PORT_NUMBER|3306|g' /config/datasource.xml + ;; + *db2* ) + sed -i 's|DB_PORT_NUMBER|50000|g' /config/datasource.xml + ;; + *postgres* ) + sed -i 's|DB_PORT_NUMBER|5432|g' /config/datasource.xml + ;; + *sqlserver* ) + sed -i 's|DB_PORT_NUMBER|1433|g' /config/datasource.xml + ;; + esac + else + echo "Set DB_PORT_NUMBER to 5432 as using PostgreSQL by default" + sed -i 's|DB_PORT_NUMBER|5432|g' /config/datasource.xml + fi fi if [ -n "$DB_NAME" ] diff --git a/decisioncenter/Dockerfile b/decisioncenter/Dockerfile index 8403dd31..150e7e13 100755 --- a/decisioncenter/Dockerfile +++ b/decisioncenter/Dockerfile @@ -61,6 +61,7 @@ COPY --chown=1001:0 $ODMDOCKERDIR/common/config/jvm/jvm.options /config/configDr COPY --chown=1001:0 $ODMDOCKERDIR/common/security/ltpa.keys /config/resources/security/ltpa.keys COPY --chown=1001:0 $ODMDOCKERDIR/common/security/keystore.jks /config/security/keystore.jks COPY --chown=1001:0 $ODMDOCKERDIR/common/security/truststore.jks /config/security/truststore.jks +COPY --chown=1001:0 $ODMDOCKERDIR/common/resources/ibm-public.crt /config/resources/ibm-public.crt COPY --chown=1001:0 $ODMDOCKERDIR/common/drivers /config/resources RUN chmod -R 777 /config diff --git a/decisioncenter/config/datasource-db2.xml b/decisioncenter/config/datasource-db2.xml index e88cfbb9..440d53e9 100644 --- a/decisioncenter/config/datasource-db2.xml +++ b/decisioncenter/config/datasource-db2.xml @@ -20,7 +20,7 @@ user="odmusr" password="odmpwd" serverName="dbserver" - portNumber="50000" + portNumber="DB_PORT_NUMBER" sslConnection="false"/> diff --git a/decisioncenter/config/datasource-derby.xml b/decisioncenter/config/datasource-derby.xml index eae1b445..25d72211 100644 --- a/decisioncenter/config/datasource-derby.xml +++ b/decisioncenter/config/datasource-derby.xml @@ -18,7 +18,7 @@ agedTimeout="30m"/> diff --git a/decisioncenter/config/datasource-mysql.xml b/decisioncenter/config/datasource-mysql.xml index 348e4626..1562915a 100644 --- a/decisioncenter/config/datasource-mysql.xml +++ b/decisioncenter/config/datasource-mysql.xml @@ -25,7 +25,7 @@ user="odmusr" password="odmpwd" serverName="dbserver" - portNumber="3306"/> + portNumber="DB_PORT_NUMBER"/> diff --git a/decisioncenter/config/datasource-postgres.xml b/decisioncenter/config/datasource-postgres.xml index 27139450..cee06b9f 100644 --- a/decisioncenter/config/datasource-postgres.xml +++ b/decisioncenter/config/datasource-postgres.xml @@ -25,7 +25,7 @@ databaseName="odmdb" user="odmusr" password="odmpwd" - portNumber="5432" + portNumber="DB_PORT_NUMBER" sslMode="prefer" serverName="dbserver" /> diff --git a/decisioncenter/config/datasource-sqlserver.xml b/decisioncenter/config/datasource-sqlserver.xml index 4ad15532..f7b16e1a 100644 --- a/decisioncenter/config/datasource-sqlserver.xml +++ b/decisioncenter/config/datasource-sqlserver.xml @@ -22,7 +22,7 @@ databaseName="odmdb" user="odmusr" password="odmpwd" - portNumber="1433" + portNumber="DB_PORT_NUMBER" encrypt="false" trustServerCertificate="true" serverName="dbserver" /> diff --git a/decisioncenter/script/rundc.sh b/decisioncenter/script/rundc.sh index c8265b30..90a2b876 100755 --- a/decisioncenter/script/rundc.sh +++ b/decisioncenter/script/rundc.sh @@ -25,9 +25,14 @@ $SCRIPT/setTimeZone.sh . $SCRIPT/setUTF8Locale.sh -if [ -s "$SCRIPT/customEnd.sh" ] +if [ -s "$SCRIPT/customEnd.sh" ] then - $SCRIPT/customEnd.sh + $SCRIPT/customEnd.sh +fi + +if [ -n "$DEMO" ] +then + $SCRIPT/updateDemoServers.sh & fi /opt/ibm/wlp/bin/server run defaultServer diff --git a/decisioncenter/script/updateDCConfigurations.sh b/decisioncenter/script/updateDCConfigurations.sh old mode 100644 new mode 100755 index 76279ea4..cc49d705 --- a/decisioncenter/script/updateDCConfigurations.sh +++ b/decisioncenter/script/updateDCConfigurations.sh @@ -253,6 +253,12 @@ then sed -i 's|/DecisionRunner|'$DECISIONRUNNER_CONTEXT_ROOT/DecisionRunner'|g' $DC_SERVER_CONFIG fi +if [ -n "$DEMO" ] +then + echo "Update flag to allow update of existing server definition in $DC_SERVER_CONFIG" + sed -i 's|false|true|g' $DC_SERVER_CONFIG +fi + if [ -s "/config/auth/ldap-configurations.xml" ] then echo "Update LDAP synchronization mode to users in decisioncenter-configuration.properties" diff --git a/decisioncenter/script/updateDemoServers.sh b/decisioncenter/script/updateDemoServers.sh new file mode 100755 index 00000000..4b45cdef --- /dev/null +++ b/decisioncenter/script/updateDemoServers.sh @@ -0,0 +1,68 @@ +#!/bin/bash + +sleep 60 + +PROTOCOL=http + +if [ -n "$ENABLE_TLS" ] +then + PROTOCOL=https +fi + +DSC_HOST=odm-decisionserverconsole + +if [ -n "$DECISIONSERVERCONSOLE_NAME" ] +then + DSC_HOST=$DECISIONSERVERCONSOLE_NAME +fi + +DR_HOST=odm-decisionrunner + +if [ -n "$DECISIONRUNNER_NAME" ] +then + DR_HOST=$DECISIONRUNNER_NAME +fi + +DSC_PORT=9080 + +if [ -n "$DECISIONSERVERCONSOLE_PORT" ] +then + DSC_PORT=$DECISIONSERVERCONSOLE_PORT +fi + +DR_PORT=9080 + +if [ -n "$DECISIONRUNNER_PORT" ] +then + DR_PORT=$DECISIONRUNNER_PORT +fi + +DSE_URL=$PROTOCOL"://"$DSC_HOST":"$DSC_PORT"/res" + +DR_URL=$PROTOCOL"://"$DR_HOST":"$DR_PORT"/DecisionRunner" + +retry=0 +while [[ ("$(curl -X POST "http://localhost:9060/decisioncenter-api/v1/servers/d8cb5830-14aa-45e0-89e2-8837f4d91021" -H "Content-Type: application/json;charset=UTF-8" -d "{ \"url\": \"$DSE_URL\"}" -H "authorization: Basic b2RtQWRtaW46b2RtQWRtaW4=" -w "%{http_code}" -s -o /dev/null)" != 200) && ( $retry -lt 10) ]];do + echo "try updating Decision Service Execution with $DSE_URL" + sleep 5 + retry=$((retry + 1)) +done + +if [[ $retry == 10 ]];then + echo "failed to update Decision Service Execution with $DSE_URL" +else + echo "successfully updated Decision Service Execution with $DSE_URL" +fi + +retry=0 +while [[ ("$(curl -X POST "http://localhost:9060/decisioncenter-api/v1/servers/a677f1c1-8633-42ff-8e4e-994fb52b3384" -H "Content-Type: application/json;charset=UTF-8" -d "{ \"url\": \"$DR_URL\"}" -H "authorization: Basic b2RtQWRtaW46b2RtQWRtaW4=" -w "%{http_code}" -s -o /dev/null)" != 200) && ( $retry -lt 10) ]];do + echo "try updating Test and Simulation Execution with $DR_URL" + sleep 5 + retry=$((retry + 1)) +done + +if [[ $retry == 10 ]];then + echo "failed to update Test and Simulation Execution with $DR_URL" +else + echo "successfully updated Test and Simulation Execution with $DR_URL" +fi diff --git a/decisionserver/config/datasource-db2.xml b/decisionserver/config/datasource-db2.xml index 32805c50..e34f4af0 100644 --- a/decisionserver/config/datasource-db2.xml +++ b/decisionserver/config/datasource-db2.xml @@ -7,7 +7,7 @@ - + diff --git a/decisionserver/config/datasource-derby.xml b/decisionserver/config/datasource-derby.xml index 3bdbe8a1..84c7b28e 100644 --- a/decisionserver/config/datasource-derby.xml +++ b/decisionserver/config/datasource-derby.xml @@ -6,6 +6,6 @@ + portNumber="DB_PORT_NUMBER" createDatabase="create" user="odmusr" password="odmpwd" /> diff --git a/decisionserver/config/datasource-mysql.xml b/decisionserver/config/datasource-mysql.xml index cf9189fc..7cd72d69 100644 --- a/decisionserver/config/datasource-mysql.xml +++ b/decisionserver/config/datasource-mysql.xml @@ -11,7 +11,7 @@ libraryRef="MySQLLib"/> - + diff --git a/decisionserver/config/datasource-postgres.xml b/decisionserver/config/datasource-postgres.xml index d643b0f4..13e4d098 100644 --- a/decisionserver/config/datasource-postgres.xml +++ b/decisionserver/config/datasource-postgres.xml @@ -20,7 +20,7 @@ databaseName="odmdb" user="odmusr" password="odmpwd" - portNumber="5432" + portNumber="DB_PORT_NUMBER" tcpKeepAlive="true" sslMode="prefer" serverName="dbserver" /> diff --git a/decisionserver/config/datasource-sqlserver.xml b/decisionserver/config/datasource-sqlserver.xml index 146ee965..edad2540 100644 --- a/decisionserver/config/datasource-sqlserver.xml +++ b/decisionserver/config/datasource-sqlserver.xml @@ -18,7 +18,7 @@ serverName="dbserver" encrypt="false" trustServerCertificate="true" - portNumber="1433"/> + portNumber="DB_PORT_NUMBER"/> diff --git a/decisionserver/decisionserverconsole/Dockerfile b/decisionserver/decisionserverconsole/Dockerfile index f2b83ac9..b6186a16 100644 --- a/decisionserver/decisionserverconsole/Dockerfile +++ b/decisionserver/decisionserverconsole/Dockerfile @@ -45,6 +45,7 @@ COPY --chown=1001:0 $ODMDOCKERDIR/common/config /config COPY --chown=1001:0 $ODMDOCKERDIR/common/security/ltpa.keys /config/resources/security/ltpa.keys COPY --chown=1001:0 $ODMDOCKERDIR/common/security/keystore.jks /config/security/keystore.jks COPY --chown=1001:0 $ODMDOCKERDIR/common/security/truststore.jks /config/security/truststore.jks +COPY --chown=1001:0 $ODMDOCKERDIR/common/resources/ibm-docs.crt /config/resources/ibm-docs.crt COPY --chown=1001:0 $ODMDOCKERDIR/common/drivers /config/resources COPY --chown=1001:0 $ODMDOCKERDIR/common/config/jvm/jvm.options /config/configDropins/overrides/jvm.options diff --git a/standalone/config/datasource-postgres.xml b/standalone/config/datasource-postgres.xml index ce2c2ffb..9e078183 100644 --- a/standalone/config/datasource-postgres.xml +++ b/standalone/config/datasource-postgres.xml @@ -25,7 +25,7 @@ databaseName="odmdb" user="odmusr" password="odmpwd" - portNumber="5432" + portNumber="DB_PORT_NUMBER" serverName="dbserver" /> @@ -35,7 +35,7 @@ databaseName="odmdb" user="odmusr" password="odmpwd" - portNumber="5432" + portNumber="DB_PORT_NUMBER" serverName="dbserver" /> diff --git a/standalone/dockerhub/full-description.md b/standalone/dockerhub/full-description.md index d6d9d2f8..3f9d9911 100644 --- a/standalone/dockerhub/full-description.md +++ b/standalone/dockerhub/full-description.md @@ -3,10 +3,6 @@ This repository is the home directory of IBM Operational Decision Manager for De # Quick reference -Click the image to view a short video (5 mins) on how to get started with IBM ODM for Developers. - -[![ODM overview](http://img.youtube.com/vi/ccdFtyy34x8/0.jpg)](http://www.youtube.com/watch?feature=player_embedded&v=ccdFtyy34x8) - - **Where to get help**: * [ODM Documentation](https://www.ibm.com/support/knowledgecenter/SSQP76_8.10.x/com.ibm.odm.distrib.overview/topics/tpc_dmov_intro_intro.html) * [ODM Developer Center community](https://developer.ibm.com/odm/)