Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
d6d0327
Add base bicep script for service fabric cluster and add nested cua b…
Oct 14, 2021
07c8b61
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Oct 18, 2021
54f758e
Update bicep file and add param file.
Oct 18, 2021
3919fdb
Update biceps and parameters file.
Oct 18, 2021
f697d12
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Oct 18, 2021
8c00c5e
Remove duplicate output section.
Oct 18, 2021
0353c38
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Oct 19, 2021
e969e09
Update deploy.bicep and params file and add the nested rbac file.
Oct 19, 2021
eb3edfb
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Oct 19, 2021
4c05558
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Oct 20, 2021
177fee8
Update bicep and param files.
Oct 20, 2021
bac6121
Remove unwanted files.
Oct 20, 2021
d89c07b
Update deploy and param file and add nested applicationServices and a…
Oct 20, 2021
ef81308
Add workflow and update README.md.
Oct 20, 2021
d301ebc
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Oct 22, 2021
5935f82
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Oct 22, 2021
935f4a3
Process review comments.
Oct 22, 2021
655a706
Merge branch 'Azure:main' into users/sogangul/bicep_serviceFabricClus…
kavishshivhare Oct 25, 2021
8569e7c
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Oct 26, 2021
90444de
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Oct 26, 2021
5134441
Update Service fabric bicep module with updated child modules.
Oct 26, 2021
1a7f7bb
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Oct 26, 2021
a6e0682
Update managementEndpoint param in line with cluster name.
Oct 26, 2021
7776b73
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Oct 27, 2021
6ef532f
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Nov 3, 2021
1acfcc9
Update to latest codebase from the source org's backup branch.
Nov 3, 2021
43be846
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Nov 3, 2021
dd41e61
Create nested module for service fabric prereqs and update deploy.bicep.
Nov 3, 2021
a251242
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Nov 5, 2021
6990443
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Nov 9, 2021
9b6b824
Update bicep module with prerequisites and post provisioning resources.
Nov 9, 2021
27e3096
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Nov 9, 2021
34d6abb
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Nov 16, 2021
4acb1c1
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Nov 24, 2021
d2e47f0
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Dec 1, 2021
4bc7716
Resolve PR comments.
Dec 1, 2021
99f7792
Undo change to formatOnSave VSCode setting.
Dec 1, 2021
cc83c47
Undo change to formatOnSave VS Code setting.
Dec 1, 2021
49ab43b
Undo change to formatOnSave VS Code setting.
Dec 1, 2021
0d88126
Update applications bicep.
Dec 1, 2021
91a6963
Update clusters' and application's deploy.bicep file. And comment out…
Dec 1, 2021
c328cfc
Updated (commented additional params) parameter file.
Dec 1, 2021
8bbd881
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Dec 1, 2021
c5bc4e0
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Dec 3, 2021
6ff35bf
Resolve PR comments.
Dec 3, 2021
8fe76f0
Add Readme files and update output names for cluster resource.
Dec 3, 2021
cc922c1
Add linter suggestions.
Dec 3, 2021
828da64
Add linter suggestions to deploy.bicep file.
Dec 3, 2021
c147f91
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Dec 6, 2021
31acfb2
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Dec 6, 2021
98ad47a
Resolve PR comments.
Dec 7, 2021
70a8a19
Merge branch 'main' of https://github.com/SomilGanguly/ResourceModule…
Dec 7, 2021
4f66d1a
Expanded further properties
AlexanderSehr Jan 10, 2022
b2f4618
Update to latest
AlexanderSehr Jan 10, 2022
a2ea050
Removed any trace of resource we currently cannot test
AlexanderSehr Jan 10, 2022
ea0ed90
Enabled upgrade desc
AlexanderSehr Jan 10, 2022
e9ea1f0
Enabled upgrade desc
AlexanderSehr Jan 10, 2022
67384eb
Update to latest
AlexanderSehr Jan 10, 2022
fd4b92e
Update to latest
AlexanderSehr Jan 10, 2022
98e0c37
Update to latest
AlexanderSehr Jan 10, 2022
66c409e
Added AAD
AlexanderSehr Jan 10, 2022
3182539
Added min file
AlexanderSehr Jan 10, 2022
77e9528
Update to latest
AlexanderSehr Jan 10, 2022
ec66706
Update to latest
AlexanderSehr Jan 10, 2022
c833ef4
Update to latest
AlexanderSehr Jan 10, 2022
eeef425
Update to latest
AlexanderSehr Jan 11, 2022
754aa5b
Updated param
AlexanderSehr Jan 11, 2022
df8e04e
Updated docs
AlexanderSehr Jan 11, 2022
007a6cb
Merge branch 'main' into users/alsehr/sfTest
AlexanderSehr Jan 11, 2022
9ce1199
Minor update
AlexanderSehr Jan 11, 2022
b8dd3a4
Merge branch 'main' into users/sogangul/bicep_serviceFabricClusters
AlexanderSehr Jan 11, 2022
789e9df
Merge branch 'users/sogangul/bicep_serviceFabricClusters' into users/…
AlexanderSehr Jan 11, 2022
d0f8317
Fixed endpoints
AlexanderSehr Jan 12, 2022
e25513f
Fixed tags
AlexanderSehr Jan 12, 2022
debe4a9
Removed dots
AlexanderSehr Jan 14, 2022
de13d29
Merge pull request #2 from SomilGanguly/users/alsehr/sfTest
SomilGanguly Jan 21, 2022
631b5f3
Updated to latest naming
AlexanderSehr Jan 25, 2022
751ee1a
Updated GH workflow to latest & added ADO pipeline
AlexanderSehr Jan 25, 2022
9927ed6
Minor update
AlexanderSehr Jan 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .azuredevops/modulePipelines/ms.servicefabric.clusters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: 'Service Fabric - Clusters'

parameters:
- name: removeDeployment
displayName: Remove deployed module
type: boolean
default: true
- name: versioningOption
displayName: The mode to handle the version increments [major|minor|patch]
type: string
default: patch
values:
- patch
- minor
- major
- name: customVersion
displayName: Custom version to apply. Used only if higher than latest
type: string
default: '0.0.1'

trigger:
batch: true
branches:
include:
- main
paths:
include:
- '/.azuredevops/modulePipelines/ms.servicefabric.clusters.yml'
- '/.azuredevops/pipelineTemplates/module.*.yml'
- '/Microsoft.ServiceFabric/clusters/*'
exclude:
- '/**/*.md'

variables:
- template: '/.azuredevops/pipelineVariables/global.variables.yml'
- group: 'PLATFORM_VARIABLES'
- name: modulePath
value: '/arm/Microsoft.ServiceFabric/clusters'

stages:
- stage: Validation
displayName: Pester tests
jobs:
- template: /.azuredevops/pipelineTemplates/module.jobs.validate.yml

- stage: Deployment
displayName: Deployment tests
jobs:
- template: /.azuredevops/pipelineTemplates/module.jobs.deploy.yml
parameters:
removeDeployment: '${{ parameters.removeDeployment }}'
deploymentBlocks:
- path: $(modulePath)/.parameters/min.parameters.json
- path: $(modulePath)/.parameters/parameters.json

- stage: Publishing
displayName: Publish module
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
jobs:
- template: /.azuredevops/pipelineTemplates/module.jobs.publish.yml
parameters:
versioningOption: '${{ parameters.versioningOption }}'
customVersion: '${{ parameters.customVersion }}'
147 changes: 147 additions & 0 deletions .github/workflows/ms.servicefabric.clusters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
name: 'Service Fabric: Clusters'

on:
workflow_dispatch:
inputs:
removeDeployment:
type: boolean
description: 'Remove deployed module'
required: false
default: 'true'
versioningOption:
type: choice
description: 'The mode to handle the version increments [major|minor|patch]'
required: false
default: 'patch'
options:
- major
- minor
- patch
customVersion:
description: 'Custom version to apply. Used only if higher than latest'
required: false
default: '0.0.1'
push:
branches:
- main
paths:
- '.github/actions/templates/**'
- '.github/workflows/ms.servicefabric.clusters.yml'
- 'arm/Microsoft.ServiceFabric/clusters/**'
- '!*/**/readme.md'
- 'utilities/pipelines/**'
- '!utilities/pipelines/dependencies/**'

env:
modulePath: 'arm/Microsoft.ServiceFabric/clusters'
workflowPath: '.github/workflows/ms.servicefabric.clusters.yml'
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
ARM_SUBSCRIPTION_ID: '${{ secrets.ARM_SUBSCRIPTION_ID }}'
ARM_MGMTGROUP_ID: '${{ secrets.ARM_MGMTGROUP_ID }}'
ARM_TENANT_ID: '${{ secrets.ARM_TENANT_ID }}'
DEPLOYMENT_SP_ID: '${{ secrets.DEPLOYMENT_SP_ID }}'

jobs:
############################
# SET INPUT PARAMETERS #
############################
job_set_workflow_param:
runs-on: ubuntu-20.04
name: 'Set input parameters to output variables'
steps:
- name: 'Checkout'
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'Set input parameters'
id: get-workflow-param
uses: ./.github/actions/templates/getWorkflowInput
with:
workflowPath: '${{ env.workflowPath}}'
outputs:
removeDeployment: ${{ steps.get-workflow-param.outputs.removeDeployment }}
versioningOption: ${{ steps.get-workflow-param.outputs.versioningOption }}
customVersion: ${{ steps.get-workflow-param.outputs.customVersion }}

####################
# Pester Tests #
####################
job_module_pester_validation:
runs-on: ubuntu-20.04
name: 'Pester tests'
steps:
- name: 'Checkout'
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'Run tests'
uses: ./.github/actions/templates/validateModulePester
with:
modulePath: '${{ env.modulePath }}'

####################
# Deployment tests #
####################
job_module_deploy_validation:
runs-on: ubuntu-20.04
name: 'Deployment tests'
needs:
- job_set_workflow_param
- job_module_pester_validation
strategy:
fail-fast: false
matrix:
parameterFilePaths: ['min.parameters.json', 'parameters.json']
steps:
- name: 'Checkout'
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set environment variables
uses: deep-mm/set-variables@v1.0
with:
variableFileName: 'global.variables'
- name: 'Using parameter file [${{ matrix.parameterFilePaths }}]'
uses: ./.github/actions/templates/validateModuleDeployment
with:
templateFilePath: '${{ env.modulePath }}/deploy.bicep'
parameterFilePath: '${{ env.modulePath }}/.parameters/${{ matrix.parameterFilePaths }}'
location: '${{ env.defaultLocation }}'
resourceGroupName: '${{ env.resourceGroupName }}'
subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}'
managementGroupId: '${{ secrets.ARM_MGMTGROUP_ID }}'
removeDeployment: '${{ needs.job_set_workflow_param.outputs.removeDeployment }}'

###############
# PUBLISH #
###############
job_publish_module:
name: 'Publish module'
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
runs-on: ubuntu-20.04
needs:
- job_set_workflow_param
- job_module_deploy_validation
steps:
- name: 'Checkout'
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set environment variables
uses: deep-mm/set-variables@v1.0
with:
variableFileName: 'global.variables'
- name: 'Publish module'
uses: ./.github/actions/templates/publishModule
with:
templateFilePath: '${{ env.modulePath }}/deploy.bicep'
versioningOption: '${{ needs.job_set_workflow_param.outputs.versioningOption }}'
customVersion: '${{ needs.job_set_workflow_param.outputs.customVersion }}'
templateSpecsRGName: '${{ env.templateSpecsRGName }}'
templateSpecsRGLocation: '${{ env.templateSpecsRGLocation }}'
templateSpecsDescription: '${{ env.templateSpecsDescription }}'
templateSpecsDoPublish: '${{ env.templateSpecsDoPublish }}'
bicepRegistryName: '${{ env.bicepRegistryName }}'
bicepRegistryRGName: '${{ env.bicepRegistryRGName }}'
bicepRegistryRgLocation: '${{ env.bicepRegistryRgLocation }}'
bicepRegistryDoPublish: '${{ env.bicepRegistryDoPublish }}'
Empty file.
32 changes: 32 additions & 0 deletions arm/Microsoft.ServiceFabric/clusters/.bicep/nested_rbac.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
param principalIds array
param roleDefinitionIdOrName string
param resourceId string

var builtInRoleNames = {
'Owner': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '8e3af657-a8ff-443c-a75c-2fe8c4bcb635')
'Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
'Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')
'Log Analytics Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '92aaf0da-9dab-42b6-94a3-d43ce8d16293')
'Log Analytics Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '73c42c96-874c-492b-b04d-ab87d138a893')
'Managed Application Contributor Role': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '641177b8-a67a-45b9-a033-47bc880bb21e')
'Managed Application Operator Role': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'c7393b34-138c-406f-901b-d8cf2b17e6ae')
'Managed Applications Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b9331d33-8a36-4f8c-b097-4f54124fdb44')
'Monitoring Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '749f88d5-cbae-40b8-bcfc-e573ddc772fa')
'Monitoring Metrics Publisher': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3913510d-42f4-4e42-8a64-420c390055eb')
'Monitoring Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '43d0d8ad-25c7-4714-9337-8ba259a9fe05')
'Resource Policy Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '36243c78-bf99-498c-9df9-86d9f8d28608')
'User Access Administrator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '18d7d88d-d35e-4fb5-a5c3-7773c20a72d9')
}

resource serviceFabricCluster 'Microsoft.ServiceFabric/clusters@2021-06-01' existing = {
name: last(split(resourceId, '/'))
}

resource roleAssignment 'Microsoft.Authorization/roleAssignments@2020-04-01-preview' = [for principalId in principalIds: {
name: guid(serviceFabricCluster.name, principalId, roleDefinitionIdOrName)
properties: {
roleDefinitionId: contains(builtInRoleNames, roleDefinitionIdOrName) ? builtInRoleNames[roleDefinitionIdOrName] : roleDefinitionIdOrName
principalId: principalId
}
scope: serviceFabricCluster
}]
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"value": "sxx-az-sfc-cert-001"
},
"managementEndpoint": {
"value": "https://sxx-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"
}
]
}
}
}
Loading