diff --git a/.github/workflows/ms.servicefabric.clusters.yml b/.github/workflows/ms.servicefabric.clusters.yml index 5c4866bb99..4c79ac4382 100644 --- a/.github/workflows/ms.servicefabric.clusters.yml +++ b/.github/workflows/ms.servicefabric.clusters.yml @@ -106,8 +106,7 @@ jobs: - name: 'Using test file [${{ matrix.moduleTestFilePaths }}]' uses: ./.github/actions/templates/validateModuleDeployment with: - templateFilePath: '${{ env.modulePath }}/deploy.bicep' - parameterFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}' + templateFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}' location: '${{ env.location }}' resourceGroupName: '${{ env.resourceGroupName }}' subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}' diff --git a/modules/Microsoft.ServiceFabric/clusters/.test/cert.parameters.json b/modules/Microsoft.ServiceFabric/clusters/.test/cert.parameters.json deleted file mode 100644 index 668b6d8d12..0000000000 --- a/modules/Microsoft.ServiceFabric/clusters/.test/cert.parameters.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-sfc-cert-001" - }, - "managementEndpoint": { - "value": "https://<>-az-sfc-cert-001.westeurope.cloudapp.azure.com:19080" - }, - "reliabilityLevel": { - "value": "None" - }, - "certificate": { - "value": { - "thumbprint": "0AC113D5E1D94C401DDEB0EE2B1B96CC130", // Mutual exclusive with the other cert specs - "x509StoreName": "My" - } - }, - "nodeTypes": { - "value": [ - { - "applicationPorts": { - "endPort": 30000, - "startPort": 20000 - }, - "clientConnectionEndpointPort": 19000, - "durabilityLevel": "Bronze", - "ephemeralPorts": { - "endPort": 65534, - "startPort": 49152 - }, - "httpGatewayEndpointPort": 19080, - "isPrimary": true, - "name": "Node01" - } - ] - } - } -} diff --git a/modules/Microsoft.ServiceFabric/clusters/.test/cert/deploy.test.bicep b/modules/Microsoft.ServiceFabric/clusters/.test/cert/deploy.test.bicep new file mode 100644 index 0000000000..b0ebd137ed --- /dev/null +++ b/modules/Microsoft.ServiceFabric/clusters/.test/cert/deploy.test.bicep @@ -0,0 +1,61 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for testing purposes.') +@maxLength(90) +param resourceGroupName string = 'ms.servicefabric.clusters-${serviceShort}-rg' + +@description('Optional. The location to deploy resources to.') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') +param serviceShort string = 'sfccer' + +// =========== // +// Deployments // +// =========== // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + managementEndpoint: 'https://<>${serviceShort}001.westeurope.cloudapp.azure.com:19080' + reliabilityLevel: 'None' + certificate: { + thumbprint: '0AC113D5E1D94C401DDEB0EE2B1B96CC130' + x509StoreName: 'My' + } + nodeTypes: [ + { + applicationPorts: { + endPort: 30000 + startPort: 20000 + } + clientConnectionEndpointPort: 19000 + durabilityLevel: 'Bronze' + ephemeralPorts: { + endPort: 65534 + startPort: 49152 + } + httpGatewayEndpointPort: 19080 + isPrimary: true + name: 'Node01' + } + ] + + } +} diff --git a/modules/Microsoft.ServiceFabric/clusters/.test/common/dependencies.bicep b/modules/Microsoft.ServiceFabric/clusters/.test/common/dependencies.bicep new file mode 100644 index 0000000000..31ddf58d79 --- /dev/null +++ b/modules/Microsoft.ServiceFabric/clusters/.test/common/dependencies.bicep @@ -0,0 +1,31 @@ +@description('Optional. The location to deploy to.') +param location string = resourceGroup().location + +@description('Required. The name of the Managed Identity to create.') +param managedIdentityName string + +@description('Required. The name of the storage account to create.') +param storageAccountName string + +resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = { + name: managedIdentityName + location: location +} + +resource storageAccount 'Microsoft.Storage/storageAccounts@2021-08-01' = { + name: storageAccountName + location: location + kind: 'StorageV2' + sku: { + name: 'Standard_LRS' + } + properties: { + allowBlobPublicAccess: false + } +} + +@description('The principal ID of the created Managed Identity.') +output managedIdentityPrincipalId string = managedIdentity.properties.principalId + +@description('The name of the created Storage Account.') +output storageAccountResourceName string = last(split(storageAccount.id, '/')) diff --git a/modules/Microsoft.ServiceFabric/clusters/.test/common/deploy.test.bicep b/modules/Microsoft.ServiceFabric/clusters/.test/common/deploy.test.bicep new file mode 100644 index 0000000000..916608e10a --- /dev/null +++ b/modules/Microsoft.ServiceFabric/clusters/.test/common/deploy.test.bicep @@ -0,0 +1,212 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for testing purposes.') +@maxLength(90) +param resourceGroupName string = 'ms.servicefabric.clusters-${serviceShort}-rg' + +@description('Optional. The location to deploy resources to.') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') +param serviceShort string = 'sfccom' + +// =========== // +// Deployments // +// =========== // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +module resourceGroupResources 'dependencies.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name, location)}-paramNested' + params: { + managedIdentityName: 'dep-<>-msi-${serviceShort}' + storageAccountName: 'dep<>azsa${serviceShort}01' + } +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + lock: 'CanNotDelete' + tags: { + resourceType: 'Service Fabric' + clusterName: '<>${serviceShort}001' + + } + addOnFeatures: [ + 'RepairManager' + 'DnsService' + 'BackupRestoreService' + 'ResourceMonitorService' + ] + maxUnusedVersionsToKeep: 2 + azureActiveDirectory: { + clientApplication: resourceGroupResources.outputs.managedIdentityPrincipalId + clusterApplication: 'cf33fea8-b30f-424f-ab73-c48d99e0b222' + tenantId: '<>' + } + certificateCommonNames: { + commonNames: [ + { + certificateCommonName: 'certcommon' + certificateIssuerThumbprint: '0AC113D5E1D94C401DDEB0EE2B1B96CC130' + } + ] + x509StoreName: '' + } + clientCertificateCommonNames: [ + { + certificateCommonName: 'clientcommoncert1' + certificateIssuerThumbprint: '0AC113D5E1D94C401DDEB0EE2B1B96CC130' + isAdmin: false + } + { + certificateCommonName: 'clientcommoncert2' + certificateIssuerThumbprint: '0AC113D5E1D94C401DDEB0EE2B1B96CC131' + isAdmin: false + } + ] + clientCertificateThumbprints: [ + { + certificateThumbprint: '0AC113D5E1D94C401DDEB0EE2B1B96CC130' + isAdmin: false + } + { + certificateThumbprint: '0AC113D5E1D94C401DDEB0EE2B1B96CC131' + 'isAdmin': false + } + ] + diagnosticsStorageAccountConfig: { + blobEndpoint: 'https://${resourceGroupResources.outputs.storageAccountResourceName}.blob.${environment().suffixes.storage}/' + protectedAccountKeyName: 'StorageAccountKey1' + queueEndpoint: 'https://${resourceGroupResources.outputs.storageAccountResourceName}.queue.${environment().suffixes.storage}/' + storageAccountName: resourceGroupResources.outputs.storageAccountResourceName + tableEndpoint: 'https://${resourceGroupResources.outputs.storageAccountResourceName}.table.${environment().suffixes.storage}/' + } + fabricSettings: [ + { + name: 'Security' + parameters: [ + { + name: 'ClusterProtectionLevel' + value: 'EncryptAndSign' + } + ] + } + { + name: 'UpgradeService' + parameters: [ + { + name: 'AppPollIntervalInSeconds' + value: '60' + } + ] + } + ] + managementEndpoint: 'https://<>${serviceShort}001.westeurope.cloudapp.azure.com:19080' + reliabilityLevel: 'Silver' + nodeTypes: [ + { + applicationPorts: { + endPort: 30000 + startPort: 20000 + } + clientConnectionEndpointPort: 19000 + durabilityLevel: 'Silver' + ephemeralPorts: { + endPort: 65534 + startPort: 49152 + } + httpGatewayEndpointPort: 19080 + isPrimary: true + name: 'Node01' + + isStateless: false + multipleAvailabilityZones: false + + placementProperties: {} + reverseProxyEndpointPort: '' + vmInstanceCount: 5 + } + { + applicationPorts: { + endPort: 30000 + startPort: 20000 + } + clientConnectionEndpointPort: 19000 + durabilityLevel: 'Bronze' + ephemeralPorts: { + endPort: 64000 + startPort: 49000 + httpGatewayEndpointPort: 19007 + isPrimary: true + name: 'Node02' + vmInstanceCount: 5 + } + } + ] + notifications: [ + { + isEnabled: true + notificationCategory: 'WaveProgress' + notificationLevel: 'Critical' + notificationTargets: [ + { + notificationChannel: 'EmailUser' + receivers: [ + 'SomeReceiver' + ] + } + ] + } + ] + upgradeDescription: { + forceRestart: false + upgradeReplicaSetCheckTimeout: '1.00:00:00' + healthCheckWaitDuration: '00:00:30' + healthCheckStableDuration: '00:01:00' + healthCheckRetryTimeout: '00:45:00' + upgradeTimeout: '02:00:00' + upgradeDomainTimeout: '02:00:00' + healthPolicy: { + maxPercentUnhealthyNodes: 0 + maxPercentUnhealthyApplications: 0 + } + deltaHealthPolicy: { + maxPercentDeltaUnhealthyNodes: 0 + maxPercentUpgradeDomainDeltaUnhealthyNodes: 0 + maxPercentDeltaUnhealthyApplications: 0 + } + + } + vmImage: 'Linux' + roleAssignments: [ + { + roleDefinitionIdOrName: 'Reader' + principalIds: [ + resourceGroupResources.outputs.managedIdentityPrincipalId + ] + } + ] + applicationTypes: [ + { + name: 'WordCount' // not idempotent + } + ] + } +} diff --git a/modules/Microsoft.ServiceFabric/clusters/.test/full.parameters.json b/modules/Microsoft.ServiceFabric/clusters/.test/full.parameters.json deleted file mode 100644 index 46c19ee885..0000000000 --- a/modules/Microsoft.ServiceFabric/clusters/.test/full.parameters.json +++ /dev/null @@ -1,208 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-sfc-full-001" - }, - "lock": { - "value": "CanNotDelete" - }, - "tags": { - "value": { - "resourceType": "Service Fabric", - "clusterName": "<>-az-sfc-full-001" - } - }, - "addOnFeatures": { - "value": [ - "RepairManager", - "DnsService", - "BackupRestoreService", - "ResourceMonitorService" - ] - }, - "maxUnusedVersionsToKeep": { - "value": 2 - }, - "azureActiveDirectory": { - "value": { - "clientApplication": "<>", - "clusterApplication": "cf33fea8-b30f-424f-ab73-c48d99e0b222", - "tenantId": "<>" - } - }, - "certificateCommonNames": { - "value": { - "commonNames": [ - { - "certificateCommonName": "certcommon", - "certificateIssuerThumbprint": "0AC113D5E1D94C401DDEB0EE2B1B96CC130" - } - ], - "x509StoreName": "" - } - }, - "clientCertificateCommonNames": { - "value": [ - { - "certificateCommonName": "clientcommoncert1", - "certificateIssuerThumbprint": "0AC113D5E1D94C401DDEB0EE2B1B96CC130", - "isAdmin": false - }, - { - "certificateCommonName": "clientcommoncert2", - "certificateIssuerThumbprint": "0AC113D5E1D94C401DDEB0EE2B1B96CC131", - "isAdmin": false - } - ] - }, - "clientCertificateThumbprints": { - "value": [ - { - "certificateThumbprint": "0AC113D5E1D94C401DDEB0EE2B1B96CC130", - "isAdmin": false - }, - { - "certificateThumbprint": "0AC113D5E1D94C401DDEB0EE2B1B96CC131", - "isAdmin": false - } - ] - }, - "diagnosticsStorageAccountConfig": { - "value": { - "blobEndpoint": "https://adp<>azsaweux001.blob.core.windows.net/", - "protectedAccountKeyName": "StorageAccountKey1", - "queueEndpoint": "https://adp<>azsaweux001.queue.core.windows.net/", - "storageAccountName": "adp<>azsaweux001", - "tableEndpoint": "https://adp<>azsaweux001.table.core.windows.net/" - } - }, - "fabricSettings": { - "value": [ - { - "name": "Security", - "parameters": [ - { - "name": "ClusterProtectionLevel", - "value": "EncryptAndSign" - } - ] - }, - { - "name": "UpgradeService", - "parameters": [ - { - "name": "AppPollIntervalInSeconds", - "value": "60" - } - ] - } - ] - }, - "managementEndpoint": { - "value": "https://<>-az-sfc-full-001.westeurope.cloudapp.azure.com:19080" - }, - "nodeTypes": { - "value": [ - { - "applicationPorts": { - "endPort": 30000, - "startPort": 20000 - }, - "capacities": {}, - "clientConnectionEndpointPort": 19000, - "durabilityLevel": "Silver", - "ephemeralPorts": { - "endPort": 65534, - "startPort": 49152 - }, - "httpGatewayEndpointPort": 19080, - "isPrimary": true, - "isStateless": false, - "multipleAvailabilityZones": false, - "name": "Node01", - "placementProperties": {}, - "reverseProxyEndpointPort": "", - "vmInstanceCount": 5 - }, - { - "applicationPorts": { - "endPort": 30000, - "startPort": 20000 - }, - "clientConnectionEndpointPort": 19000, - "durabilityLevel": "Bronze", - "ephemeralPorts": { - "endPort": 64000, - "startPort": 49000 - }, - "httpGatewayEndpointPort": 19007, - "isPrimary": true, - "name": "Node02", - "vmInstanceCount": 5 - } - ] - }, - "notifications": { - "value": [ - { - "isEnabled": true, - "notificationCategory": "WaveProgress", - "notificationLevel": "Critical", - "notificationTargets": [ - { - "notificationChannel": "EmailUser", - "receivers": [ - "SomeReceiver" - ] - } - ] - } - ] - }, - "upgradeDescription": { - "value": { - "forceRestart": false, - "upgradeReplicaSetCheckTimeout": "1.00:00:00", - "healthCheckWaitDuration": "00:00:30", - "healthCheckStableDuration": "00:01:00", - "healthCheckRetryTimeout": "00:45:00", - "upgradeTimeout": "02:00:00", - "upgradeDomainTimeout": "02:00:00", - "healthPolicy": { - "maxPercentUnhealthyNodes": 0, - "maxPercentUnhealthyApplications": 0 - }, - "deltaHealthPolicy": { - "maxPercentDeltaUnhealthyNodes": 0, - "maxPercentUpgradeDomainDeltaUnhealthyNodes": 0, - "maxPercentDeltaUnhealthyApplications": 0 - } - } - }, - "reliabilityLevel": { - "value": "Silver" - }, - "vmImage": { - "value": "Linux" - }, - "roleAssignments": { - "value": [ - { - "roleDefinitionIdOrName": "Reader", - "principalIds": [ - "<>" - ] - } - ] - }, - "applicationTypes": { - "value": [ - { - "name": "WordCount" // not idempotent - } - ] - } - } -} diff --git a/modules/Microsoft.ServiceFabric/clusters/.test/min.parameters.json b/modules/Microsoft.ServiceFabric/clusters/.test/min.parameters.json deleted file mode 100644 index b7673a725b..0000000000 --- a/modules/Microsoft.ServiceFabric/clusters/.test/min.parameters.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-sfc-min-001" - }, - "managementEndpoint": { - "value": "https://<>-az-sfc-min-001.westeurope.cloudapp.azure.com:19080" - }, - "reliabilityLevel": { - "value": "None" - }, - "nodeTypes": { - "value": [ - { - "applicationPorts": { - "endPort": 30000, - "startPort": 20000 - }, - "clientConnectionEndpointPort": 19000, - "durabilityLevel": "Bronze", - "ephemeralPorts": { - "endPort": 65534, - "startPort": 49152 - }, - "httpGatewayEndpointPort": 19080, - "isPrimary": true, - "name": "Node01" - } - ] - } - } -} diff --git a/modules/Microsoft.ServiceFabric/clusters/.test/min/deploy.test.bicep b/modules/Microsoft.ServiceFabric/clusters/.test/min/deploy.test.bicep new file mode 100644 index 0000000000..f2c97a2f38 --- /dev/null +++ b/modules/Microsoft.ServiceFabric/clusters/.test/min/deploy.test.bicep @@ -0,0 +1,57 @@ +targetScope = 'subscription' + +// ========== // +// Parameters // +// ========== // +@description('Optional. The name of the resource group to deploy for testing purposes.') +@maxLength(90) +param resourceGroupName string = 'ms.servicefabric.clusters-${serviceShort}-rg' + +@description('Optional. The location to deploy resources to.') +param location string = deployment().location + +@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.') +param serviceShort string = 'sfcmin' + +// =========== // +// Deployments // +// =========== // + +// General resources +// ================= +resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = { + name: resourceGroupName + location: location +} + +// ============== // +// Test Execution // +// ============== // + +module testDeployment '../../deploy.bicep' = { + scope: resourceGroup + name: '${uniqueString(deployment().name)}-test-${serviceShort}' + params: { + name: '<>${serviceShort}001' + managementEndpoint: 'https://<>${serviceShort}001.westeurope.cloudapp.azure.com:19080' + reliabilityLevel: 'None' + nodeTypes: [ + { + applicationPorts: { + endPort: 30000 + startPort: 20000 + } + clientConnectionEndpointPort: 19000 + durabilityLevel: 'Bronze' + ephemeralPorts: { + endPort: 65534 + startPort: 49152 + } + httpGatewayEndpointPort: 19080 + isPrimary: true + name: 'Node01' + } + ] + + } +} diff --git a/modules/Microsoft.ServiceFabric/clusters/deploy.bicep b/modules/Microsoft.ServiceFabric/clusters/deploy.bicep index 48773b0cf6..4d02835b42 100644 --- a/modules/Microsoft.ServiceFabric/clusters/deploy.bicep +++ b/modules/Microsoft.ServiceFabric/clusters/deploy.bicep @@ -63,8 +63,8 @@ param infrastructureServiceManager bool = false @description('Required. The http management endpoint of the cluster.') param managementEndpoint string -@description('Optional. The list of node types in the cluster.') -param nodeTypes array = [] +@description('Required. The list of node types in the cluster.') +param nodeTypes array @description('Optional. Indicates a list of notification channels for cluster events.') param notifications array = [] @@ -76,7 +76,7 @@ param notifications array = [] 'Platinum' 'Silver' ]) -@description('Optional. The reliability level sets the replica set size of system services. Learn about ReliabilityLevel (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). - None - Run the System services with a target replica set count of 1. This should only be used for test clusters. - Bronze - Run the System services with a target replica set count of 3. This should only be used for test clusters. - Silver - Run the System services with a target replica set count of 5. - Gold - Run the System services with a target replica set count of 7. - Platinum - Run the System services with a target replica set count of 9.') +@description('Required. The reliability level sets the replica set size of system services. Learn about ReliabilityLevel (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). - None - Run the System services with a target replica set count of 1. This should only be used for test clusters. - Bronze - Run the System services with a target replica set count of 3. This should only be used for test clusters. - Silver - Run the System services with a target replica set count of 5. - Gold - Run the System services with a target replica set count of 7. - Platinum - Run the System services with a target replica set count of 9.') param reliabilityLevel string @description('Optional. Describes the certificate details.') diff --git a/modules/Microsoft.ServiceFabric/clusters/readme.md b/modules/Microsoft.ServiceFabric/clusters/readme.md index 49326b0e0c..aa12cb360b 100644 --- a/modules/Microsoft.ServiceFabric/clusters/readme.md +++ b/modules/Microsoft.ServiceFabric/clusters/readme.md @@ -23,10 +23,12 @@ This module deploys a Service Fabric Cluster. **Required parameters** -| Parameter Name | Type | Description | -| :-- | :-- | :-- | -| `managementEndpoint` | string | The http management endpoint of the cluster. | -| `name` | string | Name of the Service Fabric cluster. | +| Parameter Name | Type | Allowed Values | Description | +| :-- | :-- | :-- | :-- | +| `managementEndpoint` | string | | The http management endpoint of the cluster. | +| `name` | string | | Name of the Service Fabric cluster. | +| `nodeTypes` | array | | The list of node types in the cluster. | +| `reliabilityLevel` | string | `[Bronze, Gold, None, Platinum, Silver]` | The reliability level sets the replica set size of system services. Learn about ReliabilityLevel (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). - None - Run the System services with a target replica set count of 1. This should only be used for test clusters. - Bronze - Run the System services with a target replica set count of 3. This should only be used for test clusters. - Silver - Run the System services with a target replica set count of 5. - Gold - Run the System services with a target replica set count of 7. - Platinum - Run the System services with a target replica set count of 9. | **Optional parameters** @@ -48,9 +50,7 @@ This module deploys a Service Fabric Cluster. | `location` | string | `[resourceGroup().location]` | | Location for all resources. | | `lock` | string | `''` | `['', CanNotDelete, ReadOnly]` | Specify the type of lock. | | `maxUnusedVersionsToKeep` | int | `3` | | Number of unused versions per application type to keep. | -| `nodeTypes` | array | `[]` | | The list of node types in the cluster. | | `notifications` | array | `[]` | | Indicates a list of notification channels for cluster events. | -| `reliabilityLevel` | string | | `[Bronze, Gold, None, Platinum, Silver]` | The reliability level sets the replica set size of system services. Learn about ReliabilityLevel (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). - None - Run the System services with a target replica set count of 1. This should only be used for test clusters. - Bronze - Run the System services with a target replica set count of 3. This should only be used for test clusters. - Silver - Run the System services with a target replica set count of 5. - Gold - Run the System services with a target replica set count of 7. - Platinum - Run the System services with a target replica set count of 9. | | `reverseProxyCertificate` | object | `{object}` | | Describes the certificate details. | | `reverseProxyCertificateCommonNames` | object | `{object}` | | Describes a list of server certificates referenced by common name that are used to secure the cluster. | | `roleAssignments` | array | `[]` | | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. | @@ -248,17 +248,11 @@ The following module usage examples are retrieved from the content of the files ```bicep module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-Clusters' + name: '${uniqueString(deployment().name)}-test-sfccer' params: { // Required parameters - managementEndpoint: 'https://<>-az-sfc-cert-001.westeurope.cloudapp.azure.com:19080' - name: '<>-az-sfc-cert-001' - reliabilityLevel: 'None' - // Non-required parameters - certificate: { - thumbprint: '0AC113D5E1D94C401DDEB0EE2B1B96CC130' - x509StoreName: 'My' - } + managementEndpoint: 'https://<>sfccer001.westeurope.cloudapp.azure.com:19080' + name: '<>sfccer001' nodeTypes: [ { applicationPorts: { @@ -276,6 +270,12 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { name: 'Node01' } ] + reliabilityLevel: 'None' + // Non-required parameters + certificate: { + thumbprint: '0AC113D5E1D94C401DDEB0EE2B1B96CC130' + x509StoreName: 'My' + } } } ``` @@ -294,20 +294,10 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { "parameters": { // Required parameters "managementEndpoint": { - "value": "https://<>-az-sfc-cert-001.westeurope.cloudapp.azure.com:19080" + "value": "https://<>sfccer001.westeurope.cloudapp.azure.com:19080" }, "name": { - "value": "<>-az-sfc-cert-001" - }, - "reliabilityLevel": { - "value": "None" - }, - // Non-required parameters - "certificate": { - "value": { - "thumbprint": "0AC113D5E1D94C401DDEB0EE2B1B96CC130", - "x509StoreName": "My" - } + "value": "<>sfccer001" }, "nodeTypes": { "value": [ @@ -327,6 +317,16 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { "name": "Node01" } ] + }, + "reliabilityLevel": { + "value": "None" + }, + // Non-required parameters + "certificate": { + "value": { + "thumbprint": "0AC113D5E1D94C401DDEB0EE2B1B96CC130", + "x509StoreName": "My" + } } } } @@ -335,7 +335,7 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = {

-

Example 2: Full

+

Example 2: Common

@@ -343,11 +343,49 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { ```bicep module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-Clusters' + name: '${uniqueString(deployment().name)}-test-sfccom' params: { // Required parameters - managementEndpoint: 'https://<>-az-sfc-full-001.westeurope.cloudapp.azure.com:19080' - name: '<>-az-sfc-full-001' + managementEndpoint: 'https://<>sfccom001.westeurope.cloudapp.azure.com:19080' + name: '<>sfccom001' + nodeTypes: [ + { + applicationPorts: { + endPort: 30000 + startPort: 20000 + } + clientConnectionEndpointPort: 19000 + durabilityLevel: 'Silver' + ephemeralPorts: { + endPort: 65534 + startPort: 49152 + } + httpGatewayEndpointPort: 19080 + isPrimary: true + isStateless: false + multipleAvailabilityZones: false + name: 'Node01' + placementProperties: {} + reverseProxyEndpointPort: '' + vmInstanceCount: 5 + } + { + applicationPorts: { + endPort: 30000 + startPort: 20000 + } + clientConnectionEndpointPort: 19000 + durabilityLevel: 'Bronze' + ephemeralPorts: { + endPort: 64000 + httpGatewayEndpointPort: 19007 + isPrimary: true + name: 'Node02' + startPort: 49000 + vmInstanceCount: 5 + } + } + ] reliabilityLevel: 'Silver' // Non-required parameters addOnFeatures: [ @@ -362,7 +400,7 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { } ] azureActiveDirectory: { - clientApplication: '<>' + clientApplication: '' clusterApplication: 'cf33fea8-b30f-424f-ab73-c48d99e0b222' tenantId: '<>' } @@ -398,11 +436,11 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { } ] diagnosticsStorageAccountConfig: { - blobEndpoint: 'https://adp<>azsaweux001.blob.core.windows.net/' + blobEndpoint: 'https://${resourceGroupResources.outputs.storageAccountResourceName}.blob.${environment().suffixes.storage}/' protectedAccountKeyName: 'StorageAccountKey1' - queueEndpoint: 'https://adp<>azsaweux001.queue.core.windows.net/' - storageAccountName: 'adp<>azsaweux001' - tableEndpoint: 'https://adp<>azsaweux001.table.core.windows.net/' + queueEndpoint: 'https://${resourceGroupResources.outputs.storageAccountResourceName}.queue.${environment().suffixes.storage}/' + storageAccountName: '' + tableEndpoint: 'https://${resourceGroupResources.outputs.storageAccountResourceName}.table.${environment().suffixes.storage}/' } fabricSettings: [ { @@ -426,45 +464,6 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { ] lock: 'CanNotDelete' maxUnusedVersionsToKeep: 2 - nodeTypes: [ - { - applicationPorts: { - endPort: 30000 - startPort: 20000 - } - capacities: {} - clientConnectionEndpointPort: 19000 - durabilityLevel: 'Silver' - ephemeralPorts: { - endPort: 65534 - startPort: 49152 - } - httpGatewayEndpointPort: 19080 - isPrimary: true - isStateless: false - multipleAvailabilityZones: false - name: 'Node01' - placementProperties: {} - reverseProxyEndpointPort: '' - vmInstanceCount: 5 - } - { - applicationPorts: { - endPort: 30000 - startPort: 20000 - } - clientConnectionEndpointPort: 19000 - durabilityLevel: 'Bronze' - ephemeralPorts: { - endPort: 64000 - startPort: 49000 - } - httpGatewayEndpointPort: 19007 - isPrimary: true - name: 'Node02' - vmInstanceCount: 5 - } - ] notifications: [ { isEnabled: true @@ -483,13 +482,13 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { roleAssignments: [ { principalIds: [ - '<>' + '' ] roleDefinitionIdOrName: 'Reader' } ] tags: { - clusterName: '<>-az-sfc-full-001' + clusterName: '<>sfccom001' resourceType: 'Service Fabric' } upgradeDescription: { @@ -507,7 +506,7 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { maxPercentUnhealthyNodes: 0 } upgradeDomainTimeout: '02:00:00' - upgradeReplicaSetCheckTimeout: '1.00:00:00' + upgradeReplicaSetCheckTimeout: '' upgradeTimeout: '02:00:00' } vmImage: 'Linux' @@ -529,10 +528,50 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { "parameters": { // Required parameters "managementEndpoint": { - "value": "https://<>-az-sfc-full-001.westeurope.cloudapp.azure.com:19080" + "value": "https://<>sfccom001.westeurope.cloudapp.azure.com:19080" }, "name": { - "value": "<>-az-sfc-full-001" + "value": "<>sfccom001" + }, + "nodeTypes": { + "value": [ + { + "applicationPorts": { + "endPort": 30000, + "startPort": 20000 + }, + "clientConnectionEndpointPort": 19000, + "durabilityLevel": "Silver", + "ephemeralPorts": { + "endPort": 65534, + "startPort": 49152 + }, + "httpGatewayEndpointPort": 19080, + "isPrimary": true, + "isStateless": false, + "multipleAvailabilityZones": false, + "name": "Node01", + "placementProperties": {}, + "reverseProxyEndpointPort": "", + "vmInstanceCount": 5 + }, + { + "applicationPorts": { + "endPort": 30000, + "startPort": 20000 + }, + "clientConnectionEndpointPort": 19000, + "durabilityLevel": "Bronze", + "ephemeralPorts": { + "endPort": 64000, + "httpGatewayEndpointPort": 19007, + "isPrimary": true, + "name": "Node02", + "startPort": 49000, + "vmInstanceCount": 5 + } + } + ] }, "reliabilityLevel": { "value": "Silver" @@ -555,7 +594,7 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { }, "azureActiveDirectory": { "value": { - "clientApplication": "<>", + "clientApplication": "", "clusterApplication": "cf33fea8-b30f-424f-ab73-c48d99e0b222", "tenantId": "<>" } @@ -599,11 +638,11 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { }, "diagnosticsStorageAccountConfig": { "value": { - "blobEndpoint": "https://adp<>azsaweux001.blob.core.windows.net/", + "blobEndpoint": "https://${resourceGroupResources.outputs.storageAccountResourceName}.blob.${environment().suffixes.storage}/", "protectedAccountKeyName": "StorageAccountKey1", - "queueEndpoint": "https://adp<>azsaweux001.queue.core.windows.net/", - "storageAccountName": "adp<>azsaweux001", - "tableEndpoint": "https://adp<>azsaweux001.table.core.windows.net/" + "queueEndpoint": "https://${resourceGroupResources.outputs.storageAccountResourceName}.queue.${environment().suffixes.storage}/", + "storageAccountName": "", + "tableEndpoint": "https://${resourceGroupResources.outputs.storageAccountResourceName}.table.${environment().suffixes.storage}/" } }, "fabricSettings": { @@ -634,47 +673,6 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { "maxUnusedVersionsToKeep": { "value": 2 }, - "nodeTypes": { - "value": [ - { - "applicationPorts": { - "endPort": 30000, - "startPort": 20000 - }, - "capacities": {}, - "clientConnectionEndpointPort": 19000, - "durabilityLevel": "Silver", - "ephemeralPorts": { - "endPort": 65534, - "startPort": 49152 - }, - "httpGatewayEndpointPort": 19080, - "isPrimary": true, - "isStateless": false, - "multipleAvailabilityZones": false, - "name": "Node01", - "placementProperties": {}, - "reverseProxyEndpointPort": "", - "vmInstanceCount": 5 - }, - { - "applicationPorts": { - "endPort": 30000, - "startPort": 20000 - }, - "clientConnectionEndpointPort": 19000, - "durabilityLevel": "Bronze", - "ephemeralPorts": { - "endPort": 64000, - "startPort": 49000 - }, - "httpGatewayEndpointPort": 19007, - "isPrimary": true, - "name": "Node02", - "vmInstanceCount": 5 - } - ] - }, "notifications": { "value": [ { @@ -696,7 +694,7 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { "value": [ { "principalIds": [ - "<>" + "" ], "roleDefinitionIdOrName": "Reader" } @@ -704,7 +702,7 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { }, "tags": { "value": { - "clusterName": "<>-az-sfc-full-001", + "clusterName": "<>sfccom001", "resourceType": "Service Fabric" } }, @@ -724,7 +722,7 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { "maxPercentUnhealthyNodes": 0 }, "upgradeDomainTimeout": "02:00:00", - "upgradeReplicaSetCheckTimeout": "1.00:00:00", + "upgradeReplicaSetCheckTimeout": "", "upgradeTimeout": "02:00:00" } }, @@ -746,13 +744,11 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { ```bicep module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-Clusters' + name: '${uniqueString(deployment().name)}-test-sfcmin' params: { // Required parameters - managementEndpoint: 'https://<>-az-sfc-min-001.westeurope.cloudapp.azure.com:19080' - name: '<>-az-sfc-min-001' - reliabilityLevel: 'None' - // Non-required parameters + managementEndpoint: 'https://<>sfcmin001.westeurope.cloudapp.azure.com:19080' + name: '<>sfcmin001' nodeTypes: [ { applicationPorts: { @@ -770,6 +766,7 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { name: 'Node01' } ] + reliabilityLevel: 'None' } } ``` @@ -788,15 +785,11 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { "parameters": { // Required parameters "managementEndpoint": { - "value": "https://<>-az-sfc-min-001.westeurope.cloudapp.azure.com:19080" + "value": "https://<>sfcmin001.westeurope.cloudapp.azure.com:19080" }, "name": { - "value": "<>-az-sfc-min-001" + "value": "<>sfcmin001" }, - "reliabilityLevel": { - "value": "None" - }, - // Non-required parameters "nodeTypes": { "value": [ { @@ -815,6 +808,9 @@ module clusters './Microsoft.ServiceFabric/clusters/deploy.bicep' = { "name": "Node01" } ] + }, + "reliabilityLevel": { + "value": "None" } } }