Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@
]
},
"protectedSettings": {
"commandToExecute": "[concat('sh',' ',variables('name_scriptFile'),' ',parameters('adminVMName'),' ',parameters('wlsDomainName'),' ',parameters('wlsUserName'),' ',parameters('wlsPassword'),' ',variables('const_wlsHome'),' ',variables('const_wlsDomainPath'),' ', parameters('aadsSettings').enable,' ',if(parameters('aadsSettings').enable, parameters('aadsSettings').certificateBase64String, 'null'),' ', parameters('customSSLSettings').enable,' ',if(parameters('customSSLSettings').enable,parameters('customSSLSettings').customIdentityKeyStoreBase64String, 'null'),' ',if(parameters('customSSLSettings').enable,parameters('customSSLSettings').customIdentityKeyStorePassPhrase, 'null'),' ',if(parameters('customSSLSettings').enable,parameters('customSSLSettings').customIdentityKeyStoreType, 'null'),' ',if(parameters('customSSLSettings').enable,parameters('customSSLSettings').customTrustKeyStoreBase64String, 'null'),' ',if(parameters('customSSLSettings').enable,parameters('customSSLSettings').customTrustKeyStorePassPhrase, 'null'),' ',if(parameters('customSSLSettings').enable,parameters('customSSLSettings').customTrustKeyStoreType, 'null'),' ',if(parameters('customSSLSettings').enable,parameters('customSSLSettings').privateKeyAlias, 'null'),' ',if(parameters('customSSLSettings').enable,parameters('customSSLSettings').privateKeyPassPhrase, 'null'))]" }
"commandToExecute": "[concat('sh',' ',variables('name_scriptFile'),' <<< \"',parameters('adminVMName'),' ',parameters('wlsDomainName'),' ',parameters('wlsUserName'),' ',parameters('wlsPassword'),' ',variables('const_wlsHome'),' ',variables('const_wlsDomainPath'),' ', parameters('aadsSettings').enable,' ',if(parameters('aadsSettings').enable, parameters('aadsSettings').certificateBase64String, 'null'),' ', parameters('customSSLSettings').enable,' ',if(parameters('customSSLSettings').enable,parameters('customSSLSettings').customIdentityKeyStoreBase64String, 'null'),' ',if(parameters('customSSLSettings').enable,parameters('customSSLSettings').customIdentityKeyStorePassPhrase, 'null'),' ',if(parameters('customSSLSettings').enable,parameters('customSSLSettings').customIdentityKeyStoreType, 'null'),' ',if(parameters('customSSLSettings').enable,parameters('customSSLSettings').customTrustKeyStoreBase64String, 'null'),' ',if(parameters('customSSLSettings').enable,parameters('customSSLSettings').customTrustKeyStorePassPhrase, 'null'),' ',if(parameters('customSSLSettings').enable,parameters('customSSLSettings').customTrustKeyStoreType, 'null'),' ',if(parameters('customSSLSettings').enable,parameters('customSSLSettings').privateKeyAlias, 'null'),' ',if(parameters('customSSLSettings').enable,parameters('customSSLSettings').privateKeyPassPhrase, 'null'),'\"')]"
}
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function echo_stderr ()
#Function to display usage message
function usage()
{
echo_stderr "./configureCustomAdminSSL.sh <adminVMName> <wlsDomainName> <wlsUserName> <wlsPassword> <oracleHome> <wlsDomainPath> <enableAAD> <wlsADSSLCer> <isCustomSSLenabled> <customIdentityKeyStoreBase64String> <customIdentityKeyStorePassPhrase> <customIdentityKeyStoreType> <customTrustKeyStoreBase64String> <customTrustKeyStorePassPhrase> <customTrustKeyStoreType> <privateKeyAlias> <privateKeyPassPhrase>"
echo_stderr "./configureCustomAdminSSL.sh <<< \"<customSSLConfigArgsFromStdIn>\""
}

function installUtilities()
Expand Down Expand Up @@ -285,46 +285,14 @@ SCRIPT_PWD=`pwd`
args=("$@")
# get number of elements
ELEMENTS=${#args[@]}

# echo each element in array
# for loop
#for (( i=0;i<$ELEMENTS;i++)); do
# echo "ARG[${args[${i}]}]"
#done

if [ $# -lt 9 ]
then
usage
exit 1
fi

adminVMName=$1
wlsDomainName=$2
wlsUserName=$3
wlsPassword=$4
oracleHome=$5
wlsDomainPath=$6

enableAAD="${7}"
enableAAD="${enableAAD,,}"
#read arguments from stdin
read adminVMName wlsDomainName wlsUserName wlsPassword oracleHome wlsDomainPath enableAAD wlsADSSLCer isCustomSSLEnabled customIdentityKeyStoreBase64String customIdentityKeyStorePassPhrase customIdentityKeyStoreType customTrustKeyStoreBase64String customTrustKeyStorePassPhrase customTrustKeyStoreType privateKeyAlias privateKeyPassPhrase

wlsADSSLCer="${8}"

isCustomSSLEnabled="${9}"
enableAAD="${enableAAD,,}"
isCustomSSLEnabled="${isCustomSSLEnabled,,}"

if [ "${isCustomSSLEnabled,,}" == "true" ];
then
customIdentityKeyStoreBase64String="${10}"
customIdentityKeyStorePassPhrase="${11}"
customIdentityKeyStoreType="${12}"
customTrustKeyStoreBase64String="${13}"
customTrustKeyStorePassPhrase="${14}"
customTrustKeyStoreType="${15}"
privateKeyAlias="${16}"
privateKeyPassPhrase="${17}"
fi

wlsAdminPort=7001
wlsAdminChannelPort=7005
wlsAdminURL="$adminVMName:$wlsAdminChannelPort"
Expand All @@ -337,16 +305,16 @@ KEYSTORE_PATH="$wlsDomainPath/$wlsDomainName/keystores"
validateInput
cleanup

parseAndSaveCustomSSLKeyStoreData
parseAndSaveCustomSSLKeyStoreData

if [ "$enableAAD" == "true" ];then
parseLDAPCertificate
importAADCertificateIntoWLSCustomTrustKeyStore
fi
wait_for_admin
configureSSL
restartAdminServerService
wait_for_admin
if [ "$enableAAD" == "true" ];then
parseLDAPCertificate
importAADCertificateIntoWLSCustomTrustKeyStore
fi

wait_for_admin
configureSSL
restartAdminServerService
wait_for_admin

cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
]
},
"protectedSettings": {
"commandToExecute": "[concat('sh',' ',variables('name_scriptAADConfiguration'),' ', variables('const_aadParameters'))]"
"commandToExecute": "[concat('sh',' ',variables('name_scriptAADConfiguration'),' <<< \"', variables('const_aadParameters'),'\"')]"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
]
},
"protectedSettings": {
"commandToExecute": "[concat('sh',' ',variables('name_scriptFile'),' ',parameters('wlsDomainName'),' ',parameters('wlsUserName'),' ',parameters('wlsPassword'),' ',parameters('adminVMName'),' ', variables('const_wlsHome'),' ',variables('name_storageAccount'),' ',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('name_storageAccount')), '2019-04-01').keys[0].value,' ',variables('const_mountPointPath'),' ',string(parameters('enableHTTPAdminListenPort')),' ', if(parameters('enableCustomDNS'), parameters('customDNSName'), reference(variables('name_publicIPAddress')).dnsSettings.fqdn), ' ')]"
"commandToExecute": "[concat('sh',' ',variables('name_scriptFile'),' <<< \"',parameters('wlsDomainName'),' ',parameters('wlsUserName'),' ',parameters('wlsPassword'),' ',parameters('adminVMName'),' ', variables('const_wlsHome'),' ',variables('name_storageAccount'),' ',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('name_storageAccount')), '2019-04-01').keys[0].value,' ',variables('const_mountPointPath'),' ',string(parameters('enableHTTPAdminListenPort')),' ', if(parameters('enableCustomDNS'), parameters('customDNSName'), reference(variables('name_publicIPAddress')).dnsSettings.fqdn), '\"')]"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@
]
},
"protectedSettings": {
"commandToExecute": "[concat('sh',' ',variables('name_scriptFile'),' ',parameters('wlsDomainName'),' ',parameters('wlsUserName'),' ',parameters('wlsPassword'),' ',parameters('adminVMName'),' ', variables('const_wlsHome'),' ',variables('name_storageAccount'),' ',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('name_storageAccount')), '${azure.apiVersion2}').keys[0].value,' ',variables('const_mountPointPath'),' ',string(parameters('enableHTTPAdminListenPort')),' ',if(parameters('enableCustomDNS'), parameters('customDNSName'), reference(variables('name_publicIPAddress')).dnsSettings.fqdn),' ',string(parameters('enableCustomSSL')),' ',if(parameters('enableCustomSSL'),base64(parameters('keyVaultCustomIdentityKeyStoreData')),''),' ',if(parameters('enableCustomSSL'),base64(parameters('keyVaultCustomIdentityKeyStorePassPhrase')),''),' ',if(parameters('enableCustomSSL'),base64(parameters('keyVaultCustomIdentityKeyStoreType')),''),' ',if(parameters('enableCustomSSL'),base64(parameters('keyVaultCustomTrustKeyStoreData')),''),' ',if(parameters('enableCustomSSL'),base64(parameters('keyVaultCustomTrustKeyStorePassPhrase')),''),' ',if(parameters('enableCustomSSL'),base64(parameters('keyVaultCustomTrustKeyStoreType')),''),' ',if(parameters('enableCustomSSL'),base64(parameters('keyVaultPrivateKeyAlias')),''),' ',if(parameters('enableCustomSSL'),base64(parameters('keyVaultPrivateKeyPassPhrase')),''),' ')]"
"commandToExecute": "[concat('sh',' ',variables('name_scriptFile'),' <<< \"',parameters('wlsDomainName'),' ',parameters('wlsUserName'),' ',parameters('wlsPassword'),' ',parameters('adminVMName'),' ', variables('const_wlsHome'),' ',variables('name_storageAccount'),' ',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('name_storageAccount')), '${azure.apiVersion2}').keys[0].value,' ',variables('const_mountPointPath'),' ',string(parameters('enableHTTPAdminListenPort')),' ',if(parameters('enableCustomDNS'), parameters('customDNSName'), reference(variables('name_publicIPAddress')).dnsSettings.fqdn),' ',string(parameters('enableCustomSSL')),' ',if(parameters('enableCustomSSL'),base64(parameters('keyVaultCustomIdentityKeyStoreData')),''),' ',if(parameters('enableCustomSSL'),base64(parameters('keyVaultCustomIdentityKeyStorePassPhrase')),''),' ',if(parameters('enableCustomSSL'),base64(parameters('keyVaultCustomIdentityKeyStoreType')),''),' ',if(parameters('enableCustomSSL'),base64(parameters('keyVaultCustomTrustKeyStoreData')),''),' ',if(parameters('enableCustomSSL'),base64(parameters('keyVaultCustomTrustKeyStorePassPhrase')),''),' ',if(parameters('enableCustomSSL'),base64(parameters('keyVaultCustomTrustKeyStoreType')),''),' ',if(parameters('enableCustomSSL'),base64(parameters('keyVaultPrivateKeyAlias')),''),' ',if(parameters('enableCustomSSL'),base64(parameters('keyVaultPrivateKeyPassPhrase')),''),'\"')]"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
]
},
"protectedSettings": {
"commandToExecute": "[concat('sh',' ',variables('name_scriptFilePrefix'),parameters('databaseType'),'.sh ',variables('const_wlsHome'),' ',parameters('adminVMName'),' ',variables('const_wlsAdminPort'),' ',parameters('wlsUserName'),' ',variables('const_singleQuote'),parameters('wlsPassword'),variables('const_singleQuote'),' ',parameters('jdbcDataSourceName'),' ',variables('const_singleQuote'),parameters('dsConnectionURL'),variables('const_singleQuote'),' ',parameters('dbUser'),' ',variables('const_singleQuote'),parameters('dbPassword'),variables('const_singleQuote'))]"
"commandToExecute": "[concat('sh',' ',variables('name_scriptFilePrefix'),parameters('databaseType'),'.sh <<< \"',variables('const_wlsHome'),' ',parameters('adminVMName'),' ',variables('const_wlsAdminPort'),' ',parameters('wlsUserName'),' ',variables('const_singleQuote'),parameters('wlsPassword'),variables('const_singleQuote'),' ',parameters('jdbcDataSourceName'),' ',variables('const_singleQuote'),parameters('dsConnectionURL'),variables('const_singleQuote'),' ',parameters('dbUser'),' ',variables('const_singleQuote'),parameters('dbPassword'),variables('const_singleQuote'),'\"')]"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
]
},
"protectedSettings": {
"commandToExecute": "[concat('sh',' ',variables('name_scriptELKConfiguration'),' ', variables('const_wlsHome'), ' ', parameters('adminVMName'), ' ', variables('const_wlsAdminPort'), ' ', parameters('wlsUserName'), ' ', parameters('wlsPassword'), ' ', variables('const_adminServerName'), ' ',parameters('elasticsearchEndpoint') ,' ', parameters('elasticsearchUserName'),' ', parameters('elasticsearchPassword'), ' ', parameters('wlsDomainName'),' ', variables('const_wlsDomainPath'),' ', array.join(parameters('logsToIntegrate')),' ', variables('const_logIndex'))]"
"commandToExecute": "[concat('sh',' ',variables('name_scriptELKConfiguration'),' <<< \"', variables('const_wlsHome'), ' ', parameters('adminVMName'), ' ', variables('const_wlsAdminPort'), ' ', parameters('wlsUserName'), ' ', parameters('wlsPassword'), ' ', variables('const_adminServerName'), ' ',parameters('elasticsearchEndpoint') ,' ', parameters('elasticsearchUserName'),' ', parameters('elasticsearchPassword'), ' ', parameters('wlsDomainName'),' ', variables('const_wlsDomainPath'),' ', array.join(parameters('logsToIntegrate')),' ', variables('const_logIndex'),'\"')]"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,41 +367,9 @@ function createTempFolder()
sudo rm -rf $SCRIPT_PATH/*
}

LDAP_USER_NAME='sAMAccountName'
LDAP_USER_FROM_NAME_FILTER='(&(sAMAccountName=%u)(objectclass=user))'
JAVA_OPTIONS_TLS_V12="-Djdk.tls.client.protocols=TLSv1.2"
STRING_ENABLE_TLSV12="Append -Djdk.tls.client.protocols to JAVA_OPTIONS in jdk8"
SCRIPT_PWD=`pwd`
USER_ORACLE="oracle"
GROUP_ORACLE="oracle"
DOMAIN_PATH="/u01/domains"

if [ $# -ne 20 ]
then
usage
exit 1
fi
#main

wlsUserName=$1
wlsPassword=$2
wlsDomainName=$3
adProviderName=$4
adServerHost=$5
adServerPort=$6
adPrincipal=$7
adPassword=$8
adGroupBaseDN=$9
adUserBaseDN=${10}
oracleHome=${11}
wlsAdminHost=${12}
wlsAdminPort=${13}
wlsADSSLCer="${14}"
wlsLDAPPublicIP="${15}"
wlsAdminServerName=${16}
wlsDomainPath=${17}
isCustomSSLEnabled=${18}
customTrustKeyStorePassPhrase="${19}"
customTrustKeyStoreType="${20}"
read wlsUserName wlsPassword wlsDomainName adProviderName adServerHost adServerPort adPrincipal adPassword adGroupBaseDN adUserBaseDN oracleHome wlsAdminHost wlsAdminPort wlsADSSLCer wlsLDAPPublicIP wlsAdminServerName wlsDomainPath isCustomSSLEnabled customTrustKeyStorePassPhrase customTrustKeyStoreType

isCustomSSLEnabled="${isCustomSSLEnabled,,}"

Expand All @@ -413,6 +381,15 @@ fi

wlsAdminURL=$wlsAdminHost:$wlsAdminPort

LDAP_USER_NAME='sAMAccountName'
LDAP_USER_FROM_NAME_FILTER='(&(sAMAccountName=%u)(objectclass=user))'
JAVA_OPTIONS_TLS_V12="-Djdk.tls.client.protocols=TLSv1.2"
STRING_ENABLE_TLSV12="Append -Djdk.tls.client.protocols to JAVA_OPTIONS in jdk8"
SCRIPT_PWD=`pwd`
USER_ORACLE="oracle"
GROUP_ORACLE="oracle"
DOMAIN_PATH="/u01/domains"

validateInput
createTempFolder
echo "check status of admin server"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,6 @@
# Description
# This script configures datasource on WebLogic Server Domain for Oracle database.

oracleHome=$1
wlsAdminHost=$2
wlsAdminPort=$3
wlsUserName=$4
wlsPassword=$5
jdbcDataSourceName=$6
dsConnectionURL=$7
dsUser=$8
dsPassword=$9
wlsClusterName=${10-cluster1}
wlsAdminURL=$wlsAdminHost:$wlsAdminPort
hostName=`hostname`

#Function to output message to StdErr
function echo_stderr ()
{
Expand All @@ -27,7 +14,7 @@ function echo_stderr ()
#Function to display usage message
function usage()
{
echo_stderr "./configDatasource.sh <oracleHome> <wlsAdminHost> <wlsAdminPort> <wlsUserName> <wlsPassword> <jdbcDataSourceName> <dsConnectionURL> <dsUser> <dsPassword> <wlsClusterName> "
echo_stderr "./configDatasource.sh <<< \"<wlsDataSourceSetupArgsFromStdIn>\""
}

function validateInput()
Expand Down Expand Up @@ -148,10 +135,17 @@ function createTempFolder()
sudo rm -rf $scriptPath/*
}

if [ $# -lt 9 ]
#main

#read arguments from stdin
read oracleHome wlsAdminHost wlsAdminPort wlsUserName wlsPassword jdbcDataSourceName dsConnectionURL dsUser dsPassword wlsClusterName

wlsAdminURL=$wlsAdminHost:$wlsAdminPort
hostName=`hostname`

if [ -z "$wlsClusterName" ];
then
usage
exit 1
wlsClusterName="cluster1"
fi

createTempFolder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,6 @@
# Description
# This script configures datasource on WebLogic Server Domain for PostgreSQL database.

oracleHome=$1
wlsAdminHost=$2
wlsAdminPort=$3
wlsUserName=$4
wlsPassword=$5
jdbcDataSourceName=$6
dsConnectionURL=$7
dsUser=$8
dsPassword=$9
wlsClusterName=${10-cluster1}
wlsAdminURL=$wlsAdminHost:$wlsAdminPort
hostName=`hostname`

#Function to output message to StdErr
function echo_stderr ()
{
Expand All @@ -27,7 +14,7 @@ function echo_stderr ()
#Function to display usage message
function usage()
{
echo_stderr "./configDatasource.sh <oracleHome> <wlsAdminHost> <wlsAdminPort> <wlsUserName> <wlsPassword> <jdbcDataSourceName> <dsConnectionURL> <dsUser> <dsPassword> <wlsClusterName> "
echo_stderr "./configDatasource.sh <<< \"<wlsDataSourceSetupArgsFromStdIn>\""
}

function validateInput()
Expand Down Expand Up @@ -154,17 +141,17 @@ args=("$@")
# get number of elements
ELEMENTS=${#args[@]}

# echo each element in array
# for loop
for (( i=0;i <$ELEMENTS;i++)); do
echo "ARG[${args[${i}]}]"
done
#main

#read arguments from stdin
read oracleHome wlsAdminHost wlsAdminPort wlsUserName wlsPassword jdbcDataSourceName dsConnectionURL dsUser dsPassword wlsClusterName

if [ $# -lt 9 ]
wlsAdminURL=$wlsAdminHost:$wlsAdminPort
hostName=`hostname`

if [ -z "$wlsClusterName" ];
then
usage
exit 1
wlsClusterName="cluster1"
fi

createTempFolder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,6 @@
# Description
# This script configures datasource on WebLogic Server Domain for SQL Server database.

oracleHome=$1
wlsAdminHost=$2
wlsAdminPort=$3
wlsUserName=$4
wlsPassword=$5
jdbcDataSourceName=$6
dsConnectionURL=$7
dsUser=$8
dsPassword=$9
wlsClusterName=${10-cluster1}
wlsAdminURL=$wlsAdminHost:$wlsAdminPort
hostName=`hostname`

#Function to output message to StdErr
function echo_stderr ()
{
Expand All @@ -27,7 +14,7 @@ function echo_stderr ()
#Function to display usage message
function usage()
{
echo_stderr "./configDatasource.sh <oracleHome> <wlsAdminHost> <wlsAdminPort> <wlsUserName> <wlsPassword> <jdbcDataSourceName> <dsConnectionURL> <dsUser> <dsPassword> <wlsClusterName> "
echo_stderr "./configDatasource.sh <<< \"<wlsDataSourceSetupArgsFromStdIn>\""
}

function validateInput()
Expand Down Expand Up @@ -148,10 +135,17 @@ function createTempFolder()
sudo rm -rf $scriptPath/*
}

if [ $# -lt 9 ]
#main

#read arguments from stdin
read oracleHome wlsAdminHost wlsAdminPort wlsUserName wlsPassword jdbcDataSourceName dsConnectionURL dsUser dsPassword wlsClusterName

wlsAdminURL=$wlsAdminHost:$wlsAdminPort
hostName=`hostname`

if [ -z "$wlsClusterName" ];
then
usage
exit 1
wlsClusterName="cluster1"
fi

createTempFolder
Expand Down
Loading