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

Configure Bicep Apiversions with properties file #279

Closed backwind1233 closed 9 months ago

backwind1233 commented 9 months ago

Context

Refer to https://github.com/oracle/weblogic-azure/pull/278

Changes and improvements.

  1. Update workflow to get artifactid versions. Thanks for the advice from @majguo.
    mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec
  2. Use azure-common.properties to place all apiversions, include bicep files.
    • Extract ApiVersions in microsoft-pid.properties and pid.properties.
  3. Code Refactor
    • Place all properties in root pom.xml.
    • Use file pattern instead of url pattern, check link.

Check the generated offer zip file

  1. Download the wls-on-aks-azure-marketplace-1.0.64-arm-assembly.
  2. Unzip the file.
  3. Check the mainTemplate.json to make sure it contains the right versions. ✅ image

Test Results

✅ Both workflow and local tests passed.

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/bicep_apiversion_with_properties
  else
    echo "using ms pid"
    mvn -Ptemplate-validation-tests clean install -Ddev -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/bicep_apiversion_with_properties
  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/bicep_apiversion_with_properties
  else
    echo "using ms pid"
    mvn -Ptemplate-validation-tests clean install -Ddev -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/bicep_apiversion_with_properties
  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/bicep_apiversion_with_properties
  else
    echo "using ms pid"
    mvn -Ptemplate-validation-tests clean install -Ddev -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/bicep_apiversion_with_properties
  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/bicep_apiversion_with_properties
  else
    echo "using ms pid"
    mvn -Ptemplate-validation-tests clean install -Ddev -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/bicep_apiversion_with_properties
  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/bicep_apiversion_with_properties
  else
    echo "using ms pids"
    mvn -Ptemplate-validation-tests clean install -Ddev -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/bicep_apiversion_with_properties
  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/bicep_apiversion_with_properties
  else
    echo "using ms pids"
    mvn -Ptemplate-validation-tests clean install -Ddev -Dgit.repo.owner=azure-javaee -Dgit.tag=refs/heads/bicep_apiversion_with_properties
  fi
# ---
# BUILD SUCCESS

Workflow test

Type Workflow Result
AKS https://github.com/azure-javaee/weblogic-azure/actions/runs/6244945897
admin-oracle https://github.com/azure-javaee/weblogic-azure/actions/runs/6244959219
admin-microsoft https://github.com/azure-javaee/weblogic-azure/actions/runs/6244955669
cluster-oracle https://github.com/azure-javaee/weblogic-azure/actions/runs/6244965523
cluster-microsoft https://github.com/azure-javaee/weblogic-azure/actions/runs/6244962211
dynamic-cluster-oracle https://github.com/azure-javaee/weblogic-azure/actions/runs/6244972123
dynamic-cluster-microsoft https://github.com/azure-javaee/weblogic-azure/actions/runs/6244969344
backwind1233 commented 9 months ago

Hello @edburns, please help review this PR.

backwind1233 commented 9 months ago

Updates

When test all the preview offers ,there are error in two Cluster offers.

Offers Test Result
WebLogic Server on AKS Deploy Success
Oracle WebLogic Server Cluster Failed
Oracle WebLogic Server Dynamic Cluster Failed
Oracle WebLogic Server with Admin Server Deploy Success
Oracle WebLogic Server Single Node Deploy Success

The error log is

image

Root Cause

The API Version replaceholders(eg: ${azure.apiVersionForPublicIPAddresses}) can be used in two in two scenarios Scenario1: one for the definition of resources Scenario2: the other for the reference of resources. This commit is meant to fix a bug caused by incorrect resource referencing(Scenario2).

backwind1233 commented 9 months ago

Update


All preview offer tests passed.

Offers Test Result
WebLogic Server on AKS Deploy Success
Oracle WebLogic Server Cluster Deploy Success
Oracle WebLogic Server Dynamic Cluster Deploy Success
Oracle WebLogic Server with Admin Server Deploy Success
Oracle WebLogic Server Single Node Deploy Success
edburns commented 9 months ago

I need to be able to see a successful deployment from these preview offers before I can approve this:

edburns commented 9 months ago

Ok, I have now seen a successful deployment of all the VM offers and the AKS offer. I am re-approving this PR.