How do I update application using Azure automation DSC?
When I change the configuration and upload and compile the configuration the status of the Vm node goes from Complaint
to Pending
status.
Then, I have to wait 30 min for the configuration to pickup the new config which then updates the application. I changed the package version too. Is there a way to force trigger the update?
Following is my code:
Configuration Deploy
{
Import-DscResource -ModuleName cWebPackageDeploy
Import-Dscresource -ModuleName PowerShellModule
node "localhost"
{
cWebPackageDeploy depwebpackage
{
Name = "website.zip"
StorageAccount = "testdeploy"
StorageKey = "xxxxxxxxxxxxxxxxxxxxxxx"
Ensure = "Present"
PackageVersion = "1.0"
DeployPath = "C:\Temp\Testdeploy"
DependsOn = "[PSModuleResource]Azure.Storage"
}
PSModuleResource Azure.Storage
{
Ensure = 'present'
Module_Name = 'Azure.Storage'
}
}
}
Deploy
There is no way of doing that using Azure Automation natively.
That being said you can always work around that by telling a vm to pull configuration with Update-DscConfiguration.
You can create a script that uploads the configuration, compiles it and forces a VM to pull from the pull server.