Edit

Share via


Upgrade a shared solution

In this tutorial, you upgrade a shared Factory Sensor Anomaly Detector (FSAD) solution and deploy a dependent Shared Sync Adapter (SSA) solution using workload orchestration and the Azure CLI.

The FSAD solution is deployed on a child target, while the SSA solution is deployed on a parent target. The FSAD solution uses the SSA solution to synchronize data between devices and servers. For more information about the FSAD and SSA solutions, see Quickstart: Create a solution with multiple shared adapter dependencies.

Prerequisites

Note

You can reuse the global variables defined in Prepare the basics to run workload orchestration and the resource variables defined in Set up the resources of workload orchestration.

Prepare the setup

  1. Before proceeding, ensure that the targets for the shared application (FSAD) and the dependent solution (SSA) are created. Additionally, create solution templates for both FSAD and SSA, ensuring all dependencies are properly configured.

    Important

    When configuring the SSA solution template, include only the solution template ID of FSAD as a dependency. Don't include the solution template version in the SSA configuration template.

    dependencies:
      - solutionTemplateId: <arm id FSAD solution template id>
        configsToBeInjected:
          - from: DependencyConfig
            to: DependencyConfigs
    
  2. Set the variables for the FSAD and SSA solution templates, their instances, and the target names. The target names should be unique for each solution template instance.

    fsad="<fsad name>"
    fsad_instance_name="<fsad instance name>"
    ssa="<ssa name>"
    t1="<target for fsad>"
    t2="<target for ssa>"
    rg="rg"
    
  3. Review the FSAD solution template using the az workload-orchestration target review command.

    az workload-orchestration target review --solution-template-version-id /subscriptions/$subId/resourceGroups/$rg/providers/Microsoft.Edge/solutionTemplates/$fsad/versions/1.0.0 --resource-group "$rg" --target-name "$t1" --solution-instance-name "$fsad_instance_name"
    
  4. Copy the ID from the output of the FSAD review command and add it to "solutionVersionId": "<solution version id>" in the dependencies.json file.

  5. Review the SSA solution template.

    az workload-orchestration target review --solution-template-version-id /subscriptions/$subId/resourceGroups/$rg/providers/Microsoft.Edge/solutionTemplates/$ssa/versions/1.0.0 --resource-group "$rg" --target-name "$t2" --solution-dependencies "@dependencies.json" 
    
  6. Publish and install the SSA solution instance.

    ssareviewId="<copy the reviewId from review output>"
    ssaVersion="<copy the name from review output>"
    
    az workload-orchestration target publish \
        --solution-version-id /subscriptions/$subId/resourceGroups/$rg/providers/private.edge/targets/$t2/solutions/$ssa/versions/$ssaVersion \
        --resource-group "$rg" \
        --target-name "$t2"
    
    
    az workload-orchestration target install \
        --solution-version-id /subscriptions/$subId/resourceGroups/$rg/providers/private.edge/targets/$t2/solutions/$ssa/versions/$ssaVersion \
        --resource-group "$rg" \
        --target-name "$t2"
    

Once installation succeeds, you see both SSA and FSAD solutions deployed on edge and FSAD solution has the configurations injected from SSA.

Upgrade the FSAD solution instance

  1. Create a new version of the FSAD solution template. For example, the new version can have new configurations or new helm chart version.

  2. Run the review command for FSAD instance with new solution template version.

    $new_version="<new version>"
    
    az workload-orchestration target review --solution-template-version-id /subscriptions/$subId/resourceGroups/$rg/providers/Microsoft.Edge/solutionTemplates/$fsad/versions/$new_version 
    --resource-group "$rg" --target-name "$t1" --solution-instance-name "$fsad_instance_name"
    
  3. Publish and install the FSAD solution instance.

    fsadreviewId="<copy the reviewId from review output>"
    fsadVersion="<copy the name from review output>"
    
    az workload-orchestration target publish \
            --solution-version-id /subscriptions/$subId/resourceGroups/$rg/providers/private.edge/targets/$t1/solutions/$fsad/versions/$fsadVersion \
            --resource-group "$rg" \
            --target-name "$t1"
    
    az workload-orchestration target install \
            --solution-version-id /subscriptions/$subId/resourceGroups/$rg/providers/private.edge/targets/$t1/solutions/$fsad/versions/$fsadVersion \
            --resource-group "$rg" \
            --target-name "$t1"
    

Once installation succeeds, the FSAD solution is upgraded with latest changes along with the SSA configurations.