Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Modules] Added multiple vm deployment example #1369

Merged
merged 6 commits into from
May 8, 2022

Conversation

AlexanderSehr
Copy link
Contributor

@AlexanderSehr AlexanderSehr commented May 6, 2022

Description

  • Added a sample/construct to show how to deploy multiple VMs using our module in combination with a name generator
  • Tested both conditional vmNames and vmInitialNumber + vmNamePrefix + vmNumberOfInstances

vnamesportal

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update (Wiki)

Example output of deployment

DeploymentName          : vmNamesTest
ResourceGroupName       : validation-rg
ProvisioningState       : Succeeded
Timestamp               : 06.05.2022 20:03:21
Mode                    : Incremental
TemplateLink            : 
Parameters              : 
                          Name                                     Type                       Value
                          =======================================  =========================  ==========
                          vmNames                                  Array                      ["alsehr-vm-linux-min-01","alsehr-vm-linux-min-02","alsehr-vm-linux-min-03"]
                          vmNamePrefix                             String                     "alsehr"
                          vmInitialNumber                          Int                        111
                          vmNumberOfInstances                      Int                        3
                          vmComputerNamesTransformation            String                     "none"
                          vmSize                                   String                     "Standard_B12ms"
                          encryptionAtHost                         Bool                       true
                          securityType                             String                     ""
                          secureBootEnabled                        Bool                       false
                          vTpmEnabled                              Bool                       false
                          imageReference                           Object                     {"publisher":"Canonical","offer":"UbuntuServer","sku":"18.04-LTS","version":"latest"}
                          plan                                     Object                     {}
                          osDisk                                   Object                     {"diskSizeGB":"128","managedDisk":{"storageAccountType":"Premium_LRS"}}
                          dataDisks                                Array                      []
                          ultraSSDEnabled                          Bool                       false
                          adminUsername                            SecureString               null
                          adminPassword                            SecureString               null
                          customData                               String                     ""
                          certificatesToBeInstalled                Array                      []
                          vmPriority                               String                     "Regular"
                          enableEvictionPolicy                     Bool                       false
                          maxPriceForLowPriorityVm                 String                     ""
                          dedicatedHostId                          String                     ""
                          licenseType                              String                     ""
                          publicKeys                               Array                      [{"path":"/home/localAdminUser/.ssh/authorized_keys","keyData":"..."}]
                          systemAssignedIdentity                   Bool                       false
                          userAssignedIdentities                   Object                     {}
                          bootDiagnosticStorageAccountName         String                     ""
                          bootDiagnosticStorageAccountUri          String                     ".blob.core.windows.net/"
                          proximityPlacementGroupName              String                     ""
                          availabilitySetName                      String                     ""
                          availabilityZone                         Int                        0
                          nicConfigurations                        Array                      [{"nicSuffix":"-nic-01","ipConfigurations":[{"name":"ipconfig01","subnetId":"/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<<namePrefix>>-az-vnet-x-001/subnets/<<namePrefix>>-az-subnet-x-001","pipC 
                          onfiguration":{"publicIpNameSuffix":"-pip-01"}}]}]
                          pipDiagnosticSettingsName                String                     ""        
                          pipdiagnosticLogCategoriesToEnable       Array                      ["DDoSProtectionNotifications","DDoSMitigationFlowLogs","DDoSMitigationReports"]
                          pipdiagnosticMetricsToEnable             Array                      ["AllMetrics"]
                          nicDiagnosticSettingsName                String                     ""
                          nicdiagnosticMetricsToEnable             Array                      ["AllMetrics"]
                          backupVaultName                          String                     ""
                          backupVaultResourceGroup                 String                     "validation-rg"
                          backupPolicyName                         String                     "DefaultPolicy"
                          enableServerSideEncryption               Bool                       false
                          allowExtensionOperations                 Bool                       true
                          extensionDomainJoinPassword              SecureString               null
                          extensionDomainJoinConfig                Object                     {"enabled":false}
                          extensionAntiMalwareConfig               Object                     {"enabled":false}
                          extensionMonitoringAgentConfig           Object                     {"enabled":false}
                          monitoringWorkspaceId                    String                     ""
                          extensionDependencyAgentConfig           Object                     {"enabled":false}
                          extensionNetworkWatcherAgentConfig       Object                     {"enabled":false}
                          extensionDiskEncryptionConfig            Object                     {"enabled":false}
                          extensionDSCConfig                       Object                     {"enabled":false}
                          extensionCustomScriptConfig              Object                     {"enabled":false,"fileData":[]}
                          extensionCustomScriptProtectedSetting    SecureObject               null
                          location                                 String                     "westeurope"
                          diagnosticLogsRetentionInDays            Int                        365
                          diagnosticStorageAccountId               String                     ""
                          diagnosticWorkspaceId                    String                     ""
                          diagnosticEventHubAuthorizationRuleId    String                     ""
                          diagnosticEventHubName                   String                     ""
                          lock                                     String                     "NotSpecified"
                          roleAssignments                          Array                      []
                          tags                                     Object                     {}
                          enableDefaultTelemetry                   Bool                       true
                          baseTime                                 String                     "2022-05-06 20:01:58Z"
                          sasTokenValidityLength                   String                     "PT8H"
                          osType                                   String                     "Linux"
                          disablePasswordAuthentication            Bool                       true
                          provisionVMAgent                         Bool                       true
                          enableAutomaticUpdates                   Bool                       true
                          timeZone                                 String                     ""
                          additionalUnattendContent                Array                      []
                          winRM                                    Object                     {}
                          configurationProfileAssignments          Array                      []

Outputs                 : 
                          Name                            Type                       Value
                          ==============================  =========================  ==========
                          virtualMachinesResourceId       Array                      ["/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Com 
                          pute/virtualMachines/alsehr-vm-linux-min-01","/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Compute/virtualMac 
                          hines/alsehr-vm-linux-min-02","/subscriptions/<<subscriptionId>>/resourceGroups/validation-rg/providers/Microsoft.Compute/virtualMachines/alsehr-vm 
                          -linux-min-03"]
                          virtualMachinesResourceGroup    String                     "validation-rg"
                          virtualMachinesName             Array                      ["alsehr-vm-linux-min-01","alsehr-vm-linux-min-02","alsehr-vm-linux-min-03"]

DeploymentDebugLogLevel : 

@AlexanderSehr AlexanderSehr self-assigned this May 6, 2022
@AlexanderSehr AlexanderSehr linked an issue May 6, 2022 that may be closed by this pull request
@AlexanderSehr AlexanderSehr enabled auto-merge (squash) May 7, 2022 11:35
Copy link
Contributor

@eriqua eriqua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have costructs tested? What's your take on that?

@eriqua eriqua changed the title Added multiple vm deployment example [Modules] Added multiple vm deployment example May 8, 2022
…rs/linux.prefix.parameter.json

Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com>
Copy link
Contributor

@eriqua eriqua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆗

@AlexanderSehr AlexanderSehr merged commit d01e58f into main May 8, 2022
@AlexanderSehr AlexanderSehr deleted the users/alsehr/vmConstruct branch May 8, 2022 19:43
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add construct for multiple VM deployment
2 participants