oracle / weblogic-azure

This project offers support for running Oracle WebLogic Server in the Azure Virtual Machines and Azure Kubernetes Service (AKS)
Universal Permissive License v1.0
8 stars 19 forks source link

Update APIVersions in weblogic-azure #278

Closed backwind1233 closed 9 months ago

backwind1233 commented 9 months ago

CheckList

Context

These workflow failed because of out-dated apiversion.

Goal

Update weblogic-azure with latest apiVersions.

Tool

Use this command to get the latest non-preview apiVersion of specific ResourceType.

export NameSpace=<your_name_space>
export ResourceType=<your_resource_type>
az provider show --namespace ${NameSpace} --query "resourceTypes[?resourceType=='${ResourceType}'].apiVersions[:10]" \
| jq -r '.[][] | select(test("preview$"; "i") | not)' | head -n 1

Example Run below command ,it will output 2023-08-01

export NameSpace="Microsoft.ContainerService"
export ResourceType="managedClusters"
az provider show --namespace ${NameSpace} --query "resourceTypes[?resourceType=='${ResourceType}'].apiVersions[:10]" \
| jq -r '.[][] | select(test("preview$"; "i") | not)' | head -n 1
image

Updates in this PR

The new version updated in microsoft-pid.properties,pid.properties.

ResourceType Latest Version
Microsoft.Compute/virtualMachines 2023-07-01
Microsoft.Network/virtualNetworks 2023-06-01
Microsoft.Authorization/roleAssignments 2022-04-01
Microsoft.Network/publicIPAddresses 2023-06-01
Microsoft.Network/privateEndpoints 2023-06-01
Microsoft.Network/networkSecurityGroups 2023-06-01
Microsoft.Network/networkInterfaces 2023-06-01
Microsoft.KeyVault/vaults 2023-02-01
Microsoft.ManagedIdentity/userAssignedIdentities 2023-01-31
Microsoft.Resources/deploymentScripts 2020-10-01
Microsoft.Network/dnszones 2023-07-01-preview
Microsoft.Compute/availabilitySets 2023-07-01
Microsoft.Resources/deployments 2023-07-01
Microsoft.Storage/storageAccounts 2023-01-01

The new versions updated in weblogic-azure/weblogic-azure-aks/src/main/bicep/*.bicep

Old Versions New Versions
Microsoft.Authorization/roleAssignments@2022-04-01 Microsoft.Authorization/roleAssignments@2022-04-01
Microsoft.Authorization/roleDefinitions@2018-01-01-preview Microsoft.Authorization/roleDefinitions@2022-04-01
Microsoft.ContainerRegistry/registries@2021-09-01 Microsoft.ContainerRegistry/registries@2023-07-01
Microsoft.ContainerService/managedClusters@2022-09-01 Microsoft.ContainerService/managedClusters@2023-08-01
Microsoft.KeyVault/vaults/secrets@2021-10-01 Microsoft.KeyVault/vaults/secrets@2023-02-01
Microsoft.KeyVault/vaults@2021-10-01 Microsoft.KeyVault/vaults@2023-02-01
Microsoft.ManagedIdentity/userAssignedIdentities@2021-09-30-preview Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31
Microsoft.Network/applicationGateways@2022-01-01 Microsoft.Network/applicationGateways@2023-06-01
Microsoft.Network/dnszones@2018-05-01 Microsoft.Network/dnszones@2018-05-01
Microsoft.Network/networkSecurityGroups@2022-07-01 Microsoft.Network/networkSecurityGroups@2023-06-01
Microsoft.Network/publicIPAddresses@2022-01-01 Microsoft.Network/publicIPAddresses@2023-06-01
Microsoft.Network/virtualNetworks/subnets@2022-07-01 Microsoft.Network/virtualNetworks/subnets@2023-06-01
Microsoft.Network/virtualNetworks@2022-07-01 Microsoft.Network/virtualNetworks@2023-06-01
Microsoft.OperationalInsights/workspaces@2022-10-01 Microsoft.OperationalInsights/workspaces@2022-10-01
Microsoft.Resources/deploymentScripts@2020-10-01 Microsoft.Resources/deploymentScripts@2020-10-01
Microsoft.Resources/tags@2021-04-01 Microsoft.Resources/tags@2023-07-01
Microsoft.Storage/storageAccounts/fileServices/shares@2022-05-01 Microsoft.Storage/storageAccounts/fileServices/shares@2023-01-01
Microsoft.Storage/storageAccounts@2022-05-01 Microsoft.Storage/storageAccounts@2023-01-01

Test Results

Test the 4 workflows

Test Locally

Test AKS :: ✅

mvn -Pbicep -Passembly clean install -Ptemplate-validation-tests --file weblogic-azure/weblogic-azure-aks/pom.xml

# ---
# BUILD SUCCESS

Test admin :: ✅

cd weblogic-azure/weblogic-azure-vm/arm-oraclelinux-wls-admin
  pidType=oracle
  if [[ "${pidType}" == "oracle" ]];then
    echo "using oracle pid"
    mvn -Ptemplate-validation-tests clean install -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/upgrade_api_version
  else
    echo "using ms pid"
    mvn -Ptemplate-validation-tests clean install -Ddev -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/upgrade_api_version
  fi

# ---
# BUILD SUCCESS

cd weblogic-azure/weblogic-azure-vm/arm-oraclelinux-wls-admin
  pidType=non-oracle
  if [[ "${pidType}" == "oracle" ]];then
    echo "using oracle pid"
    mvn -Ptemplate-validation-tests clean install -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/upgrade_api_version
  else
    echo "using ms pid"
    mvn -Ptemplate-validation-tests clean install -Ddev -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/upgrade_api_version
  fi

# ---
# BUILD SUCCESS

Test cluster :: ✅

cd weblogic-azure/weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster
  pidType=oracle
  if [[ "${pidType}" == "oracle" ]];then
    echo "using oracle pid"
    mvn -Ptemplate-validation-tests clean install -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/upgrade_api_version
  else
    echo "using ms pid"
    mvn -Ptemplate-validation-tests clean install -Ddev -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/upgrade_api_version
  fi

# ---
# BUILD SUCCESS

cd weblogic-azure/weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster
  pidType=non-oracle
  if [[ "${pidType}" == "oracle" ]];then
    echo "using oracle pid"
    mvn -Ptemplate-validation-tests clean install -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/upgrade_api_version
  else
    echo "using ms pid"
    mvn -Ptemplate-validation-tests clean install -Ddev -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/upgrade_api_version
  fi

# ---
# BUILD SUCCESS

Test dynamic-cluster :: ✅

cd weblogic-azure/weblogic-azure-vm/arm-oraclelinux-wls-dynamic-cluster/arm-oraclelinux-wls-dynamic-cluster
  pidType=oracle
  echo ${pidType}
  if [[ "${pidType}" == "oracle" ]];then
    echo "using oracle pids"
    mvn -Ptemplate-validation-tests clean install -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/upgrade_api_version
  else
    echo "using ms pids"
    mvn -Ptemplate-validation-tests clean install -Ddev -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/upgrade_api_version
  fi

# ---
# BUILD SUCCESS

cd weblogic-azure/weblogic-azure-vm/arm-oraclelinux-wls-dynamic-cluster/arm-oraclelinux-wls-dynamic-cluster
  pidType=non-oracle
  echo ${pidType}
  if [[ "${pidType}" == "oracle" ]];then
    echo "using oracle pids"
    mvn -Ptemplate-validation-tests clean install -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/upgrade_api_version
  else
    echo "using ms pids"
    mvn -Ptemplate-validation-tests clean install -Ddev -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/upgrade_api_version
  fi
# ---
# BUILD SUCCESS

Online Workflow Test Results

AKS ✅ pass https://github.com/azure-javaee/weblogic-azure/actions/runs/6183533388
admin-pid-microsoft ✅ pass https://github.com/azure-javaee/weblogic-azure/actions/runs/6183569990
admin-pid-oracle ✅ pass https://github.com/azure-javaee/weblogic-azure/actions/runs/6183581518
cluster-pid-microsoft ✅ pass https://github.com/azure-javaee/weblogic-azure/actions/runs/6183617554
cluster-pid-oracle ✅ pass https://github.com/azure-javaee/weblogic-azure/actions/runs/6183621692
dynamic-pid-microsoft ✅ pass https://github.com/azure-javaee/weblogic-azure/actions/runs/6183627635
dynamic-pid-oracle ✅ pass https://github.com/azure-javaee/weblogic-azure/actions/runs/6183632052
backwind1233 commented 9 months ago

Link to https://github.com/oracle/weblogic-azure/pull/277

backwind1233 commented 9 months ago

Hello @edburns Please help review this PR

edburns commented 9 months ago

Hello @backwind1233 , excellent work. Can you please add an entry in the team FAQ after this one that answers the question How do I get the latest apiVersion value of a specific ResourceType? and whose answer is your text and the command following it?

edburns commented 9 months ago

Hello @backwind1233 I have copied this to a new guidance in the IBM side.

backwind1233 commented 9 months ago

Hello @edburns since I have update a lot versions, I still need some time to continue work on the checklist, so please don't publish current code to offer before I finish the offer preview test.

image