Skip to main content

Framework Release Pipeline

The release pipeline will use the artifacts created from the build pipeline and publish this to the stage(s) you define. Each stage will deploy the resources to the Azure subscription and resource group you specify in the deployment tasks.

Variable Group

Create a variable group named {prefix}.Invictus.{stage} for all the stages (environments) and add at least one variable (eg: Invictus.Secrets.ApiKey1.Name = apikey1).

Make sure the Project Collection Build Service has Administrator access to these variable groups (Pipelines > Library > Security)

Library Security

YAML Pipeline

Next step is to add a YAML pipeline to release the Invictus for Azure Framework. Change the framework.release.yaml file according to your needs, for example change the needed environments and change the name of the build pipeline trigger:

resources:
pipelines:
# Name of the pipeline resource inside this workflow. Used to reference the pipeline resources later on (e.g. download artifacts).
- pipeline: _build
# Name of the build pipeline in Azure Pipelines
source: 'customer.azure.invictus.framework.build'
trigger: true

⚠️ Make sure to replace the azureSubscription value with the name of your serviceconnection as this value cannot be parameterized.

Also make sure to change the bicep template parameters according to your needs.

If you need to overwrite more bicep template parameters make sure to add this to the deployScriptParameters. A complete list of bicep template parameters can be found here.

Afterwards add the framework.release.yaml in your DevOps environment as a pipeline.

Deploy Script Arguments

The following script arguments are used in the deploy script:

  • Mandatory Arguments

    • artifactsPath: $(ArtifactsPath)
    • resourcePrefix: $(Infra.Environment.ShortName)-$(Infra.Environment.Region.Primary.ShortName)-$(Infra.Environment.Customer.ShortName)
    • resourceGroupName: name of the Azure Resource Group. Include the variable $(Infra.Environment.ShortName) to make this environment specific.
    • variableGroupName: The name of the variable group. Include the variable $(Infra.Environment.ShortName) to make this environment specific.
    • identityProviderClientSecret: Value can be obtained by following this guide: Container Authentication.
    • identityProviderApplicationId: Value can be obtained by following this guide: Container Authentication.
  • Optional Arguments

    • artifactsPathScripts: uses ArtifactsPath when not specified.
    • resourceGroupLocation: $(Infra.Environment.Region.Primary) or 'West Europe' when not specified.
    • additionalTemplateParameters: Additional named parameters for the Bicep template you wish to override. More on this below.

The AdditionalTemplateParameters argument are named arguments you can use to override the default values used by the ARM template. You simply name the argument as the parameter. For example if you want to use a different servicePlanSku you would add -eventHubSkuName "Standard" to the arguments of the powershell script.

Complete example of the arguments (note the use of -devOpsObjectId as an additional parameter):

PS> $(ArtifactsPath)/Deploy.ps1 `
-version ${{parameters.Version}} `
-location "West Europe" `
-useBeta ${{parameters.UseBeta}} `
-acrPath "invictusreleases.azurecr.io" `
-acrUsername $(Infra.Environment.ACRUsername) `
-acrPassword $(Infra.Environment.ACRPassword) `
-resourcePrefix $(Infra.Environment.ResourcePrefix) `
-artifactsPath $(Pipeline.Workspace)/_build/framework `
-resourceGroupName $(Infra.Environment.ResourceGroup) `
-variableGroupName invictus.$(Infra.Environment.ShortName) `
-devOpsObjectId "$(Infra.DevOps.Object.Id)" `
-identityProviderApplicationId "$(Infra.AzAD.Client.IdentityProviderApplicationId)" `
-identityProviderClientSecret "$(Infra.AzAD.Client.IdentityProviderClientSecret)" `
-containerAppsEnvironmentLocation "$(Infra.Environment.ContainerAppsEnvironmentLocation)"

Bicep Template Parameters

The below tables lists the parameters accepted by the Bicep template.

Top-level parameters

Resource-independent parameters that affect all resources in the deployed resource group.

ParameterRequiredDefaultDescription
resourcePrefixYesused as part of the default names for most resources.
devOpsObjectIdYesThe object-id associated with the service principal of the enterprise application that's connected to the service connection on DevOps
ParameterRequiredDefaultDescription
enabledVnetSupport (VNET)YesfalseUsed to toggle VNET functionality on or off
vnetResourceGroupName (VNET)Yes The name of the resource group on Azure where the VNET is located
vnetName (VNET)Yes The name of the VNET resource
privateEndpointSubnetName (VNET)YesThe name of the subnet to be used to connect the private endpoint resources
containerAppEnvironmentSubnetName (VNET)YesThe name of the subnet to be used to connect the container app environment
dnsZoneSubscriptionId (VNET)NoSubscription ID of scopeThe subscription ID of the private DNS zones.
dnsZoneResourceGroupName (VNET)NoVNET RG nameThe resource group name of where the private DNS zones are located.

Function App service parameters

Parameters related to the Azure Functions applications that are deployed.

ParameterRequiredDefaultDescription
timesequencerFunctionNameNoinvictus-{resourcePrefix}-timesequencerName for the time sequencer function
sequenceControllerFunctionNameNoinvictus-{resourcePrefix}-sequencecontrollerName for the Sequence Controller function
xmlJsonConverterFunctionNameNoinvictus-{resourcePrefix}-xmljsonconverterName for the XmlJson Converter function
xsdValidatorFunctionNameNoinvictus-{resourcePrefix}-xsdvalidatorName for the XSD Validator function
regexTranslatorFunctionNameNoinvictus-{resourcePrefix}-regextranslatorName for the Regex Translator function
transcoV2FunctionNameNoinvictus-{resourcePrefix}-transco-v2Name for the TranscoV2 function
pubsubV2FunctionNameNoinvictus-{resourcePrefix}-pubsub-v2Name for the PubSubV2 function
exceptionHandlerFunctionNameNoinvictus-{resourcePrefix}-exceptionhandlerName for the Exception Handler function
servicePlanNameNoinvictus-{resourcePrefix}-appplanName for the service plan which will host the APIs

Storage parameters

Parameters related to data that is stored during the component's interaction.

ParameterRequiredDefaultDescription
storageAccountNameNoinvictus{resourcePrefix}storeName for the Azure Storage resource. Any dashes (-) will be removed from {resourcePrefix}
blobContainerPrefixNoinvictusPrefix set for blob containers for pubsub
storageAccountTypeNoStandard_LRSThe Storage account StorageAccountSkuType
storageAccountSubnets (VNET)Yes[]An array of string. The values need to match the subnet names on the VNET
disableStorageAccountPublicNetworkAccess (VNET)NofalseIf true, the Invictus storage account will not be accessible from a public network.
storageAccountMinimumTLSVersion (VNET)NoTLS1_2Set the required TLS value for the storage account. Accepted values: TLS1_0, TLS1_1, TLS1_2

Messaging parameters

Parameters related to the messaging components, like PubSub.

ParameterRequiredDefaultDescription
serviceBusNamespaceNameNoinvictus-{resourcePrefix}-sbsName for the Service Bus Namespace resource
serviceBusSkuNameNoStandard or Premium if VNET enabled`Name for the Service Bus SKU
serviceBusMessageTimeToLiveMinutesNo-1Time messages should be stored on service bus before being archived
serviceBusSubnets (VNET)Yes[]An array of string. The values need to match the subnet names on the VNET

Secret parameters

Parameters related to the security and secret management of the deployed applications.

ParameterRequiredDefaultDescription
keyVaultNameNoinvictus-{resourcePrefix}-vltName for the Key Vault Service Namespace resource
keyVaultEnablePurgeProtectionNonullIf true, enables key vault purge protection. Once enabled, this property can never be disabled.
identityProviderClientSecretYesAAD App Registration client secret required for Azure Container Apps Identity Provider authentication
identityProviderApplicationIdYesAAD Application ID for MSI Authentication of Azure Container Apps
keyVaultSubnets (VNET)Yes[]An array of string. The values need to match the subnet names on the VNET

Observability parameters

Parameters related to telemetry tracking of the deployed applications.

ParameterRequiredDefaultDescription
appInsightsNameNoinvictus-{resourcePrefix}-appinsName for the Application Insights resource

Scaling parameters

Azure Container Apps allow for flexible scaling customization. In Invictus we have provided default scaling values which can be customized according to your scenario.

Container Apps have the ability to scale down to zero replicas. This is a great cost-saving option especially for components which are not used at all. A container app scaled to zero will automatically scale out when triggered, however this may take up to a few minutes to complete. This could prove to be an issue in scenarios with limited timeout e.g. logic apps with 120 seconds timeout. In such cases there is no option but to set a minimum replica count of 1.

ParameterRequired
timeSequencerScalingNo
exceptionHandlerScalingNo
pubSubV2ScalingNo
regexTranslatorScalingNo
sequenceControllerScalingNo
transcoV2ScalingNo
xmlJsonConverterScalingNo
xsdValidatorScalingNo

Each of the above parameters accepts an object:

{
scaleMinReplicas: int
scaleMaxReplicas: int
cpuResources: string
memoryResources: string
}
Parameter valueDescription
scaleMinReplicasThe lowest number of replicas the Container App will scale in to.
scaleMaxReplicasThe highest number of replicas the Container App will scale out to.
cpuResourcesThe amount of cpu resources to dedicate for the container resource. See here for allowed values.
memoryResourcesThe amount of memory resources to dedicate for the container resource. See here for allowed values.