-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAssert-PetShopInProd.ps1
More file actions
24 lines (19 loc) · 1.33 KB
/
Assert-PetShopInProd.ps1
File metadata and controls
24 lines (19 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
###########################################################################################
# Production deployment of configuration to two servers
# DD-Web: IIS server which hosts Web App front end
# DD-SQL: SQL server which hosts SQL backend
#
# Two servers are already connected to Azure Automation so all that needs to be done is
# import the new configuration into Azure Automation then target nodes will pull during
# next DSC refresh
###########################################################################################
$outputFolder = "C:\DemoScripts\MOF\PetShop_Prod"
# Import the PetShop WebApp Configuration
Import-Module $PSScriptRoot\PetShopWebApp_Config.psm1
# Generate IL files
PetShopWebApp -OutputPath $outputFolder -ConfigurationData $PSScriptRoot\Prod_EnvConfig.psd1
# select subscription
Get-AzureRMSubscription -SubscriptionName "CI Automation Demo" | Select-AzureRMSubscription
# Deploy configurations to Azure Automation: Import Node Configurations
Import-AzureRmAutomationDscNodeConfiguration -Path "$outputFolder\SQL.mof" -ConfigurationName "PetShopWebApp" -ResourceGroupName 'petshopdemo' -AutomationAccountName 'petshop' -Force
Import-AzureRmAutomationDscNodeConfiguration -Path "$outputFolder\IIS.mof" -ConfigurationName "PetShopWebApp" -ResourceGroupName 'petshopdemo' -AutomationAccountName 'petshop' -Force