Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
6a33183
On branch e2etest: OSSO account password should not include semicolon.
galiacheng Sep 15, 2021
7a5ba78
On branch e2etest: remove '/console/' from the remote console url.
galiacheng Sep 17, 2021
11b4b5b
On branch e2etest: remove slash from cluster endpoint.
galiacheng Sep 17, 2021
f73c5a2
On branch e2etest: fix regression issue in post deployment introduced…
galiacheng Sep 18, 2021
8a02312
On branch e2etest: fix issue - fail to create multiple domains in the…
galiacheng Sep 18, 2021
6cd35f7
On branch e2etest: wait for ingress completed.
galiacheng Sep 18, 2021
8869d6b
On branch e2etest: UI fix: make nodeVM size number is the same with n…
galiacheng Sep 22, 2021
519ce5d
On branch e2etest: fix regex of managed server prefix.
galiacheng Sep 22, 2021
70d4168
On branch e2etest: enhance Lb editable grid with regex on service nam…
galiacheng Sep 22, 2021
d90f841
On branch e2etest: fix regex of app gateway frontend password.
galiacheng Sep 22, 2021
89550ab
On branch e2etest: fix regex for "contains letters, numbers and hyphe…
galiacheng Sep 22, 2021
96ec326
On branch e2etest: do not download unsupport files (files should end …
galiacheng Sep 22, 2021
e118289
On branch e2etest: fix regex for db user name.
galiacheng Sep 22, 2021
5bfa863
On branch e2etest: enhance tooltip of DNS Zone name control.
galiacheng Sep 22, 2021
eaef43f
On branch e2etest: increase pom version
galiacheng Sep 22, 2021
d21ac96
On branch e2etest: allow underscores (_), periods (.) and hyphens in …
galiacheng Sep 22, 2021
cbf3458
On branchc e2etest: take "." "_" "(" ")" from gateway dns name that i…
galiacheng Sep 23, 2021
2ee42f0
On branch e2etest: output secured urls exposed by Lb service.
galiacheng Sep 24, 2021
4583958
On branch e2etest: support updating with .jar application in post dep…
galiacheng Sep 24, 2021
b6a1d8a
On branch e2etest: fix lb url outputs
galiacheng Sep 24, 2021
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
2 changes: 1 addition & 1 deletion weblogic-azure-aks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>com.oracle.weblogic.azure</groupId>
<artifactId>wls-on-aks-azure-marketplace</artifactId>
<version>1.0.17</version>
<version>1.0.18</version>

<parent>
<groupId>com.microsoft.azure.iaas</groupId>
Expand Down
55 changes: 32 additions & 23 deletions weblogic-azure-aks/src/main/arm/createUiDefinition.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"toolTip": "Password for Oracle Single Sign-On authentication to login the Oracle Container Registry.",
"constraints": {
"required": true,
"regex": "^(?=.*[A-Z])(?=.*[a-z])(?=.*\\d)[A-Za-z\\d\\$\\&\\+\\,:;\\=\\?@#|'.\\^\\*!\\-_~/'\\[\\]\\{\\}\"]{8,}$",
"regex": "^(?=.*[A-Z])(?=.*[a-z])(?=.*\\d)[A-Za-z\\d\\$\\&\\+\\,:\\=\\?@#|'.\\^\\*!\\-_~/'\\[\\]\\{\\}\"]{8,}$",
"validationMessage": "The password must contain at least 8 characters, with at least 1 uppercase letter, 1 lowercase letter and 1 number, and special characters, but should not contain > < ( ) % ; \\."
},
"options": {
Expand Down Expand Up @@ -168,8 +168,8 @@
"defaultValue": "managed-server",
"constraints": {
"required": true,
"regex": "^[a-z0-9A-Z\\-]{3,20}$",
"validationMessage": "The prefix must be between 3 and 20 characters long and contain letters, numbers and -."
"regex": "^(?=.{3,20}$)[a-zA-Z](?!.*--)[a-zA-Z0-9-]*[a-zA-Z0-9]$",
"validationMessage": "The prefix must be between 3 and 20 characters long and contain letters, numbers and hyphens(-). The name must begin with a letter, end with a letter or digit, and not contain consecutive hyphens."
},
"visible": "[bool(basics('basicsOptional').basicsOptionalAcceptDefaults)]"
},
Expand All @@ -194,8 +194,8 @@
"defaultValue": "sample-domain1",
"constraints": {
"required": true,
"regex": "^[a-z0-9A-Z\\-]{3,20}$",
"validationMessage": "The Domain UID must be between 3 and 20 characters long and contain letters, numbers and -."
"regex": "^(?=.{3,20}$)[a-zA-Z](?!.*--)[a-zA-Z0-9-]*[a-zA-Z0-9]$",
"validationMessage": "The prefix must be between 3 and 20 characters long and contain letters, numbers and hyphens(-). The name must begin with a letter, end with a letter or digit, and not contain consecutive hyphens."
},
"visible": "[bool(basics('basicsOptional').basicsOptionalAcceptDefaults)]"
},
Expand Down Expand Up @@ -351,7 +351,7 @@
"label": "Node count",
"defaultValue": 2,
"showStepMarkers": false,
"toolTip": "The number of nodes that should be created along with the cluster. You will be able to resize the cluster later",
"toolTip": "The number of nodes that should be created along with the cluster. You will be able to resize the cluster later.",
"constraints": {
"required": true
},
Expand All @@ -375,7 +375,7 @@
"hideDiskTypeFilter": false
},
"osPlatform": "Linux",
"count": 2,
"count": "[steps('section_aks').clusterInfo.aksNodeCount]",
"visible": "[bool(steps('section_aks').clusterInfo.createAKSCluster)]"
},
{
Expand Down Expand Up @@ -453,7 +453,7 @@
"type": "Microsoft.Common.TextBlock",
"visible": true,
"options": {
"text": "This value is appended to 'container-registry.oracle.com/middleware/weblogic:' and used in the Dockerfile FROM statement. \nOracle Standard Terms and Restrictions terms must be agreed. \nClick the following link to make sure you have agree the terms and check the valid tags.",
"text": "This value is appended to 'container-registry.oracle.com/middleware/weblogic:' and used in the Dockerfile from statement. \nOracle Standard Terms and Restrictions terms must be agreed. \nClick the following link to make sure you have agree the terms and check the valid tags.",
"link": {
"label": "Must be a valid tag value from Oracle Container Registry",
"uri": "https://aka.ms/wls-aks-fromImage-tag?${project.version}-${maven.build.timestamp}"
Expand Down Expand Up @@ -508,10 +508,11 @@
{
"name": "appPackageUrl",
"type": "Microsoft.Common.FileUpload",
"label": "Application package (.war,.ear)",
"toolTip": "The application war package to deploy.",
"label": "Application package (.war,.ear,.jar)",
"toolTip": "The application package to deploy.",
"constraints": {
"required": true
"required": true,
"accept": ".war,.ear,.jar"
},
"options": {
"multiple": true,
Expand Down Expand Up @@ -804,7 +805,7 @@
"toolTip": "Use only letters and numbers",
"constraints": {
"required": true,
"regex": "^(?=.{3,24}$)[a-zA-Z](([a-z0-9A-Z]*|(?:\\-[^\\-][a-z0-9A-Z]*))*)$",
"regex": "^(?=.{3,24}$)[a-zA-Z](?!.*--)[a-zA-Z0-9-]*[a-zA-Z0-9]$",
"validationMessage": "[if(or(greater(length(steps('section_sslConfiguration').keyVaultStoredCustomSSLSettings.keyVaultName), 24), less(length(steps('section_sslConfiguration').keyVaultStoredCustomSSLSettings.keyVaultName), 3)),'Vault name must be between 3-24 alphanumeric characters. The name must begin with a letter, end with a letter or digit, and not contain consecutive hyphens.','Vault name must only contain alphanumeric characters and dashes and cannot start with a number')]"
}
},
Expand Down Expand Up @@ -996,7 +997,7 @@
"rows": {
"count": {
"min": 0,
"max": 10
"max": 4
}
},
"columns": [
Expand All @@ -1011,8 +1012,12 @@
"required": true,
"validations": [
{
"regex": "^[a-z0-9A-Z-]{1,30}$",
"message": "Only alphanumeric characters are allowed, and the value must be 1-30 characters long."
"isValid": "[lessOrEquals(length(filter(steps('section_appGateway').lbSVCInfo.lbSVC, (item) => equals(item.colName, last(take(steps('section_appGateway').lbSVCInfo.lbSVC, $rowIndex)).colName))),1)]",
"message": "You can not input the same service prefix repeadly, please change any of the value."
},
{
"regex": "^(?=.{3,20}$)[a-zA-Z](?!.*--)[a-zA-Z0-9-]*[a-zA-Z0-9]$",
"message": "The prefix must be between 3 and 20 characters long and contain letters, numbers and hyphens(-). The name must begin with a letter, end with a letter or digit, and not contain consecutive hyphens."
}
]
}
Expand Down Expand Up @@ -1060,7 +1065,11 @@
"required": true,
"validations": [
{
"regex": "^[0-9]{1,5}$",
"isValid": "[lessOrEquals(length(filter(steps('section_appGateway').lbSVCInfo.lbSVC, (item) => equals(item.colTarget, last(take(steps('section_appGateway').lbSVCInfo.lbSVC, $rowIndex)).colTarget))),1)]",
"message": "You can not select the same target repeadly."
},
{
"regex": "^()([1-9]|[1-5]?[0-9]{2,4}|6[1-4][0-9]{3}|65[1-4][0-9]{2}|655[1-2][0-9]|6553[1-5])$",
"message": "Only numbers are allowed, and the value must be 1-65535."
}
]
Expand Down Expand Up @@ -1185,7 +1194,7 @@
"toolTip": "Frontend TLS/SSL certificate password",
"constraints": {
"required": "[equals(steps('section_appGateway').appgwIngress.certificateOption, 'haveCert')]",
"regex": "^((?=.*[0-9])(?=.*[a-z])|(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])|(?=.*[0-9])(?=.*[a-z])(?=.*[!@#$%^&*])|(?=.*[0-9])(?=.*[A-Z])(?=.*[!@#$%^&*])|(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*])).{6,128}$",
"regex": "^((?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*])).{6,128}$",
"validationMessage": "The password must contain at least 6 characters, with at least 1 uppercase letter, 1 lowercase letter and 1 number."
},
"options": {
Expand Down Expand Up @@ -1230,7 +1239,7 @@
"toolTip": "Use only letters and numbers",
"constraints": {
"required": true,
"regex": "^(?=.{3,24}$)[a-zA-Z](([a-z0-9A-Z]*|(?:\\-[^\\-][a-z0-9A-Z]*))*)$",
"regex": "^(?=.{3,24}$)[a-zA-Z](?!.*--)[a-zA-Z0-9-]*[a-zA-Z0-9]$",
"validationMessage": "[if(or(greater(length(steps('section_appGateway').appgwIngress.keyVaultName), 24), less(length(steps('section_appGateway').appgwIngress.keyVaultName), 3)),'Vault name must be between 3-24 alphanumeric characters. The name must begin with a letter, end with a letter or digit, and not contain consecutive hyphens.','Vault name must only contain alphanumeric characters and dashes and cannot start with a number')]"
},
"visible": "[equals(steps('section_appGateway').appgwIngress.certificateOption, 'haveKeyVault')]"
Expand Down Expand Up @@ -1403,7 +1412,7 @@
"type": "Microsoft.Common.TextBox",
"label": "DNS Zone Name",
"defaultValue": "",
"toolTip": "Use only letters and numbers and periods to separate Domains",
"toolTip": "Each label must only contain letters, numbers, underscores, and dashes. Use periods to separate Domains",
"constraints": {
"required": true,
"regex": "^([0-9a-zA-Z_-]{1,63}\\.){1,33}[0-9a-zA-Z_-]{1,63}$",
Expand Down Expand Up @@ -1586,8 +1595,8 @@
"defaultValue": "",
"constraints": {
"required": "[bool(steps('section_database').enableDB)]",
"regex": "^[a-z0-9A-Z/]{1,30}$",
"validationMessage": "The value must be 1-30 characters long and must only contain letters, numbers, and slashes (/)."
"regex": "^[a-zA-Z0-9./_-]{1,30}$",
"validationMessage": "The value must be 1-30 characters long and must only contain letters, numbers, hyphens (-), underscores (_), periods (.) and slashes (/)."
},
"visible": true
},
Expand All @@ -1612,7 +1621,7 @@
"defaultValue": "",
"constraints": {
"required": "[bool(steps('section_database').enableDB)]",
"regex": "^(?!\\-)([a-z0-9A-Z@\\-]{1,128})([^\\-])$",
"regex": "^(?=.{1,128}$)[a-zA-Z](?!.*--)(?!.*@@)(?!.*-@)(?!.*@-)[a-zA-Z0-9-@]*[a-zA-Z0-9]$",
"validationMessage": "The value must be 1-128 characters long and must only contain letters, numbers, hyphen(-) and the at sign, no hyphen allowed at the beginning and the end of database username."
},
"visible": true
Expand All @@ -1628,7 +1637,7 @@
"constraints": {
"required": "[bool(steps('section_database').enableDB)]",
"regex": "^((?=.*[0-9])(?=.*[a-zA-Z!@#$%^&*])).{5,128}$",
"validationMessage": "The password must be between five and 128 characters long and have at least one number."
"validationMessage": "The password must be between 5 and 128 characters long and have at least one number."
},
"options": {
"hideConfirmation": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ function appgw_ingress_svc_for_cluster() {
generate_appgw_cluster_config_file
kubectl apply -f ${clusterAppgwIngressYamlPath}
utility_validate_status "Create appgw ingress svc."
utility_waitfor_lb_svc_completed \
utility_waitfor_ingress_completed \
${clusterIngressName} \
${wlsDomainNS} \
${checkSVCStateMaxAttempt} \
Expand All @@ -502,7 +502,7 @@ function appgw_ingress_svc_for_cluster() {
if [[ "${enableCustomSSL,,}" != "true" ]]; then
kubectl apply -f ${clusterAppgwIngressHttpsYamlPath}
utility_validate_status "Create appgw ingress https svc."
utility_waitfor_lb_svc_completed \
utility_waitfor_ingress_completed \
${clusterIngressHttpsName} \
${wlsDomainNS} \
${checkSVCStateMaxAttempt} \
Expand Down
40 changes: 36 additions & 4 deletions weblogic-azure-aks/src/main/arm/scripts/createLbSvc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,14 @@ function create_lb_svc_for_admin_server_default_channel() {

adminServerEndpoint=$(kubectl get svc ${adminServerLBSVCName} -n ${wlsDomainNS} \
-o=jsonpath='{.status.loadBalancer.ingress[0].ip}:{.spec.ports[0].port}')
adminConsoleEndpoint="${adminServerEndpoint}/console"

if [ "${enableCustomDNSAlias,,}" == "true" ]; then
create_dns_A_record "${adminServerEndpoint%%:*}" ${dnsAdminLabel} ${dnsRGName} ${dnsZoneName}
adminConsoleEndpoint="${dnsAdminLabel}.${dnsZoneName}:${adminServerEndpoint#*:}/console"
adminServerEndpoint="${dnsAdminLabel}.${dnsZoneName}:${adminServerEndpoint#*:}"
fi

adminConsoleEndpoint="${adminServerEndpoint}/console"
adminRemoteEndpoint=${adminServerEndpoint}
}

function create_lb_svc_for_admin_t3_channel() {
Expand Down Expand Up @@ -234,7 +236,7 @@ function create_lb_svc_for_cluster_default_channel() {

if [ "${enableCustomDNSAlias,,}" == "true" ]; then
create_dns_A_record "${clusterEndpoint%%:*}" ${dnsClusterLabel} ${dnsRGName} ${dnsZoneName}
clusterEndpoint="${dnsClusterLabel}.${dnsZoneName}:${clusterEndpoint#*:}/"
clusterEndpoint="${dnsClusterLabel}.${dnsZoneName}:${clusterEndpoint#*:}"
fi
}

Expand Down Expand Up @@ -360,19 +362,48 @@ EOF
fi
}

function validate_admin_console_url() {
local podName=$(kubectl -n ${wlsDomainNS} get pod -l weblogic.serverName=${constAdminServerName} -o json |
jq '.items[0] | .metadata.name' |
tr -d "\"")

if [[ "${podName}" == "null" ]]; then
echo "Ensure your domain has at least one admin server."
exit 1
fi

adminTargetPort=$(kubectl get svc ${svcAdminServer} -n ${wlsDomainNS} -o json |
jq '.spec.ports[] | select(.name=="default") | .port')
local adminConsoleUrl="http://${svcAdminServer}.${wlsDomainNS}:${adminTargetPort}/console/"

kubectl exec -it ${podName} -n ${wlsDomainNS} -c ${wlsContainerName} \
-- bash -c 'curl --write-out "%{http_code}\n" --silent --output /dev/null "'${adminConsoleUrl}'" | grep "302"'

if [ $? == 1 ]; then
echo "admin console is not accessible."
# reset admin console endpoint
adminConsoleEndpoint="null"
fi
}

#Output value to deployment scripts
function output_result() {
echo ${adminConsoleEndpoint}
echo ${clusterEndpoint}
echo ${adminServerT3Endpoint}
echo ${clusterT3Endpoint}
echo ${adminRemoteEndpoint}

# check if the admin console is accessible, do not output it
validate_admin_console_url

result=$(jq -n -c \
--arg adminEndpoint $adminConsoleEndpoint \
--arg clusterEndpoint $clusterEndpoint \
--arg adminT3Endpoint $adminServerT3Endpoint \
--arg clusterT3Endpoint $clusterT3Endpoint \
'{adminConsoleEndpoint: $adminEndpoint, clusterEndpoint: $clusterEndpoint, adminServerT3Endpoint: $adminT3Endpoint, clusterT3Endpoint: $clusterT3Endpoint}')
--arg adminRemoteEndpoint ${adminRemoteEndpoint} \
'{adminConsoleEndpoint: $adminEndpoint, clusterEndpoint: $clusterEndpoint, adminServerT3Endpoint: $adminT3Endpoint, clusterT3Endpoint: $clusterT3Endpoint, adminRemoteEndpoint: $adminRemoteEndpoint}')
echo "result is: $result"
echo $result >$AZ_SCRIPTS_OUTPUT_PATH
}
Expand Down Expand Up @@ -461,6 +492,7 @@ wlsDomainUID=${11}
adminConsoleEndpoint="null"
adminServerName=${constAdminServerName} # define in common.sh
adminServerT3Endpoint="null"
adminRemoteEndpoint="null"
clusterEndpoint="null"
clusterName=${constClusterName}
clusterT3Endpoint="null"
Expand Down
8 changes: 8 additions & 0 deletions weblogic-azure-aks/src/main/arm/scripts/genImageModel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@ EOF
fileName="${urlWithoutQueryString##*/}"
echo $fileName
fileExtension="${fileName##*.}"
echo ${fileExtension}
# support .ear, .war, .jar files.
if [[ "${fileExtension,,}" != "ear" ]] &&
[[ "${fileExtension,,}" != "war" ]] &&
[[ "${fileExtension,,}" != "jar" ]]; then
continue
fi

curl -m ${curlMaxTime} -fL "$item" -o ${scriptDir}/model-images/wlsdeploy/applications/${fileName}
if [ $? -ne 0 ];then
echo "Failed to download $item"
Expand Down
Loading