Skip to content

Commit 3204889

Browse files
edburnsgaliacheng
andauthored
Edburns/em 6908 accommodate aks nodepool naming changes (#346)
* Update node pool name to 'nodepool1' and adjust related parameters in Bicep templates * Update version.wls-on-aks-azure-marketplace to 1.0.88 in pom.xml * Fix string comparison in build_docker_image function for AKS node pool name * fix utility.sh: line 109: [: 1: unary operator expected * fix utility.sh: line 109: [: 1: unary operator expected --------- Co-authored-by: haiche_microsoft <[email protected]>
1 parent 5daab69 commit 3204889

File tree

8 files changed

+19
-6
lines changed

8 files changed

+19
-6
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<properties>
4141
<!-- versions start -->
4242
<!-- weblogic azure aks versions -->
43-
<version.wls-on-aks-azure-marketplace>1.0.87</version.wls-on-aks-azure-marketplace>
43+
<version.wls-on-aks-azure-marketplace>1.0.88</version.wls-on-aks-azure-marketplace>
4444
<!-- weblogic azure vm versions -->
4545
<version.arm-oraclelinux-wls>1.0.31</version.arm-oraclelinux-wls>
4646
<version.arm-oraclelinux-wls-admin>1.0.56</version.arm-oraclelinux-wls-admin>

weblogic-azure-aks/src/main/arm/scripts/createVMAndBuildImage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ function build_docker_image() {
106106
# query AKS vm size
107107
# use the same VM size to create the Ubuntu machine, make sure the architecture is matched.
108108
local vmSize=$(az aks show --name ${AKS_CLUSTER_NAME} --resource-group ${AKS_CLUSTER_RESOURCEGROUP_NAME} \
109-
| jq '.agentPoolProfiles[] | select(.name=="agentpool") | .vmSize' \
109+
| jq '.agentPoolProfiles[] | select(.name=="'${AKS_NODE_POOL_NAME}'") | .vmSize' \
110110
| tr -d "\"")
111111

112112
# if vmSize is empty or null, exit

weblogic-azure-aks/src/main/arm/scripts/validateApplications.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ function validate_app() {
2020
export script="${BASH_SOURCE[0]}"
2121
export scriptDir="$(cd "$(dirname "${script}")" && pwd)"
2222

23+
source ${scriptDir}/common.sh
2324
source ${scriptDir}/utility.sh
2425

2526
install_kubectl
2627

2728
connect_aks $AKS_NAME $AKS_RESOURCE_GROUP_NAME
2829

29-
validate_app
30+
validate_app

weblogic-azure-aks/src/main/bicep/mainTemplate.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ param acrResourceGroupName string = 'acr-contoso-rg'
3333
@maxLength(12)
3434
@minLength(1)
3535
@description('The name for this node pool. Node pool must contain only lowercase letters and numbers. For Linux node pools the name cannot be longer than 12 characters.')
36-
param aksAgentPoolName string = 'agentpool'
36+
param aksAgentPoolName string = 'nodepool1'
3737
@maxValue(10000)
3838
@minValue(1)
3939
@description('Set the minimum node count for the cluster.')

weblogic-azure-aks/src/main/bicep/modules/_azure-resoruces/_aks.bicep

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ param agentAvailabilityZones array = []
1111
@maxLength(12)
1212
@minLength(1)
1313
@description('The name for this node pool. Node pool must contain only lowercase letters and numbers. For Linux node pools the name cannot be longer than 12 characters.')
14-
param aksAgentPoolName string = 'agentpool'
14+
param aksAgentPoolName string = 'nodepool1'
1515
@maxValue(10000)
1616
@minValue(1)
1717
@description('The number of nodes that should be created along with the cluster. You will be able to resize the cluster later.')

weblogic-azure-aks/src/main/bicep/modules/_deployment-scripts/_ds-create-wls-cluster.bicep

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ param _artifactsLocation string = deployment().properties.templateLink.uri
66
param _artifactsLocationSasToken string = ''
77
param _globalResourceNameSuffix string
88

9+
param aksAgentPoolName string = ''
910
param aksClusterRGName string = ''
1011
param aksClusterName string = ''
1112
param acrName string = ''
@@ -103,6 +104,14 @@ resource deploymentScript 'Microsoft.Resources/deploymentScripts@${azure.apiVers
103104
name: 'AKS_CLUSTER_NAME'
104105
value: aksClusterName
105106
}
107+
{
108+
name: 'AKS_NODE_POOL_NAME'
109+
value: aksAgentPoolName
110+
}
111+
{
112+
name: 'AKS_CLUSTER_LOCATION'
113+
value: location
114+
}
106115
{
107116
name: 'AKS_CLUSTER_RESOURCEGROUP_NAME'
108117
value: aksClusterRGName

weblogic-azure-aks/src/main/bicep/modules/_deployment-scripts/_ds-validate-applications.bicep

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ var const_pyCheckAppStatusScript = 'checkApplicationStatus.py'
2424
var const_scriptLocation = uri(_artifactsLocation, 'scripts/')
2525
var const_validateAppScript= 'validateApplications.sh'
2626
var const_utilityScript= 'utility.sh'
27+
var const_commonScript= 'common.sh'
2728

2829

2930
resource deploymentScript 'Microsoft.Resources/deploymentScripts@${azure.apiVersionForDeploymentScript}' = {
@@ -58,6 +59,7 @@ resource deploymentScript 'Microsoft.Resources/deploymentScripts@${azure.apiVers
5859
]
5960
primaryScriptUri: uri(const_scriptLocation, '${const_validateAppScript}${_artifactsLocationSasToken}')
6061
supportingScriptUris: [
62+
uri(const_scriptLocation, '${const_commonScript}${_artifactsLocationSasToken}')
6163
uri(const_scriptLocation, '${const_utilityScript}${_artifactsLocationSasToken}')
6264
uri(const_scriptLocation, '${const_pyCheckAppStatusScript}${_artifactsLocationSasToken}')
6365
]

weblogic-azure-aks/src/main/bicep/modules/setupWebLogicCluster.bicep

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ param aksAgentAvailabilityZones array = []
3434
@maxLength(12)
3535
@minLength(1)
3636
@description('The name for this node pool. Node pool must contain only lowercase letters and numbers. For Linux node pools the name cannot be longer than 12 characters.')
37-
param aksAgentPoolName string = 'agentpool'
37+
param aksAgentPoolName string = 'nodepool1'
3838
@maxValue(10000)
3939
@minValue(1)
4040
@description('Set the minimum node count for the cluster..')
@@ -202,6 +202,7 @@ module wlsDomainDeployment './_deployment-scripts/_ds-create-wls-cluster.bicep'
202202
_artifactsLocation: _artifactsLocation
203203
_artifactsLocationSasToken: _artifactsLocationSasToken
204204
_globalResourceNameSuffix: _globalResourceNameSuffix
205+
aksAgentPoolName: aksAgentPoolName
205206
aksClusterRGName: createAKSCluster ? resourceGroup().name : aksClusterRGName
206207
aksClusterName: aksClusterName
207208
acrName: useOracleImage ? acrName : userProvidedAcr

0 commit comments

Comments
 (0)